createDataLakeNamespace method
Enables you to programmatically create an Amazon Web Services Supply Chain data lake namespace. Developers can create the namespaces for a given instance ID.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter instanceId :
The Amazon Web Services Supply Chain instance identifier.
Parameter name :
The name of the namespace. Noted you cannot create namespace with name
starting with asc, default, scn, aws,
amazon, amzn
Parameter description :
The description of the namespace.
Parameter tags :
The tags of the namespace.
Implementation
Future<CreateDataLakeNamespaceResponse> createDataLakeNamespace({
required String instanceId,
required String name,
String? description,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
if (description != null) 'description': description,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/api/datalake/instance/${Uri.encodeComponent(instanceId)}/namespaces/${Uri.encodeComponent(name)}',
exceptionFnMap: _exceptionFns,
);
return CreateDataLakeNamespaceResponse.fromJson(response);
}