create_spending_limit
async
¶
create_spending_limit(
client_token: String64,
device_arn: DeviceArn,
spending_limit: str,
*,
config_overrides: Optional[AsyncBraketClientConfig] = 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/async_braket.py
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 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 | |