Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IEnvironmentAware ¶
type IEnvironmentAware interface {
// The environment this resource belongs to.
//
// For resources that are created and managed in a Stack (those created by
// creating new class instances like `new Role()`, `new Bucket()`, etc.), this
// is always the same as the environment of the stack they belong to.
//
// For referenced resources (those obtained from referencing methods like
// `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
// different than the stack they were imported into.
Env() *ResourceEnvironment
}
Used to indicate that a particular construct has an resource environment.
type ResourceEnvironment ¶
type ResourceEnvironment struct {
// 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 comparing the values with direct
// string equality.
Account *string `field:"required" json:"account" yaml:"account"`
// 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 comparing the values with direct string equality.
Region *string `field:"required" json:"region" yaml:"region"`
}
Represents the environment a given resource lives in.
Used as the return value for the `IEnvironmentAware.env` property.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
resourceEnvironment := &ResourceEnvironment{
Account: jsii.String("account"),
Region: jsii.String("region"),
}
Click to show internal directories.
Click to hide internal directories.