/AWS1/IF_SDY=>UPDATESERVICE()
¶
About UpdateService¶
Submits a request to perform the following operations:
-
Update the TTL setting for existing
DnsRecords
configurations -
Add, update, or delete
HealthCheckConfig
for a specified serviceYou can't add, update, or delete a
HealthCheckCustomConfig
configuration.
For public and private DNS namespaces, note the following:
-
If you omit any existing
DnsRecords
orHealthCheckConfig
configurations from anUpdateService
request, the configurations are deleted from the service. -
If you omit an existing
HealthCheckCustomConfig
configuration from anUpdateService
request, the configuration isn't deleted from the service.
You can't call UpdateService
and update settings in the following
scenarios:
-
When the service is associated with an HTTP namespace
-
When the service is associated with a shared namespace and contains instances that were registered by Amazon Web Services accounts other than the account making the
UpdateService
call
When you update settings for a service, Cloud Map also updates the corresponding settings in all the records and health checks that were created by using the specified service.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_id
TYPE /AWS1/SDYARN
/AWS1/SDYARN
¶
The ID or Amazon Resource Name (ARN) of the service that you want to update. If the namespace associated with the service is shared with your Amazon Web Services account, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide
io_service
TYPE REF TO /AWS1/CL_SDYSERVICECHANGE
/AWS1/CL_SDYSERVICECHANGE
¶
A complex type that contains the new settings for the service. You can specify a maximum of 30 attributes (key-value pairs).
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_sdyupdateservicersp
/AWS1/CL_SDYUPDATESERVICERSP
¶
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->/aws1/if_sdy~updateservice(
io_service = new /aws1/cl_sdyservicechange(
io_dnsconfig = new /aws1/cl_sdydnsconfigchange(
it_dnsrecords = VALUE /aws1/cl_sdydnsrecord=>tt_dnsrecordlist(
(
new /aws1/cl_sdydnsrecord(
iv_ttl = 123
iv_type = |string|
)
)
)
)
io_healthcheckconfig = new /aws1/cl_sdyhealthcheckconfig(
iv_failurethreshold = 123
iv_resourcepath = |string|
iv_type = |string|
)
iv_description = |string|
)
iv_id = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_operationid = lo_result->get_operationid( ).
ENDIF.
UpdateService Example¶
This example submits a request to replace the DnsConfig and HealthCheckConfig settings of a specified service.
DATA(lo_result) = lo_client->/aws1/if_sdy~updateservice(
io_service = new /aws1/cl_sdyservicechange(
io_dnsconfig = new /aws1/cl_sdydnsconfigchange(
it_dnsrecords = VALUE /aws1/cl_sdydnsrecord=>tt_dnsrecordlist(
(
new /aws1/cl_sdydnsrecord(
iv_ttl = 60
iv_type = |A|
)
)
)
)
io_healthcheckconfig = new /aws1/cl_sdyhealthcheckconfig(
iv_failurethreshold = 2
iv_resourcepath = |/|
iv_type = |HTTP|
)
)
iv_id = |srv-e4anhexample0004|
).