Utilizzare GetConfigurationSetEventDestinations con un SDK AWS - AWS Esempi di codice SDK

Sono disponibili altri esempi AWS SDK nel repository AWS Doc SDK Examples. GitHub

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

Utilizzare GetConfigurationSetEventDestinations con un SDK AWS

Il seguente esempio di codice mostra come utilizzareGetConfigurationSetEventDestinations.

SAP ABAP
SDK per SAP ABAP
Nota

C'è altro da fare. GitHub Trova l'esempio completo e scopri di più sulla configurazione e l'esecuzione nel Repository di esempi di codice AWS.

TRY. " Get event destinations for the configuration set oo_result = lo_pps->getconfseteventdestinations( iv_configurationsetname = iv_configuration_set_name " e.g., 'my-config-set' ). " Process the event destinations LOOP AT oo_result->get_eventdestinations( ) INTO DATA(lo_event_dest). DATA(lv_dest_name) = lo_event_dest->get_name( ). DATA(lv_enabled) = lo_event_dest->get_enabled( ). MESSAGE |Event destination: { lv_dest_name }, Enabled: { lv_enabled }| TYPE 'I'. " Check for CloudWatch Logs destination DATA(lo_cloudwatch_dest) = lo_event_dest->get_cloudwatchlogsdst( ). IF lo_cloudwatch_dest IS NOT INITIAL. DATA(lv_log_group_arn) = lo_cloudwatch_dest->get_loggrouparn( ). MESSAGE | CloudWatch Logs destination: { lv_log_group_arn }| TYPE 'I'. ENDIF. " Check for Kinesis Firehose destination DATA(lo_firehose_dest) = lo_event_dest->get_kinesisfirehosedst( ). IF lo_firehose_dest IS NOT INITIAL. DATA(lv_delivery_stream) = lo_firehose_dest->get_deliverystreamarn( ). MESSAGE | Kinesis Firehose destination: { lv_delivery_stream }| TYPE 'I'. ENDIF. " Check for SNS destination DATA(lo_sns_dest) = lo_event_dest->get_snsdestination( ). IF lo_sns_dest IS NOT INITIAL. DATA(lv_topic_arn) = lo_sns_dest->get_topicarn( ). MESSAGE | SNS destination: { lv_topic_arn }| TYPE 'I'. ENDIF. ENDLOOP. CATCH /aws1/cx_ppsnotfoundexception INTO DATA(lo_not_found_ex). MESSAGE lo_not_found_ex->get_text( ) TYPE 'I'. RAISE EXCEPTION lo_not_found_ex. CATCH /aws1/cx_ppsbadrequestex INTO DATA(lo_bad_request_ex). MESSAGE lo_bad_request_ex->get_text( ) TYPE 'I'. RAISE EXCEPTION lo_bad_request_ex. CATCH /aws1/cx_ppsinternalsvcerrorex INTO DATA(lo_internal_error_ex). MESSAGE lo_internal_error_ex->get_text( ) TYPE 'I'. RAISE EXCEPTION lo_internal_error_ex. CATCH /aws1/cx_ppstoomanyrequestsex INTO DATA(lo_too_many_requests_ex). MESSAGE lo_too_many_requests_ex->get_text( ) TYPE 'I'. RAISE EXCEPTION lo_too_many_requests_ex. ENDTRY.