Skip to content
v2.273.0

EnvironmentPlaceholders Class ​

Placeholders which can be used manifests.

These can occur both in the Asset Manifest as well as the general Cloud Assembly manifest.

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 environmentPlaceholders = new cx_api.EnvironmentPlaceholders();
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_placeholders = cx_api.EnvironmentPlaceholders()
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.*;

EnvironmentPlaceholders environmentPlaceholders = new EnvironmentPlaceholders();
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 environmentPlaceholders = new EnvironmentPlaceholders();
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"

environmentPlaceholders := awscdk.Cx_api.NewEnvironmentPlaceholders()

Initializer ​

ts
new EnvironmentPlaceholders()
python
EnvironmentPlaceholders()
java
new EnvironmentPlaceholders()
csharp
new EnvironmentPlaceholders()
go
NewEnvironmentPlaceholders()

Properties ​

CURRENT_ACCOUNTstringcurrent_accountstrCURRENT_ACCOUNTStringCURRENT_ACCOUNTstringCURRENT_ACCOUNT*stringrequiredstatic#
Insert this into the destination fields to be replaced with the current account.
CURRENT_PARTITIONstringcurrent_partitionstrCURRENT_PARTITIONStringCURRENT_PARTITIONstringCURRENT_PARTITION*stringrequiredstatic#
Insert this into the destination fields to be replaced with the current partition.
CURRENT_REGIONstringcurrent_regionstrCURRENT_REGIONStringCURRENT_REGIONstringCURRENT_REGION*stringrequiredstatic#
Insert this into the destination fields to be replaced with the current region.

Methods ​

replace(object: any, values: EnvironmentPlaceholderValues): any@staticmethod def replace(object: Any, values: EnvironmentPlaceholderValues) -> Anypublic static Object replace(Object object, EnvironmentPlaceholderValues values)public static object Replace(object object, EnvironmentPlaceholderValues values)func Replace(Object interface{}, Values EnvironmentPlaceholderValues) interface{}static#
Replace the environment placeholders in all strings found in a complex object.

Duplicated between cdk-assets and aws-cdk CLI because we don't have a good single place to put it (they're nominally independent tools).

replaceAsync(object: any, provider: IEnvironmentPlaceholderProvider): any@staticmethod def replace_async(object: Any, provider: IEnvironmentPlaceholderProvider) -> Anypublic static Object replaceAsync(Object object, IEnvironmentPlaceholderProvider provider)public static object ReplaceAsync(object object, IEnvironmentPlaceholderProvider provider)func ReplaceAsync(Object interface{}, Provider IEnvironmentPlaceholderProvider) interface{}static#
Like 'replace', but asynchronous.