deleteNamespace method

Future<DeleteNamespaceResponse> deleteNamespace({
  1. required String id,
})

Deletes a namespace from the current account. If the namespace still contains one or more services, the request fails.

May throw InvalidInput. May throw NamespaceNotFound. May throw ResourceInUse. May throw DuplicateRequest.

Parameter id : The ID of the namespace that you want to delete.

Implementation

Future<DeleteNamespaceResponse> deleteNamespace({
  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.DeleteNamespace'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Id': id,
    },
  );

  return DeleteNamespaceResponse.fromJson(jsonResponse.body);
}