/AWS1/IF_SSM=>GETINVENTORYSCHEMA()¶
About GetInventorySchema¶
Return a list of inventory type names for the account, or return a list of attribute names for a specific Inventory item type.
Method Signature¶
METHODS /AWS1/IF_SSM~GETINVENTORYSCHEMA
IMPORTING
!IV_TYPENAME TYPE /AWS1/SSMINVITEMTYPENAMEFILTER OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/SSMNEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/SSMGETINVSCHMAXRESULTS OPTIONAL
!IV_AGGREGATOR TYPE /AWS1/SSMAGGREGATORSCHEMAONLY OPTIONAL
!IV_SUBTYPE TYPE /AWS1/SSMISSUBTYPESCHEMA OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ssmgetinvschemaresult
RAISING
/AWS1/CX_SSMINTERNALSERVERERR
/AWS1/CX_SSMINVALIDNEXTTOKEN
/AWS1/CX_SSMINVALIDTYPENAMEEX
/AWS1/CX_SSMCLIENTEXC
/AWS1/CX_SSMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_typename TYPE /AWS1/SSMINVITEMTYPENAMEFILTER /AWS1/SSMINVITEMTYPENAMEFILTER¶
The type of inventory item to return.
iv_nexttoken TYPE /AWS1/SSMNEXTTOKEN /AWS1/SSMNEXTTOKEN¶
The token for the next set of items to return. (You received this token from a previous call.)
iv_maxresults TYPE /AWS1/SSMGETINVSCHMAXRESULTS /AWS1/SSMGETINVSCHMAXRESULTS¶
The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.
iv_aggregator TYPE /AWS1/SSMAGGREGATORSCHEMAONLY /AWS1/SSMAGGREGATORSCHEMAONLY¶
Returns inventory schemas that support aggregation. For example, this call returns the
AWS:InstanceInformationtype, because it supports aggregation based on thePlatformName,PlatformType, andPlatformVersionattributes.
iv_subtype TYPE /AWS1/SSMISSUBTYPESCHEMA /AWS1/SSMISSUBTYPESCHEMA¶
Returns the sub-type schema for a specified inventory type.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ssmgetinvschemaresult /AWS1/CL_SSMGETINVSCHEMARESULT¶
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->getinventoryschema(
iv_aggregator = ABAP_TRUE
iv_maxresults = 123
iv_nexttoken = |string|
iv_subtype = ABAP_TRUE
iv_typename = |string|
).
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_schemas( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_inventoryitemtypename = lo_row_1->get_typename( ).
lv_inventoryitemschemavers = lo_row_1->get_version( ).
LOOP AT lo_row_1->get_attributes( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_inventoryitemattributen = lo_row_3->get_name( ).
lv_inventoryattributedatat = lo_row_3->get_datatype( ).
ENDIF.
ENDLOOP.
lv_inventorytypedisplaynam = lo_row_1->get_displayname( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.