/AWS1/IF_ECS=>LISTSERVICEDEPLOYMENTS()¶
About ListServiceDeployments¶
This operation lists all the service deployments that meet the specified filter criteria.
A service deployment happens when you release a software update for the service. You route traffic from the running service revisions to the new service revison and control the number of running tasks.
This API returns the values that you use for the request parameters in DescribeServiceRevisions.
Method Signature¶
METHODS /AWS1/IF_ECS~LISTSERVICEDEPLOYMENTS
IMPORTING
!IV_SERVICE TYPE /AWS1/ECSSTRING OPTIONAL
!IV_CLUSTER TYPE /AWS1/ECSSTRING OPTIONAL
!IT_STATUS TYPE /AWS1/CL_ECSSVCDEPLOYMENTSTA00=>TT_SERVICEDEPLOYMENTSTATUSLIST OPTIONAL
!IO_CREATEDAT TYPE REF TO /AWS1/CL_ECSCREATEDAT OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/ECSSTRING OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/ECSBOXEDINTEGER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ecslstsvcdeployment01
RAISING
/AWS1/CX_ECSACCESSDENIEDEX
/AWS1/CX_ECSCLIENTEXCEPTION
/AWS1/CX_ECSINVALIDPARAMETEREX
/AWS1/CX_ECSSERVEREXCEPTION
/AWS1/CX_ECSSERVICENOTFOUNDEX
/AWS1/CX_ECSUNSUPPEDFEATUREEX
/AWS1/CX_ECSCLIENTEXC
/AWS1/CX_ECSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_service TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The ARN or name of the service
Optional arguments:¶
iv_cluster TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The cluster that hosts the service. This can either be the cluster name or ARN. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. If you don't specify a cluster,
defaultis used.
it_status TYPE /AWS1/CL_ECSSVCDEPLOYMENTSTA00=>TT_SERVICEDEPLOYMENTSTATUSLIST TT_SERVICEDEPLOYMENTSTATUSLIST¶
An optional filter you can use to narrow the results. If you do not specify a status, then all status values are included in the result.
io_createdat TYPE REF TO /AWS1/CL_ECSCREATEDAT /AWS1/CL_ECSCREATEDAT¶
An optional filter you can use to narrow the results by the service creation date. If you do not specify a value, the result includes all services created before the current time. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.
iv_nexttoken TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The
nextTokenvalue returned from aListServiceDeploymentsrequest indicating that more results are available to fulfill the request and further calls are needed. If you providedmaxResults, it's possible the number of results is fewer thanmaxResults.
iv_maxresults TYPE /AWS1/ECSBOXEDINTEGER /AWS1/ECSBOXEDINTEGER¶
The maximum number of service deployment results that
ListServiceDeploymentsreturned in paginated output. When this parameter is used,ListServiceDeploymentsonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListServiceDeploymentsrequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter isn't used, thenListServiceDeploymentsreturns up to 20 results and anextTokenvalue if applicable.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ecslstsvcdeployment01 /AWS1/CL_ECSLSTSVCDEPLOYMENT01¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
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->listservicedeployments(
io_createdat = new /aws1/cl_ecscreatedat(
iv_after = '20150101000000.0000000'
iv_before = '20150101000000.0000000'
)
it_status = VALUE /aws1/cl_ecssvcdeploymentsta00=>tt_servicedeploymentstatuslist(
( new /aws1/cl_ecssvcdeploymentsta00( |string| ) )
)
iv_cluster = |string|
iv_maxresults = 123
iv_nexttoken = |string|
iv_service = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_servicedeployments( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_servicedeploymentarn( ).
lv_string = lo_row_1->get_servicearn( ).
lv_string = lo_row_1->get_clusterarn( ).
lv_timestamp = lo_row_1->get_startedat( ).
lv_timestamp = lo_row_1->get_createdat( ).
lv_timestamp = lo_row_1->get_finishedat( ).
lv_string = lo_row_1->get_targetservicerevisionarn( ).
lv_servicedeploymentstatus = lo_row_1->get_status( ).
lv_string = lo_row_1->get_statusreason( ).
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).
ENDIF.
To list service deployments that meet the specified criteria¶
This example lists all successful service deployments for the service "sd-example" in the cluster "example".
DATA(lo_result) = lo_client->listservicedeployments(
it_status = VALUE /aws1/cl_ecssvcdeploymentsta00=>tt_servicedeploymentstatuslist(
( new /aws1/cl_ecssvcdeploymentsta00( |SUCCESSFUL| ) )
)
iv_cluster = |example|
iv_service = |sd-example|
).