Class: AWSCDK::ECS::DeploymentLifecycleLambdaTarget

Inherits:
Jsii::Object
  • Object
show all
Includes:
IDeploymentLifecycleHookTarget
Defined in:
ecs/deployment_lifecycle_lambda_target.rb

Overview

Use an AWS Lambda function as a deployment lifecycle hook target.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(handler, id, props) ⇒ DeploymentLifecycleLambdaTarget

Returns a new instance of DeploymentLifecycleLambdaTarget.



12
13
14
15
16
17
18
# File 'ecs/deployment_lifecycle_lambda_target.rb', line 12

def initialize(handler, id, props)
  props = props.is_a?(Hash) ? ::AWSCDK::ECS::DeploymentLifecycleLambdaTargetProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(handler, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "handler")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkRlcGxveW1lbnRMaWZlY3ljbGVMYW1iZGFUYXJnZXRQcm9wcyJ9")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(handler, id, props)
end

Class Method Details

.jsii_overridable_methodsObject



20
21
22
23
24
25
# File 'ecs/deployment_lifecycle_lambda_target.rb', line 20

def self.jsii_overridable_methods
  {
    :role => { kind: :property, name: "role", is_optional: false },
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

Instance Method Details

#bind(scope) ⇒ AWSCDK::ECS::DeploymentLifecycleHookTargetConfig

Bind this target to a deployment lifecycle hook.

Parameters:

  • scope (Constructs::IConstruct)

Returns:



38
39
40
41
# File 'ecs/deployment_lifecycle_lambda_target.rb', line 38

def bind(scope)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "scope")
  jsii_call_method("bind", [scope])
end

#roleAWSCDK::IAM::IRole

The IAM role for the deployment lifecycle hook target.

Returns:



30
31
32
# File 'ecs/deployment_lifecycle_lambda_target.rb', line 30

def role()
  jsii_get_property("role")
end