Skip to content

delete_application async

delete_application(
    application_name: ApplicationName,
    *,
    config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
) -> None

Deletes an application.

Parameters:

  • application_name (ApplicationName) –

    The name of an CodeDeploy application associated with the user or Amazon Web Services account.

Raises:

  • ApplicationNameRequiredException –

    The minimum number of required application names was not specified.

  • InvalidApplicationNameException –

    The application name was specified in an invalid format.

  • InvalidRoleException –

    The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.

  • UnknownServiceError –

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

Source code in docs_src/capo_codedeploy/_services/async_code_deploy.py
async def delete_application(
    self,
    application_name: "capo_codedeploy.types.application_name.ApplicationName",
    *,
    config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
) -> None:
    """<p>Deletes an application.</p>

    Args:
        application_name: <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>

    Raises:
        capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
        capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
        capo_codedeploy.errors.invalid_role_exception.InvalidRoleException: <p>The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.</p>
        capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codedeploy.types.delete_application_input.DeleteApplicationInput]",
    ) -> AsyncOperationResponse[None]:
        import capo_codedeploy._operations.code_deploy_20141006.delete_application

        (
            output,
            http_response,
        ) = await capo_codedeploy._operations.code_deploy_20141006.delete_application.async_delete_application(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteApplication")
    )
    input_: capo_codedeploy.types.delete_application_input.DeleteApplicationInput = {
        "application_name": application_name
    }

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