Class: AWSCDK::CloudAssemblySchema::FileAssetMetadataEntry

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

Overview

Metadata Entry spec for files.

Examples:

entry = {
    packaging: "file",
    s3_bucket_parameter: "bucket-parameter",
    s3_key_paramenter: "key-parameter",
    artifact_hash_parameter: "hash-parameter",
}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(artifact_hash_parameter:, id:, packaging:, path:, s3_bucket_parameter:, s3_key_parameter:, source_hash:) ⇒ FileAssetMetadataEntry

Returns a new instance of FileAssetMetadataEntry.

Parameters:

  • artifact_hash_parameter (String)

    The name of the parameter where the hash of the bundled asset should be passed in.

  • id (String)

    Logical identifier for the asset.

  • packaging (String)

    Requested packaging style.

  • path (String)

    Path on disk to the asset.

  • s3_bucket_parameter (String)

    Name of parameter where S3 bucket should be passed in.

  • s3_key_parameter (String)

    Name of parameter where S3 key should be passed in.

  • source_hash (String)

    The hash of the asset source.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'cloud_assembly_schema/file_asset_metadata_entry.rb', line 22

def initialize(artifact_hash_parameter:, id:, packaging:, path:, s3_bucket_parameter:, s3_key_parameter:, source_hash:)
  @artifact_hash_parameter = artifact_hash_parameter
  Jsii::Type.check_type(@artifact_hash_parameter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "artifactHashParameter")
  @id = id
  Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  @packaging = packaging
  Jsii::Type.check_type(@packaging, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "packaging")
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  @s3_bucket_parameter = s3_bucket_parameter
  Jsii::Type.check_type(@s3_bucket_parameter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3BucketParameter")
  @s3_key_parameter = s3_key_parameter
  Jsii::Type.check_type(@s3_key_parameter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3KeyParameter")
  @source_hash = source_hash
  Jsii::Type.check_type(@source_hash, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceHash")
end

Instance Attribute Details

#artifact_hash_parameterString (readonly)

The name of the parameter where the hash of the bundled asset should be passed in.

Returns:

  • (String)


42
43
44
# File 'cloud_assembly_schema/file_asset_metadata_entry.rb', line 42

def artifact_hash_parameter
  @artifact_hash_parameter
end

#idString (readonly)

Logical identifier for the asset.

Returns:

  • (String)


46
47
48
# File 'cloud_assembly_schema/file_asset_metadata_entry.rb', line 46

def id
  @id
end

#packagingString (readonly)

Requested packaging style.

Returns:

  • (String)


50
51
52
# File 'cloud_assembly_schema/file_asset_metadata_entry.rb', line 50

def packaging
  @packaging
end

#pathString (readonly)

Path on disk to the asset.

Returns:

  • (String)


54
55
56
# File 'cloud_assembly_schema/file_asset_metadata_entry.rb', line 54

def path
  @path
end

#s3_bucket_parameterString (readonly)

Name of parameter where S3 bucket should be passed in.

Returns:

  • (String)


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

def s3_bucket_parameter
  @s3_bucket_parameter
end

#s3_key_parameterString (readonly)

Name of parameter where S3 key should be passed in.

Returns:

  • (String)


62
63
64
# File 'cloud_assembly_schema/file_asset_metadata_entry.rb', line 62

def s3_key_parameter
  @s3_key_parameter
end

#source_hashString (readonly)

The hash of the asset source.

Returns:

  • (String)


66
67
68
# File 'cloud_assembly_schema/file_asset_metadata_entry.rb', line 66

def source_hash
  @source_hash
end

Class Method Details

.jsii_propertiesObject



68
69
70
71
72
73
74
75
76
77
78
# File 'cloud_assembly_schema/file_asset_metadata_entry.rb', line 68

def self.jsii_properties
  {
    :artifact_hash_parameter => "artifactHashParameter",
    :id => "id",
    :packaging => "packaging",
    :path => "path",
    :s3_bucket_parameter => "s3BucketParameter",
    :s3_key_parameter => "s3KeyParameter",
    :source_hash => "sourceHash",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "artifactHashParameter" => @artifact_hash_parameter,
    "id" => @id,
    "packaging" => @packaging,
    "path" => @path,
    "s3BucketParameter" => @s3_bucket_parameter,
    "s3KeyParameter" => @s3_key_parameter,
    "sourceHash" => @source_hash,
  })
  result.compact
end