/AWS1/IF_LMD=>GETLAYERVERSION()¶
About GetLayerVersion¶
Returns information about a version of an Lambda layer, with a link to download the layer archive that's valid for 10 minutes.
Method Signature¶
METHODS /AWS1/IF_LMD~GETLAYERVERSION
IMPORTING
!IV_LAYERNAME TYPE /AWS1/LMDLAYERNAME OPTIONAL
!IV_VERSIONNUMBER TYPE /AWS1/LMDLAYERVERSIONNUMBER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lmdgetlayerversionrsp
RAISING
/AWS1/CX_LMDINVPARAMVALUEEX
/AWS1/CX_LMDRESOURCENOTFOUNDEX
/AWS1/CX_LMDSERVICEEXCEPTION
/AWS1/CX_LMDTOOMANYREQUESTSEX
/AWS1/CX_LMDCLIENTEXC
/AWS1/CX_LMDSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_layername TYPE /AWS1/LMDLAYERNAME /AWS1/LMDLAYERNAME¶
The name or Amazon Resource Name (ARN) of the layer.
iv_versionnumber TYPE /AWS1/LMDLAYERVERSIONNUMBER /AWS1/LMDLAYERVERSIONNUMBER¶
The version number.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_lmdgetlayerversionrsp /AWS1/CL_LMDGETLAYERVERSIONRSP¶
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->getlayerversion(
iv_layername = |string|
iv_versionnumber = 123
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_layerversioncontentoutp = lo_result->get_content( ).
IF lo_layerversioncontentoutp IS NOT INITIAL.
lv_string = lo_layerversioncontentoutp->get_location( ).
lv_string = lo_layerversioncontentoutp->get_codesha256( ).
lv_long = lo_layerversioncontentoutp->get_codesize( ).
lv_string = lo_layerversioncontentoutp->get_signingprofileversionarn( ).
lv_string = lo_layerversioncontentoutp->get_signingjobarn( ).
ENDIF.
lv_layerarn = lo_result->get_layerarn( ).
lv_layerversionarn = lo_result->get_layerversionarn( ).
lv_description = lo_result->get_description( ).
lv_timestamp = lo_result->get_createddate( ).
lv_layerversionnumber = lo_result->get_version( ).
LOOP AT lo_result->get_compatibleruntimes( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_runtime = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_licenseinfo = lo_result->get_licenseinfo( ).
LOOP AT lo_result->get_compatiblearchitectures( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_architecture = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
To get information about a Lambda layer version¶
The following example returns information for version 1 of a layer named my-layer.
DATA(lo_result) = lo_client->getlayerversion(
iv_layername = |my-layer|
iv_versionnumber = 1
).