Removes Shield Advanced from an account. Shield Advanced requires a 1-year subscription commitment. You cannot delete a subscription prior to the completion of that commitment.
Raises:
-
InternalErrorException
–
Exception that indicates that a problem occurred with the service infrastructure. You can retry the request.
-
LockedSubscriptionException
–
You are trying to update a subscription that has not yet completed the 1-year commitment. You can change the AutoRenew parameter during the last 30 days of your subscription. This exception indicates that you are attempting to change AutoRenew prior to that period.
-
ResourceNotFoundException
–
Exception indicating the specified resource does not exist. If available, this exception includes details in additional properties.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_shield/_services/shield.py
| def delete_subscription(
self, *, config_overrides: Optional[ShieldClientConfig] = None
) -> "capo_shield.types.delete_subscription_response.DeleteSubscriptionResponse":
"""<p>Removes Shield Advanced from an account. Shield Advanced requires a 1-year subscription commitment. You cannot delete a subscription prior to the completion of that commitment. </p>
Raises:
capo_shield.errors.internal_error_exception.InternalErrorException: <p>Exception that indicates that a problem occurred with the service infrastructure. You can retry the request.</p>
capo_shield.errors.locked_subscription_exception.LockedSubscriptionException: <p>You are trying to update a subscription that has not yet completed the 1-year commitment. You can change the <code>AutoRenew</code> parameter during the last 30 days of your subscription. This exception indicates that you are attempting to change <code>AutoRenew</code> prior to that period.</p>
capo_shield.errors.resource_not_found_exception.ResourceNotFoundException: <p>Exception indicating the specified resource does not exist. If available, this exception includes details in additional properties. </p>
capo_shield.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_shield.types.delete_subscription_request.DeleteSubscriptionRequest]",
) -> OperationResponse[
"capo_shield.types.delete_subscription_response.DeleteSubscriptionResponse"
]:
import capo_shield._operations.aws_shield_20160616.delete_subscription
output, http_response = (
capo_shield._operations.aws_shield_20160616.delete_subscription.delete_subscription(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteSubscription")
)
input_: capo_shield.types.delete_subscription_request.DeleteSubscriptionRequest = {}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|