Class: AWSCDK::CXAPI::EnvironmentPlaceholders Deprecated

Inherits:
Jsii::Object
  • Object
show all
Defined in:
cxapi/environment_placeholders.rb

Overview

Deprecated.

The definition of this type has moved to @aws-cdk/cloud-assembly-api.

Placeholders which can be used manifests.

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeEnvironmentPlaceholders

Returns a new instance of EnvironmentPlaceholders.



13
14
15
# File 'cxapi/environment_placeholders.rb', line 13

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.CURRENT_ACCOUNTString

Insert this into the destination fields to be replaced with the current account.

Returns:

  • (String)


51
52
53
# File 'cxapi/environment_placeholders.rb', line 51

def self.CURRENT_ACCOUNT()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.cx_api.EnvironmentPlaceholders", "CURRENT_ACCOUNT")
end

.CURRENT_PARTITIONString

Insert this into the destination fields to be replaced with the current partition.

Returns:

  • (String)


58
59
60
# File 'cxapi/environment_placeholders.rb', line 58

def self.CURRENT_PARTITION()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.cx_api.EnvironmentPlaceholders", "CURRENT_PARTITION")
end

.CURRENT_REGIONString

Insert this into the destination fields to be replaced with the current region.

Returns:

  • (String)


65
66
67
# File 'cxapi/environment_placeholders.rb', line 65

def self.CURRENT_REGION()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.cx_api.EnvironmentPlaceholders", "CURRENT_REGION")
end

.jsii_overridable_methodsObject



17
18
19
20
# File 'cxapi/environment_placeholders.rb', line 17

def self.jsii_overridable_methods
  {
  }
end

.replace(object, values) ⇒ Object

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).

Parameters:

Returns:

  • (Object)


30
31
32
33
34
35
# File 'cxapi/environment_placeholders.rb', line 30

def self.replace(object, values)
  Jsii::Type.check_type(object, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "object")
  values = values.is_a?(Hash) ? ::AWSCDK::CXAPI::EnvironmentPlaceholderValues.new(**values.transform_keys(&:to_sym)) : values
  Jsii::Type.check_type(values, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jeF9hcGkuRW52aXJvbm1lbnRQbGFjZWhvbGRlclZhbHVlcyJ9")), "values")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.cx_api.EnvironmentPlaceholders", "replace", [object, values])
end

.replace_async(object, provider) ⇒ Object

Like 'replace', but asynchronous.

Parameters:

Returns:

  • (Object)


42
43
44
45
46
# File 'cxapi/environment_placeholders.rb', line 42

def self.replace_async(object, provider)
  Jsii::Type.check_type(object, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "object")
  Jsii::Type.check_type(provider, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jeF9hcGkuSUVudmlyb25tZW50UGxhY2Vob2xkZXJQcm92aWRlciJ9")), "provider")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.cx_api.EnvironmentPlaceholders", "replaceAsync", [object, provider])
end