upgradeElasticsearchDomain method

Future<UpgradeElasticsearchDomainResponse> upgradeElasticsearchDomain({
  1. required String domainName,
  2. required String targetVersion,
  3. bool? performCheckOnly,
})

Allows you to either upgrade your domain or perform an Upgrade eligibility check to a compatible Elasticsearch version.

May throw BaseException. May throw ResourceNotFoundException. May throw ResourceAlreadyExistsException. May throw DisabledOperationException. May throw ValidationException. May throw InternalException.

Parameter targetVersion : The version of Elasticsearch that you intend to upgrade the domain to.

Parameter performCheckOnly : This flag, when set to True, indicates that an Upgrade Eligibility Check needs to be performed. This will not actually perform the Upgrade.

Implementation

Future<UpgradeElasticsearchDomainResponse> upgradeElasticsearchDomain({
  required String domainName,
  required String targetVersion,
  bool? performCheckOnly,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    3,
    28,
    isRequired: true,
  );
  ArgumentError.checkNotNull(targetVersion, 'targetVersion');
  final $payload = <String, dynamic>{
    'DomainName': domainName,
    'TargetVersion': targetVersion,
    if (performCheckOnly != null) 'PerformCheckOnly': performCheckOnly,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/2015-01-01/es/upgradeDomain',
    exceptionFnMap: _exceptionFns,
  );
  return UpgradeElasticsearchDomainResponse.fromJson(response);
}