usage_limits
Creates, updates, deletes, gets or lists a usage_limits resource.
Overview
| Name | usage_limits |
| Type | Resource |
| Id | aws.redshift_serverless.usage_limits |
Fields
The following fields are returned by SELECT queries:
- get_usage_limit
- list_usage_limits
| Name | Datatype | Description |
|---|---|---|
amount | integer (int64) | The limit amount. If time-based, this amount is in RPUs consumed per hour. If data-based, this amount is in terabytes (TB). The value must be a positive number. |
breach_action | string | The action that Amazon Redshift Serverless takes when the limit is reached. (log, emit-metric, deactivate) |
period | string | The time period that the amount applies to. A weekly period begins on Sunday. The default is monthly. (daily, weekly, monthly) |
resource_arn | string | The Amazon Resource Name (ARN) that identifies the Amazon Redshift Serverless resource. |
usage_limit_arn | string | The Amazon Resource Name (ARN) of the resource associated with the usage limit. |
usage_limit_id | string | The identifier of the usage limit. |
usage_type | string | The Amazon Redshift Serverless feature to limit. (serverless-compute, cross-region-datasharing) |
| Name | Datatype | Description |
|---|---|---|
amount | integer (int64) | The limit amount. If time-based, this amount is in RPUs consumed per hour. If data-based, this amount is in terabytes (TB). The value must be a positive number. |
breach_action | string | The action that Amazon Redshift Serverless takes when the limit is reached. (log, emit-metric, deactivate) |
period | string | The time period that the amount applies to. A weekly period begins on Sunday. The default is monthly. (daily, weekly, monthly) |
resource_arn | string | The Amazon Resource Name (ARN) that identifies the Amazon Redshift Serverless resource. |
usage_limit_arn | string | The Amazon Resource Name (ARN) of the resource associated with the usage limit. |
usage_limit_id | string | The identifier of the usage limit. |
usage_type | string | The Amazon Redshift Serverless feature to limit. (serverless-compute, cross-region-datasharing) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_usage_limit | select | region | Returns information about a usage limit. | |
list_usage_limits | select | region | Lists all usage limits within Amazon Redshift Serverless. | |
create_usage_limit | insert | region, amount, resourceArn, usageType | Creates a usage limit for a specified Amazon Redshift Serverless usage type. The usage limit is identified by the returned usage limit identifier. | |
update_usage_limit | update | region, usageLimitId | Update a usage limit in Amazon Redshift Serverless. You can't update the usage type or period of a usage limit. | |
delete_usage_limit | delete | region | Deletes a usage limit from Amazon Redshift Serverless. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_usage_limit
- list_usage_limits
Returns information about a usage limit.
SELECT
amount,
breach_action,
period,
resource_arn,
usage_limit_arn,
usage_limit_id,
usage_type
FROM aws.redshift_serverless.usage_limits
WHERE region = '{{ region }}' -- required
;
Lists all usage limits within Amazon Redshift Serverless.
SELECT
amount,
breach_action,
period,
resource_arn,
usage_limit_arn,
usage_limit_id,
usage_type
FROM aws.redshift_serverless.usage_limits
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_usage_limit
- Manifest
Creates a usage limit for a specified Amazon Redshift Serverless usage type. The usage limit is identified by the returned usage limit identifier.
INSERT INTO aws.redshift_serverless.usage_limits (
amount,
breachAction,
period,
resourceArn,
usageType,
region
)
SELECT
{{ amount }} /* required */,
'{{ breachAction }}',
'{{ period }}',
'{{ resourceArn }}' /* required */,
'{{ usageType }}' /* required */,
'{{ region }}'
RETURNING
usage_limit
;
# Description fields are for documentation purposes
- name: usage_limits
props:
- name: region
value: "{{ region }}"
description: Required parameter for the usage_limits resource.
- name: amount
value: {{ amount }}
description: |
The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
- name: breachAction
value: "{{ breachAction }}"
description: |
The action that Amazon Redshift Serverless takes when the limit is reached. The default is log.
valid_values: ['log', 'emit-metric', 'deactivate']
- name: period
value: "{{ period }}"
description: |
The time period that the amount applies to. A weekly period begins on Sunday. The default is monthly.
valid_values: ['daily', 'weekly', 'monthly']
- name: resourceArn
value: "{{ resourceArn }}"
description: |
The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
- name: usageType
value: "{{ usageType }}"
description: |
The type of Amazon Redshift Serverless usage to create a usage limit for.
valid_values: ['serverless-compute', 'cross-region-datasharing']
UPDATE examples
- update_usage_limit
Update a usage limit in Amazon Redshift Serverless. You can't update the usage type or period of a usage limit.
UPDATE aws.redshift_serverless.usage_limits
SET
amount = {{ amount }},
breachAction = '{{ breachAction }}',
usageLimitId = '{{ usageLimitId }}'
WHERE
region = '{{ region }}' --required
AND usageLimitId = '{{ usageLimitId }}' --required
RETURNING
usage_limit;
DELETE examples
- delete_usage_limit
Deletes a usage limit from Amazon Redshift Serverless.
DELETE FROM aws.redshift_serverless.usage_limits
WHERE region = '{{ region }}' --required
;