/AWS1/IF_APY=>UPDATEDATASOURCE()¶
About UpdateDataSource¶
Updates a DataSource object.
Method Signature¶
METHODS /AWS1/IF_APY~UPDATEDATASOURCE
IMPORTING
!IV_APIID TYPE /AWS1/APYSTRING OPTIONAL
!IV_NAME TYPE /AWS1/APYRESOURCENAME OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/APYSTRING OPTIONAL
!IV_TYPE TYPE /AWS1/APYDATASOURCETYPE OPTIONAL
!IV_SERVICEROLEARN TYPE /AWS1/APYSTRING OPTIONAL
!IO_DYNAMODBCONFIG TYPE REF TO /AWS1/CL_APYDYNAMODBDATASRCCFG OPTIONAL
!IO_LAMBDACONFIG TYPE REF TO /AWS1/CL_APYLAMBDADATASRCCFG OPTIONAL
!IO_ELASTICSEARCHCONFIG TYPE REF TO /AWS1/CL_APYELASTICSRCHDATAS00 OPTIONAL
!IO_OPENSEARCHSERVICECONFIG TYPE REF TO /AWS1/CL_APYOPENSRCHSVCDATAS00 OPTIONAL
!IO_HTTPCONFIG TYPE REF TO /AWS1/CL_APYHTTPDATASOURCECFG OPTIONAL
!IO_RELATIONALDATABASECONFIG TYPE REF TO /AWS1/CL_APYRELATIONALDATABA00 OPTIONAL
!IO_EVENTBRIDGECONFIG TYPE REF TO /AWS1/CL_APYEVTBRIDGEDATASRC00 OPTIONAL
!IV_METRICSCONFIG TYPE /AWS1/APYDATASOURCELEVELMETCFG OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_apyupdatedatasrcrsp
RAISING
/AWS1/CX_APYBADREQUESTEX
/AWS1/CX_APYCONCURRENTMODEX
/AWS1/CX_APYINTERNALFAILUREEX
/AWS1/CX_APYNOTFOUNDEXCEPTION
/AWS1/CX_APYUNAUTHORIZEDEX
/AWS1/CX_APYCLIENTEXC
/AWS1/CX_APYSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_apiid TYPE /AWS1/APYSTRING /AWS1/APYSTRING¶
The API ID.
iv_name TYPE /AWS1/APYRESOURCENAME /AWS1/APYRESOURCENAME¶
The new name for the data source.
iv_type TYPE /AWS1/APYDATASOURCETYPE /AWS1/APYDATASOURCETYPE¶
The new data source type.
Optional arguments:¶
iv_description TYPE /AWS1/APYSTRING /AWS1/APYSTRING¶
The new description for the data source.
iv_servicerolearn TYPE /AWS1/APYSTRING /AWS1/APYSTRING¶
The new service role Amazon Resource Name (ARN) for the data source.
io_dynamodbconfig TYPE REF TO /AWS1/CL_APYDYNAMODBDATASRCCFG /AWS1/CL_APYDYNAMODBDATASRCCFG¶
The new Amazon DynamoDB configuration.
io_lambdaconfig TYPE REF TO /AWS1/CL_APYLAMBDADATASRCCFG /AWS1/CL_APYLAMBDADATASRCCFG¶
The new Lambda configuration.
io_elasticsearchconfig TYPE REF TO /AWS1/CL_APYELASTICSRCHDATAS00 /AWS1/CL_APYELASTICSRCHDATAS00¶
The new OpenSearch configuration.
As of September 2021, Amazon Elasticsearch service is Amazon OpenSearch Service. This configuration is deprecated. Instead, use UpdateDataSourceRequest$openSearchServiceConfig to update an OpenSearch data source.
io_opensearchserviceconfig TYPE REF TO /AWS1/CL_APYOPENSRCHSVCDATAS00 /AWS1/CL_APYOPENSRCHSVCDATAS00¶
The new OpenSearch configuration.
io_httpconfig TYPE REF TO /AWS1/CL_APYHTTPDATASOURCECFG /AWS1/CL_APYHTTPDATASOURCECFG¶
The new HTTP endpoint configuration.
io_relationaldatabaseconfig TYPE REF TO /AWS1/CL_APYRELATIONALDATABA00 /AWS1/CL_APYRELATIONALDATABA00¶
The new relational database configuration.
io_eventbridgeconfig TYPE REF TO /AWS1/CL_APYEVTBRIDGEDATASRC00 /AWS1/CL_APYEVTBRIDGEDATASRC00¶
The new Amazon EventBridge settings.
iv_metricsconfig TYPE /AWS1/APYDATASOURCELEVELMETCFG /AWS1/APYDATASOURCELEVELMETCFG¶
Enables or disables enhanced data source metrics for specified data sources. Note that
metricsConfigwon't be used unless thedataSourceLevelMetricsBehaviorvalue is set toPER_DATA_SOURCE_METRICS. If thedataSourceLevelMetricsBehavioris set toFULL_REQUEST_DATA_SOURCE_METRICSinstead,metricsConfigwill be ignored. However, you can still set its value.
metricsConfigcan beENABLEDorDISABLED.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_apyupdatedatasrcrsp /AWS1/CL_APYUPDATEDATASRCRSP¶
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->updatedatasource(
io_dynamodbconfig = new /aws1/cl_apydynamodbdatasrccfg(
io_deltasyncconfig = new /aws1/cl_apydeltasyncconfig(
iv_basetablettl = 123
iv_deltasynctablename = |string|
iv_deltasynctablettl = 123
)
iv_awsregion = |string|
iv_tablename = |string|
iv_usecallercredentials = ABAP_TRUE
iv_versioned = ABAP_TRUE
)
io_elasticsearchconfig = new /aws1/cl_apyelasticsrchdatas00(
iv_awsregion = |string|
iv_endpoint = |string|
)
io_eventbridgeconfig = new /aws1/cl_apyevtbridgedatasrc00( |string| )
io_httpconfig = new /aws1/cl_apyhttpdatasourcecfg(
io_authorizationconfig = new /aws1/cl_apyauthconfig(
io_awsiamconfig = new /aws1/cl_apyawsiamconfig(
iv_signingregion = |string|
iv_signingservicename = |string|
)
iv_authorizationtype = |string|
)
iv_endpoint = |string|
)
io_lambdaconfig = new /aws1/cl_apylambdadatasrccfg( |string| )
io_opensearchserviceconfig = new /aws1/cl_apyopensrchsvcdatas00(
iv_awsregion = |string|
iv_endpoint = |string|
)
io_relationaldatabaseconfig = new /aws1/cl_apyrelationaldataba00(
io_rdshttpendpointconfig = new /aws1/cl_apyrdshttpendptconfig(
iv_awsregion = |string|
iv_awssecretstorearn = |string|
iv_databasename = |string|
iv_dbclusteridentifier = |string|
iv_schema = |string|
)
iv_relationaldatabasesrctype = |string|
)
iv_apiid = |string|
iv_description = |string|
iv_metricsconfig = |string|
iv_name = |string|
iv_servicerolearn = |string|
iv_type = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_datasource = lo_result->get_datasource( ).
IF lo_datasource IS NOT INITIAL.
lv_string = lo_datasource->get_datasourcearn( ).
lv_resourcename = lo_datasource->get_name( ).
lv_string = lo_datasource->get_description( ).
lv_datasourcetype = lo_datasource->get_type( ).
lv_string = lo_datasource->get_servicerolearn( ).
lo_dynamodbdatasourceconfi = lo_datasource->get_dynamodbconfig( ).
IF lo_dynamodbdatasourceconfi IS NOT INITIAL.
lv_string = lo_dynamodbdatasourceconfi->get_tablename( ).
lv_string = lo_dynamodbdatasourceconfi->get_awsregion( ).
lv_boolean = lo_dynamodbdatasourceconfi->get_usecallercredentials( ).
lo_deltasyncconfig = lo_dynamodbdatasourceconfi->get_deltasyncconfig( ).
IF lo_deltasyncconfig IS NOT INITIAL.
lv_long = lo_deltasyncconfig->get_basetablettl( ).
lv_string = lo_deltasyncconfig->get_deltasynctablename( ).
lv_long = lo_deltasyncconfig->get_deltasynctablettl( ).
ENDIF.
lv_boolean = lo_dynamodbdatasourceconfi->get_versioned( ).
ENDIF.
lo_lambdadatasourceconfig = lo_datasource->get_lambdaconfig( ).
IF lo_lambdadatasourceconfig IS NOT INITIAL.
lv_string = lo_lambdadatasourceconfig->get_lambdafunctionarn( ).
ENDIF.
lo_elasticsearchdatasource = lo_datasource->get_elasticsearchconfig( ).
IF lo_elasticsearchdatasource IS NOT INITIAL.
lv_string = lo_elasticsearchdatasource->get_endpoint( ).
lv_string = lo_elasticsearchdatasource->get_awsregion( ).
ENDIF.
lo_opensearchservicedataso = lo_datasource->get_opensearchserviceconfig( ).
IF lo_opensearchservicedataso IS NOT INITIAL.
lv_string = lo_opensearchservicedataso->get_endpoint( ).
lv_string = lo_opensearchservicedataso->get_awsregion( ).
ENDIF.
lo_httpdatasourceconfig = lo_datasource->get_httpconfig( ).
IF lo_httpdatasourceconfig IS NOT INITIAL.
lv_string = lo_httpdatasourceconfig->get_endpoint( ).
lo_authorizationconfig = lo_httpdatasourceconfig->get_authorizationconfig( ).
IF lo_authorizationconfig IS NOT INITIAL.
lv_authorizationtype = lo_authorizationconfig->get_authorizationtype( ).
lo_awsiamconfig = lo_authorizationconfig->get_awsiamconfig( ).
IF lo_awsiamconfig IS NOT INITIAL.
lv_string = lo_awsiamconfig->get_signingregion( ).
lv_string = lo_awsiamconfig->get_signingservicename( ).
ENDIF.
ENDIF.
ENDIF.
lo_relationaldatabasedatas = lo_datasource->get_relationaldatabaseconfig( ).
IF lo_relationaldatabasedatas IS NOT INITIAL.
lv_relationaldatabasesourc = lo_relationaldatabasedatas->get_relationaldatabasesrct00( ).
lo_rdshttpendpointconfig = lo_relationaldatabasedatas->get_rdshttpendpointconfig( ).
IF lo_rdshttpendpointconfig IS NOT INITIAL.
lv_string = lo_rdshttpendpointconfig->get_awsregion( ).
lv_string = lo_rdshttpendpointconfig->get_dbclusteridentifier( ).
lv_string = lo_rdshttpendpointconfig->get_databasename( ).
lv_string = lo_rdshttpendpointconfig->get_schema( ).
lv_string = lo_rdshttpendpointconfig->get_awssecretstorearn( ).
ENDIF.
ENDIF.
lo_eventbridgedatasourceco = lo_datasource->get_eventbridgeconfig( ).
IF lo_eventbridgedatasourceco IS NOT INITIAL.
lv_string = lo_eventbridgedatasourceco->get_eventbusarn( ).
ENDIF.
lv_datasourcelevelmetricsc = lo_datasource->get_metricsconfig( ).
ENDIF.
ENDIF.