ResourceEnvironment
- class aws_cdk.ResourceEnvironment(*, account, region)
Bases:
objectRepresents the environment a given resource lives in.
Used as the return value for the
IEnvironmentAware.envproperty.- Parameters:
account (
str) – The AWS Account ID that this resource belongs to. Since this can be a Token (for example, when the account is CloudFormation’sAWS::AccountIdintrinsic), make sure to useToken.compareStrings()instead of comparing the values with direct string equality.region (
str) – The AWS Region that this resource belongs to. Since this can be a Token (for example, when the region is CloudFormation’sAWS::Regionintrinsic), make sure to useToken.compareStrings()instead of comparing the values with direct string equality.
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk resource_environment = cdk.interfaces.ResourceEnvironment( account="account", region="region" )
Attributes
- account
The AWS Account ID that this resource belongs to.
Since this can be a Token (for example, when the account is CloudFormation’s
AWS::AccountIdintrinsic), make sure to useToken.compareStrings()instead of comparing the values with direct string equality.
- region
The AWS Region that this resource belongs to.
Since this can be a Token (for example, when the region is CloudFormation’s
AWS::Regionintrinsic), make sure to useToken.compareStrings()instead of comparing the values with direct string equality.