create_spending_limit
¶
create_spending_limit(
client_token: String64,
device_arn: DeviceArn,
spending_limit: str,
*,
config_overrides: Optional[BraketClientConfig] = None,
time_period: Optional[TimePeriod] = None,
tags: Optional[TagsMap] = None,
) -> CreateSpendingLimitResponse
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.
Parameters:
-
client_token(String64) –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.
-
device_arn(DeviceArn) –The Amazon Resource Name (ARN) of the quantum device to apply the spending limit to.
-
spending_limit(str) –The maximum amount that can be spent on the specified device, in USD.
-
time_period(Optional[TimePeriod], default:None) –The time period during which the spending limit is active, including start and end dates.
-
tags(Optional[TagsMap], default:None) –The tags to apply to the spending limit. Each tag consists of a key and an optional value.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
DeviceRetiredException–The specified device has been retired.
-
InternalServiceException–The request failed because of an unknown error.
-
ThrottlingException–The API throttling rate limit is exceeded.
-
ValidationException–The input request failed to satisfy constraints expected by Amazon Braket.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_braket/_services/braket.py
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 | |