Skip to content
v2.277.0

Environment Struct ​

Models an AWS execution environment, for use within the CDK toolkit.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cx_api } from 'aws-cdk-lib';
const environment: cx_api.Environment = {
  account: 'account',
  name: 'name',
  region: 'region',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import cx_api

environment = cx_api.Environment(
    account="account",
    name="name",
    region="region"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cxapi.*;

Environment environment = Environment.builder()
        .account("account")
        .name("name")
        .region("region")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.CXAPI;

var environment = new Environment {
    Account = "account",
    Name = "name",
    Region = "region"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// 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"

environment := &Environment{
	Account: jsii.String("account"),
	Name: jsii.String("name"),
	Region: jsii.String("region"),
}

Properties ​

accountstringaccountstraccountStringAccountstringAccount*string required #
The AWS account this environment deploys into.
namestringnamestrnameStringNamestringName*string required #
The arbitrary name of this environment (user-set, or at least user-meaningful).
regionstringregionstrregionStringRegionstringRegion*string required #
The AWS region name where this environment deploys into.