Class: AWSCDK::CXAPI::CloudFormationStackArtifact

Inherits:
CloudArtifact
  • Object
show all
Defined in:
cxapi/cloud_formation_stack_artifact.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(assembly, artifact_id, artifact) ⇒ CloudFormationStackArtifact

Returns a new instance of CloudFormationStackArtifact.

Parameters:



10
11
12
13
14
15
16
# File 'cxapi/cloud_formation_stack_artifact.rb', line 10

def initialize(assembly, artifact_id, artifact)
  artifact = artifact.is_a?(Hash) ? ::AWSCDK::CloudAssemblySchema::ArtifactManifest.new(**artifact.transform_keys(&:to_sym)) : artifact
  Jsii::Type.check_type(assembly, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jeF9hcGkuQ2xvdWRBc3NlbWJseSJ9")), "assembly")
  Jsii::Type.check_type(artifact_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "artifactId")
  Jsii::Type.check_type(artifact, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jbG91ZF9hc3NlbWJseV9zY2hlbWEuQXJ0aWZhY3RNYW5pZmVzdCJ9")), "artifact")
  Jsii::Object.instance_method(:initialize).bind(self).call(assembly, artifact_id, artifact)
end

Class Method Details

.is_cloud_formation_stack_artifact(art) ⇒ Boolean

Checks if art is an instance of this class.

Use this method instead of instanceof to properly detect CloudFormationStackArtifact instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the cx-api library on disk are seen as independent, completely different libraries. As a consequence, the class CloudFormationStackArtifact in each copy of the cx-api library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the cx-api library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

  • art (Object)

Returns:

  • (Boolean)


70
71
72
73
# File 'cxapi/cloud_formation_stack_artifact.rb', line 70

def self.is_cloud_formation_stack_artifact(art)
  Jsii::Type.check_type(art, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "art")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.cx_api.CloudFormationStackArtifact", "isCloudFormationStackArtifact", [art])
end

.jsii_overridable_methodsObject



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'cxapi/cloud_formation_stack_artifact.rb', line 18

def self.jsii_overridable_methods
  {
    :assembly => { kind: :property, name: "assembly", is_optional: false },
    :dependencies => { kind: :property, name: "dependencies", is_optional: false },
    :hierarchical_id => { kind: :property, name: "hierarchicalId", is_optional: false },
    :id => { kind: :property, name: "id", is_optional: false },
    :manifest => { kind: :property, name: "manifest", is_optional: false },
    :messages => { kind: :property, name: "messages", is_optional: false },
    :metadata => { kind: :property, name: "metadata", is_optional: false },
    :assets => { kind: :property, name: "assets", is_optional: false },
    :display_name => { kind: :property, name: "displayName", is_optional: false },
    :environment => { kind: :property, name: "environment", is_optional: false },
    :original_name => { kind: :property, name: "originalName", is_optional: false },
    :parameters => { kind: :property, name: "parameters", is_optional: false },
    :stack_name => { kind: :property, name: "stackName", is_optional: false },
    :tags => { kind: :property, name: "tags", is_optional: false },
    :template => { kind: :property, name: "template", is_optional: false },
    :template_file => { kind: :property, name: "templateFile", is_optional: false },
    :template_full_path => { kind: :property, name: "templateFullPath", is_optional: false },
    :assume_role_additional_options => { kind: :property, name: "assumeRoleAdditionalOptions", is_optional: true },
    :assume_role_arn => { kind: :property, name: "assumeRoleArn", is_optional: true },
    :assume_role_external_id => { kind: :property, name: "assumeRoleExternalId", is_optional: true },
    :bootstrap_stack_version_ssm_parameter => { kind: :property, name: "bootstrapStackVersionSsmParameter", is_optional: true },
    :cloud_formation_execution_role_arn => { kind: :property, name: "cloudFormationExecutionRoleArn", is_optional: true },
    :lookup_role => { kind: :property, name: "lookupRole", is_optional: true },
    :notification_arns => { kind: :property, name: "notificationArns", is_optional: true },
    :requires_bootstrap_stack_version => { kind: :property, name: "requiresBootstrapStackVersion", is_optional: true },
    :stack_template_asset_object_url => { kind: :property, name: "stackTemplateAssetObjectUrl", is_optional: true },
    :termination_protection => { kind: :property, name: "terminationProtection", is_optional: true },
    :validate_on_synth => { kind: :property, name: "validateOnSynth", is_optional: true },
    :find_metadata_by_type => { kind: :method, name: "findMetadataByType", is_optional: false },
  }
end

Instance Method Details

#assemblyAWSCDK::CXAPI::CloudAssembly



76
77
78
# File 'cxapi/cloud_formation_stack_artifact.rb', line 76

def assembly()
  jsii_get_property("assembly")
end

#assetsArray<AWSCDK::CloudAssemblySchema::FileAssetMetadataEntry, AWSCDK::CloudAssemblySchema::ContainerImageAssetMetadataEntry>

Any assets associated with this stack.



126
127
128
# File 'cxapi/cloud_formation_stack_artifact.rb', line 126

def assets()
  jsii_get_property("assets")
end

#assume_role_additional_optionsHash{String => Object}?

Note:

Default: - No additional options.

Additional options to pass to STS when assuming the role for cloudformation deployments.

  • RoleArn should not be used. Use the dedicated assume_role_arn property instead.
  • ExternalId should not be used. Use the dedicated assume_role_external_id instead.
  • TransitiveTagKeys defaults to use all keys (if any) specified in Tags. E.g, all tags are transitive by default.


207
208
209
# File 'cxapi/cloud_formation_stack_artifact.rb', line 207

def assume_role_additional_options()
  jsii_get_property("assumeRoleAdditionalOptions")
end

#assume_role_arnString?

Note:

Default: - No role is assumed (current credentials are used)

The role that needs to be assumed to deploy the stack.

Returns:

  • (String, nil)


215
216
217
# File 'cxapi/cloud_formation_stack_artifact.rb', line 215

def assume_role_arn()
  jsii_get_property("assumeRoleArn")
end

#assume_role_external_idString?

Note:

Default: - No external ID

External ID to use when assuming role for cloudformation deployments.

Returns:

  • (String, nil)


223
224
225
# File 'cxapi/cloud_formation_stack_artifact.rb', line 223

def assume_role_external_id()
  jsii_get_property("assumeRoleExternalId")
end

#bootstrap_stack_version_ssm_parameterString?

Note:

Default: - Discover SSM parameter by reading stack

Name of SSM parameter with bootstrap stack version.

Returns:

  • (String, nil)


231
232
233
# File 'cxapi/cloud_formation_stack_artifact.rb', line 231

def bootstrap_stack_version_ssm_parameter()
  jsii_get_property("bootstrapStackVersionSsmParameter")
end

#cloud_formation_execution_role_arnString?

Note:

Default: - No role is passed (currently assumed role/credentials are used)

The role that is passed to CloudFormation to execute the change set.

Returns:

  • (String, nil)


239
240
241
# File 'cxapi/cloud_formation_stack_artifact.rb', line 239

def cloud_formation_execution_role_arn()
  jsii_get_property("cloudFormationExecutionRoleArn")
end

#dependenciesArray<AWSCDK::CXAPI::CloudArtifact>

Returns all the artifacts that this artifact depends on.

Returns:



83
84
85
# File 'cxapi/cloud_formation_stack_artifact.rb', line 83

def dependencies()
  jsii_get_property("dependencies")
end

#display_nameString

A string that represents this stack.

Should only be used in user interfaces. If the stackName has not been set explicitly, or has been set to artifactId, it will return the hierarchicalId of the stack. Otherwise, it will return something like " ()"

Returns:

  • (String)


138
139
140
# File 'cxapi/cloud_formation_stack_artifact.rb', line 138

def display_name()
  jsii_get_property("displayName")
end

#environmentAWSCDK::CXAPI::Environment

The environment into which to deploy this artifact.



145
146
147
# File 'cxapi/cloud_formation_stack_artifact.rb', line 145

def environment()
  jsii_get_property("environment")
end

#find_metadata_by_type(type) ⇒ Array<AWSCDK::CXAPI::MetadataEntryResult>

Returns all the metadata entries of a specific type in this artifact.

Parameters:

  • type (String)

Returns:



291
292
293
294
# File 'cxapi/cloud_formation_stack_artifact.rb', line 291

def (type)
  Jsii::Type.check_type(type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  jsii_call_method("findMetadataByType", [type])
end

#hierarchical_idString

An identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests.

Defaults to the normal id. Should only be used in user interfaces.

Returns:

  • (String)


93
94
95
# File 'cxapi/cloud_formation_stack_artifact.rb', line 93

def hierarchical_id()
  jsii_get_property("hierarchicalId")
end

#idString

Returns:

  • (String)


98
99
100
# File 'cxapi/cloud_formation_stack_artifact.rb', line 98

def id()
  jsii_get_property("id")
end

#lookup_roleAWSCDK::CloudAssemblySchema::BootstrapRole?

Note:

Default: - No role is assumed (current credentials are used)

The role to use to look up values from the target AWS account.



247
248
249
# File 'cxapi/cloud_formation_stack_artifact.rb', line 247

def lookup_role()
  jsii_get_property("lookupRole")
end

#manifestAWSCDK::CloudAssemblySchema::ArtifactManifest

The artifact's manifest.



105
106
107
# File 'cxapi/cloud_formation_stack_artifact.rb', line 105

def manifest()
  jsii_get_property("manifest")
end

#messagesArray<AWSCDK::CXAPI::SynthesisMessage>

The set of messages extracted from the artifact's metadata.



112
113
114
# File 'cxapi/cloud_formation_stack_artifact.rb', line 112

def messages()
  jsii_get_property("messages")
end

#metadataHash{String => Array<AWSCDK::CloudAssemblySchema::MetadataEntry>}

Returns the metadata associated with this Cloud Artifact.

Returns:



119
120
121
# File 'cxapi/cloud_formation_stack_artifact.rb', line 119

def ()
  jsii_get_property("metadata")
end

#notification_arnsArray<String>?

SNS Topics that will receive stack events.

Returns:

  • (Array<String>, nil)


254
255
256
# File 'cxapi/cloud_formation_stack_artifact.rb', line 254

def notification_arns()
  jsii_get_property("notificationArns")
end

#original_nameString

The original name as defined in the CDK app.

Returns:

  • (String)


152
153
154
# File 'cxapi/cloud_formation_stack_artifact.rb', line 152

def original_name()
  jsii_get_property("originalName")
end

#parametersHash{String => String}

CloudFormation parameters to pass to the stack.

Returns:

  • (Hash{String => String})


159
160
161
# File 'cxapi/cloud_formation_stack_artifact.rb', line 159

def parameters()
  jsii_get_property("parameters")
end

#requires_bootstrap_stack_versionNumeric?

Note:

Default: - No bootstrap stack required

Version of bootstrap stack required to deploy this stack.

Returns:

  • (Numeric, nil)


262
263
264
# File 'cxapi/cloud_formation_stack_artifact.rb', line 262

def requires_bootstrap_stack_version()
  jsii_get_property("requiresBootstrapStackVersion")
end

#stack_nameString

The physical name of this stack.

Returns:

  • (String)


166
167
168
# File 'cxapi/cloud_formation_stack_artifact.rb', line 166

def stack_name()
  jsii_get_property("stackName")
end

#stack_template_asset_object_urlString?

Note:

Default: - Not uploaded yet, upload just before deploying

If the stack template has already been included in the asset manifest, its asset URL.

Returns:

  • (String, nil)


270
271
272
# File 'cxapi/cloud_formation_stack_artifact.rb', line 270

def stack_template_asset_object_url()
  jsii_get_property("stackTemplateAssetObjectUrl")
end

#tagsHash{String => String}

CloudFormation tags to pass to the stack.

Returns:

  • (Hash{String => String})


173
174
175
# File 'cxapi/cloud_formation_stack_artifact.rb', line 173

def tags()
  jsii_get_property("tags")
end

#templateObject

The CloudFormation template for this stack.

Returns:

  • (Object)


180
181
182
# File 'cxapi/cloud_formation_stack_artifact.rb', line 180

def template()
  jsii_get_property("template")
end

#template_fileString

The file name of the template.

Returns:

  • (String)


187
188
189
# File 'cxapi/cloud_formation_stack_artifact.rb', line 187

def template_file()
  jsii_get_property("templateFile")
end

#template_full_pathString

Full path to the template file.

Returns:

  • (String)


194
195
196
# File 'cxapi/cloud_formation_stack_artifact.rb', line 194

def template_full_path()
  jsii_get_property("templateFullPath")
end

#termination_protectionBoolean?

Whether termination protection is enabled for this stack.

Returns:

  • (Boolean, nil)


277
278
279
# File 'cxapi/cloud_formation_stack_artifact.rb', line 277

def termination_protection()
  jsii_get_property("terminationProtection")
end

#validate_on_synthBoolean?

Note:

Default: - false

Whether this stack should be validated by the CLI after synthesis.

Returns:

  • (Boolean, nil)


285
286
287
# File 'cxapi/cloud_formation_stack_artifact.rb', line 285

def validate_on_synth()
  jsii_get_property("validateOnSynth")
end