Skip to content

/AWS1/IF_ECS=>CONTINUESERVICEDEPLOYMENT()

About ContinueServiceDeployment

Continues or rolls back an Amazon ECS service deployment that is paused at a lifecycle hook.

When a service deployment reaches a lifecycle stage that has a PAUSE hook configured, the deployment pauses and waits for an explicit action. Use this API to either continue the deployment to the next stage or roll back to the previous service revision.

To find the hookId of the paused hook, call DescribeServiceDeployments and inspect the lifecycleHookDetails field.

Method Signature

METHODS /AWS1/IF_ECS~CONTINUESERVICEDEPLOYMENT
  IMPORTING
    !IV_SERVICEDEPLOYMENTARN TYPE /AWS1/ECSSTRING OPTIONAL
    !IV_HOOKID TYPE /AWS1/ECSSTRING OPTIONAL
    !IV_ACTION TYPE /AWS1/ECSDEPLOYLCHOOKACTION OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ecscontinuesvcdeplrsp
  RAISING
    /AWS1/CX_ECSACCESSDENIEDEX
    /AWS1/CX_ECSCLIENTEXCEPTION
    /AWS1/CX_ECSINVALIDPARAMETEREX
    /AWS1/CX_ECSSERVEREXCEPTION
    /AWS1/CX_ECSSVCDEPLOYMENTNOT00
    /AWS1/CX_ECSUNSUPPEDFEATUREEX
    /AWS1/CX_ECSCLIENTEXC
    /AWS1/CX_ECSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_servicedeploymentarn TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING

The ARN of the service deployment to continue or roll back.

iv_hookid TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING

The ID of the paused lifecycle hook to act on. You can find the hookId by calling DescribeServiceDeployments and inspecting the lifecycleHookDetails field of the service deployment.

Optional arguments:

iv_action TYPE /AWS1/ECSDEPLOYLCHOOKACTION /AWS1/ECSDEPLOYLCHOOKACTION

The action to take on the paused lifecycle hook. Valid values are:

  • CONTINUE - Proceeds the deployment to the next lifecycle stage.

  • ROLLBACK - Rolls back the deployment to the previous service revision.

If no value is specified, the default action is CONTINUE.

RETURNING

oo_output TYPE REF TO /aws1/cl_ecscontinuesvcdeplrsp /AWS1/CL_ECSCONTINUESVCDEPLRSP

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->continueservicedeployment(
  iv_action = |string|
  iv_hookid = |string|
  iv_servicedeploymentarn = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_string = lo_result->get_servicedeploymentarn( ).
ENDIF.

To continue a paused service deployment

This example continues a service deployment that is paused at a lifecycle hook, using the CONTINUE action to proceed to the next deployment stage.

DATA(lo_result) = lo_client->continueservicedeployment(
  iv_action = |CONTINUE|
  iv_hookid = |ABCDEFGHIJKLMNOPQRSTUVWXYZ234567|
  iv_servicedeploymentarn = |arn:aws:ecs:us-east-1:123456789012:service-deployment/MyCluster/MyService/r9i43YFjvgF_xlg7m2eJ1r|
).

To roll back a paused service deployment

This example rolls back a service deployment that is paused at a lifecycle hook, using the ROLLBACK action to revert to the previous service revision.

DATA(lo_result) = lo_client->continueservicedeployment(
  iv_action = |ROLLBACK|
  iv_hookid = |ABCDEFGHIJKLMNOPQRSTUVWXYZ234567|
  iv_servicedeploymentarn = |arn:aws:ecs:us-east-1:123456789012:service-deployment/MyCluster/MyService/r9i43YFjvgF_xlg7m2eJ1r|
).