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.
Parameters:
-
spending_limit_arn
(SpendingLimitArn)
–
The Amazon Resource Name (ARN) of the spending limit to delete.
Raises:
Source code in docs_src/capo_braket/_services/braket.py
| def delete_spending_limit(
self,
spending_limit_arn: "capo_braket.types.spending_limit_arn.SpendingLimitArn",
*,
config_overrides: Optional[BraketClientConfig] = None,
) -> "capo_braket.types.delete_spending_limit_response.DeleteSpendingLimitResponse":
"""<p>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.</p>
Args:
spending_limit_arn: <p>The Amazon Resource Name (ARN) of the spending limit to delete.</p>
Raises:
capo_braket.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
capo_braket.errors.internal_service_exception.InternalServiceException: <p>The request failed because of an unknown error.</p>
capo_braket.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_braket.errors.throttling_exception.ThrottlingException: <p>The API throttling rate limit is exceeded.</p>
capo_braket.errors.validation_exception.ValidationException: <p>The input request failed to satisfy constraints expected by Amazon Braket.</p>
capo_braket.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_braket.types.delete_spending_limit_request.DeleteSpendingLimitRequest]",
) -> OperationResponse[
"capo_braket.types.delete_spending_limit_response.DeleteSpendingLimitResponse"
]:
import capo_braket._operations.braket.delete_spending_limit
output, http_response = (
capo_braket._operations.braket.delete_spending_limit.delete_spending_limit(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteSpendingLimit")
)
input_: capo_braket.types.delete_spending_limit_request.DeleteSpendingLimitRequest = {
"spending_limit_arn": spending_limit_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|