getNamespace method

Future<GetNamespaceResponse> getNamespace({
  1. required String id,
})

Gets information about a namespace.

May throw InvalidInput. May throw NamespaceNotFound.

Parameter id : 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 Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide

Implementation

Future<GetNamespaceResponse> getNamespace({
  required String id,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53AutoNaming_v20170314.GetNamespace'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Id': id,
    },
  );

  return GetNamespaceResponse.fromJson(jsonResponse.body);
}