spending_limits
Creates, updates, deletes, gets or lists a spending_limits resource.
Overview
| Name | spending_limits |
| Type | Resource |
| Id | aws.braket.spending_limits |
Fields
The following fields are returned by SELECT queries:
- search_spending_limits
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time when the spending limit was created, in epoch seconds. |
device_arn | string | The Amazon Resource Name (ARN) of the quantum device associated with this spending limit. |
queued_spend | string | The amount currently queued for spending on the device, in USD. |
spending_limit | string | The maximum spending amount allowed for the device during the specified time period, in USD. |
spending_limit_arn | string | The Amazon Resource Name (ARN) that uniquely identifies the spending limit. (pattern: <code>arn:aws[a-z-]:braket:[a-z0-9-]+:[0-9]{12}:spending-limit/.</code>) |
tags | object | The tags associated with the spending limit. Each tag consists of a key and an optional value. |
time_period | object | Defines a time range for spending limits, specifying when the limit is active. |
total_spend | string | The total amount spent on the device so far during the current time period, in USD. |
updated_at | string (date-time) | The date and time when the spending limit was last modified, in epoch seconds. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
search_spending_limits | select | region | Searches and lists spending limits based on specified filters. This operation supports pagination and allows filtering by various criteria to find specific spending limits. We recommend using pagination to ensure that the operation returns quickly and successfully. | |
create_spending_limit | insert | region, clientToken, deviceArn, spendingLimit | Creates a spending limit for a specified quantum device. Spending limits help you control costs by setting maximum amounts that can be spent on quantum computing tasks within a specified time period. Simulators do not support spending limits. | |
update_spending_limit | update | spending_limit_arn, region, clientToken | Updates an existing spending limit. You can modify the spending amount or time period. Changes take effect immediately. | |
delete_spending_limit | delete | spending_limit_arn, region | Deletes an existing spending limit. This operation permanently removes the spending limit and cannot be undone. After deletion, the associated device becomes unrestricted for spending. |
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) |
spending_limit_arn | string | The Amazon Resource Name (ARN) of the spending limit to delete. |
SELECT examples
- search_spending_limits
Searches and lists spending limits based on specified filters. This operation supports pagination and allows filtering by various criteria to find specific spending limits. We recommend using pagination to ensure that the operation returns quickly and successfully.
SELECT
created_at,
device_arn,
queued_spend,
spending_limit,
spending_limit_arn,
tags,
time_period,
total_spend,
updated_at
FROM aws.braket.spending_limits
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_spending_limit
- Manifest
Creates a spending limit for a specified quantum device. Spending limits help you control costs by setting maximum amounts that can be spent on quantum computing tasks within a specified time period. Simulators do not support spending limits.
INSERT INTO aws.braket.spending_limits (
clientToken,
deviceArn,
spendingLimit,
timePeriod,
tags,
region
)
SELECT
'{{ clientToken }}' /* required */,
'{{ deviceArn }}' /* required */,
'{{ spendingLimit }}' /* required */,
'{{ timePeriod }}',
'{{ tags }}',
'{{ region }}'
RETURNING
spending_limit_arn
;
# Description fields are for documentation purposes
- name: spending_limits
props:
- name: region
value: "{{ region }}"
description: Required parameter for the spending_limits resource.
- name: clientToken
value: "{{ clientToken }}"
- name: deviceArn
value: "{{ deviceArn }}"
- name: spendingLimit
value: "{{ spendingLimit }}"
- name: timePeriod
description: |
Defines a time range for spending limits, specifying when the limit is active.
value:
startAt: "{{ startAt }}"
endAt: "{{ endAt }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_spending_limit
Updates an existing spending limit. You can modify the spending amount or time period. Changes take effect immediately.
UPDATE aws.braket.spending_limits
SET
clientToken = '{{ clientToken }}',
spendingLimit = '{{ spendingLimit }}',
timePeriod = '{{ timePeriod }}'
WHERE
spending_limit_arn = '{{ spending_limit_arn }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}' --required;
DELETE examples
- delete_spending_limit
Deletes an existing spending limit. This operation permanently removes the spending limit and cannot be undone. After deletion, the associated device becomes unrestricted for spending.
DELETE FROM aws.braket.spending_limits
WHERE spending_limit_arn = '{{ spending_limit_arn }}' --required
AND region = '{{ region }}' --required
;