Class: AWSCDK::Lightsail::CfnInstanceSnapshotProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lightsail/cfn_instance_snapshot_props.rb

Overview

Properties for defining a CfnInstanceSnapshot.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance_name:, instance_snapshot_name:, tags: nil) ⇒ CfnInstanceSnapshotProps

Returns a new instance of CfnInstanceSnapshotProps.

Parameters:

  • instance_name (String)

    The name the user gave the instance ( Amazon_Linux_2023-1 ).

  • instance_snapshot_name (String)

    The name of the snapshot.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The tag keys and optional values for the resource.



12
13
14
15
16
17
18
19
# File 'lightsail/cfn_instance_snapshot_props.rb', line 12

def initialize(instance_name:, instance_snapshot_name:, tags: nil)
  @instance_name = instance_name
  Jsii::Type.check_type(@instance_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceName")
  @instance_snapshot_name = instance_snapshot_name
  Jsii::Type.check_type(@instance_snapshot_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceSnapshotName")
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#instance_nameString (readonly)

The name the user gave the instance ( Amazon_Linux_2023-1 ).



25
26
27
# File 'lightsail/cfn_instance_snapshot_props.rb', line 25

def instance_name
  @instance_name
end

#instance_snapshot_nameString (readonly)

The name of the snapshot.



30
31
32
# File 'lightsail/cfn_instance_snapshot_props.rb', line 30

def instance_snapshot_name
  @instance_snapshot_name
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The tag keys and optional values for the resource.

For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .



37
38
39
# File 'lightsail/cfn_instance_snapshot_props.rb', line 37

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
# File 'lightsail/cfn_instance_snapshot_props.rb', line 39

def self.jsii_properties
  {
    :instance_name => "instanceName",
    :instance_snapshot_name => "instanceSnapshotName",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
# File 'lightsail/cfn_instance_snapshot_props.rb', line 47

def to_jsii
  result = {}
  result.merge!({
    "instanceName" => @instance_name,
    "instanceSnapshotName" => @instance_snapshot_name,
    "tags" => @tags,
  })
  result.compact
end