upgradeAppliedSchema method

Future<UpgradeAppliedSchemaResponse> upgradeAppliedSchema({
  1. required String directoryArn,
  2. required String publishedSchemaArn,
  3. bool? dryRun,
})

Upgrades a single directory in-place using the PublishedSchemaArn with schema updates found in MinorVersion. Backwards-compatible minor version upgrades are instantaneously available for readers on all objects in the directory. Note: This is a synchronous API call and upgrades only one schema on a given directory per call. To upgrade multiple directories from one schema, you would need to call this API on each directory.

May throw InternalServiceException. May throw InvalidArnException. May throw RetryableConflictException. May throw ValidationException. May throw IncompatibleSchemaException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw InvalidAttachmentException.

Parameter directoryArn : The ARN for the directory to which the upgraded schema will be applied.

Parameter publishedSchemaArn : The revision of the published schema to upgrade the directory to.

Parameter dryRun : Used for testing whether the major version schemas are backward compatible or not. If schema compatibility fails, an exception would be thrown else the call would succeed but no changes will be saved. This parameter is optional.

Implementation

Future<UpgradeAppliedSchemaResponse> upgradeAppliedSchema({
  required String directoryArn,
  required String publishedSchemaArn,
  bool? dryRun,
}) async {
  ArgumentError.checkNotNull(directoryArn, 'directoryArn');
  ArgumentError.checkNotNull(publishedSchemaArn, 'publishedSchemaArn');
  final $payload = <String, dynamic>{
    'DirectoryArn': directoryArn,
    'PublishedSchemaArn': publishedSchemaArn,
    if (dryRun != null) 'DryRun': dryRun,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/schema/upgradeapplied',
    exceptionFnMap: _exceptionFns,
  );
  return UpgradeAppliedSchemaResponse.fromJson(response);
}