Class: Aws::ECS::Types::DeploymentLifecycleHook

Inherits:
Struct
  • Object
show all
Includes:
Structure
Defined in:
lib/aws-sdk-ecs/types.rb

Overview

A deployment lifecycle hook runs custom logic at specific stages of the deployment process. Currently, you can use Lambda functions as hook targets.

For more information, see [Lifecycle hooks for Amazon ECS service deployments] in the Amazon Elastic Container Service Developer Guide.

[1]: docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-lifecycle-hooks.html

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#hook_detailsHash, ...

Use this field to specify custom parameters that Amazon ECS will pass to your hook target invocations (such as a Lambda function).

Returns:

  • (Hash, Array, String, Numeric, Boolean)


6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
# File 'lib/aws-sdk-ecs/types.rb', line 6170

class DeploymentLifecycleHook < Struct.new(
  :target_type,
  :hook_target_arn,
  :role_arn,
  :lifecycle_stages,
  :hook_details,
  :timeout_configuration)
  SENSITIVE = []
  include Aws::Structure
end

#hook_target_arnString

The Amazon Resource Name (ARN) of the hook target. Currently, only Lambda function ARNs are supported.

You must provide this parameter when configuring a deployment lifecycle hook.

Returns:

  • (String)


6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
# File 'lib/aws-sdk-ecs/types.rb', line 6170

class DeploymentLifecycleHook < Struct.new(
  :target_type,
  :hook_target_arn,
  :role_arn,
  :lifecycle_stages,
  :hook_details,
  :timeout_configuration)
  SENSITIVE = []
  include Aws::Structure
end

#lifecycle_stagesArray<String>

The lifecycle stages at which to run the hook. Choose from these valid values:

  • RECONCILE_SERVICE

    The reconciliation stage that only happens when you start a new service deployment with more than 1 service revision in an ACTIVE state.

    You can use a lifecycle hook for this stage.

  • PRE_SCALE_UP

    The green service revision has not started. The blue service revision is handling 100% of the production traffic. There is no test traffic.

    You can use a lifecycle hook for this stage.

  • POST_SCALE_UP

    The green service revision has started. The blue service revision is handling 100% of the production traffic. There is no test traffic.

    You can use a lifecycle hook for this stage.

  • TEST_TRAFFIC_SHIFT

    The blue and green service revisions are running. The blue service revision handles 100% of the production traffic. The green service revision is migrating from 0% to 100% of test traffic.

    You can use a lifecycle hook for this stage.

  • POST_TEST_TRAFFIC_SHIFT

    The test traffic shift is complete. The green service revision handles 100% of the test traffic.

    You can use a lifecycle hook for this stage.

  • PRODUCTION_TRAFFIC_SHIFT

    Production traffic is shifting to the green service revision. The green service revision is migrating from 0% to 100% of production traffic.

    You can use a lifecycle hook for this stage.

  • POST_PRODUCTION_TRAFFIC_SHIFT

    The production traffic shift is complete.

    You can use a lifecycle hook for this stage.

You must provide this parameter when configuring a deployment lifecycle hook.

Returns:

  • (Array<String>)


6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
# File 'lib/aws-sdk-ecs/types.rb', line 6170

class DeploymentLifecycleHook < Struct.new(
  :target_type,
  :hook_target_arn,
  :role_arn,
  :lifecycle_stages,
  :hook_details,
  :timeout_configuration)
  SENSITIVE = []
  include Aws::Structure
end

#role_arnString

The Amazon Resource Name (ARN) of the IAM role that grants Amazon ECS permission to call Lambda functions on your behalf.

For more information, see [Permissions required for Lambda functions in Amazon ECS blue/green deployments] in the Amazon Elastic Container Service Developer Guide.

[1]: docs.aws.amazon.com/AmazonECS/latest/developerguide/blue-green-permissions.html

Returns:

  • (String)


6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
# File 'lib/aws-sdk-ecs/types.rb', line 6170

class DeploymentLifecycleHook < Struct.new(
  :target_type,
  :hook_target_arn,
  :role_arn,
  :lifecycle_stages,
  :hook_details,
  :timeout_configuration)
  SENSITIVE = []
  include Aws::Structure
end

#target_typeString

The type of action the lifecycle hook performs. Valid values are:

  • ‘AWS_LAMBDA` - Invokes a Lambda function at the specified lifecycle stage. This is the default value.

  • ‘PAUSE` - Pauses the deployment at the specified lifecycle stage until you call `ContinueServiceDeployment` to continue or roll back.

This field is optional. If not specified, the default value is ‘AWS_LAMBDA`.

Returns:

  • (String)


6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
# File 'lib/aws-sdk-ecs/types.rb', line 6170

class DeploymentLifecycleHook < Struct.new(
  :target_type,
  :hook_target_arn,
  :role_arn,
  :lifecycle_stages,
  :hook_details,
  :timeout_configuration)
  SENSITIVE = []
  include Aws::Structure
end

#timeout_configurationTypes::DeploymentLifecycleHookTimeoutConfiguration

The timeout configuration for the lifecycle hook. This specifies how long Amazon ECS waits before taking the timeout action if the hook is not resolved.



6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
# File 'lib/aws-sdk-ecs/types.rb', line 6170

class DeploymentLifecycleHook < Struct.new(
  :target_type,
  :hook_target_arn,
  :role_arn,
  :lifecycle_stages,
  :hook_details,
  :timeout_configuration)
  SENSITIVE = []
  include Aws::Structure
end