Skip to content

/AWS1/CL_ASP=>DESCRIBESCALINGPLANRESOURCES()

About DescribeScalingPlanResources

Describes the scalable resources in the specified scaling plan.

Method Signature

IMPORTING

Required arguments:

iv_scalingplanname TYPE /AWS1/ASPSCALINGPLANNAME /AWS1/ASPSCALINGPLANNAME

The name of the scaling plan.

iv_scalingplanversion TYPE /AWS1/ASPSCALINGPLANVERSION /AWS1/ASPSCALINGPLANVERSION

The version number of the scaling plan. Currently, the only valid value is 1.

Optional arguments:

iv_maxresults TYPE /AWS1/ASPMAXRESULTS /AWS1/ASPMAXRESULTS

The maximum number of scalable resources to return. The value must be between 1 and 50. The default value is 50.

iv_nexttoken TYPE /AWS1/ASPNEXTTOKEN /AWS1/ASPNEXTTOKEN

The token for the next set of results.

RETURNING

oo_output TYPE REF TO /aws1/cl_aspdscscaplanresrcs01 /AWS1/CL_ASPDSCSCAPLANRESRCS01

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->/aws1/if_asp~describescalingplanresources(
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_scalingplanname = |string|
  iv_scalingplanversion = 123
).

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_scalingplanresources( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_scalingplanname = lo_row_1->get_scalingplanname( ).
      lv_scalingplanversion = lo_row_1->get_scalingplanversion( ).
      lv_servicenamespace = lo_row_1->get_servicenamespace( ).
      lv_resourceidmaxlen1600 = lo_row_1->get_resourceid( ).
      lv_scalabledimension = lo_row_1->get_scalabledimension( ).
      LOOP AT lo_row_1->get_scalingpolicies( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_policyname = lo_row_3->get_policyname( ).
          lv_policytype = lo_row_3->get_policytype( ).
          lo_targettrackingconfigura = lo_row_3->get_targettrackingconf( ).
          IF lo_targettrackingconfigura IS NOT INITIAL.
            lo_predefinedscalingmetric = lo_targettrackingconfigura->get_predefinedscalingmetpec( ).
            IF lo_predefinedscalingmetric IS NOT INITIAL.
              lv_scalingmetrictype = lo_predefinedscalingmetric->get_predefinedscametrictype( ).
              lv_resourcelabel = lo_predefinedscalingmetric->get_resourcelabel( ).
            ENDIF.
            lo_customizedscalingmetric = lo_targettrackingconfigura->get_customizedscalingmetpec( ).
            IF lo_customizedscalingmetric IS NOT INITIAL.
              lv_metricname = lo_customizedscalingmetric->get_metricname( ).
              lv_metricnamespace = lo_customizedscalingmetric->get_namespace( ).
              LOOP AT lo_customizedscalingmetric->get_dimensions( ) into lo_row_4.
                lo_row_5 = lo_row_4.
                IF lo_row_5 IS NOT INITIAL.
                  lv_metricdimensionname = lo_row_5->get_name( ).
                  lv_metricdimensionvalue = lo_row_5->get_value( ).
                ENDIF.
              ENDLOOP.
              lv_metricstatistic = lo_customizedscalingmetric->get_statistic( ).
              lv_metricunit = lo_customizedscalingmetric->get_unit( ).
            ENDIF.
            lv_metricscale = lo_targettrackingconfigura->get_targetvalue( ).
            lv_disablescalein = lo_targettrackingconfigura->get_disablescalein( ).
            lv_cooldown = lo_targettrackingconfigura->get_scaleoutcooldown( ).
            lv_cooldown = lo_targettrackingconfigura->get_scaleincooldown( ).
            lv_cooldown = lo_targettrackingconfigura->get_estimatedinstancewarmup( ).
          ENDIF.
        ENDIF.
      ENDLOOP.
      lv_scalingstatuscode = lo_row_1->get_scalingstatuscode( ).
      lv_xmlstring = lo_row_1->get_scalingstatusmessage( ).
    ENDIF.
  ENDLOOP.
  lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.