updateAvailabilityOptions method

Future<UpdateAvailabilityOptionsResponse> updateAvailabilityOptions({
  1. required String domainName,
  2. required bool multiAZ,
})

Configures the availability options for a domain. Enabling the Multi-AZ option expands an Amazon CloudSearch domain to an additional Availability Zone in the same Region to increase fault tolerance in the event of a service disruption. Changes to the Multi-AZ option can take about half an hour to become active. For more information, see Configuring Availability Options in the Amazon CloudSearch Developer Guide.

May throw BaseException. May throw InternalException. May throw InvalidTypeException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw DisabledOperationException.

Parameter multiAZ : You expand an existing search domain to a second Availability Zone by setting the Multi-AZ option to true. Similarly, you can turn off the Multi-AZ option to downgrade the domain to a single Availability Zone by setting the Multi-AZ option to false.

Implementation

Future<UpdateAvailabilityOptionsResponse> updateAvailabilityOptions({
  required String domainName,
  required bool multiAZ,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    3,
    28,
    isRequired: true,
  );
  ArgumentError.checkNotNull(multiAZ, 'multiAZ');
  final $request = <String, dynamic>{};
  $request['DomainName'] = domainName;
  $request['MultiAZ'] = multiAZ;
  final $result = await _protocol.send(
    $request,
    action: 'UpdateAvailabilityOptions',
    version: '2011-02-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['UpdateAvailabilityOptionsRequest'],
    shapes: shapes,
    resultWrapper: 'UpdateAvailabilityOptionsResult',
  );
  return UpdateAvailabilityOptionsResponse.fromXml($result);
}