Interface Environment
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
Environment.Jsii$Proxy
Example:
import software.amazon.awscdk.*;
App app = new App();
Stack stack = Stack.Builder.create(app, "Stack").env(Environment.builder().region("us-west-2").build()).build();
TableV2 globalTable = TableV2.Builder.create(stack, "GlobalTable")
.partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
.replicas(List.of(ReplicaTableProps.builder().region("us-east-1").build()))
.build();
globalTable.addReplica(ReplicaTableProps.builder().region("us-east-2").deletionProtection(true).build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forEnvironmentstatic final classAn implementation forEnvironment -
Method Summary
Modifier and TypeMethodDescriptionstatic Environment.Builderbuilder()default StringThe AWS account ID for this environment.default StringThe AWS region for this environment.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAccount
The AWS account ID for this environment.This can be either a concrete value such as
585191031104orAws.ACCOUNT_IDwhich indicates that account ID will only be determined during deployment (it will resolve to the CloudFormation intrinsic{"Ref":"AWS::AccountId"}). Note that certain features, such as cross-stack references and environmental context providers require concrete region information and will cause this stack to emit synthesis errors.Default: Aws.ACCOUNT_ID which means that the stack will be account-agnostic.
-
getRegion
The AWS region for this environment.This can be either a concrete value such as
eu-west-2orAws.REGIONwhich indicates that account ID will only be determined during deployment (it will resolve to the CloudFormation intrinsic{"Ref":"AWS::Region"}). Note that certain features, such as cross-stack references and environmental context providers require concrete region information and will cause this stack to emit synthesis errors.Default: Aws.REGION which means that the stack will be region-agnostic.
-
builder
- Returns:
- a
Environment.BuilderofEnvironment
-