async def get_namespace(
self,
id: "capo_servicediscovery.types.arn.Arn",
*,
config_overrides: Optional[AsyncServiceDiscoveryClientConfig] = None,
) -> "capo_servicediscovery.types.get_namespace_response.GetNamespaceResponse":
"""<p>Gets information about a namespace.</p>
Args:
id: <p>The ID or Amazon Resource Name (ARN) of the namespace that you want to get information about. For namespaces shared with your Amazon Web Services account, specify the namespace ARN. For more information about shared namespaces, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/sharing-namespaces.html">Cross-account Cloud Map namespace sharing</a> in the <i>Cloud Map Developer Guide</i> </p>
Raises:
capo_servicediscovery.errors.invalid_input.InvalidInput: <p>One or more specified values aren't valid. For example, a required value might be missing, a numeric value might be outside the allowed range, or a string value might exceed length constraints.</p>
capo_servicediscovery.errors.namespace_not_found.NamespaceNotFound: <p>No namespace exists with the specified ID.</p>
capo_servicediscovery.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_servicediscovery.types.get_namespace_request.GetNamespaceRequest]",
) -> AsyncOperationResponse[
"capo_servicediscovery.types.get_namespace_response.GetNamespaceResponse"
]:
import capo_servicediscovery._operations.route53_auto_naming_v20170314.get_namespace
(
output,
http_response,
) = await capo_servicediscovery._operations.route53_auto_naming_v20170314.get_namespace.async_get_namespace(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetNamespace")
)
input_: capo_servicediscovery.types.get_namespace_request.GetNamespaceRequest = {
"id": id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output