interface CfnJsonProps
Language | Type name |
---|---|
.NET | Amazon.CDK.CfnJsonProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2#CfnJsonProps |
Java | software.amazon.awscdk.CfnJsonProps |
Python | aws_cdk.CfnJsonProps |
TypeScript (source) | aws-cdk-lib » CfnJsonProps |
Example
const tagParam = new CfnParameter(this, 'TagName');
const stringEquals = new CfnJson(this, 'ConditionJson', {
value: {
[`aws:PrincipalTag/${tagParam.valueAsString}`]: true,
},
});
const principal = new iam.AccountRootPrincipal().withConditions({
StringEquals: stringEquals,
});
new iam.Role(this, 'MyRole', { assumedBy: principal });
Properties
Name | Type | Description |
---|---|---|
value | any | The value to resolve. |
value
Type:
any
The value to resolve.
Can be any JavaScript object, including tokens and references in keys or values.