Skip to content

get_domain_for_organization async

get_domain_for_organization(
    domain_id: DomainId,
    *,
    config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
) -> GetDomainForOrganizationOutput

Retrieves the details of an organization domain by ID.

Parameters:

  • domain_id (DomainId) –

    The ID of the organization domain.

Raises:

Examples:

Get an organization domain The following example retrieves the configuration and status of an organization-scoped domain by its ID. Payloads are shown as JSON; on the wire they are CBOR-encoded.

>>> await client.get_domain_for_organization(domain_id='d-9z8y7x6w5v')
Source code in docs_src/capo_cloudwatchomni/_services/async_cloud_watch_omni.py
async def get_domain_for_organization(
    self,
    domain_id: "capo_cloudwatchomni.types.domain_id.DomainId",
    *,
    config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
) -> "capo_cloudwatchomni.types.get_domain_for_organization_output.GetDomainForOrganizationOutput":
    """Retrieves the details of an organization domain by ID.

    Args:
        domain_id: The ID of the organization domain.

    Raises:
        capo_cloudwatchomni.errors.access_denied_exception.AccessDeniedException: The caller is not authorized to perform this action.
        capo_cloudwatchomni.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_cloudwatchomni.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource does not exist.
        capo_cloudwatchomni.errors.throttling_exception.ThrottlingException: The request was throttled due to exceeding the allowed request rate.
        capo_cloudwatchomni.errors.validation_exception.ValidationException: A parameter is specified incorrectly.
        capo_cloudwatchomni.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Get an organization domain
        The following example retrieves the configuration and status of an organization-scoped domain by its ID. Payloads are shown as JSON; on the wire they are CBOR-encoded.

        >>> await client.get_domain_for_organization(domain_id='d-9z8y7x6w5v')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudwatchomni.types.get_domain_for_organization_input.GetDomainForOrganizationInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudwatchomni.types.get_domain_for_organization_output.GetDomainForOrganizationOutput"
    ]:
        import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.get_domain_for_organization

        (
            output,
            http_response,
        ) = await capo_cloudwatchomni._operations.cloud_watch_omni_frontend.get_domain_for_organization.async_get_domain_for_organization(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDomainForOrganization")
    )
    input_: capo_cloudwatchomni.types.get_domain_for_organization_input.GetDomainForOrganizationInput = {
        "domain_id": domain_id
    }

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