interface ResourceEnvironment
Language | Type name |
---|---|
.NET | Amazon.CDK.ResourceEnvironment |
Go | github.com/aws/aws-cdk-go/awscdk/v2#ResourceEnvironment |
Java | software.amazon.awscdk.ResourceEnvironment |
Python | aws_cdk.ResourceEnvironment |
TypeScript (source) | aws-cdk-lib » ResourceEnvironment |
Represents the environment a given resource lives in.
Used as the return value for the IResource.env
property.
Example
// 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';
const resourceEnvironment: cdk.ResourceEnvironment = {
account: 'account',
region: 'region',
};
Properties
Name | Type | Description |
---|---|---|
account | string | The AWS account ID that this resource belongs to. |
region | string | The AWS region that this resource belongs to. |
account
Type:
string
The AWS account ID that this resource belongs to.
Since this can be a Token (for example, when the account is CloudFormation's AWS::AccountId intrinsic), make sure to use Token.compareStrings() instead of just comparing the values for equality.
region
Type:
string
The AWS region that this resource belongs to.
Since this can be a Token (for example, when the region is CloudFormation's AWS::Region intrinsic), make sure to use Token.compareStrings() instead of just comparing the values for equality.