/AWS1/IF_GLU=>GETCATALOGS()¶
About GetCatalogs¶
Retrieves all catalogs defined in a catalog in the Glue Data Catalog. For a Redshift-federated catalog use case, this operation returns the list of catalogs mapped to Redshift databases in the Redshift namespace catalog.
Method Signature¶
METHODS /AWS1/IF_GLU~GETCATALOGS
IMPORTING
!IV_PARENTCATALOGID TYPE /AWS1/GLUCATALOGIDSTRING OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/GLUTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/GLUPAGESIZE OPTIONAL
!IV_RECURSIVE TYPE /AWS1/GLUBOOLEAN OPTIONAL
!IV_INCLUDEROOT TYPE /AWS1/GLUNULLABLEBOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_glugetcatalogsrsp
RAISING
/AWS1/CX_GLUACCESSDENIEDEX
/AWS1/CX_GLUENTITYNOTFOUNDEX
/AWS1/CX_GLUFEDR8NSOURCEEX
/AWS1/CX_GLUFEDSRCRETRYABLEEX
/AWS1/CX_GLUGLUEENCEXCEPTION
/AWS1/CX_GLUINTERNALSERVICEEX
/AWS1/CX_GLUINVALIDINPUTEX
/AWS1/CX_GLUOPERATIONTIMEOUTEX
/AWS1/CX_GLUCLIENTEXC
/AWS1/CX_GLUSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_parentcatalogid TYPE /AWS1/GLUCATALOGIDSTRING /AWS1/GLUCATALOGIDSTRING¶
The ID of the parent catalog in which the catalog resides. If none is provided, the Amazon Web Services Account Number is used by default.
iv_nexttoken TYPE /AWS1/GLUTOKEN /AWS1/GLUTOKEN¶
A continuation token, if this is a continuation call.
iv_maxresults TYPE /AWS1/GLUPAGESIZE /AWS1/GLUPAGESIZE¶
The maximum number of catalogs to return in one response.
iv_recursive TYPE /AWS1/GLUBOOLEAN /AWS1/GLUBOOLEAN¶
Whether to list all catalogs across the catalog hierarchy, starting from the
ParentCatalogId. Defaults tofalse. Whentrue, all catalog objects in theParentCatalogIDhierarchy are enumerated in the response.
iv_includeroot TYPE /AWS1/GLUNULLABLEBOOLEAN /AWS1/GLUNULLABLEBOOLEAN¶
Whether to list the default catalog in the account and region in the response. Defaults to
false. WhentrueandParentCatalogId = NULL | Amazon Web Services Account ID, all catalogs and the default catalog are enumerated in the response.When the
ParentCatalogIdis not equal to null, and this attribute is passed asfalseortrue, anInvalidInputExceptionis thrown.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_glugetcatalogsrsp /AWS1/CL_GLUGETCATALOGSRSP¶
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->getcatalogs(
iv_includeroot = ABAP_TRUE
iv_maxresults = 123
iv_nexttoken = |string|
iv_parentcatalogid = |string|
iv_recursive = ABAP_TRUE
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_cataloglist( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_catalogidstring = lo_row_1->get_catalogid( ).
lv_catalognamestring = lo_row_1->get_name( ).
lv_resourcearnstring = lo_row_1->get_resourcearn( ).
lv_descriptionstring = lo_row_1->get_description( ).
LOOP AT lo_row_1->get_parameters( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_parametersmapvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_timestamp = lo_row_1->get_createtime( ).
lv_timestamp = lo_row_1->get_updatetime( ).
lo_targetredshiftcatalog = lo_row_1->get_targetredshiftcatalog( ).
IF lo_targetredshiftcatalog IS NOT INITIAL.
lv_resourcearnstring = lo_targetredshiftcatalog->get_catalogarn( ).
ENDIF.
lo_federatedcatalog = lo_row_1->get_federatedcatalog( ).
IF lo_federatedcatalog IS NOT INITIAL.
lv_federationidentifier = lo_federatedcatalog->get_identifier( ).
lv_namestring = lo_federatedcatalog->get_connectionname( ).
lv_namestring = lo_federatedcatalog->get_connectiontype( ).
ENDIF.
lo_catalogpropertiesoutput = lo_row_1->get_catalogproperties( ).
IF lo_catalogpropertiesoutput IS NOT INITIAL.
lo_datalakeaccesspropertie = lo_catalogpropertiesoutput->get_datalakeaccessproperties( ).
IF lo_datalakeaccesspropertie IS NOT INITIAL.
lv_boolean = lo_datalakeaccesspropertie->get_datalakeaccess( ).
lv_iamrolearn = lo_datalakeaccesspropertie->get_datatransferrole( ).
lv_resourcearnstring = lo_datalakeaccesspropertie->get_kmskey( ).
lv_namestring = lo_datalakeaccesspropertie->get_managedworkgroupname( ).
lv_namestring = lo_datalakeaccesspropertie->get_managedworkgroupstatus( ).
lv_namestring = lo_datalakeaccesspropertie->get_redshiftdatabasename( ).
lv_namestring = lo_datalakeaccesspropertie->get_statusmessage( ).
lv_namestring = lo_datalakeaccesspropertie->get_catalogtype( ).
ENDIF.
lo_icebergoptimizationprop = lo_catalogpropertiesoutput->get_icebergoptimizationprops( ).
IF lo_icebergoptimizationprop IS NOT INITIAL.
lv_iamrolearn = lo_icebergoptimizationprop->get_rolearn( ).
LOOP AT lo_icebergoptimizationprop->get_compaction( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_parametersmapvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_icebergoptimizationprop->get_retention( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_parametersmapvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_icebergoptimizationprop->get_orphanfiledeletion( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_parametersmapvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_timestamp = lo_icebergoptimizationprop->get_lastupdatedtime( ).
ENDIF.
LOOP AT lo_catalogpropertiesoutput->get_customproperties( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_parametersmapvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT lo_row_1->get_createtabledefaultperms( ) into lo_row_3.
lo_row_4 = lo_row_3.
IF lo_row_4 IS NOT INITIAL.
lo_datalakeprincipal = lo_row_4->get_principal( ).
IF lo_datalakeprincipal IS NOT INITIAL.
lv_datalakeprincipalstring = lo_datalakeprincipal->get_datalakeprincipalid( ).
ENDIF.
LOOP AT lo_row_4->get_permissions( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_permission = lo_row_6->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
LOOP AT lo_row_1->get_createdatabasedefperms( ) into lo_row_3.
lo_row_4 = lo_row_3.
IF lo_row_4 IS NOT INITIAL.
lo_datalakeprincipal = lo_row_4->get_principal( ).
IF lo_datalakeprincipal IS NOT INITIAL.
lv_datalakeprincipalstring = lo_datalakeprincipal->get_datalakeprincipalid( ).
ENDIF.
LOOP AT lo_row_4->get_permissions( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_permission = lo_row_6->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lv_allowfulltableexternald = lo_row_1->get_alwfulltblexternaldata00( ).
ENDIF.
ENDLOOP.
lv_token = lo_result->get_nexttoken( ).
ENDIF.