/AWS1/IF_SDY=>GETSERVICEATTRIBUTES()
¶
About GetServiceAttributes¶
Returns the attributes associated with a specified service.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_serviceid
TYPE /AWS1/SDYARN
/AWS1/SDYARN
¶
The ID or Amazon Resource Name (ARN) of the service that you want to get attributes for. For services created in a namespace 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.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_sdygetserviceattrsrsp
/AWS1/CL_SDYGETSERVICEATTRSRSP
¶
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~getserviceattributes( |string| ).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_serviceattributes = lo_result->get_serviceattributes( ).
IF lo_serviceattributes IS NOT INITIAL.
lv_arn = lo_serviceattributes->get_servicearn( ).
lv_awsaccountid = lo_serviceattributes->get_resourceowner( ).
LOOP AT lo_serviceattributes->get_attributes( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv_serviceattributevalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
GetServiceAttributes Example¶
This example gets the attributes for a specified service.
DATA(lo_result) = lo_client->/aws1/if_sdy~getserviceattributes( |srv-e4anhexample0004| ).