Redshift / Client / create_usage_limit
create_usage_limitΒΆ
- Redshift.Client.create_usage_limit(**kwargs)ΒΆ
Creates a usage limit for a specified Amazon Redshift feature on a cluster. The usage limit is identified by the returned usage limit identifier.
See also: AWS API Documentation
Request Syntax
response = client.create_usage_limit( ClusterIdentifier='string', FeatureType='spectrum'|'concurrency-scaling'|'cross-region-datasharing'|'extra-compute-for-automatic-optimization', LimitType='time'|'data-scanned', Amount=123, Period='daily'|'weekly'|'monthly', BreachAction='log'|'emit-metric'|'disable', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
- Parameters:
ClusterIdentifier (string) β
[REQUIRED]
The identifier of the cluster that you want to limit usage.
FeatureType (string) β
[REQUIRED]
The Amazon Redshift feature that you want to limit.
LimitType (string) β
[REQUIRED]
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. IfFeatureTypeisextra-compute-for-automatic-optimization, thenLimitTypemust betime.Amount (integer) β
[REQUIRED]
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.
Period (string) β The time period that the amount applies to. A
weeklyperiod begins on Sunday. The default ismonthly.BreachAction (string) β The action that Amazon Redshift takes when the limit is reached. The default is log. For more information about this parameter, see UsageLimit.
Tags (list) β
A list of tag instances.
(dict) β
A tag consisting of a name/value pair for a resource.
Key (string) β
The key, or name, for the resource tag.
Value (string) β
The value for the resource tag.
- Return type:
dict
- Returns:
Response Syntax
{ 'UsageLimitId': 'string', 'ClusterIdentifier': 'string', 'FeatureType': 'spectrum'|'concurrency-scaling'|'cross-region-datasharing'|'extra-compute-for-automatic-optimization', 'LimitType': 'time'|'data-scanned', 'Amount': 123, 'Period': 'daily'|'weekly'|'monthly', 'BreachAction': 'log'|'emit-metric'|'disable', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }
Response Structure
(dict) β
Describes a usage limit object for a cluster.
UsageLimitId (string) β
The identifier of the usage limit.
ClusterIdentifier (string) β
The identifier of the cluster with a usage limit.
FeatureType (string) β
The Amazon Redshift feature to which the limit applies.
LimitType (string) β
The type of limit. Depending on the feature type, this can be based on a time duration or data size.
Amount (integer) β
The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB).
Period (string) β
The time period that the amount applies to. A
weeklyperiod begins on Sunday. The default ismonthly.BreachAction (string) β
The action that Amazon Redshift takes when the limit is reached. Possible values are:
log - To log an event in a system table. The default is log.
emit-metric - To emit CloudWatch metrics.
disable - To disable the feature until the next usage period begins.
Tags (list) β
A list of tag instances.
(dict) β
A tag consisting of a name/value pair for a resource.
Key (string) β
The key, or name, for the resource tag.
Value (string) β
The value for the resource tag.
Exceptions
Redshift.Client.exceptions.ClusterNotFoundFaultRedshift.Client.exceptions.InvalidClusterStateFaultRedshift.Client.exceptions.LimitExceededFaultRedshift.Client.exceptions.UsageLimitAlreadyExistsFaultRedshift.Client.exceptions.InvalidUsageLimitFaultRedshift.Client.exceptions.TagLimitExceededFaultRedshift.Client.exceptions.UnsupportedOperationFault