Skip to content

Environment

The deployment environment for a stack.

Initializer

import com.aliyun.ros.cdk.core.Environment;
Environment.builder()
//  .account(java.lang.String)
//  .region(java.lang.String)
    .build();

Properties

Name Type Description
account java.lang.String The ALIYUN account ID for this environment.
region java.lang.String The ALIYUN region for this environment.

accountOptional

public java.lang.String getAccount();
  • Type: java.lang.String
  • Default: ALIYUN.ACCOUNT_ID which means that the stack will be account-agnostic.

The ALIYUN account ID for this environment.

This can be either a concrete value such as 585191031104 or ALIYUN.ACCOUNT_ID which indicates that account ID will only be determined during deployment (it will resolve to the ROS intrinsic {"Ref":"ALIYUN::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.


regionOptional

public java.lang.String getRegion();
  • Type: java.lang.String
  • Default: ALIYUN.REGION which means that the stack will be region-agnostic.

The ALIYUN region for this environment.

This can be either a concrete value such as eu-west-2 or ALIYUN.REGION which indicates that account ID will only be determined during deployment (it will resolve to the ROS intrinsic {"Ref":"ALIYUN::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.