2025/11/20 - Braket - 4 new api methods
Changes Add support for Braket spending limits.
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.
See also: AWS API Documentation
Request Syntax
client.delete_spending_limit(
spendingLimitArn='string'
)
string
[REQUIRED]
The Amazon Resource Name (ARN) of the spending limit to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
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.
See also: AWS API Documentation
Request Syntax
client.search_spending_limits(
nextToken='string',
maxResults=123,
filters=[
{
'name': 'string',
'values': [
'string',
],
'operator': 'EQUAL'
},
]
)
string
The token to retrieve the next page of results. This value is returned from a previous call to SearchSpendingLimits when there are more results available.
integer
The maximum number of results to return in a single call. Minimum value of 1, maximum value of 100. Default is 20.
list
The filters to apply when searching for spending limits. Use filters to narrow down the results based on specific criteria.
(dict) --
Specifies filter criteria for searching spending limits. Use filters to narrow down results based on specific attributes.
name (string) -- [REQUIRED]
The name of the field to filter on. Currently only supports deviceArn.
values (list) -- [REQUIRED]
An array of values to match against the specified field.
(string) --
operator (string) -- [REQUIRED]
The comparison operator to use when filtering.
dict
Response Syntax
{
'spendingLimits': [
{
'spendingLimitArn': 'string',
'deviceArn': 'string',
'timePeriod': {
'startAt': datetime(2015, 1, 1),
'endAt': datetime(2015, 1, 1)
},
'spendingLimit': 'string',
'queuedSpend': 'string',
'totalSpend': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'tags': {
'string': 'string'
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
spendingLimits (list) --
An array of spending limit summaries that match the specified filters.
(dict) --
Contains summary information about a spending limit, including current spending status and configuration details.
spendingLimitArn (string) --
The Amazon Resource Name (ARN) that uniquely identifies the spending limit.
deviceArn (string) --
The Amazon Resource Name (ARN) of the quantum device associated with this spending limit.
timePeriod (dict) --
The time period during which the spending limit is active.
startAt (datetime) --
The start date and time for the spending limit period, in epoch seconds.
endAt (datetime) --
The end date and time for the spending limit period, in epoch seconds.
spendingLimit (string) --
The maximum spending amount allowed for the device during the specified time period, in USD.
queuedSpend (string) --
The amount currently queued for spending on the device, in USD.
totalSpend (string) --
The total amount spent on the device so far during the current time period, in USD.
createdAt (datetime) --
The date and time when the spending limit was created, in epoch seconds.
updatedAt (datetime) --
The date and time when the spending limit was last modified, in epoch seconds.
tags (dict) --
The tags associated with the spending limit. Each tag consists of a key and an optional value.
(string) --
(string) --
nextToken (string) --
The token to retrieve the next page of results. This value is null when there are no more results to return.
Updates an existing spending limit. You can modify the spending amount or time period. Changes take effect immediately.
See also: AWS API Documentation
Request Syntax
client.update_spending_limit(
spendingLimitArn='string',
clientToken='string',
spendingLimit='string',
timePeriod={
'startAt': datetime(2015, 1, 1),
'endAt': datetime(2015, 1, 1)
}
)
string
[REQUIRED]
The Amazon Resource Name (ARN) of the spending limit to update.
string
[REQUIRED]
A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Braket ignores the request, but does not return an error.
This field is autopopulated if not provided.
string
The new maximum amount that can be spent on the specified device, in USD.
dict
The new time period during which the spending limit is active, including start and end dates.
startAt (datetime) -- [REQUIRED]
The start date and time for the spending limit period, in epoch seconds.
endAt (datetime) -- [REQUIRED]
The end date and time for the spending limit period, in epoch seconds.
dict
Response Syntax
{}
Response Structure
(dict) --
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.
See also: AWS API Documentation
Request Syntax
client.create_spending_limit(
clientToken='string',
deviceArn='string',
spendingLimit='string',
timePeriod={
'startAt': datetime(2015, 1, 1),
'endAt': datetime(2015, 1, 1)
},
tags={
'string': 'string'
}
)
string
[REQUIRED]
A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Braket ignores the request, but does not return an error.
This field is autopopulated if not provided.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the quantum device to apply the spending limit to.
string
[REQUIRED]
The maximum amount that can be spent on the specified device, in USD.
dict
The time period during which the spending limit is active, including start and end dates.
startAt (datetime) -- [REQUIRED]
The start date and time for the spending limit period, in epoch seconds.
endAt (datetime) -- [REQUIRED]
The end date and time for the spending limit period, in epoch seconds.
dict
The tags to apply to the spending limit. Each tag consists of a key and an optional value.
(string) --
(string) --
dict
Response Syntax
{
'spendingLimitArn': 'string'
}
Response Structure
(dict) --
spendingLimitArn (string) --
The Amazon Resource Name (ARN) of the created spending limit.