putSchemaFromJson method
Allows a schema to be updated using JSON upload. Only available for development schemas. See JSON Schema Format for more information.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidArnException.
May throw InvalidRuleException.
May throw InvalidSchemaDocException.
May throw LimitExceededException.
May throw RetryableConflictException.
May throw ValidationException.
Parameter document :
The replacement JSON schema.
Parameter schemaArn :
The ARN of the schema to update.
Implementation
Future<PutSchemaFromJsonResponse> putSchemaFromJson({
required String document,
required String schemaArn,
}) async {
final headers = <String, String>{
'x-amz-data-partition': schemaArn.toString(),
};
final $payload = <String, dynamic>{
'Document': document,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/amazonclouddirectory/2017-01-11/schema/json',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return PutSchemaFromJsonResponse.fromJson(response);
}