Class: AWSCDK::CloudAssemblySchema::ArtifactManifest

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_assembly_schema/artifact_manifest.rb

Overview

A manifest for a single artifact within the cloud assembly.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, additional_metadata_file: nil, dependencies: nil, display_name: nil, environment: nil, metadata: nil, properties: nil) ⇒ ArtifactManifest

Returns a new instance of ArtifactManifest.

Parameters:



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'cloud_assembly_schema/artifact_manifest.rb', line 14

def initialize(type:, additional_metadata_file: nil, dependencies: nil, display_name: nil, environment: nil, metadata: nil, properties: nil)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jbG91ZF9hc3NlbWJseV9zY2hlbWEuQXJ0aWZhY3RUeXBlIn0=")), "type")
  @additional_metadata_file = 
  Jsii::Type.check_type(@additional_metadata_file, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "additionalMetadataFile") unless @additional_metadata_file.nil?
  @dependencies = dependencies
  Jsii::Type.check_type(@dependencies, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "dependencies") unless @dependencies.nil?
  @display_name = display_name
  Jsii::Type.check_type(@display_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "displayName") unless @display_name.nil?
  @environment = environment
  Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "environment") unless @environment.nil?
  @metadata = .is_a?(Hash) ? .transform_values { |jsii_v0| jsii_v0.is_a?(Array) ? jsii_v0.map { |jsii_v1| jsii_v1.is_a?(Hash) ? ::AWSCDK::CloudAssemblySchema::MetadataEntry.new(**jsii_v1.transform_keys(&:to_sym)) : jsii_v1 } : jsii_v0 } : 
  Jsii::Type.check_type(@metadata, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsiZnFuIjoiYXdzLWNkay1saWIuY2xvdWRfYXNzZW1ibHlfc2NoZW1hLk1ldGFkYXRhRW50cnkifSwia2luZCI6ImFycmF5In19LCJraW5kIjoibWFwIn19")), "metadata") unless @metadata.nil?
  @properties = properties
  Jsii::Type.check_type(@properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuY2xvdWRfYXNzZW1ibHlfc2NoZW1hLkF3c0Nsb3VkRm9ybWF0aW9uU3RhY2tQcm9wZXJ0aWVzIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5jbG91ZF9hc3NlbWJseV9zY2hlbWEuQXNzZXRNYW5pZmVzdFByb3BlcnRpZXMifSx7ImZxbiI6ImF3cy1jZGstbGliLmNsb3VkX2Fzc2VtYmx5X3NjaGVtYS5UcmVlQXJ0aWZhY3RQcm9wZXJ0aWVzIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5jbG91ZF9hc3NlbWJseV9zY2hlbWEuTmVzdGVkQ2xvdWRBc3NlbWJseVByb3BlcnRpZXMifSx7ImZxbiI6ImF3cy1jZGstbGliLmNsb3VkX2Fzc2VtYmx5X3NjaGVtYS5GZWF0dXJlRmxhZ1JlcG9ydFByb3BlcnRpZXMifV19fQ==")), "properties") unless @properties.nil?
end

Instance Attribute Details

#additional_metadata_fileString? (readonly)

Note:

Default: - no additional metadata

A file with additional metadata entries.

The schema of this file is exactly the same as the type of the metadata field. In other words, that file contains an object mapping construct paths to arrays of metadata entries.

Returns:

  • (String, nil)


43
44
45
# File 'cloud_assembly_schema/artifact_manifest.rb', line 43

def 
  @additional_metadata_file
end

#dependenciesArray<String>? (readonly)

Note:

Default: - no dependencies.

IDs of artifacts that must be deployed before this artifact.

Returns:

  • (Array<String>, nil)


48
49
50
# File 'cloud_assembly_schema/artifact_manifest.rb', line 48

def dependencies
  @dependencies
end

#display_nameString? (readonly)

Note:

Default: - no display name

A string that can be shown to a user to uniquely identify this artifact inside a cloud assembly tree.

Is used by the CLI to present a list of stacks to the user in a way that makes sense to them. Even though the property name "display name" doesn't imply it, this field is used to select stacks as well, so all stacks should have a unique display name.

Returns:

  • (String, nil)


58
59
60
# File 'cloud_assembly_schema/artifact_manifest.rb', line 58

def display_name
  @display_name
end

#environmentString? (readonly)

Note:

Default: - no envrionment.

The environment into which this artifact is deployed.

Returns:

  • (String, nil)


63
64
65
# File 'cloud_assembly_schema/artifact_manifest.rb', line 63

def environment
  @environment
end

#metadataHash{String => Array<AWSCDK::CloudAssemblySchema::MetadataEntry>}? (readonly)

Note:

Default: - no metadata.

Associated metadata.

Metadata can be stored directly in the assembly manifest, as well as in a separate file (see additional_metadata_file). It should prefer to be stored in the additional file, as that will reduce the size of the assembly manifest in cases of a lot of metdata (which CDK does emit by default).

Returns:



73
74
75
# File 'cloud_assembly_schema/artifact_manifest.rb', line 73

def 
  @metadata
end

#propertiesAWSCDK::CloudAssemblySchema::AWSCloudFormationStackProperties, ... (readonly)

Note:

Default: - no properties.

The set of properties for this artifact (depends on type).



78
79
80
# File 'cloud_assembly_schema/artifact_manifest.rb', line 78

def properties
  @properties
end

#typeAWSCDK::CloudAssemblySchema::ArtifactType (readonly)

The type of artifact.



34
35
36
# File 'cloud_assembly_schema/artifact_manifest.rb', line 34

def type
  @type
end

Class Method Details

.jsii_propertiesObject



80
81
82
83
84
85
86
87
88
89
90
# File 'cloud_assembly_schema/artifact_manifest.rb', line 80

def self.jsii_properties
  {
    :type => "type",
    :additional_metadata_file => "additionalMetadataFile",
    :dependencies => "dependencies",
    :display_name => "displayName",
    :environment => "environment",
    :metadata => "metadata",
    :properties => "properties",
  }
end

Instance Method Details

#to_jsiiObject



92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'cloud_assembly_schema/artifact_manifest.rb', line 92

def to_jsii
  result = {}
  result.merge!({
    "type" => @type,
    "additionalMetadataFile" => @additional_metadata_file,
    "dependencies" => @dependencies,
    "displayName" => @display_name,
    "environment" => @environment,
    "metadata" => @metadata,
    "properties" => @properties,
  })
  result.compact
end