upgradePublishedSchema method

Future<UpgradePublishedSchemaResponse> upgradePublishedSchema({
  1. required String developmentSchemaArn,
  2. required String minorVersion,
  3. required String publishedSchemaArn,
  4. bool? dryRun,
})

Upgrades a published schema under a new minor version revision using the current contents of DevelopmentSchemaArn.

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

Parameter developmentSchemaArn : The ARN of the development schema with the changes used for the upgrade.

Parameter minorVersion : Identifies the minor version of the published schema that will be created. This parameter is NOT optional.

Parameter publishedSchemaArn : The ARN of the published schema to be upgraded.

Parameter dryRun : Used for testing whether the Development schema provided is backwards compatible, or not, with the publish schema provided by the user to be upgraded. If schema compatibility fails, an exception would be thrown else the call would succeed. This parameter is optional and defaults to false.

Implementation

Future<UpgradePublishedSchemaResponse> upgradePublishedSchema({
  required String developmentSchemaArn,
  required String minorVersion,
  required String publishedSchemaArn,
  bool? dryRun,
}) async {
  ArgumentError.checkNotNull(developmentSchemaArn, 'developmentSchemaArn');
  ArgumentError.checkNotNull(minorVersion, 'minorVersion');
  _s.validateStringLength(
    'minorVersion',
    minorVersion,
    1,
    10,
    isRequired: true,
  );
  ArgumentError.checkNotNull(publishedSchemaArn, 'publishedSchemaArn');
  final $payload = <String, dynamic>{
    'DevelopmentSchemaArn': developmentSchemaArn,
    'MinorVersion': minorVersion,
    'PublishedSchemaArn': publishedSchemaArn,
    if (dryRun != null) 'DryRun': dryRun,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/schema/upgradepublished',
    exceptionFnMap: _exceptionFns,
  );
  return UpgradePublishedSchemaResponse.fromJson(response);
}