Retrieves the details of a domain by ID.
Parameters:
-
domain_id
(DomainId)
–
The unique ID of the domain.
Raises:
Examples:
Get a domain
The following example retrieves the configuration and status of an Identity Center domain by its ID. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> client.get_domain(domain_id='d-1a2b3c4d5e')
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
| def get_domain(
self,
domain_id: "capo_cloudwatchomni.types.domain_id.DomainId",
*,
config_overrides: Optional[CloudWatchOmniClientConfig] = None,
) -> "capo_cloudwatchomni.types.get_domain_output.GetDomainOutput":
"""Retrieves the details of a domain by ID.
Args:
domain_id: The unique ID of the 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 a domain
The following example retrieves the configuration and status of an Identity Center domain by its ID. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> client.get_domain(domain_id='d-1a2b3c4d5e')
"""
def _handler(
req: "OperationRequest[capo_cloudwatchomni.types.get_domain_input.GetDomainInput]",
) -> OperationResponse[
"capo_cloudwatchomni.types.get_domain_output.GetDomainOutput"
]:
import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.get_domain
output, http_response = (
capo_cloudwatchomni._operations.cloud_watch_omni_frontend.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_cloudwatchomni.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
|