Skip to main content

usage_limits

Creates, updates, deletes, gets or lists a usage_limits resource.

Overview

Nameusage_limits
TypeResource
Idaws.redshift.usage_limits

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
amountintegerThe limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB).
breach_actionstringThe 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.
cluster_identifierstringThe identifier of the cluster with a usage limit.
feature_typestringThe Amazon Redshift feature to which the limit applies.
limit_typestringThe type of limit. Depending on the feature type, this can be based on a time duration or data size.
periodstringThe time period that the amount applies to. A weekly period begins on Sunday. The default is monthly.
tagsstringA list of tag instances.
usage_limit_idstringThe identifier of the usage limit.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_usage_limitsselectregionUsageLimitId, ClusterIdentifier, FeatureType, MaxRecords, Marker, TagKeys, TagValuesShows usage limits on a cluster. Results are filtered based on the combination of input usage limit identifier, cluster identifier, and feature type parameters: If usage limit identifier, cluster identifier, and feature type are not provided, then all usage limit objects for the current account in the current region are returned. If usage limit identifier is provided, then the corresponding usage limit object is returned. If cluster identifier is provided, then all usage limit objects for the specified cluster are returned. If cluster identifier and feature type are provided, then all usage limit objects for the combination of cluster and feature are returned.
create_usage_limitinsertClusterIdentifier, FeatureType, LimitType, regionAmount, Period, BreachAction, TagsCreates a usage limit for a specified Amazon Redshift feature on a cluster. The usage limit is identified by the returned usage limit identifier.
modify_usage_limitupdateUsageLimitId, regionAmount, BreachActionModifies a usage limit in a cluster. You can't modify the feature type or period of a usage limit.
delete_usage_limitdeleteUsageLimitId, regionDeletes a usage limit from a cluster.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ClusterIdentifierstringThe identifier of the cluster that you want to limit usage.
FeatureTypestringThe Amazon Redshift feature that you want to limit.
LimitTypestringThe type of limit. Depending on the feature type, this can be based on a time duration or data size. If FeatureType is spectrum, then LimitType must be data-scanned. If FeatureType is concurrency-scaling, then LimitType must be time. If FeatureType is cross-region-datasharing, then LimitType must be data-scanned. If FeatureType is extra-compute-for-automatic-optimization, then LimitType must be time.
UsageLimitIdstringThe identifier of the usage limit to delete.
regionstringAWS region (default: us-east-1)
Amountinteger (int64)The new limit amount. For more information about this parameter, see UsageLimit.
BreachActionstringThe new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see UsageLimit.
ClusterIdentifierstringThe identifier of the cluster for which you want to describe usage limits.
FeatureTypestringThe feature type for which you want to describe usage limits.
MarkerstringAn optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeUsageLimits request exceed the value specified in MaxRecords, Amazon Web Services returns a value in the Marker field of the response. You can retrieve the next set of response records by providing the returned marker value in the Marker parameter and retrying the request.
MaxRecordsintegerThe maximum number of response records to return in each call. If the number of remaining response records exceeds the specified MaxRecords value, a value is returned in a marker field of the response. You can retrieve the next set of records by retrying the command with the returned marker value. Default: 100 Constraints: minimum 20, maximum 100.
PeriodstringThe time period that the amount applies to. A weekly period begins on Sunday. The default is monthly.
TagKeysarrayA tag key or keys for which you want to return all matching usage limit objects that are associated with the specified key or keys. For example, suppose that you have parameter groups that are tagged with keys called owner and environment. If you specify both of these tag keys in the request, Amazon Redshift returns a response with the usage limit objects have either or both of these tag keys associated with them.
TagValuesarrayA tag value or values for which you want to return all matching usage limit objects that are associated with the specified tag value or values. For example, suppose that you have parameter groups that are tagged with values called admin and test. If you specify both of these tag values in the request, Amazon Redshift returns a response with the usage limit objects that have either or both of these tag values associated with them.
TagsarrayA list of tag instances.
UsageLimitIdstringThe identifier of the usage limit to describe.

SELECT examples

Shows usage limits on a cluster. Results are filtered based on the combination of input usage limit identifier, cluster identifier, and feature type parameters: If usage limit identifier, cluster identifier, and feature type are not provided, then all usage limit objects for the current account in the current region are returned. If usage limit identifier is provided, then the corresponding usage limit object is returned. If cluster identifier is provided, then all usage limit objects for the specified cluster are returned. If cluster identifier and feature type are provided, then all usage limit objects for the combination of cluster and feature are returned.

SELECT
amount,
breach_action,
cluster_identifier,
feature_type,
limit_type,
period,
tags,
usage_limit_id
FROM aws.redshift.usage_limits
WHERE region = '{{ region }}' -- required
AND UsageLimitId = '{{ UsageLimitId }}'
AND ClusterIdentifier = '{{ ClusterIdentifier }}'
AND FeatureType = '{{ FeatureType }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
AND TagKeys = '{{ TagKeys }}'
AND TagValues = '{{ TagValues }}'
;

INSERT examples

Creates a usage limit for a specified Amazon Redshift feature on a cluster. The usage limit is identified by the returned usage limit identifier.

INSERT INTO aws.redshift.usage_limits (
ClusterIdentifier,
FeatureType,
LimitType,
region,
Amount,
Period,
BreachAction,
Tags
)
SELECT
'{{ ClusterIdentifier }}',
'{{ FeatureType }}',
'{{ LimitType }}',
'{{ region }}',
'{{ Amount }}',
'{{ Period }}',
'{{ BreachAction }}',
'{{ Tags }}'
RETURNING
amount,
breach_action,
cluster_identifier,
feature_type,
limit_type,
period,
tags,
usage_limit_id
;

UPDATE examples

Modifies a usage limit in a cluster. You can't modify the feature type or period of a usage limit.

UPDATE aws.redshift.usage_limits
SET
-- No updatable properties
WHERE
UsageLimitId = '{{ UsageLimitId }}' --required
AND region = '{{ region }}' --required
AND Amount = '{{ Amount}}'
AND BreachAction = '{{ BreachAction}}'
RETURNING
amount,
breach_action,
cluster_identifier,
feature_type,
limit_type,
period,
tags,
usage_limit_id;

DELETE examples

Deletes a usage limit from a cluster.

DELETE FROM aws.redshift.usage_limits
WHERE UsageLimitId = '{{ UsageLimitId }}' --required
AND region = '{{ region }}' --required
;