Skip to content

/AWS1/IF_ECS=>DELETEDAEMON()

About DeleteDaemon

Deletes the specified daemon. The daemon must be in an ACTIVE state to be deleted. Deleting a daemon stops all running daemon tasks on the associated container instances. Amazon ECS drains existing container instances and provisions new instances without the deleted daemon. Amazon ECS automatically launches replacement tasks for your Amazon ECS services.

ECS Managed Daemons is only supported for Amazon ECS Managed Instances Capacity Providers.

Method Signature

METHODS /AWS1/IF_ECS~DELETEDAEMON
  IMPORTING
    !IV_DAEMONARN TYPE /AWS1/ECSSTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ecsdeletedaemonrsp
  RAISING
    /AWS1/CX_ECSACCESSDENIEDEX
    /AWS1/CX_ECSCLIENTEXCEPTION
    /AWS1/CX_ECSCLUSTERNOTFOUNDEX
    /AWS1/CX_ECSDAEMONNOTACTIVEEX
    /AWS1/CX_ECSDAEMONNOTFOUNDEX
    /AWS1/CX_ECSINVALIDPARAMETEREX
    /AWS1/CX_ECSSERVEREXCEPTION
    /AWS1/CX_ECSUNSUPPEDFEATUREEX
    /AWS1/CX_ECSCLIENTEXC
    /AWS1/CX_ECSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_daemonarn TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING

The Amazon Resource Name (ARN) of the daemon to delete.

RETURNING

oo_output TYPE REF TO /aws1/cl_ecsdeletedaemonrsp /AWS1/CL_ECSDELETEDAEMONRSP

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->deletedaemon( |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_daemonarn( ).
  lv_daemonstatus = lo_result->get_status( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_timestamp = lo_result->get_updatedat( ).
  lv_string = lo_result->get_deploymentarn( ).
ENDIF.

To delete a daemon

This example deletes the my-monitoring-daemon daemon.

DATA(lo_result) = lo_client->deletedaemon( |arn:aws:ecs:us-east-1:123456789012:daemon/my-cluster/my-monitoring-daemon| ).