/AWS1/CL_ECSDEPLOYMENTLCHOOK¶
A deployment lifecycle hook runs custom logic or pauses the deployment at specific stages of the deployment process. You can use Lambda functions or pause hooks as hook targets.
For more information, see Lifecycle hooks for Amazon ECS service deployments in the Amazon Elastic Container Service Developer Guide.
CONSTRUCTOR¶
IMPORTING¶
Optional arguments:¶
iv_targettype TYPE /AWS1/ECSDEPLOYLCHOOKTGTTYPE /AWS1/ECSDEPLOYLCHOOKTGTTYPE¶
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 callContinueServiceDeploymentto continue or roll back.This field is optional. If not specified, the default value is
AWS_LAMBDA.
iv_hooktargetarn TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The Amazon Resource Name (ARN) of the hook target. For
AWS_LAMBDAhooks, this is the Lambda function ARN. This field is not applicable forPAUSEhooks.You must provide this parameter when configuring an
AWS_LAMBDAlifecycle hook.
iv_rolearn TYPE /AWS1/ECSIAMROLEARN /AWS1/ECSIAMROLEARN¶
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.
it_lifecyclestages TYPE /AWS1/CL_ECSDEPLOYMENTLCHOOK00=>TT_DEPLOYMENTLCHOOKSTAGELIST TT_DEPLOYMENTLCHOOKSTAGELIST¶
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.
PRE_PRODUCTION_TRAFFIC_SHIFT
Occurs before production traffic shift. For linear and canary deployments, this stage is invoked before every traffic shift step.
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. For linear and canary deployments, this stage is invoked at every traffic shift step.
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.
PAUSEhooks cannot be configured atTEST_TRAFFIC_SHIFTorPRODUCTION_TRAFFIC_SHIFTstages. These stages are only valid forAWS_LAMBDAhooks.You must provide this parameter when configuring a deployment lifecycle hook.
io_hookdetails TYPE REF TO /AWS1/CL_RT_DOCUMENT /AWS1/CL_RT_DOCUMENT¶
Use this field to specify custom parameters that Amazon ECS passes to your Lambda function on each invocation. This field is not used for
PAUSEhooks.
io_timeoutconfiguration TYPE REF TO /AWS1/CL_ECSDEPLLCHOOKTOCONF /AWS1/CL_ECSDEPLLCHOOKTOCONF¶
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.
Queryable Attributes¶
targetType¶
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 callContinueServiceDeploymentto continue or roll back.This field is optional. If not specified, the default value is
AWS_LAMBDA.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_TARGETTYPE() |
Getter for TARGETTYPE, with configurable default |
ASK_TARGETTYPE() |
Getter for TARGETTYPE w/ exceptions if field has no value |
HAS_TARGETTYPE() |
Determine if TARGETTYPE has a value |
hookTargetArn¶
The Amazon Resource Name (ARN) of the hook target. For
AWS_LAMBDAhooks, this is the Lambda function ARN. This field is not applicable forPAUSEhooks.You must provide this parameter when configuring an
AWS_LAMBDAlifecycle hook.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_HOOKTARGETARN() |
Getter for HOOKTARGETARN, with configurable default |
ASK_HOOKTARGETARN() |
Getter for HOOKTARGETARN w/ exceptions if field has no value |
HAS_HOOKTARGETARN() |
Determine if HOOKTARGETARN has a value |
roleArn¶
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.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_ROLEARN() |
Getter for ROLEARN, with configurable default |
ASK_ROLEARN() |
Getter for ROLEARN w/ exceptions if field has no value |
HAS_ROLEARN() |
Determine if ROLEARN has a value |
lifecycleStages¶
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.
PRE_PRODUCTION_TRAFFIC_SHIFT
Occurs before production traffic shift. For linear and canary deployments, this stage is invoked before every traffic shift step.
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. For linear and canary deployments, this stage is invoked at every traffic shift step.
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.
PAUSEhooks cannot be configured atTEST_TRAFFIC_SHIFTorPRODUCTION_TRAFFIC_SHIFTstages. These stages are only valid forAWS_LAMBDAhooks.You must provide this parameter when configuring a deployment lifecycle hook.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_LIFECYCLESTAGES() |
Getter for LIFECYCLESTAGES, with configurable default |
ASK_LIFECYCLESTAGES() |
Getter for LIFECYCLESTAGES w/ exceptions if field has no val |
HAS_LIFECYCLESTAGES() |
Determine if LIFECYCLESTAGES has a value |
hookDetails¶
Use this field to specify custom parameters that Amazon ECS passes to your Lambda function on each invocation. This field is not used for
PAUSEhooks.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_HOOKDETAILS() |
Getter for HOOKDETAILS, with configurable default |
ASK_HOOKDETAILS() |
Getter for HOOKDETAILS w/ exceptions if field has no value |
HAS_HOOKDETAILS() |
Determine if HOOKDETAILS has a value |
timeoutConfiguration¶
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.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_TIMEOUTCONFIGURATION() |
Getter for TIMEOUTCONFIGURATION |
Public Local Types In This Class¶
Internal table types, representing arrays and maps of this class, are defined as local types:
TT_DEPLOYMENTLIFECYCLEHOOKLIST¶
TYPES TT_DEPLOYMENTLIFECYCLEHOOKLIST TYPE STANDARD TABLE OF REF TO /AWS1/CL_ECSDEPLOYMENTLCHOOK WITH DEFAULT KEY
.