/AWS1/IF_RSH=>CREATEUSAGELIMIT()¶
About CreateUsageLimit¶
Creates a usage limit for a specified Amazon Redshift feature on a cluster. The usage limit is identified by the returned usage limit identifier.
Method Signature¶
METHODS /AWS1/IF_RSH~CREATEUSAGELIMIT
IMPORTING
!IV_CLUSTERIDENTIFIER TYPE /AWS1/RSHSTRING OPTIONAL
!IV_FEATURETYPE TYPE /AWS1/RSHUSAGELIMITFEATURETYPE OPTIONAL
!IV_LIMITTYPE TYPE /AWS1/RSHUSAGELIMITLIMITTYPE OPTIONAL
!IV_AMOUNT TYPE /AWS1/RSHLONG OPTIONAL
!IV_PERIOD TYPE /AWS1/RSHUSAGELIMITPERIOD OPTIONAL
!IV_BREACHACTION TYPE /AWS1/RSHUSAGELIMITBREACHACT OPTIONAL
!IT_TAGS TYPE /AWS1/CL_RSHTAG=>TT_TAGLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_rshusagelimit
RAISING
/AWS1/CX_RSHCLUSTNOTFOUNDFAULT
/AWS1/CX_RSHINVCLUSTSTATEFAULT
/AWS1/CX_RSHINVUSAGELIMITFAULT
/AWS1/CX_RSHLIMITEXCEEDEDFAULT
/AWS1/CX_RSHTAGLIMITEXCDFAULT
/AWS1/CX_RSHUNSUPPORTEDOPFAULT
/AWS1/CX_RSHUSAGELMTALREXFAULT
/AWS1/CX_RSHCLIENTEXC
/AWS1/CX_RSHSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_clusteridentifier TYPE /AWS1/RSHSTRING /AWS1/RSHSTRING¶
The identifier of the cluster that you want to limit usage.
iv_featuretype TYPE /AWS1/RSHUSAGELIMITFEATURETYPE /AWS1/RSHUSAGELIMITFEATURETYPE¶
The Amazon Redshift feature that you want to limit.
iv_limittype TYPE /AWS1/RSHUSAGELIMITLIMITTYPE /AWS1/RSHUSAGELIMITLIMITTYPE¶
The type of limit. Depending on the feature type, this can be based on a time duration or data size. If
FeatureTypeisspectrum, thenLimitTypemust bedata-scanned. IfFeatureTypeisconcurrency-scaling, thenLimitTypemust betime. IfFeatureTypeiscross-region-datasharing, thenLimitTypemust bedata-scanned.
iv_amount TYPE /AWS1/RSHLONG /AWS1/RSHLONG¶
The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB). The value must be a positive number.
Optional arguments:¶
iv_period TYPE /AWS1/RSHUSAGELIMITPERIOD /AWS1/RSHUSAGELIMITPERIOD¶
The time period that the amount applies to. A
weeklyperiod begins on Sunday. The default ismonthly.
iv_breachaction TYPE /AWS1/RSHUSAGELIMITBREACHACT /AWS1/RSHUSAGELIMITBREACHACT¶
The action that Amazon Redshift takes when the limit is reached. The default is log. For more information about this parameter, see UsageLimit.
it_tags TYPE /AWS1/CL_RSHTAG=>TT_TAGLIST TT_TAGLIST¶
A list of tag instances.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_rshusagelimit /AWS1/CL_RSHUSAGELIMIT¶
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->createusagelimit(
it_tags = VALUE /aws1/cl_rshtag=>tt_taglist(
(
new /aws1/cl_rshtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_amount = 123
iv_breachaction = |string|
iv_clusteridentifier = |string|
iv_featuretype = |string|
iv_limittype = |string|
iv_period = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_string = lo_result->get_usagelimitid( ).
lv_string = lo_result->get_clusteridentifier( ).
lv_usagelimitfeaturetype = lo_result->get_featuretype( ).
lv_usagelimitlimittype = lo_result->get_limittype( ).
lv_long = lo_result->get_amount( ).
lv_usagelimitperiod = lo_result->get_period( ).
lv_usagelimitbreachaction = lo_result->get_breachaction( ).
LOOP AT lo_result->get_tags( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_key( ).
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.