putFormType method
Creates or updates a form type in Glue Data Catalog. A form type defines the schema for structured metadata that can be attached to assets.
May throw AccessDeniedException.
May throw ConcurrentModificationException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw ThrottlingException.
Parameter name :
The name of the form type. Must start with an uppercase letter.
Parameter schema :
The Smithy IDL schema definition for the form type.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Implementation
Future<PutFormTypeResponse> putFormType({
required String name,
required String schema,
String? clientToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.PutFormType'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
'Schema': schema,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
},
);
return PutFormTypeResponse.fromJson(jsonResponse.body);
}