/AWS1/IF_CWT=>GETDATASET()¶
About GetDataset¶
Returns information about the specified dataset. This includes its identifier, Amazon Resource Name (ARN), and any customer managed Amazon Web Services Key Management Service (Amazon Web Services KMS) key that is currently associated with it.
Only the default dataset is supported. The default dataset
is implicit for every account in every Region — you can call GetDataset
for it without first creating it. If no customer managed KMS key has been associated
with the dataset, the response omits the KmsKeyArn field, indicating that
data is encrypted at rest using an Amazon Web Services owned key managed by
Amazon CloudWatch.
To associate a customer managed KMS key with a dataset, use AssociateDatasetKmsKey. To remove the association, use DisassociateDatasetKmsKey.
Method Signature¶
METHODS /AWS1/IF_CWT~GETDATASET
IMPORTING
!IV_DATASETIDENTIFIER TYPE /AWS1/CWTDATASETIDENTIFIER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cwtgetdatasetoutput
RAISING
/AWS1/CX_CWTRESOURCENOTFOUNDEX
/AWS1/CX_CWTCLIENTEXC
/AWS1/CX_CWTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_datasetidentifier TYPE /AWS1/CWTDATASETIDENTIFIER /AWS1/CWTDATASETIDENTIFIER¶
Specifies the identifier of the dataset to retrieve. For the
defaultdataset, you can specify eitherdefaultor the full dataset Amazon Resource Name (ARN) in the formatarn:aws:cloudwatch:Region:account-id:dataset/default.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cwtgetdatasetoutput /AWS1/CL_CWTGETDATASETOUTPUT¶
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->getdataset( |string| ).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_datasetid = lo_result->get_datasetid( ).
lv_datasetarn = lo_result->get_arn( ).
lv_kmskeyarn = lo_result->get_kmskeyarn( ).
ENDIF.