interface CfnJsonProps
Language | Type name |
---|---|
![]() | Amazon.CDK.CfnJsonProps |
![]() | software.amazon.awscdk.core.CfnJsonProps |
![]() | aws_cdk.core.CfnJsonProps |
![]() | @aws-cdk/core » 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.