StackRolesProperty Struct
Specifies the stack roles for the StackFilters property type to include or exclude specific stacks from Hook invocations based on their associated IAM roles.
For more information, see CloudFormation Hooks stack level filters .
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const stackRolesProperty: cdk.CfnGuardHook.StackRolesProperty = {
exclude: ['exclude'],
include: ['include'],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
stack_roles_property = cdk.CfnGuardHook.StackRolesProperty(
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.*;
StackRolesProperty stackRolesProperty = StackRolesProperty.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;
var stackRolesProperty = new StackRolesProperty {
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 cdk "github.com/aws/aws-cdk-go/awscdk"
stackRolesProperty := &StackRolesProperty{
Exclude: []*string{
jsii.String("exclude"),
},
Include: []*string{
jsii.String("include"),
},
}
Properties
excludeoptionalstring[]excludeoptionaltyping.List[str]excludeoptionalList<String>Excludeoptionalstring[]Excludeoptional*[]*string #The IAM role ARNs for stacks you want to exclude.
The Hook will be invoked on all stacks except those initiated by the specified roles.
includeoptionalstring[]includeoptionaltyping.List[str]includeoptionalList<String>Includeoptionalstring[]Includeoptional*[]*string #The IAM role ARNs to target stacks associated with these roles.
Only stack operations initiated by these roles will invoke the Hook.