getNamespace method

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

Gets information about a namespace.

May throw InvalidInput. May throw NamespaceNotFound.

Parameter id : The ID of the namespace that you want to get information about.

Implementation

Future<GetNamespaceResponse> getNamespace({
  required String id,
}) async {
  ArgumentError.checkNotNull(id, 'id');
  _s.validateStringLength(
    'id',
    id,
    0,
    64,
    isRequired: true,
  );
  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);
}