/AWS1/IF_GLU=>PUTASSET()¶
About PutAsset¶
Creates or updates an asset in Glue Data Catalog. If the asset already exists, this operation updates it; otherwise, a new asset is created.
Method Signature¶
METHODS /AWS1/IF_GLU~PUTASSET
IMPORTING
!IV_ASSETTYPEID TYPE /AWS1/GLUASSETTYPEID OPTIONAL
!IV_IDENTIFIER TYPE /AWS1/GLUASSETID OPTIONAL
!IV_NAME TYPE /AWS1/GLUASSETNAME OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/GLUASSETDESCRIPTION OPTIONAL
!IT_FORMS TYPE /AWS1/CL_GLUASSETFORMENTRY=>TT_ASSETFORMMAP OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/GLUHASHSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gluputassetresponse
RAISING
/AWS1/CX_GLUACCESSDENIEDEX
/AWS1/CX_GLUCONCURRENTMODEX
/AWS1/CX_GLUENTITYNOTFOUNDEX
/AWS1/CX_GLUINTERNALSERVICEEX
/AWS1/CX_GLUINVALIDINPUTEX
/AWS1/CX_GLUTHROTTLINGEX
/AWS1/CX_GLUCLIENTEXC
/AWS1/CX_GLUSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_assettypeid TYPE /AWS1/GLUASSETTYPEID /AWS1/GLUASSETTYPEID¶
The identifier of the asset type for the asset.
iv_identifier TYPE /AWS1/GLUASSETID /AWS1/GLUASSETID¶
The unique identifier of the asset. If an asset with this identifier already exists, it is updated.
iv_name TYPE /AWS1/GLUASSETNAME /AWS1/GLUASSETNAME¶
The name of the asset.
it_forms TYPE /AWS1/CL_GLUASSETFORMENTRY=>TT_ASSETFORMMAP TT_ASSETFORMMAP¶
The forms to set on the asset, keyed by form name. Each entry specifies the form type and its JSON content.
Optional arguments:¶
iv_description TYPE /AWS1/GLUASSETDESCRIPTION /AWS1/GLUASSETDESCRIPTION¶
The description of the asset.
iv_clienttoken TYPE /AWS1/GLUHASHSTRING /AWS1/GLUHASHSTRING¶
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_gluputassetresponse /AWS1/CL_GLUPUTASSETRESPONSE¶
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->putasset(
it_forms = VALUE /aws1/cl_gluassetformentry=>tt_assetformmap(
(
VALUE /aws1/cl_gluassetformentry=>ts_assetformmap_maprow(
key = |string|
value = new /aws1/cl_gluassetformentry(
iv_content = |string|
iv_formtypeid = |string|
)
)
)
)
iv_assettypeid = |string|
iv_clienttoken = |string|
iv_description = |string|
iv_identifier = |string|
iv_name = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_assetid = lo_result->get_id( ).
lv_assetname = lo_result->get_name( ).
lv_assetdescription = lo_result->get_description( ).
lv_createdat = lo_result->get_createdat( ).
LOOP AT lo_result->get_forms( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv_formtypeid = lo_value->get_formtypeid( ).
lv_formcontent = lo_value->get_content( ).
ENDIF.
ENDLOOP.
ENDIF.