Class: AWSCDK::ImageBuilder::CfnImage::DeletionSettingsProperty

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

Overview

Contains deletion settings of underlying resources of an image when it is replaced or deleted, including its Amazon Machine Images (AMIs), snapshots, or containers.

If you specify the Retain option in the DeletionPolicy or UpdateReplacePolicy , the deletion of underlying resources will not be executed.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(execution_role:) ⇒ DeletionSettingsProperty

Returns a new instance of DeletionSettingsProperty.

Parameters:

  • execution_role (String)

    The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to delete the image and its underlying resources.



751
752
753
754
# File 'image_builder/cfn_image.rb', line 751

def initialize(execution_role:)
  @execution_role = execution_role
  Jsii::Type.check_type(@execution_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionRole")
end

Instance Attribute Details

#execution_roleString (readonly)

The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to delete the image and its underlying resources.



760
761
762
# File 'image_builder/cfn_image.rb', line 760

def execution_role
  @execution_role
end

Class Method Details

.jsii_propertiesObject



762
763
764
765
766
# File 'image_builder/cfn_image.rb', line 762

def self.jsii_properties
  {
    :execution_role => "executionRole",
  }
end

Instance Method Details

#to_jsiiObject



768
769
770
771
772
773
774
# File 'image_builder/cfn_image.rb', line 768

def to_jsii
  result = {}
  result.merge!({
    "executionRole" => @execution_role,
  })
  result.compact
end