Skip to content

get_domain

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

Retrieves information about a Domain.

Parameters:

  • domain_id (DomainId) –

    The id of the Domain to get

Raises:

Source code in docs_src/capo_connecthealth/_services/connect_health.py
def get_domain(
    self,
    domain_id: "capo_connecthealth.types.domain_id.DomainId",
    *,
    config_overrides: Optional[ConnectHealthClientConfig] = None,
) -> "capo_connecthealth.types.get_domain_output.GetDomainOutput":
    """<p>Retrieves information about a Domain.</p>

    Args:
        domain_id: <p>The id of the Domain to get</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.get_domain_input.GetDomainInput]",
    ) -> OperationResponse[
        "capo_connecthealth.types.get_domain_output.GetDomainOutput"
    ]:
        import capo_connecthealth._operations.connect_health.get_domain

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDomain")
    )
    input_: capo_connecthealth.types.get_domain_input.GetDomainInput = {
        "domain_id": domain_id
    }

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