publishSchema method
Publishes a development schema with a major version and a recommended minor version.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidArnException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw RetryableConflictException.
May throw SchemaAlreadyPublishedException.
May throw ValidationException.
Parameter developmentSchemaArn :
The Amazon Resource Name (ARN) that is associated with the development
schema. For more information, see arns.
Parameter version :
The major version under which the schema will be published. Schemas have
both a major and minor version associated with them.
Parameter minorVersion :
The minor version under which the schema will be published. This parameter
is recommended. Schemas have both a major and minor version associated
with them.
Parameter name :
The new name under which the schema will be published. If this is not
provided, the development schema is considered.
Implementation
Future<PublishSchemaResponse> publishSchema({
required String developmentSchemaArn,
required String version,
String? minorVersion,
String? name,
}) async {
final headers = <String, String>{
'x-amz-data-partition': developmentSchemaArn.toString(),
};
final $payload = <String, dynamic>{
'Version': version,
if (minorVersion != null) 'MinorVersion': minorVersion,
if (name != null) 'Name': name,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/amazonclouddirectory/2017-01-11/schema/publish',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return PublishSchemaResponse.fromJson(response);
}