Braket / Client / create_spending_limit
create_spending_limit¶
- Braket.Client.create_spending_limit(**kwargs)¶
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
response = client.create_spending_limit( clientToken='string', deviceArn='string', spendingLimit='string', timePeriod={ 'startAt': datetime(2015, 1, 1), 'endAt': datetime(2015, 1, 1) }, tags={ 'string': 'string' } )
- Parameters:
clientToken (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.
deviceArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the quantum device to apply the spending limit to.
spendingLimit (string) –
[REQUIRED]
The maximum amount that can be spent on the specified device, in USD.
timePeriod (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.
tags (dict) –
The tags to apply to the spending limit. Each tag consists of a key and an optional value.
(string) –
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'spendingLimitArn': 'string' }
Response Structure
(dict) –
spendingLimitArn (string) –
The Amazon Resource Name (ARN) of the created spending limit.
Exceptions
Braket.Client.exceptions.AccessDeniedExceptionBraket.Client.exceptions.ThrottlingExceptionBraket.Client.exceptions.DeviceRetiredExceptionBraket.Client.exceptions.InternalServiceExceptionBraket.Client.exceptions.ValidationException