createCatalog method
Creates a new catalog in the Glue Data Catalog.
May throw AccessDeniedException.
May throw AlreadyExistsException.
May throw ConcurrentModificationException.
May throw EntityNotFoundException.
May throw FederatedResourceAlreadyExistsException.
May throw FederationSourceException.
May throw GlueEncryptionException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
May throw ResourceNumberLimitExceededException.
Parameter catalogInput :
A CatalogInput object that defines the metadata for the
catalog.
Parameter name :
The name of the catalog to create.
Parameter tags :
A map array of key-value pairs, not more than 50 pairs. Each key is a
UTF-8 string, not less than 1 or more than 128 bytes long. Each value is a
UTF-8 string, not more than 256 bytes long. The tags you assign to the
catalog.
Implementation
Future<void> createCatalog({
required CatalogInput catalogInput,
required String name,
Map<String, String>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.CreateCatalog'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'CatalogInput': catalogInput,
'Name': name,
if (tags != null) 'Tags': tags,
},
);
}