Skip to content

delete_domain

delete_domain(
    domain_id: DomainId, *, config_overrides: Optional[ConnectHealthClientConfig] = None
) -> DeleteDomainOutput

Deletes a Domain and all associated resources.

Parameters:

  • domain_id (DomainId) –

    The id of the Domain to delete

Raises:

Source code in docs_src/capo_connecthealth/_services/connect_health.py
def delete_domain(
    self,
    domain_id: "capo_connecthealth.types.domain_id.DomainId",
    *,
    config_overrides: Optional[ConnectHealthClientConfig] = None,
) -> "capo_connecthealth.types.delete_domain_output.DeleteDomainOutput":
    """<p>Deletes a Domain and all associated resources.</p>

    Args:
        domain_id: <p>The id of the Domain to delete</p>

    Raises:
        capo_connecthealth.errors.resource_not_found_exception.ResourceNotFoundException: <p>This error is thrown when the requested resource is not found.</p>
        capo_connecthealth.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_connecthealth.types.delete_domain_input.DeleteDomainInput]",
    ) -> OperationResponse[
        "capo_connecthealth.types.delete_domain_output.DeleteDomainOutput"
    ]:
        import capo_connecthealth._operations.connect_health.delete_domain

        output, http_response = (
            capo_connecthealth._operations.connect_health.delete_domain.delete_domain(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDomain")
    )
    input_: capo_connecthealth.types.delete_domain_input.DeleteDomainInput = {
        "domain_id": domain_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output