Class: AWSCDK::ECS::DeploymentLifecycleHookTargetConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/deployment_lifecycle_hook_target_config.rb

Overview

Configuration for a deployment lifecycle hook target.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lifecycle_stages:, target_arn:, role: nil) ⇒ DeploymentLifecycleHookTargetConfig

Returns a new instance of DeploymentLifecycleHookTargetConfig.

Parameters:

  • lifecycle_stages (Array<AWSCDK::ECS::DeploymentLifecycleStage>)

    The lifecycle stages when this hook should be executed.

  • target_arn (String)

    The ARN of the target resource.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The IAM role that grants permissions to invoke the target.



10
11
12
13
14
15
16
17
# File 'ecs/deployment_lifecycle_hook_target_config.rb', line 10

def initialize(lifecycle_stages:, target_arn:, role: nil)
  @lifecycle_stages = lifecycle_stages
  Jsii::Type.check_type(@lifecycle_stages, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuRGVwbG95bWVudExpZmVjeWNsZVN0YWdlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "lifecycleStages")
  @target_arn = target_arn
  Jsii::Type.check_type(@target_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetArn")
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
end

Instance Attribute Details

#lifecycle_stagesArray<AWSCDK::ECS::DeploymentLifecycleStage> (readonly)

The lifecycle stages when this hook should be executed.



22
23
24
# File 'ecs/deployment_lifecycle_hook_target_config.rb', line 22

def lifecycle_stages
  @lifecycle_stages
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - a role will be created automatically

The IAM role that grants permissions to invoke the target.

Returns:



31
32
33
# File 'ecs/deployment_lifecycle_hook_target_config.rb', line 31

def role
  @role
end

#target_arnString (readonly)

The ARN of the target resource.

Returns:

  • (String)


26
27
28
# File 'ecs/deployment_lifecycle_hook_target_config.rb', line 26

def target_arn
  @target_arn
end

Class Method Details

.jsii_propertiesObject



33
34
35
36
37
38
39
# File 'ecs/deployment_lifecycle_hook_target_config.rb', line 33

def self.jsii_properties
  {
    :lifecycle_stages => "lifecycleStages",
    :target_arn => "targetArn",
    :role => "role",
  }
end

Instance Method Details

#to_jsiiObject



41
42
43
44
45
46
47
48
49
# File 'ecs/deployment_lifecycle_hook_target_config.rb', line 41

def to_jsii
  result = {}
  result.merge!({
    "lifecycleStages" => @lifecycle_stages,
    "targetArn" => @target_arn,
    "role" => @role,
  })
  result.compact
end