Skip to content
v2.277.0

StackNamesProperty Struct ​

Specifies the stack names for the StackFilters property type to include or exclude specific stacks from Hook invocations.

For more information, see CloudFormation Hooks stack level filters .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudformation as cloudformation } from 'aws-cdk-lib';
const stackNamesProperty: cloudformation.CfnLambdaHook.StackNamesProperty = {
  exclude: ['exclude'],
  include: ['include'],
};
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_cloudformation as cloudformation

stack_names_property = cloudformation.CfnLambdaHook.StackNamesProperty(
    exclude=["exclude"],
    include=["include"]
)
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.cloudformation.*;

StackNamesProperty stackNamesProperty = StackNamesProperty.builder()
        .exclude(List.of("exclude"))
        .include(List.of("include"))
        .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.CloudFormation;

var stackNamesProperty = new StackNamesProperty {
    Exclude = new [] { "exclude" },
    Include = new [] { "include" }
};
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"

stackNamesProperty := &StackNamesProperty{
	Exclude: []*string{
		jsii.String("exclude"),
	},
	Include: []*string{
		jsii.String("include"),
	},
}

Properties ​

excludeoptionalstring[]excludeoptionaltyping.List[str]excludeoptionalList<String>Excludeoptionalstring[]Excludeoptional*[]*string#
The stack names to exclude.

All stacks except those listed here will invoke the Hook.

includeoptionalstring[]includeoptionaltyping.List[str]includeoptionalList<String>Includeoptionalstring[]Includeoptional*[]*string#
The stack names to include.

Only the stacks specified in this list will invoke the Hook.