Skip to content
v2.278.0

CfnResourceMetadataContextOptions Struct Added in v2.278.0 ​

Options for CfnResourceMetadataContext.of().

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';

declare const constructSelector: cdk.IConstructSelector;
const cfnResourceMetadataContextOptions: cdk.CfnResourceMetadataContextOptions = {
  selector: constructSelector,
};
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

# construct_selector: cdk.IConstructSelector

cfn_resource_metadata_context_options = cdk.CfnResourceMetadataContextOptions(
    selector=construct_selector
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;

IConstructSelector constructSelector;

CfnResourceMetadataContextOptions cfnResourceMetadataContextOptions = CfnResourceMetadataContextOptions.builder()
        .selector(constructSelector)
        .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;

IConstructSelector constructSelector;

var cfnResourceMetadataContextOptions = new CfnResourceMetadataContextOptions {
    Selector = constructSelector
};
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"

var constructSelector IConstructSelector

cfnResourceMetadataContextOptions := &CfnResourceMetadataContextOptions{
	Selector: constructSelector,
}

Properties ​

selectoroptionalIConstructSelectorselectoroptionalIConstructSelectorselectoroptionalIConstructSelectorSelectoroptionalIConstructSelectorSelectoroptionalIConstructSelector = ConstructSelector.cfnResource() #
Selects the constructs targeted by `set()` or `clear()`.

Selection runs during synthesis and only selected CfnResource constructs are updated. Synthesis fails when no CfnResource is selected. The default selects a CfnResource scope or its immediate CfnResource default child.