Class: AWSCDK::Autoscaling::BindHookTargetOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Autoscaling::BindHookTargetOptions
- Defined in:
- autoscaling/bind_hook_target_options.rb
Overview
Options needed to bind a target to a lifecycle hook.
[disable-awslint:ref-via-interface] The lifecycle hook to attach to and an IRole to use
Instance Attribute Summary collapse
-
#lifecycle_hook ⇒ AWSCDK::Autoscaling::LifecycleHook
readonly
The lifecycle hook to attach to.
-
#role ⇒ AWSCDK::IAM::IRole?
readonly
The role to use when attaching to the lifecycle hook.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(lifecycle_hook:, role: nil) ⇒ BindHookTargetOptions
constructor
A new instance of BindHookTargetOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(lifecycle_hook:, role: nil) ⇒ BindHookTargetOptions
Returns a new instance of BindHookTargetOptions.
11 12 13 14 15 16 |
# File 'autoscaling/bind_hook_target_options.rb', line 11 def initialize(lifecycle_hook:, role: nil) @lifecycle_hook = lifecycle_hook Jsii::Type.check_type(@lifecycle_hook, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuTGlmZWN5Y2xlSG9vayJ9")), "lifecycleHook") @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil? end |
Instance Attribute Details
#lifecycle_hook ⇒ AWSCDK::Autoscaling::LifecycleHook (readonly)
The lifecycle hook to attach to.
[disable-awslint:ref-via-interface]
23 24 25 |
# File 'autoscaling/bind_hook_target_options.rb', line 23 def lifecycle_hook @lifecycle_hook end |
#role ⇒ AWSCDK::IAM::IRole? (readonly)
Note:
Default: : a role is not created unless the target arn is specified
The role to use when attaching to the lifecycle hook.
[disable-awslint:ref-via-interface]
30 31 32 |
# File 'autoscaling/bind_hook_target_options.rb', line 30 def role @role end |
Class Method Details
.jsii_properties ⇒ Object
32 33 34 35 36 37 |
# File 'autoscaling/bind_hook_target_options.rb', line 32 def self.jsii_properties { :lifecycle_hook => "lifecycleHook", :role => "role", } end |
Instance Method Details
#to_jsii ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'autoscaling/bind_hook_target_options.rb', line 39 def to_jsii result = {} result.merge!({ "lifecycleHook" => @lifecycle_hook, "role" => @role, }) result.compact end |