Skip to content

delete_landing_zone async

delete_landing_zone(
    landing_zone_identifier: str,
    *,
    config_overrides: Optional[AsyncControlTowerClientConfig] = None,
) -> DeleteLandingZoneOutput

Decommissions a landing zone. This API call starts an asynchronous operation that deletes Amazon Web Services Control Tower resources deployed in accounts managed by Amazon Web Services Control Tower.

Decommissioning a landing zone is a process with significant consequences, and it cannot be undone. We strongly recommend that you perform this decommissioning process only if you intend to stop using your landing zone.

Parameters:

  • landing_zone_identifier (str) –

    The unique identifier of the landing zone.

Raises:

Source code in docs_src/capo_controltower/_services/async_control_tower.py
async def delete_landing_zone(
    self,
    landing_zone_identifier: str,
    *,
    config_overrides: Optional[AsyncControlTowerClientConfig] = None,
) -> "capo_controltower.types.delete_landing_zone_output.DeleteLandingZoneOutput":
    """<p>Decommissions a landing zone. This API call starts an asynchronous operation that deletes Amazon Web Services Control Tower resources deployed in accounts managed by Amazon Web Services Control Tower.</p> <p>Decommissioning a landing zone is a process with significant consequences, and it cannot be undone. We strongly recommend that you perform this decommissioning process only if you intend to stop using your landing zone.</p>

    Args:
        landing_zone_identifier: <p>The unique identifier of the landing zone.</p>

    Raises:
        capo_controltower.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_controltower.errors.conflict_exception.ConflictException: <p>Updating or deleting the resource can cause an inconsistent state.</p>
        capo_controltower.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during processing of a request.</p>
        capo_controltower.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that does not exist.</p>
        capo_controltower.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_controltower.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_controltower.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_controltower.types.delete_landing_zone_input.DeleteLandingZoneInput]",
    ) -> AsyncOperationResponse[
        "capo_controltower.types.delete_landing_zone_output.DeleteLandingZoneOutput"
    ]:
        import capo_controltower._operations.aws_control_tower_apis.delete_landing_zone

        (
            output,
            http_response,
        ) = await capo_controltower._operations.aws_control_tower_apis.delete_landing_zone.async_delete_landing_zone(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteLandingZone")
    )
    input_: capo_controltower.types.delete_landing_zone_input.DeleteLandingZoneInput = {
        "landing_zone_identifier": landing_zone_identifier
    }

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