Quota¶
-
class
oci.apigateway.models.Quota(**kwargs)¶ Bases:
objectQuota policy for a usage plan.
Attributes
OPERATION_ON_BREACH_ALLOWA constant which can be used with the operation_on_breach property of a Quota. OPERATION_ON_BREACH_REJECTA constant which can be used with the operation_on_breach property of a Quota. RESET_POLICY_CALENDARA constant which can be used with the reset_policy property of a Quota. UNIT_DAYA constant which can be used with the unit property of a Quota. UNIT_HOURA constant which can be used with the unit property of a Quota. UNIT_MINUTEA constant which can be used with the unit property of a Quota. UNIT_MONTHA constant which can be used with the unit property of a Quota. UNIT_WEEKA constant which can be used with the unit property of a Quota. operation_on_breach[Required] Gets the operation_on_breach of this Quota. reset_policy[Required] Gets the reset_policy of this Quota. unit[Required] Gets the unit of this Quota. value[Required] Gets the value of this Quota. Methods
__init__(**kwargs)Initializes a new Quota object with values from keyword arguments. -
OPERATION_ON_BREACH_ALLOW= 'ALLOW'¶ A constant which can be used with the operation_on_breach property of a Quota. This constant has a value of “ALLOW”
-
OPERATION_ON_BREACH_REJECT= 'REJECT'¶ A constant which can be used with the operation_on_breach property of a Quota. This constant has a value of “REJECT”
-
RESET_POLICY_CALENDAR= 'CALENDAR'¶ A constant which can be used with the reset_policy property of a Quota. This constant has a value of “CALENDAR”
-
UNIT_DAY= 'DAY'¶ A constant which can be used with the unit property of a Quota. This constant has a value of “DAY”
-
UNIT_HOUR= 'HOUR'¶ A constant which can be used with the unit property of a Quota. This constant has a value of “HOUR”
-
UNIT_MINUTE= 'MINUTE'¶ A constant which can be used with the unit property of a Quota. This constant has a value of “MINUTE”
-
UNIT_MONTH= 'MONTH'¶ A constant which can be used with the unit property of a Quota. This constant has a value of “MONTH”
-
UNIT_WEEK= 'WEEK'¶ A constant which can be used with the unit property of a Quota. This constant has a value of “WEEK”
-
__init__(**kwargs)¶ Initializes a new Quota object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
Parameters: - value (int) – The value to assign to the value property of this Quota.
- unit (str) – The value to assign to the unit property of this Quota. Allowed values for this property are: “MINUTE”, “HOUR”, “DAY”, “WEEK”, “MONTH”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- reset_policy (str) – The value to assign to the reset_policy property of this Quota. Allowed values for this property are: “CALENDAR”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- operation_on_breach (str) – The value to assign to the operation_on_breach property of this Quota. Allowed values for this property are: “REJECT”, “ALLOW”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
-
operation_on_breach¶ [Required] Gets the operation_on_breach of this Quota. What the usage plan will do when a quota is breached: REJECT will allow no further requests ALLOW will continue to allow further requests
Allowed values for this property are: “REJECT”, “ALLOW”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The operation_on_breach of this Quota. Return type: str
-
reset_policy¶ [Required] Gets the reset_policy of this Quota. The policy that controls when quotas will reset. Example: CALENDAR
Allowed values for this property are: “CALENDAR”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The reset_policy of this Quota. Return type: str
-
unit¶ [Required] Gets the unit of this Quota. The unit of time over which quotas are calculated. Example: MINUTE or MONTH
Allowed values for this property are: “MINUTE”, “HOUR”, “DAY”, “WEEK”, “MONTH”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The unit of this Quota. Return type: str
-
value¶ [Required] Gets the value of this Quota. The number of requests that can be made per time period.
Returns: The value of this Quota. Return type: int
-