Class: AWSCDK::CXAPI::CloudFormationStackArtifact
- Inherits:
-
CloudArtifact
- Object
- CloudArtifact
- AWSCDK::CXAPI::CloudFormationStackArtifact
- Defined in:
- cxapi/cloud_formation_stack_artifact.rb
Class Method Summary collapse
-
.is_cloud_formation_stack_artifact(art) ⇒ Boolean
Checks if
artis an instance of this class. - .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
- #assembly ⇒ AWSCDK::CXAPI::CloudAssembly
-
#assets ⇒ Array<AWSCDK::CloudAssemblySchema::FileAssetMetadataEntry, AWSCDK::CloudAssemblySchema::ContainerImageAssetMetadataEntry>
Any assets associated with this stack.
-
#assume_role_additional_options ⇒ Hash{String => Object}?
Additional options to pass to STS when assuming the role for cloudformation deployments.
-
#assume_role_arn ⇒ String?
The role that needs to be assumed to deploy the stack.
-
#assume_role_external_id ⇒ String?
External ID to use when assuming role for cloudformation deployments.
-
#bootstrap_stack_version_ssm_parameter ⇒ String?
Name of SSM parameter with bootstrap stack version.
-
#cloud_formation_execution_role_arn ⇒ String?
The role that is passed to CloudFormation to execute the change set.
-
#dependencies ⇒ Array<AWSCDK::CXAPI::CloudArtifact>
Returns all the artifacts that this artifact depends on.
-
#display_name ⇒ String
A string that represents this stack.
-
#environment ⇒ AWSCDK::CXAPI::Environment
The environment into which to deploy this artifact.
-
#find_metadata_by_type(type) ⇒ Array<AWSCDK::CXAPI::MetadataEntryResult>
All the metadata entries of a specific type in this artifact.
-
#hierarchical_id ⇒ String
An identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests.
- #id ⇒ String
-
#initialize(assembly, artifact_id, artifact) ⇒ CloudFormationStackArtifact
constructor
A new instance of CloudFormationStackArtifact.
-
#lookup_role ⇒ AWSCDK::CloudAssemblySchema::BootstrapRole?
The role to use to look up values from the target AWS account.
-
#manifest ⇒ AWSCDK::CloudAssemblySchema::ArtifactManifest
The artifact's manifest.
-
#messages ⇒ Array<AWSCDK::CXAPI::SynthesisMessage>
The set of messages extracted from the artifact's metadata.
-
#metadata ⇒ Hash{String => Array<AWSCDK::CloudAssemblySchema::MetadataEntry>}
Returns the metadata associated with this Cloud Artifact.
-
#notification_arns ⇒ Array<String>?
SNS Topics that will receive stack events.
-
#original_name ⇒ String
The original name as defined in the CDK app.
-
#parameters ⇒ Hash{String => String}
CloudFormation parameters to pass to the stack.
-
#requires_bootstrap_stack_version ⇒ Numeric?
Version of bootstrap stack required to deploy this stack.
-
#stack_name ⇒ String
The physical name of this stack.
-
#stack_template_asset_object_url ⇒ String?
If the stack template has already been included in the asset manifest, its asset URL.
-
#tags ⇒ Hash{String => String}
CloudFormation tags to pass to the stack.
-
#template ⇒ Object
The CloudFormation template for this stack.
-
#template_file ⇒ String
The file name of the template.
-
#template_full_path ⇒ String
Full path to the template file.
-
#termination_protection ⇒ Boolean?
Whether termination protection is enabled for this stack.
-
#validate_on_synth ⇒ Boolean?
Whether this stack should be validated by the CLI after synthesis.
Constructor Details
#initialize(assembly, artifact_id, artifact) ⇒ CloudFormationStackArtifact
Returns a new instance of CloudFormationStackArtifact.
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.
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_methods ⇒ Object
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
#assembly ⇒ AWSCDK::CXAPI::CloudAssembly
76 77 78 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 76 def assembly() jsii_get_property("assembly") end |
#assets ⇒ Array<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_options ⇒ Hash{String => Object}?
Default: - No additional options.
Additional options to pass to STS when assuming the role for cloudformation deployments.
RoleArnshould not be used. Use the dedicatedassume_role_arnproperty instead.ExternalIdshould not be used. Use the dedicatedassume_role_external_idinstead.TransitiveTagKeysdefaults to use all keys (if any) specified inTags. E.g, all tags are transitive by default.
207 208 209 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 207 def () jsii_get_property("assumeRoleAdditionalOptions") end |
#assume_role_arn ⇒ String?
Default: - No role is assumed (current credentials are used)
The role that needs to be assumed to deploy the stack.
215 216 217 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 215 def assume_role_arn() jsii_get_property("assumeRoleArn") end |
#assume_role_external_id ⇒ String?
Default: - No external ID
External ID to use when assuming role for cloudformation deployments.
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_parameter ⇒ String?
Default: - Discover SSM parameter by reading stack
Name of SSM parameter with bootstrap stack version.
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_arn ⇒ String?
Default: - No role is passed (currently assumed role/credentials are used)
The role that is passed to CloudFormation to execute the change set.
239 240 241 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 239 def cloud_formation_execution_role_arn() jsii_get_property("cloudFormationExecutionRoleArn") end |
#dependencies ⇒ Array<AWSCDK::CXAPI::CloudArtifact>
Returns all the artifacts that this artifact depends on.
83 84 85 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 83 def dependencies() jsii_get_property("dependencies") end |
#display_name ⇒ String
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 "
138 139 140 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 138 def display_name() jsii_get_property("displayName") end |
#environment ⇒ AWSCDK::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.
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_id ⇒ String
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.
93 94 95 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 93 def hierarchical_id() jsii_get_property("hierarchicalId") end |
#id ⇒ String
98 99 100 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 98 def id() jsii_get_property("id") end |
#lookup_role ⇒ AWSCDK::CloudAssemblySchema::BootstrapRole?
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 |
#manifest ⇒ AWSCDK::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 |
#messages ⇒ Array<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 () jsii_get_property("messages") end |
#metadata ⇒ Hash{String => Array<AWSCDK::CloudAssemblySchema::MetadataEntry>}
Returns the metadata associated with this Cloud Artifact.
119 120 121 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 119 def () jsii_get_property("metadata") end |
#notification_arns ⇒ Array<String>?
SNS Topics that will receive stack events.
254 255 256 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 254 def notification_arns() jsii_get_property("notificationArns") end |
#original_name ⇒ String
The original name as defined in the CDK app.
152 153 154 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 152 def original_name() jsii_get_property("originalName") end |
#parameters ⇒ Hash{String => String}
CloudFormation parameters to pass to the stack.
159 160 161 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 159 def parameters() jsii_get_property("parameters") end |
#requires_bootstrap_stack_version ⇒ Numeric?
Default: - No bootstrap stack required
Version of bootstrap stack required to deploy this stack.
262 263 264 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 262 def requires_bootstrap_stack_version() jsii_get_property("requiresBootstrapStackVersion") end |
#stack_name ⇒ String
The physical name of this stack.
166 167 168 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 166 def stack_name() jsii_get_property("stackName") end |
#stack_template_asset_object_url ⇒ String?
Default: - Not uploaded yet, upload just before deploying
If the stack template has already been included in the asset manifest, its asset URL.
270 271 272 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 270 def stack_template_asset_object_url() jsii_get_property("stackTemplateAssetObjectUrl") end |
#tags ⇒ Hash{String => String}
CloudFormation tags to pass to the stack.
173 174 175 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 173 def () jsii_get_property("tags") end |
#template ⇒ Object
The CloudFormation template for this stack.
180 181 182 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 180 def template() jsii_get_property("template") end |
#template_file ⇒ String
The file name of the template.
187 188 189 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 187 def template_file() jsii_get_property("templateFile") end |
#template_full_path ⇒ String
Full path to the template file.
194 195 196 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 194 def template_full_path() jsii_get_property("templateFullPath") end |
#termination_protection ⇒ Boolean?
Whether termination protection is enabled for this stack.
277 278 279 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 277 def termination_protection() jsii_get_property("terminationProtection") end |
#validate_on_synth ⇒ Boolean?
Default: - false
Whether this stack should be validated by the CLI after synthesis.
285 286 287 |
# File 'cxapi/cloud_formation_stack_artifact.rb', line 285 def validate_on_synth() jsii_get_property("validateOnSynth") end |