Skip to content

delete_resources_by_external_id async

delete_resources_by_external_id(
    *,
    config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
    external_id: Optional[ExternalId] = None,
) -> DeleteResourcesByExternalIdOutput

Deletes resources linked to an external ID. This action only applies if you have configured blue/green deployments through CloudFormation.

It is not necessary to call this action directly. CloudFormation calls it on your behalf when it needs to delete stack resources. This action is offered publicly in case you need to delete resources to comply with General Data Protection Regulation (GDPR) requirements.

Parameters:

  • external_id (Optional[ExternalId], default: None ) –

    The unique ID of an external resource (for example, a CloudFormation stack ID) that is linked to one or more CodeDeploy resources.

Raises:

Source code in docs_src/capo_codedeploy/_services/async_code_deploy.py
async def delete_resources_by_external_id(
    self,
    *,
    config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
    external_id: Optional["capo_codedeploy.types.external_id.ExternalId"] = None,
) -> "capo_codedeploy.types.delete_resources_by_external_id_output.DeleteResourcesByExternalIdOutput":
    """<p>Deletes resources linked to an external ID. This action only applies if you have configured blue/green deployments through CloudFormation. </p> <note> <p>It is not necessary to call this action directly. CloudFormation calls it on your behalf when it needs to delete stack resources. This action is offered publicly in case you need to delete resources to comply with General Data Protection Regulation (GDPR) requirements.</p> </note>

    Args:
        external_id: <p>The unique ID of an external resource (for example, a CloudFormation stack ID) that is linked to one or more CodeDeploy resources.</p>

    Raises:
        capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codedeploy.types.delete_resources_by_external_id_input.DeleteResourcesByExternalIdInput]",
    ) -> AsyncOperationResponse[
        "capo_codedeploy.types.delete_resources_by_external_id_output.DeleteResourcesByExternalIdOutput"
    ]:
        import capo_codedeploy._operations.code_deploy_20141006.delete_resources_by_external_id

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteResourcesByExternalId")
    )
    input_: capo_codedeploy.types.delete_resources_by_external_id_input.DeleteResourcesByExternalIdInput = {}
    if external_id is not None:
        input_["external_id"] = external_id

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