Skip to content
v2.274.0

EnvironmentUtils Class ​

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 environmentUtils = new cx_api.EnvironmentUtils();
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_utils = cx_api.EnvironmentUtils()
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.*;

EnvironmentUtils environmentUtils = new EnvironmentUtils();
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 environmentUtils = new EnvironmentUtils();
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"

environmentUtils := awscdk.Cx_api.NewEnvironmentUtils()

Initializer ​

ts
new EnvironmentUtils()
python
EnvironmentUtils()
java
new EnvironmentUtils()
csharp
new EnvironmentUtils()
go
NewEnvironmentUtils()

Methods ​

format(account: string, region: string): string@staticmethod def format(account: str, region: str) -> strpublic static String format(String account, String region)public static string Format(string account, string region)func Format(Account *string, Region *string) *stringstatic#
Format an environment string from an account and region.
make(account: string, region: string): Environment@staticmethod def make(account: str, region: str) -> Environmentpublic static Environment make(String account, String region)public static Environment Make(string account, string region)func Make(Account *string, Region *string) Environmentstatic#
Build an environment object from an account and region.
parse(environment: string): Environment@staticmethod def parse(environment: str) -> Environmentpublic static Environment parse(String environment)public static Environment Parse(string environment)func Parse(Environment *string) Environmentstatic#