Skip to content

delete_deployment async

delete_deployment(
    deployment_id: DeploymentId,
    *,
    config_overrides: Optional[AsyncLaunchWizardClientConfig] = None,
) -> DeleteDeploymentOutput

Deletes a deployment.

Parameters:

  • deployment_id (DeploymentId) –

    The ID of the deployment.

Raises:

  • InternalServerException –

    An internal error has occurred. Retry your request, but if the problem persists, contact us with details by posting a question on re:Post.

  • ResourceLimitException –

    You have exceeded an Launch Wizard resource limit. For example, you might have too many deployments in progress.

  • ResourceNotFoundException –

    The specified workload or deployment resource can't be found.

  • ValidationException –

    The input fails to satisfy the constraints specified by an Amazon Web Services service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

Delete a deployment.

>>> await client.delete_deployment(deployment_id='4c1b59c1-659c-467f-b6e9-6ef6f9d28e1d')
Source code in docs_src/capo_launch_wizard/_services/async_launch_wizard.py
async def delete_deployment(
    self,
    deployment_id: "capo_launch_wizard.types.deployment_id.DeploymentId",
    *,
    config_overrides: Optional[AsyncLaunchWizardClientConfig] = None,
) -> "capo_launch_wizard.types.delete_deployment_output.DeleteDeploymentOutput":
    """<p>Deletes a deployment.</p>

    Args:
        deployment_id: <p>The ID of the deployment.</p>

    Raises:
        capo_launch_wizard.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred. Retry your request, but if the problem persists, contact us with details by posting a question on <a href="https://repost.aws/">re:Post</a>.</p>
        capo_launch_wizard.errors.resource_limit_exception.ResourceLimitException: <p>You have exceeded an Launch Wizard resource limit. For example, you might have too many deployments in progress.</p>
        capo_launch_wizard.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified workload or deployment resource can't be found.</p>
        capo_launch_wizard.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_launch_wizard.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Delete a deployment.

        >>> await client.delete_deployment(deployment_id='4c1b59c1-659c-467f-b6e9-6ef6f9d28e1d')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_launch_wizard.types.delete_deployment_input.DeleteDeploymentInput]",
    ) -> AsyncOperationResponse[
        "capo_launch_wizard.types.delete_deployment_output.DeleteDeploymentOutput"
    ]:
        import capo_launch_wizard._operations.launch_wizard.delete_deployment

        (
            output,
            http_response,
        ) = await capo_launch_wizard._operations.launch_wizard.delete_deployment.async_delete_deployment(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDeployment")
    )
    input_: capo_launch_wizard.types.delete_deployment_input.DeleteDeploymentInput = {
        "deployment_id": deployment_id
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output