/AWS1/IF_EC2=>GETCAPACITYMANAGERMETRICDIM()¶
About GetCapacityManagerMetricDimensions¶
Retrieves the available dimension values for capacity metrics within a specified time range. This is useful for discovering what accounts, regions, instance families, and other dimensions have data available for filtering and grouping.
Method Signature¶
METHODS /AWS1/IF_EC2~GETCAPACITYMANAGERMETRICDIM
IMPORTING
!IT_GROUPBY TYPE /AWS1/CL_EC2GROUPBYSET_W=>TT_GROUPBYSET OPTIONAL
!IT_FILTERBY TYPE /AWS1/CL_EC2CAPMANAGERCOND=>TT_CAPACITYMANAGERCONDITIONSET OPTIONAL
!IV_STARTTIME TYPE /AWS1/EC2MILLISECONDDATETIME OPTIONAL
!IV_ENDTIME TYPE /AWS1/EC2MILLISECONDDATETIME OPTIONAL
!IT_METRICNAMES TYPE /AWS1/CL_EC2METRICSET_W=>TT_METRICSET OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/EC2MAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/EC2NEXTTOKEN OPTIONAL
!IV_DRYRUN TYPE /AWS1/EC2BOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ec2getcapmanagermet03
RAISING
/AWS1/CX_EC2CLIENTEXC
/AWS1/CX_EC2SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
it_groupby TYPE /AWS1/CL_EC2GROUPBYSET_W=>TT_GROUPBYSET TT_GROUPBYSET¶
The dimensions to group by when retrieving available dimension values. This determines which dimension combinations are returned. Required parameter.
iv_starttime TYPE /AWS1/EC2MILLISECONDDATETIME /AWS1/EC2MILLISECONDDATETIME¶
The start time for the dimension query, in ISO 8601 format. Only dimensions with data in this time range will be returned.
iv_endtime TYPE /AWS1/EC2MILLISECONDDATETIME /AWS1/EC2MILLISECONDDATETIME¶
The end time for the dimension query, in ISO 8601 format. Only dimensions with data in this time range will be returned.
it_metricnames TYPE /AWS1/CL_EC2METRICSET_W=>TT_METRICSET TT_METRICSET¶
The metric names to use as an additional filter when retrieving dimensions. Only dimensions that have data for these metrics will be returned. Required parameter with maximum size of 1 for v1.
Optional arguments:¶
it_filterby TYPE /AWS1/CL_EC2CAPMANAGERCOND=>TT_CAPACITYMANAGERCONDITIONSET TT_CAPACITYMANAGERCONDITIONSET¶
Conditions to filter which dimension values are returned. Each filter specifies a dimension, comparison operator, and values to match against.
iv_maxresults TYPE /AWS1/EC2MAXRESULTS /AWS1/EC2MAXRESULTS¶
The maximum number of dimension combinations to return. Valid range is 1 to 1000. Use with NextToken for pagination.
iv_nexttoken TYPE /AWS1/EC2NEXTTOKEN /AWS1/EC2NEXTTOKEN¶
The token for the next page of results. Use this value in a subsequent call to retrieve additional dimension values.
iv_dryrun TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN¶
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ec2getcapmanagermet03 /AWS1/CL_EC2GETCAPMANAGERMET03¶
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->getcapacitymanagermetricdim(
it_filterby = VALUE /aws1/cl_ec2capmanagercond=>tt_capacitymanagerconditionset(
(
new /aws1/cl_ec2capmanagercond(
io_dimensioncondition = new /aws1/cl_ec2dimensioncondition(
it_values = VALUE /aws1/cl_ec2condvaluelist_w=>tt_conditionvaluelist(
( new /aws1/cl_ec2condvaluelist_w( |string| ) )
)
iv_comparison = |string|
iv_dimension = |string|
)
)
)
)
it_groupby = VALUE /aws1/cl_ec2groupbyset_w=>tt_groupbyset(
( new /aws1/cl_ec2groupbyset_w( |string| ) )
)
it_metricnames = VALUE /aws1/cl_ec2metricset_w=>tt_metricset(
( new /aws1/cl_ec2metricset_w( |string| ) )
)
iv_dryrun = ABAP_TRUE
iv_endtime = '20150101000000.0000000'
iv_maxresults = 123
iv_nexttoken = |string|
iv_starttime = '20150101000000.0000000'
).
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_metricdimensionresults( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_resourceregion( ).
lv_string = lo_row_1->get_availabilityzoneid( ).
lv_string = lo_row_1->get_accountid( ).
lv_string = lo_row_1->get_instancefamily( ).
lv_string = lo_row_1->get_instancetype( ).
lv_string = lo_row_1->get_instanceplatform( ).
lv_string = lo_row_1->get_reservationarn( ).
lv_string = lo_row_1->get_reservationid( ).
lv_reservationtype = lo_row_1->get_reservationtype( ).
lv_milliseconddatetime = lo_row_1->get_resvcreatetimestamp( ).
lv_milliseconddatetime = lo_row_1->get_rsvtarttimestamp( ).
lv_milliseconddatetime = lo_row_1->get_reservationendtimestamp( ).
lv_reservationenddatetype = lo_row_1->get_reservationenddatetype( ).
lv_capacitytenancy = lo_row_1->get_tenancy( ).
lv_reservationstate = lo_row_1->get_reservationstate( ).
lv_string = lo_row_1->get_resvinstmatchcriteria( ).
lv_string = lo_row_1->get_resvunusedfinancialowner( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.