/AWS1/IF_SSM=>DESCRIBEDOCUMENT()¶
About DescribeDocument¶
Describes the specified Amazon Web Services Systems Manager document (SSM document).
Method Signature¶
METHODS /AWS1/IF_SSM~DESCRIBEDOCUMENT
IMPORTING
!IV_NAME TYPE /AWS1/SSMDOCUMENTARN OPTIONAL
!IV_DOCUMENTVERSION TYPE /AWS1/SSMDOCUMENTVERSION OPTIONAL
!IV_VERSIONNAME TYPE /AWS1/SSMDOCUMENTVERSIONNAME OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ssmdescribedocresult
RAISING
/AWS1/CX_SSMINTERNALSERVERERR
/AWS1/CX_SSMINVALIDDOCUMENT
/AWS1/CX_SSMINVALIDDOCVERSION
/AWS1/CX_SSMCLIENTEXC
/AWS1/CX_SSMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/SSMDOCUMENTARN /AWS1/SSMDOCUMENTARN¶
The name of the SSM document.
If you're calling a shared SSM document from a different Amazon Web Services account,
Nameis the full Amazon Resource Name (ARN) of the document.
Optional arguments:¶
iv_documentversion TYPE /AWS1/SSMDOCUMENTVERSION /AWS1/SSMDOCUMENTVERSION¶
The document version for which you want information. Can be a specific version or the default version.
iv_versionname TYPE /AWS1/SSMDOCUMENTVERSIONNAME /AWS1/SSMDOCUMENTVERSIONNAME¶
An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ssmdescribedocresult /AWS1/CL_SSMDESCRIBEDOCRESULT¶
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->describedocument(
iv_documentversion = |string|
iv_name = |string|
iv_versionname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_documentdescription = lo_result->get_document( ).
IF lo_documentdescription IS NOT INITIAL.
lv_documentsha1 = lo_documentdescription->get_sha1( ).
lv_documenthash = lo_documentdescription->get_hash( ).
lv_documenthashtype = lo_documentdescription->get_hashtype( ).
lv_documentarn = lo_documentdescription->get_name( ).
lv_documentdisplayname = lo_documentdescription->get_displayname( ).
lv_documentversionname = lo_documentdescription->get_versionname( ).
lv_documentowner = lo_documentdescription->get_owner( ).
lv_datetime = lo_documentdescription->get_createddate( ).
lv_documentstatus = lo_documentdescription->get_status( ).
lv_documentstatusinformati = lo_documentdescription->get_statusinformation( ).
lv_documentversion = lo_documentdescription->get_documentversion( ).
lv_descriptionindocument = lo_documentdescription->get_description( ).
LOOP AT lo_documentdescription->get_parameters( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_documentparametername = lo_row_1->get_name( ).
lv_documentparametertype = lo_row_1->get_type( ).
lv_documentparameterdescrp = lo_row_1->get_description( ).
lv_documentparameterdefaul = lo_row_1->get_defaultvalue( ).
ENDIF.
ENDLOOP.
LOOP AT lo_documentdescription->get_platformtypes( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_platformtype = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_documenttype = lo_documentdescription->get_documenttype( ).
lv_documentschemaversion = lo_documentdescription->get_schemaversion( ).
lv_documentversion = lo_documentdescription->get_latestversion( ).
lv_documentversion = lo_documentdescription->get_defaultversion( ).
lv_documentformat = lo_documentdescription->get_documentformat( ).
lv_targettype = lo_documentdescription->get_targettype( ).
LOOP AT lo_documentdescription->get_tags( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_tagkey = lo_row_5->get_key( ).
lv_tagvalue = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_documentdescription->get_attachmentsinformation( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_attachmentname = lo_row_7->get_name( ).
ENDIF.
ENDLOOP.
LOOP AT lo_documentdescription->get_requires( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_documentarn = lo_row_9->get_name( ).
lv_documentversion = lo_row_9->get_version( ).
lv_requiretype = lo_row_9->get_requiretype( ).
lv_documentversionname = lo_row_9->get_versionname( ).
ENDIF.
ENDLOOP.
lv_documentauthor = lo_documentdescription->get_author( ).
LOOP AT lo_documentdescription->get_reviewinformation( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_datetime = lo_row_11->get_reviewedtime( ).
lv_reviewstatus = lo_row_11->get_status( ).
lv_reviewer = lo_row_11->get_reviewer( ).
ENDIF.
ENDLOOP.
lv_documentversion = lo_documentdescription->get_approvedversion( ).
lv_documentversion = lo_documentdescription->get_pendingreviewversion( ).
lv_reviewstatus = lo_documentdescription->get_reviewstatus( ).
LOOP AT lo_documentdescription->get_category( ) into lo_row_12.
lo_row_13 = lo_row_12.
IF lo_row_13 IS NOT INITIAL.
lv_category = lo_row_13->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_documentdescription->get_categoryenum( ) into lo_row_14.
lo_row_15 = lo_row_14.
IF lo_row_15 IS NOT INITIAL.
lv_category = lo_row_15->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.