Skip to content

/AWS1/CL_IOA=>DESCRIBEDATASTORE()

About DescribeDatastore

Retrieves information about a data store.

Method Signature

IMPORTING

Required arguments:

iv_datastorename TYPE /AWS1/IOADATASTORENAME /AWS1/IOADATASTORENAME

The name of the data store

Optional arguments:

iv_includestatistics TYPE /AWS1/IOAINCLUDESTATISTICSFLAG /AWS1/IOAINCLUDESTATISTICSFLAG

If true, additional statistical information about the data store is included in the response. This feature can't be used with a data store whose S3 storage is customer-managed.

RETURNING

oo_output TYPE REF TO /aws1/cl_ioadescrdatastorersp /AWS1/CL_IOADESCRDATASTORERSP

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_ioa~describedatastore(
  iv_datastorename = |string|
  iv_includestatistics = ABAP_TRUE
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_datastore = lo_result->get_datastore( ).
  IF lo_datastore IS NOT INITIAL.
    lv_datastorename = lo_datastore->get_name( ).
    lo_datastorestorage = lo_datastore->get_storage( ).
    IF lo_datastorestorage IS NOT INITIAL.
      lo_servicemanageddatastore = lo_datastorestorage->get_servicemanageds3( ).
      IF lo_servicemanageddatastore IS NOT INITIAL.
      ENDIF.
      lo_customermanageddatastor = lo_datastorestorage->get_customermanageds3( ).
      IF lo_customermanageddatastor IS NOT INITIAL.
        lv_bucketname = lo_customermanageddatastor->get_bucket( ).
        lv_s3keyprefix = lo_customermanageddatastor->get_keyprefix( ).
        lv_rolearn = lo_customermanageddatastor->get_rolearn( ).
      ENDIF.
      lo_datastoreiotsitewisemul = lo_datastorestorage->get_iotsitewisemultilayers00( ).
      IF lo_datastoreiotsitewisemul IS NOT INITIAL.
        lo_iotsitewisecustomermana = lo_datastoreiotsitewisemul->get_customermanageds3storage( ).
        IF lo_iotsitewisecustomermana IS NOT INITIAL.
          lv_bucketname = lo_iotsitewisecustomermana->get_bucket( ).
          lv_s3keyprefix = lo_iotsitewisecustomermana->get_keyprefix( ).
        ENDIF.
      ENDIF.
    ENDIF.
    lv_datastorearn = lo_datastore->get_arn( ).
    lv_datastorestatus = lo_datastore->get_status( ).
    lo_retentionperiod = lo_datastore->get_retentionperiod( ).
    IF lo_retentionperiod IS NOT INITIAL.
      lv_unlimitedretentionperio = lo_retentionperiod->get_unlimited( ).
      lv_retentionperiodindays = lo_retentionperiod->get_numberofdays( ).
    ENDIF.
    lv_timestamp = lo_datastore->get_creationtime( ).
    lv_timestamp = lo_datastore->get_lastupdatetime( ).
    lv_timestamp = lo_datastore->get_lastmessagearrivaltime( ).
    lo_fileformatconfiguration = lo_datastore->get_fileformatconfiguration( ).
    IF lo_fileformatconfiguration IS NOT INITIAL.
      lo_jsonconfiguration = lo_fileformatconfiguration->get_jsonconfiguration( ).
      IF lo_jsonconfiguration IS NOT INITIAL.
      ENDIF.
      lo_parquetconfiguration = lo_fileformatconfiguration->get_parquetconfiguration( ).
      IF lo_parquetconfiguration IS NOT INITIAL.
        lo_schemadefinition = lo_parquetconfiguration->get_schemadefinition( ).
        IF lo_schemadefinition IS NOT INITIAL.
          LOOP AT lo_schemadefinition->get_columns( ) into lo_row.
            lo_row_1 = lo_row.
            IF lo_row_1 IS NOT INITIAL.
              lv_columnname = lo_row_1->get_name( ).
              lv_columndatatype = lo_row_1->get_type( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDIF.
    lo_datastorepartitions = lo_datastore->get_datastorepartitions( ).
    IF lo_datastorepartitions IS NOT INITIAL.
      LOOP AT lo_datastorepartitions->get_partitions( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lo_partition = lo_row_3->get_attributepartition( ).
          IF lo_partition IS NOT INITIAL.
            lv_partitionattributename = lo_partition->get_attributename( ).
          ENDIF.
          lo_timestamppartition = lo_row_3->get_timestamppartition( ).
          IF lo_timestamppartition IS NOT INITIAL.
            lv_partitionattributename = lo_timestamppartition->get_attributename( ).
            lv_timestampformat = lo_timestamppartition->get_timestampformat( ).
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDIF.
  lo_datastorestatistics = lo_result->get_statistics( ).
  IF lo_datastorestatistics IS NOT INITIAL.
    lo_estimatedresourcesize = lo_datastorestatistics->get_size( ).
    IF lo_estimatedresourcesize IS NOT INITIAL.
      lv_sizeinbytes = lo_estimatedresourcesize->get_estimatedsizeinbytes( ).
      lv_timestamp = lo_estimatedresourcesize->get_estimatedon( ).
    ENDIF.
  ENDIF.
ENDIF.