Class: AWSCDK::CXAPI::CloudArtifact
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CXAPI::CloudArtifact
- Defined in:
- cxapi/cloud_artifact.rb
Overview
Represents an artifact within a cloud assembly.
Direct Known Subclasses
AssetManifestArtifact, CloudFormationStackArtifact, NestedCloudAssemblyArtifact, TreeCloudArtifact
Class Method Summary collapse
-
.from_manifest(assembly, id, artifact) ⇒ AWSCDK::CXAPI::CloudArtifact?
Returns a subclass of
CloudArtifactbased on the artifact type defined in the artifact manifest. - .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
- #assembly ⇒ AWSCDK::CXAPI::CloudAssembly
-
#dependencies ⇒ Array<AWSCDK::CXAPI::CloudArtifact>
Returns all the artifacts that this artifact depends on.
-
#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, id, manifest) ⇒ CloudArtifact
constructor
A new instance of CloudArtifact.
-
#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.
Constructor Details
#initialize(assembly, id, manifest) ⇒ CloudArtifact
Returns a new instance of CloudArtifact.
11 12 13 14 15 16 17 |
# File 'cxapi/cloud_artifact.rb', line 11 def initialize(assembly, id, manifest) manifest = manifest.is_a?(Hash) ? ::AWSCDK::CloudAssemblySchema::ArtifactManifest.new(**manifest.transform_keys(&:to_sym)) : manifest Jsii::Type.check_type(assembly, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jeF9hcGkuQ2xvdWRBc3NlbWJseSJ9")), "assembly") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(manifest, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jbG91ZF9hc3NlbWJseV9zY2hlbWEuQXJ0aWZhY3RNYW5pZmVzdCJ9")), "manifest") Jsii::Object.instance_method(:initialize).bind(self).call(assembly, id, manifest) end |
Class Method Details
.from_manifest(assembly, id, artifact) ⇒ AWSCDK::CXAPI::CloudArtifact?
Returns a subclass of CloudArtifact based on the artifact type defined in the artifact manifest.
38 39 40 41 42 43 44 |
# File 'cxapi/cloud_artifact.rb', line 38 def self.from_manifest(assembly, id, artifact) Jsii::Type.check_type(assembly, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jeF9hcGkuQ2xvdWRBc3NlbWJseSJ9")), "assembly") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") artifact = artifact.is_a?(Hash) ? ::AWSCDK::CloudAssemblySchema::ArtifactManifest.new(**artifact.transform_keys(&:to_sym)) : artifact Jsii::Type.check_type(artifact, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jbG91ZF9hc3NlbWJseV9zY2hlbWEuQXJ0aWZhY3RNYW5pZmVzdCJ9")), "artifact") Jsii::Kernel.instance.call_static("aws-cdk-lib.cx_api.CloudArtifact", "fromManifest", [assembly, id, artifact]) end |
.jsii_overridable_methods ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'cxapi/cloud_artifact.rb', line 19 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 }, :find_metadata_by_type => { kind: :method, name: "findMetadataByType", is_optional: false }, } end |
Instance Method Details
#assembly ⇒ AWSCDK::CXAPI::CloudAssembly
47 48 49 |
# File 'cxapi/cloud_artifact.rb', line 47 def assembly() jsii_get_property("assembly") end |
#dependencies ⇒ Array<AWSCDK::CXAPI::CloudArtifact>
Returns all the artifacts that this artifact depends on.
54 55 56 |
# File 'cxapi/cloud_artifact.rb', line 54 def dependencies() jsii_get_property("dependencies") end |
#find_metadata_by_type(type) ⇒ Array<AWSCDK::CXAPI::MetadataEntryResult>
Returns all the metadata entries of a specific type in this artifact.
96 97 98 99 |
# File 'cxapi/cloud_artifact.rb', line 96 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.
64 65 66 |
# File 'cxapi/cloud_artifact.rb', line 64 def hierarchical_id() jsii_get_property("hierarchicalId") end |
#id ⇒ String
69 70 71 |
# File 'cxapi/cloud_artifact.rb', line 69 def id() jsii_get_property("id") end |
#manifest ⇒ AWSCDK::CloudAssemblySchema::ArtifactManifest
The artifact's manifest.
76 77 78 |
# File 'cxapi/cloud_artifact.rb', line 76 def manifest() jsii_get_property("manifest") end |
#messages ⇒ Array<AWSCDK::CXAPI::SynthesisMessage>
The set of messages extracted from the artifact's metadata.
83 84 85 |
# File 'cxapi/cloud_artifact.rb', line 83 def () jsii_get_property("messages") end |
#metadata ⇒ Hash{String => Array<AWSCDK::CloudAssemblySchema::MetadataEntry>}
Returns the metadata associated with this Cloud Artifact.
90 91 92 |
# File 'cxapi/cloud_artifact.rb', line 90 def () jsii_get_property("metadata") end |