Skip to content

/AWS1/IF_CGP=>UPDATEPROVISIONEDLIMIT()

About UpdateProvisionedLimit

Sets the provisioned limit for a specific API category. The value must be between the default limit and your account-level maximum limit in Service Quotas.

Managed login user pools don't support adjustments to the UserAuthentication or UserFederation categories. To increase these limits, submit a Service Quotas increase request.

Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.

Learn more

Method Signature

METHODS /AWS1/IF_CGP~UPDATEPROVISIONEDLIMIT
  IMPORTING
    !IO_LIMITDEFINITION TYPE REF TO /AWS1/CL_CGPLIMITDEFNTYPE OPTIONAL
    !IV_REQUESTEDLIMITVALUE TYPE /AWS1/CGPINTEGERTYPE OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cgpupdateprovlimitrsp
  RAISING
    /AWS1/CX_CGPINTERNALERROREX
    /AWS1/CX_CGPINVALIDPARAMETEREX
    /AWS1/CX_CGPNOTAUTHORIZEDEX
    /AWS1/CX_CGPRESOURCENOTFOUNDEX
    /AWS1/CX_CGPSERVICEQUOTAEXCDEX
    /AWS1/CX_CGPTOOMANYREQUESTSEX
    /AWS1/CX_CGPCLIENTEXC
    /AWS1/CX_CGPSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

io_limitdefinition TYPE REF TO /AWS1/CL_CGPLIMITDEFNTYPE /AWS1/CL_CGPLIMITDEFNTYPE

The limit to update. Specify the limit class and the attributes that identify the limit.

iv_requestedlimitvalue TYPE /AWS1/CGPINTEGERTYPE /AWS1/CGPINTEGERTYPE

The provisioned rate to set, in requests per second (RPS).

RETURNING

oo_output TYPE REF TO /aws1/cl_cgpupdateprovlimitrsp /AWS1/CL_CGPUPDATEPROVLIMITRSP

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->updateprovisionedlimit(
  io_limitdefinition = new /aws1/cl_cgplimitdefntype(
    it_attributes = VALUE /aws1/cl_cgpstrtostrmaptype_w=>tt_stringtostringmaptype(
      (
        VALUE /aws1/cl_cgpstrtostrmaptype_w=>ts_strtostrmaptype_maprow(
          key = |string|
          value = new /aws1/cl_cgpstrtostrmaptype_w( |string| )
        )
      )
    )
    iv_limitclass = |string|
  )
  iv_requestedlimitvalue = 123
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_limittype = lo_result->get_limit( ).
  IF lo_limittype IS NOT INITIAL.
    lo_limitdefinitiontype = lo_limittype->get_limitdefinition( ).
    IF lo_limitdefinitiontype IS NOT INITIAL.
      lv_limitclass = lo_limitdefinitiontype->get_limitclass( ).
      LOOP AT lo_limitdefinitiontype->get_attributes( ) into ls_row.
        lv_key = ls_row-key.
        lo_value = ls_row-value.
        IF lo_value IS NOT INITIAL.
          lv_stringtype = lo_value->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
    lv_integertype = lo_limittype->get_provisionedlimitvalue( ).
    lv_integertype = lo_limittype->get_freelimitvalue( ).
  ENDIF.
ENDIF.

Example update a provisioned limit

The following example sets the provisioned limit for the UserAuthentication API category to 300 RPS.

DATA(lo_result) = lo_client->updateprovisionedlimit(
  io_limitdefinition = new /aws1/cl_cgplimitdefntype(
    it_attributes = VALUE /aws1/cl_cgpstrtostrmaptype_w=>tt_stringtostringmaptype(
      (
        VALUE /aws1/cl_cgpstrtostrmaptype_w=>ts_strtostrmaptype_maprow(
          key = |Category|
          value = new /aws1/cl_cgpstrtostrmaptype_w( |UserAuthentication| )
        )
      )
    )
    iv_limitclass = |API_CATEGORY|
  )
  iv_requestedlimitvalue = 300
).