Class: AWSCDK::Autoscaling::LifecycleHookTargetConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
autoscaling/lifecycle_hook_target_config.rb

Overview

Result of binding a lifecycle hook to a target.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(created_role:, notification_target_arn:) ⇒ LifecycleHookTargetConfig

Returns a new instance of LifecycleHookTargetConfig.

Parameters:

  • created_role (AWSCDK::IAM::IRole)

    The IRole that was used to bind the lifecycle hook to the target.

  • notification_target_arn (String)

    The targetArn that the lifecycle hook was bound to.



9
10
11
12
13
14
# File 'autoscaling/lifecycle_hook_target_config.rb', line 9

def initialize(created_role:, notification_target_arn:)
  @created_role = created_role
  Jsii::Type.check_type(@created_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "createdRole")
  @notification_target_arn = notification_target_arn
  Jsii::Type.check_type(@notification_target_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "notificationTargetArn")
end

Instance Attribute Details

#created_roleAWSCDK::IAM::IRole (readonly)

The IRole that was used to bind the lifecycle hook to the target.

Returns:



19
20
21
# File 'autoscaling/lifecycle_hook_target_config.rb', line 19

def created_role
  @created_role
end

#notification_target_arnString (readonly)

The targetArn that the lifecycle hook was bound to.

Returns:

  • (String)


23
24
25
# File 'autoscaling/lifecycle_hook_target_config.rb', line 23

def notification_target_arn
  @notification_target_arn
end

Class Method Details

.jsii_propertiesObject



25
26
27
28
29
30
# File 'autoscaling/lifecycle_hook_target_config.rb', line 25

def self.jsii_properties
  {
    :created_role => "createdRole",
    :notification_target_arn => "notificationTargetArn",
  }
end

Instance Method Details

#to_jsiiObject



32
33
34
35
36
37
38
39
# File 'autoscaling/lifecycle_hook_target_config.rb', line 32

def to_jsii
  result = {}
  result.merge!({
    "createdRole" => @created_role,
    "notificationTargetArn" => @notification_target_arn,
  })
  result.compact
end