Skip to content
v2.278.0

CfnStoredQueryProps Struct ​

Properties for defining a CfnStoredQuery.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_config as config } from 'aws-cdk-lib';
const cfnStoredQueryProps: config.CfnStoredQueryProps = {
  queryExpression: 'queryExpression',
  queryName: 'queryName',

  // the properties below are optional
  queryDescription: 'queryDescription',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_config as config

cfn_stored_query_props = config.CfnStoredQueryProps(
    query_expression="queryExpression",
    query_name="queryName",

    # the properties below are optional
    query_description="queryDescription",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
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.config.*;

CfnStoredQueryProps cfnStoredQueryProps = CfnStoredQueryProps.builder()
        .queryExpression("queryExpression")
        .queryName("queryName")

        // the properties below are optional
        .queryDescription("queryDescription")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
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.Config;

var cfnStoredQueryProps = new CfnStoredQueryProps {
    QueryExpression = "queryExpression",
    QueryName = "queryName",

    // the properties below are optional
    QueryDescription = "queryDescription",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
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"

cfnStoredQueryProps := &CfnStoredQueryProps{
	QueryExpression: jsii.String("queryExpression"),
	QueryName: jsii.String("queryName"),

	// the properties below are optional
	QueryDescription: jsii.String("queryDescription"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

queryDescriptionoptionalstringquery_descriptionoptionalstrqueryDescriptionoptionalStringQueryDescriptionoptionalstringQueryDescriptionoptional*string #
A unique description for the query.
queryExpressionstringquery_expressionstrqueryExpressionStringQueryExpressionstringQueryExpression*string required #
The expression of the query.

For example, SELECT resourceId, resourceType, supplementaryConfiguration.BucketVersioningConfiguration.status WHERE resourceType = 'AWS::S3::Bucket' AND supplementaryConfiguration.BucketVersioningConfiguration.status = 'Off'.

queryNamestringquery_namestrqueryNameStringQueryNamestringQueryName*string required #
The name of the query.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs to apply to this resource.