Class: AWSCDK::SSMQuickSetup::CfnLifecycleAutomationProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ssm_quick_setup/cfn_lifecycle_automation_props.rb

Overview

Properties for defining a CfnLifecycleAutomation.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(automation_document:, automation_parameters:, resource_key:, tags: nil) ⇒ CfnLifecycleAutomationProps

Returns a new instance of CfnLifecycleAutomationProps.

Parameters:

  • automation_document (String)

    The name of the SSM Automation document to execute in response to CloudFormation lifecycle events (CREATE, UPDATE, DELETE).

  • automation_parameters (AWSCDK::IResolvable, Hash{String => Array<String>})

    A map of key-value parameters passed to the Automation document during execution.

  • resource_key (String)

    A unique identifier used for generating the SSM Association name.

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

    Tags applied to the underlying SSM Association created by this resource.



13
14
15
16
17
18
19
20
21
22
# File 'ssm_quick_setup/cfn_lifecycle_automation_props.rb', line 13

def initialize(automation_document:, automation_parameters:, resource_key:, tags: nil)
  @automation_document = automation_document
  Jsii::Type.check_type(@automation_document, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "automationDocument")
  @automation_parameters = automation_parameters
  Jsii::Type.check_type(@automation_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsiY29sbGVjdGlvbiI6eyJlbGVtZW50dHlwZSI6eyJwcmltaXRpdmUiOiJzdHJpbmcifSwia2luZCI6ImFycmF5In19LCJraW5kIjoibWFwIn19XX19")), "automationParameters")
  @resource_key = resource_key
  Jsii::Type.check_type(@resource_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceKey")
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#automation_documentString (readonly)

The name of the SSM Automation document to execute in response to CloudFormation lifecycle events (CREATE, UPDATE, DELETE).



28
29
30
# File 'ssm_quick_setup/cfn_lifecycle_automation_props.rb', line 28

def automation_document
  @automation_document
end

#automation_parametersAWSCDK::IResolvable, Hash{String => Array<String>} (readonly)

A map of key-value parameters passed to the Automation document during execution.

Each parameter name maps to a list of values, even for single values. Parameters can include configuration-specific values for your automation workflow.



35
36
37
# File 'ssm_quick_setup/cfn_lifecycle_automation_props.rb', line 35

def automation_parameters
  @automation_parameters
end

#resource_keyString (readonly)

A unique identifier used for generating the SSM Association name.

This ensures uniqueness when multiple lifecycle automation resources exist in the same stack.



42
43
44
# File 'ssm_quick_setup/cfn_lifecycle_automation_props.rb', line 42

def resource_key
  @resource_key
end

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

Tags applied to the underlying SSM Association created by this resource.

Tags help identify and organize automation executions.



49
50
51
# File 'ssm_quick_setup/cfn_lifecycle_automation_props.rb', line 49

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



51
52
53
54
55
56
57
58
# File 'ssm_quick_setup/cfn_lifecycle_automation_props.rb', line 51

def self.jsii_properties
  {
    :automation_document => "automationDocument",
    :automation_parameters => "automationParameters",
    :resource_key => "resourceKey",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



60
61
62
63
64
65
66
67
68
69
# File 'ssm_quick_setup/cfn_lifecycle_automation_props.rb', line 60

def to_jsii
  result = {}
  result.merge!({
    "automationDocument" => @automation_document,
    "automationParameters" => @automation_parameters,
    "resourceKey" => @resource_key,
    "tags" => @tags,
  })
  result.compact
end