# CfnViewProps

Properties for defining a `CfnView`.

Used as props by: [CfnView](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_resourceexplorer2.CfnView.html)

- Source: Generated at build time
- Type last changed: v2.110.0 · 17 Nov 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_resourceexplorer2 as resourceexplorer2 } from 'aws-cdk-lib';
const cfnViewProps: resourceexplorer2.CfnViewProps = {
  viewName: 'viewName',

  // the properties below are optional
  filters: {
    filterString: 'filterString',
  },
  includedProperties: [{
    name: 'name',
  }],
  scope: 'scope',
  tags: {
    tagsKey: 'tags',
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_resourceexplorer2 as resourceexplorer2

cfn_view_props = resourceexplorer2.CfnViewProps(
    view_name="viewName",

    # the properties below are optional
    filters=resourceexplorer2.CfnView.FiltersProperty(
        filter_string="filterString"
    ),
    included_properties=[resourceexplorer2.CfnView.IncludedPropertyProperty(
        name="name"
    )],
    scope="scope",
    tags={
        "tags_key": "tags"
    }
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.resourceexplorer2.*;

CfnViewProps cfnViewProps = CfnViewProps.builder()
        .viewName("viewName")

        // the properties below are optional
        .filters(FiltersProperty.builder()
                .filterString("filterString")
                .build())
        .includedProperties(List.of(IncludedPropertyProperty.builder()
                .name("name")
                .build()))
        .scope("scope")
        .tags(Map.of(
                "tagsKey", "tags"))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ResourceExplorer2;

var cfnViewProps = new CfnViewProps {
    ViewName = "viewName",

    // the properties below are optional
    Filters = new FiltersProperty {
        FilterString = "filterString"
    },
    IncludedProperties = new [] { new IncludedPropertyProperty {
        Name = "name"
    } },
    Scope = "scope",
    Tags = new Dictionary<string, string> {
        { "tagsKey", "tags" }
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnViewProps := &CfnViewProps{
	ViewName: jsii.String("viewName"),

	// the properties below are optional
	Filters: &FiltersProperty{
		FilterString: jsii.String("filterString"),
	},
	IncludedProperties: []interface{}{
		&IncludedPropertyProperty{
			Name: jsii.String("name"),
		},
	},
	Scope: jsii.String("scope"),
	Tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
}
```

## Properties

- `filters`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnView.FiltersProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_resourceexplorer2.CfnView.FiltersProperty.html) — An array of strings that include search keywords, prefixes, and operators that filter the results that are returned for queries made using this view.

  When you use this view in a [Search](https://docs.aws.amazon.com/resource-explorer/latest/apireference/API_Search.html) operation, the filter string is combined with the search's `QueryString` parameter using a logical `AND` operator.

  For information about the supported syntax, see [Search query reference for Resource Explorer](https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html) in the *AWS Resource Explorer User Guide* .

  > This query string in the context of this operation supports only [filter prefixes](https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html#query-syntax-filters) with optional [operators](https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html#query-syntax-operators) . It doesn't support free-form text. For example, the string `region:us* service:ec2 -tag:stage=prod` includes all Amazon EC2 resources in any AWS Region that begin with the letters `us` and are *not* tagged with a key `Stage` that has the value `prod` .

- `includedProperties`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnView.IncludedPropertyProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_resourceexplorer2.CfnView.IncludedPropertyProperty.html)[] — A list of fields that provide additional information about the view.

- `scope`: string — The root ARN of the account, an organizational unit (OU), or an organization ARN.

  If left empty, the default is account.

- `tags`: { [key: string]: string } — Tag key and value pairs that are attached to the view.

- `viewName`: string (required) — The name of the new view.
