Deletes a capacity provider. You cannot delete a capacity provider that is currently being used by Lambda functions.
Parameters:
Raises:
Source code in docs_src/capo_lambda/_services/_lambda.py
| def delete_capacity_provider(
self,
capacity_provider_name: "capo_lambda.types.capacity_provider_name.CapacityProviderName",
*,
config_overrides: Optional[LambdaClientConfig] = None,
) -> "capo_lambda.types.delete_capacity_provider_response.DeleteCapacityProviderResponse":
"""<p>Deletes a capacity provider. You cannot delete a capacity provider that is currently being used by Lambda functions.</p>
Args:
capacity_provider_name: <p>The name of the capacity provider to delete.</p>
Raises:
capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests">Lambda quotas</a>.</p>
capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_lambda.types.delete_capacity_provider_request.DeleteCapacityProviderRequest]",
) -> OperationResponse[
"capo_lambda.types.delete_capacity_provider_response.DeleteCapacityProviderResponse"
]:
import capo_lambda._operations.aws_gir_api_service.delete_capacity_provider
output, http_response = (
capo_lambda._operations.aws_gir_api_service.delete_capacity_provider.delete_capacity_provider(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteCapacityProvider")
)
input_: capo_lambda.types.delete_capacity_provider_request.DeleteCapacityProviderRequest = {
"capacity_provider_name": capacity_provider_name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|