/AWS1/IF_ECS=>UPDATEEXPRESSGATEWAYSERVICE()¶
About UpdateExpressGatewayService¶
Updates an existing Express service configuration. Modifies container settings, resource allocation, auto-scaling configuration, and other service parameters without recreating the service.
Amazon ECS creates a new service revision with updated configuration and performs a rolling deployment to replace existing tasks. The service remains available during updates, ensuring zero-downtime deployments.
Some parameters like the infrastructure role cannot be modified after service creation and require creating a new service.
Method Signature¶
METHODS /AWS1/IF_ECS~UPDATEEXPRESSGATEWAYSERVICE
IMPORTING
!IV_SERVICEARN TYPE /AWS1/ECSSTRING OPTIONAL
!IV_EXECUTIONROLEARN TYPE /AWS1/ECSSTRING OPTIONAL
!IV_HEALTHCHECKPATH TYPE /AWS1/ECSSTRING OPTIONAL
!IO_PRIMARYCONTAINER TYPE REF TO /AWS1/CL_ECSEXPRESSGWCONTAINER OPTIONAL
!IV_TASKROLEARN TYPE /AWS1/ECSSTRING OPTIONAL
!IO_NETWORKCONFIGURATION TYPE REF TO /AWS1/CL_ECSEXPRESSGWSVCNETC00 OPTIONAL
!IV_CPU TYPE /AWS1/ECSSTRING OPTIONAL
!IV_MEMORY TYPE /AWS1/ECSSTRING OPTIONAL
!IV_CPUARCHITECTURE TYPE /AWS1/ECSEXPRESSCPUARCHIT OPTIONAL
!IO_SCALINGTARGET TYPE REF TO /AWS1/CL_ECSEXPRESSGWSCATARGET OPTIONAL
!IV_TASKDEFINITIONARN TYPE /AWS1/ECSSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ecsupdexpressgwsvcrsp
RAISING
/AWS1/CX_ECSACCESSDENIEDEX
/AWS1/CX_ECSCLIENTEXCEPTION
/AWS1/CX_ECSCLUSTERNOTFOUNDEX
/AWS1/CX_ECSINVALIDPARAMETEREX
/AWS1/CX_ECSSERVEREXCEPTION
/AWS1/CX_ECSSERVICENOTACTIVEEX
/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_servicearn TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The Amazon Resource Name (ARN) of the Express service to update.
Optional arguments:¶
iv_executionrolearn TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The Amazon Resource Name (ARN) of the task execution role for the Express service.
iv_healthcheckpath TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The path on the container for Application Load Balancer health checks.
io_primarycontainer TYPE REF TO /AWS1/CL_ECSEXPRESSGWCONTAINER /AWS1/CL_ECSEXPRESSGWCONTAINER¶
The primary container configuration for the Express service.
iv_taskrolearn TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The Amazon Resource Name (ARN) of the IAM role for containers in this task.
io_networkconfiguration TYPE REF TO /AWS1/CL_ECSEXPRESSGWSVCNETC00 /AWS1/CL_ECSEXPRESSGWSVCNETC00¶
The network configuration for the Express service tasks. By default, the network configuration for an Express service uses the default VPC.
iv_cpu TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The number of CPU units used by the task.
iv_memory TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The amount of memory (in MiB) used by the task.
iv_cpuarchitecture TYPE /AWS1/ECSEXPRESSCPUARCHIT /AWS1/ECSEXPRESSCPUARCHIT¶
The CPU architecture that the tasks in the Express service run on. Amazon ECS applies this value to the task definition revision that it registers for the service. If you don't specify a value, the service keeps the architecture that it currently runs on.
Valid values:
X86_64- The x86 64-bit architecture.
ARM64- The 64-bit ARM architecture.Changing the architecture starts a new deployment that replaces the running tasks. Make sure that the container image that the service uses supports the architecture that you choose. The operating system family for an Express service is always
LINUX.You can't specify
cpuArchitecturewhen you also specifytaskDefinitionArn, because this value applies only to a task definition that Amazon ECS registers on your behalf.
io_scalingtarget TYPE REF TO /AWS1/CL_ECSEXPRESSGWSCATARGET /AWS1/CL_ECSEXPRESSGWSCATARGET¶
The auto-scaling configuration for the Express service.
iv_taskdefinitionarn TYPE /AWS1/ECSSTRING /AWS1/ECSSTRING¶
The Amazon Resource Name (ARN) of a task definition to use to update the Express Gateway service. This allows you to manage your own task definition, giving you more control over the service configuration such as adding sidecar containers.
The task definition must have a container named
Mainwith a single TCP port mapping that includes a container port and port name. The task definition must also haveFARGATEcompatibility.If you provide a task definition ARN, you cannot also specify
primaryContainer,executionRoleArn,taskRoleArn,cpu,memory, orcpuArchitecture.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ecsupdexpressgwsvcrsp /AWS1/CL_ECSUPDEXPRESSGWSVCRSP¶
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->updateexpressgatewayservice(
io_networkconfiguration = new /aws1/cl_ecsexpressgwsvcnetc00(
it_securitygroups = VALUE /aws1/cl_ecsstringlist_w=>tt_stringlist(
( new /aws1/cl_ecsstringlist_w( |string| ) )
)
it_subnets = VALUE /aws1/cl_ecsstringlist_w=>tt_stringlist(
( new /aws1/cl_ecsstringlist_w( |string| ) )
)
)
io_primarycontainer = new /aws1/cl_ecsexpressgwcontainer(
io_awslogsconfiguration = new /aws1/cl_ecsexpressgwsvcawsl00(
iv_loggroup = |string|
iv_logstreamprefix = |string|
)
io_repositorycredentials = new /aws1/cl_ecsexpressgwrepocreds( |string| )
it_command = VALUE /aws1/cl_ecsstringlist_w=>tt_stringlist(
( new /aws1/cl_ecsstringlist_w( |string| ) )
)
it_environment = VALUE /aws1/cl_ecskeyvaluepair=>tt_environmentvariables(
(
new /aws1/cl_ecskeyvaluepair(
iv_name = |string|
iv_value = |string|
)
)
)
it_secrets = VALUE /aws1/cl_ecssecret=>tt_secretlist(
(
new /aws1/cl_ecssecret(
iv_name = |string|
iv_valuefrom = |string|
)
)
)
iv_containerport = 123
iv_image = |string|
)
io_scalingtarget = new /aws1/cl_ecsexpressgwscatarget(
iv_autoscalingmetric = |string|
iv_autoscalingtargetvalue = 123
iv_maxtaskcount = 123
iv_mintaskcount = 123
)
iv_cpu = |string|
iv_cpuarchitecture = |string|
iv_executionrolearn = |string|
iv_healthcheckpath = |string|
iv_memory = |string|
iv_servicearn = |string|
iv_taskdefinitionarn = |string|
iv_taskrolearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_updatedexpressgatewayse = lo_result->get_service( ).
IF lo_updatedexpressgatewayse IS NOT INITIAL.
lv_string = lo_updatedexpressgatewayse->get_servicearn( ).
lv_string = lo_updatedexpressgatewayse->get_cluster( ).
lv_string = lo_updatedexpressgatewayse->get_servicename( ).
lo_expressgatewayservicest = lo_updatedexpressgatewayse->get_status( ).
IF lo_expressgatewayservicest IS NOT INITIAL.
lv_expressgatewayservicest_1 = lo_expressgatewayservicest->get_statuscode( ).
lv_string = lo_expressgatewayservicest->get_statusreason( ).
ENDIF.
lo_expressgatewayserviceco = lo_updatedexpressgatewayse->get_targetconfiguration( ).
IF lo_expressgatewayserviceco IS NOT INITIAL.
lv_string = lo_expressgatewayserviceco->get_servicerevisionarn( ).
lv_string = lo_expressgatewayserviceco->get_executionrolearn( ).
lv_string = lo_expressgatewayserviceco->get_taskrolearn( ).
lv_string = lo_expressgatewayserviceco->get_taskdefinitionarn( ).
lv_string = lo_expressgatewayserviceco->get_cpu( ).
lv_string = lo_expressgatewayserviceco->get_memory( ).
lv_expresscpuarchitecture = lo_expressgatewayserviceco->get_cpuarchitecture( ).
lo_expressgatewayservicene = lo_expressgatewayserviceco->get_networkconfiguration( ).
IF lo_expressgatewayservicene IS NOT INITIAL.
LOOP AT lo_expressgatewayservicene->get_securitygroups( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_expressgatewayservicene->get_subnets( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_string = lo_expressgatewayserviceco->get_healthcheckpath( ).
lo_expressgatewaycontainer = lo_expressgatewayserviceco->get_primarycontainer( ).
IF lo_expressgatewaycontainer IS NOT INITIAL.
lv_string = lo_expressgatewaycontainer->get_image( ).
lv_boxedinteger = lo_expressgatewaycontainer->get_containerport( ).
lo_expressgatewayserviceaw = lo_expressgatewaycontainer->get_awslogsconfiguration( ).
IF lo_expressgatewayserviceaw IS NOT INITIAL.
lv_string = lo_expressgatewayserviceaw->get_loggroup( ).
lv_string = lo_expressgatewayserviceaw->get_logstreamprefix( ).
ENDIF.
lo_expressgatewayrepositor = lo_expressgatewaycontainer->get_repositorycredentials( ).
IF lo_expressgatewayrepositor IS NOT INITIAL.
lv_string = lo_expressgatewayrepositor->get_credentialsparameter( ).
ENDIF.
LOOP AT lo_expressgatewaycontainer->get_command( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_expressgatewaycontainer->get_environment( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_name( ).
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_expressgatewaycontainer->get_secrets( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_string = lo_row_5->get_name( ).
lv_string = lo_row_5->get_valuefrom( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_expressgatewayscalingta = lo_expressgatewayserviceco->get_scalingtarget( ).
IF lo_expressgatewayscalingta IS NOT INITIAL.
lv_boxedinteger = lo_expressgatewayscalingta->get_mintaskcount( ).
lv_boxedinteger = lo_expressgatewayscalingta->get_maxtaskcount( ).
lv_expressgatewayservicesc = lo_expressgatewayscalingta->get_autoscalingmetric( ).
lv_boxedinteger = lo_expressgatewayscalingta->get_autoscalingtargetvalue( ).
ENDIF.
LOOP AT lo_expressgatewayserviceco->get_ingresspaths( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_accesstype = lo_row_7->get_accesstype( ).
lv_string = lo_row_7->get_endpoint( ).
ENDIF.
ENDLOOP.
lv_timestamp = lo_expressgatewayserviceco->get_createdat( ).
ENDIF.
lv_timestamp = lo_updatedexpressgatewayse->get_createdat( ).
lv_timestamp = lo_updatedexpressgatewayse->get_updatedat( ).
ENDIF.
ENDIF.