Class: AWSCDK::CXAPI::NestedCloudAssemblyArtifact

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

Overview

Asset manifest is a description of a set of assets which need to be built and published.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(assembly, name, artifact) ⇒ NestedCloudAssemblyArtifact

Returns a new instance of NestedCloudAssemblyArtifact.

Parameters:



11
12
13
14
15
16
17
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 11

def initialize(assembly, name, 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(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  Jsii::Type.check_type(artifact, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jbG91ZF9hc3NlbWJseV9zY2hlbWEuQXJ0aWZhY3RNYW5pZmVzdCJ9")), "artifact")
  Jsii::Object.instance_method(:initialize).bind(self).call(assembly, name, artifact)
end

Class Method Details

.is_nested_cloud_assembly_artifact(art) ⇒ Boolean

Checks if art is an instance of this class.

Use this method instead of instanceof to properly detect NestedCloudAssemblyArtifact 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 NestedCloudAssemblyArtifact 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)


54
55
56
57
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 54

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

.jsii_overridable_methodsObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'cxapi/nested_cloud_assembly_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 },
    :directory_name => { kind: :property, name: "directoryName", is_optional: false },
    :display_name => { kind: :property, name: "displayName", is_optional: false },
    :full_path => { kind: :property, name: "fullPath", is_optional: false },
    :nested_assembly => { kind: :property, name: "nestedAssembly", is_optional: false },
    :find_metadata_by_type => { kind: :method, name: "findMetadataByType", is_optional: false },
  }
end

Instance Method Details

#assemblyAWSCDK::CXAPI::CloudAssembly



60
61
62
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 60

def assembly()
  jsii_get_property("assembly")
end

#dependenciesArray<AWSCDK::CXAPI::CloudArtifact>

Returns all the artifacts that this artifact depends on.

Returns:



67
68
69
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 67

def dependencies()
  jsii_get_property("dependencies")
end

#directory_nameString

The relative directory name of the asset manifest.

Returns:

  • (String)


110
111
112
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 110

def directory_name()
  jsii_get_property("directoryName")
end

#display_nameString

Display name.

Returns:

  • (String)


117
118
119
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 117

def display_name()
  jsii_get_property("displayName")
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:



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

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

#full_pathString

Full path to the nested assembly directory.

Returns:

  • (String)


124
125
126
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 124

def full_path()
  jsii_get_property("fullPath")
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)


77
78
79
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 77

def hierarchical_id()
  jsii_get_property("hierarchicalId")
end

#idString

Returns:

  • (String)


82
83
84
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 82

def id()
  jsii_get_property("id")
end

#manifestAWSCDK::CloudAssemblySchema::ArtifactManifest

The artifact's manifest.



89
90
91
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 89

def manifest()
  jsii_get_property("manifest")
end

#messagesArray<AWSCDK::CXAPI::SynthesisMessage>

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



96
97
98
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 96

def messages()
  jsii_get_property("messages")
end

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

Returns the metadata associated with this Cloud Artifact.

Returns:



103
104
105
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 103

def ()
  jsii_get_property("metadata")
end

#nested_assemblyAWSCDK::CXAPI::CloudAssembly

The nested Assembly.



131
132
133
# File 'cxapi/nested_cloud_assembly_artifact.rb', line 131

def nested_assembly()
  jsii_get_property("nestedAssembly")
end