CfnJsonProps

class aws_cdk.core.CfnJsonProps(*, value)

Bases: object

Parameters

value (Any) – The value to resolve. Can be any JavaScript object, including tokens and references in keys or values.

ExampleMetadata

infused

Example:

tag_param = CfnParameter(self, "TagName")

string_equals = CfnJson(self, "ConditionJson",
    value={
        f"aws:PrincipalTag/{tagParam.valueAsString}": True
    }
)

principal = iam.AccountRootPrincipal().with_conditions({
    "StringEquals": string_equals
})

iam.Role(self, "MyRole", assumed_by=principal)

Attributes

value

The value to resolve.

Can be any JavaScript object, including tokens and references in keys or values.

Return type

Any