Quota¶
- class oci.apigateway.models.Quota(**kwargs)¶
Bases:
objectQuota policy for a usage plan.
Attributes:
A constant which can be used with the operation_on_breach property of a Quota.
A constant which can be used with the operation_on_breach property of a Quota.
A constant which can be used with the reset_policy property of a Quota.
A constant which can be used with the unit property of a Quota.
A constant which can be used with the unit property of a Quota.
A constant which can be used with the unit property of a Quota.
A constant which can be used with the unit property of a Quota.
A constant which can be used with the unit property of a Quota.
[Required] Gets the operation_on_breach of this Quota.
[Required] Gets the reset_policy of this Quota.
[Required] Gets the unit of this Quota.
[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’.
- property 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
- property 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
- property 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
- property 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