Class: AWSCDK::ImageBuilder::CfnComponentProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
image_builder/cfn_component_props.rb

Overview

Properties for defining a CfnComponent.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, platform:, version:, change_description: nil, data: nil, description: nil, kms_key_id: nil, supported_os_versions: nil, tags: nil, uri: nil) ⇒ CfnComponentProps

Returns a new instance of CfnComponentProps.

Parameters:

  • name (String)

    The name of the component.

  • platform (String)

    The operating system platform of the component.

  • version (String)

    The semantic version of the component. This version follows the semantic version syntax.

  • change_description (String, nil) (defaults to: nil)

    The change description of the component.

  • data (String, nil) (defaults to: nil)

    Component data contains inline YAML document content for the component.

  • description (String, nil) (defaults to: nil)

    Describes the contents of the component.

  • kms_key_id (String, nil) (defaults to: nil)

    The Amazon Resource Name (ARN) that uniquely identifies the KMS key used to encrypt this component.

  • supported_os_versions (Array<String>, nil) (defaults to: nil)

    The operating system (OS) version supported by the component.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    The tags that apply to the component.

  • uri (String, nil) (defaults to: nil)

    The uri of a YAML component document file.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'image_builder/cfn_component_props.rb', line 19

def initialize(name:, platform:, version:, change_description: nil, data: nil, description: nil, kms_key_id: nil, supported_os_versions: nil, tags: nil, uri: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @platform = platform
  Jsii::Type.check_type(@platform, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "platform")
  @version = version
  Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version")
  @change_description = change_description
  Jsii::Type.check_type(@change_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "changeDescription") unless @change_description.nil?
  @data = data
  Jsii::Type.check_type(@data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "data") unless @data.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @kms_key_id = kms_key_id
  Jsii::Type.check_type(@kms_key_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyId") unless @kms_key_id.nil?
  @supported_os_versions = supported_os_versions
  Jsii::Type.check_type(@supported_os_versions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "supportedOsVersions") unless @supported_os_versions.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
  @uri = uri
  Jsii::Type.check_type(@uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "uri") unless @uri.nil?
end

Instance Attribute Details

#change_descriptionString? (readonly)

The change description of the component.

Describes what change has been made in this version, or what makes this version different from other versions of the component.



69
70
71
# File 'image_builder/cfn_component_props.rb', line 69

def change_description
  @change_description
end

#dataString? (readonly)

Component data contains inline YAML document content for the component.

Alternatively, you can specify the uri of a YAML document file stored in Amazon S3. However, you cannot specify both properties.



76
77
78
# File 'image_builder/cfn_component_props.rb', line 76

def data
  @data
end

#descriptionString? (readonly)

Describes the contents of the component.



81
82
83
# File 'image_builder/cfn_component_props.rb', line 81

def description
  @description
end

#kms_key_idString? (readonly)

The Amazon Resource Name (ARN) that uniquely identifies the KMS key used to encrypt this component.

This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the AWS Key Management Service Developer Guide .



88
89
90
# File 'image_builder/cfn_component_props.rb', line 88

def kms_key_id
  @kms_key_id
end

#nameString (readonly)

The name of the component.



46
47
48
# File 'image_builder/cfn_component_props.rb', line 46

def name
  @name
end

#platformString (readonly)

The operating system platform of the component.



51
52
53
# File 'image_builder/cfn_component_props.rb', line 51

def platform
  @platform
end

#supported_os_versionsArray<String>? (readonly)

The operating system (OS) version supported by the component.

If the OS information is available, a prefix match is performed against the base image OS version during image recipe creation.



95
96
97
# File 'image_builder/cfn_component_props.rb', line 95

def supported_os_versions
  @supported_os_versions
end

#tagsHash{String => String}? (readonly)

The tags that apply to the component.



100
101
102
# File 'image_builder/cfn_component_props.rb', line 100

def tags
  @tags
end

#uriString? (readonly)

The uri of a YAML component document file.

This must be an S3 URL ( s3://bucket/key ), and the requester must have permission to access the S3 bucket it points to. If you use Amazon S3, you can specify component content up to your service quota.

Alternatively, you can specify the YAML document inline, using the component data property. You cannot specify both properties.



109
110
111
# File 'image_builder/cfn_component_props.rb', line 109

def uri
  @uri
end

#versionString (readonly)

The semantic version of the component. This version follows the semantic version syntax.

The semantic version has four nodes: ../. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.



62
63
64
# File 'image_builder/cfn_component_props.rb', line 62

def version
  @version
end

Class Method Details

.jsii_propertiesObject



111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'image_builder/cfn_component_props.rb', line 111

def self.jsii_properties
  {
    :name => "name",
    :platform => "platform",
    :version => "version",
    :change_description => "changeDescription",
    :data => "data",
    :description => "description",
    :kms_key_id => "kmsKeyId",
    :supported_os_versions => "supportedOsVersions",
    :tags => "tags",
    :uri => "uri",
  }
end

Instance Method Details

#to_jsiiObject



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'image_builder/cfn_component_props.rb', line 126

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "platform" => @platform,
    "version" => @version,
    "changeDescription" => @change_description,
    "data" => @data,
    "description" => @description,
    "kmsKeyId" => @kms_key_id,
    "supportedOsVersions" => @supported_os_versions,
    "tags" => @tags,
    "uri" => @uri,
  })
  result.compact
end