describeNamespace method

Future<DescribeNamespaceResponse> describeNamespace({
  1. String? namespaceName,
})

Gets the latest version of the user's namespace and the public version that it is tracking.

May throw ResourceNotFoundException. May throw InvalidRequestException. May throw InternalFailureException. May throw ThrottlingException.

Parameter namespaceName : The name of the user's namespace. Set this to aws to get the public namespace.

Implementation

Future<DescribeNamespaceResponse> describeNamespace({
  String? namespaceName,
}) async {
  _s.validateStringLength(
    'namespaceName',
    namespaceName,
    0,
    128,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'IotThingsGraphFrontEndService.DescribeNamespace'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (namespaceName != null) 'namespaceName': namespaceName,
    },
  );

  return DescribeNamespaceResponse.fromJson(jsonResponse.body);
}