updateSchema method

Future<UpdateSchemaResponse> updateSchema({
  1. required String name,
  2. required String schemaArn,
})

Updates the schema name with a new name. Only development schema names can be updated.

May throw InternalServiceException. May throw InvalidArnException. May throw RetryableConflictException. May throw ValidationException. May throw LimitExceededException. May throw AccessDeniedException. May throw ResourceNotFoundException.

Parameter name : The name of the schema.

Parameter schemaArn : The Amazon Resource Name (ARN) of the development schema. For more information, see arns.

Implementation

Future<UpdateSchemaResponse> updateSchema({
  required String name,
  required String schemaArn,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    32,
    isRequired: true,
  );
  ArgumentError.checkNotNull(schemaArn, 'schemaArn');
  final headers = <String, String>{
    'x-amz-data-partition': schemaArn.toString(),
  };
  final $payload = <String, dynamic>{
    'Name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/schema/update',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return UpdateSchemaResponse.fromJson(response);
}