Skip to main content

spending_limits

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

Overview

Namespending_limits
TypeResource
Idaws.braket.spending_limits

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The date and time when the spending limit was created, in epoch seconds.
device_arnstringThe Amazon Resource Name (ARN) of the quantum device associated with this spending limit.
queued_spendstringThe amount currently queued for spending on the device, in USD.
spending_limitstringThe maximum spending amount allowed for the device during the specified time period, in USD.
spending_limit_arnstringThe 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>)
tagsobjectThe tags associated with the spending limit. Each tag consists of a key and an optional value.
time_periodobjectDefines a time range for spending limits, specifying when the limit is active.
total_spendstringThe total amount spent on the device so far during the current time period, in USD.
updated_atstring (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:

NameAccessible byRequired ParamsOptional ParamsDescription
search_spending_limitsselectregionSearches 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_limitinsertregion, clientToken, deviceArn, spendingLimitCreates 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_limitupdatespending_limit_arn, region, clientTokenUpdates an existing spending limit. You can modify the spending amount or time period. Changes take effect immediately.
delete_spending_limitdeletespending_limit_arn, regionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
spending_limit_arnstringThe Amazon Resource Name (ARN) of the spending limit to delete.

SELECT examples

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

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
;

UPDATE examples

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

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
;