modifyGlobalReplicationGroup method

Future<ModifyGlobalReplicationGroupResult> modifyGlobalReplicationGroup({
  1. required bool applyImmediately,
  2. required String globalReplicationGroupId,
  3. bool? automaticFailoverEnabled,
  4. String? cacheNodeType,
  5. String? engineVersion,
  6. String? globalReplicationGroupDescription,
})

Modifies the settings for a Global Datastore.

May throw GlobalReplicationGroupNotFoundFault. May throw InvalidGlobalReplicationGroupStateFault. May throw InvalidParameterValueException.

Parameter applyImmediately : This parameter causes the modifications in this request and any pending modifications to be applied, asynchronously and as soon as possible. Modifications to Global Replication Groups cannot be requested to be applied in PreferredMaintenceWindow.

Parameter globalReplicationGroupId : The name of the Global Datastore

Parameter automaticFailoverEnabled : Determines whether a read replica is automatically promoted to read/write primary if the existing primary encounters a failure.

Parameter cacheNodeType : A valid cache node type that you want to scale this Global Datastore to.

Parameter engineVersion : The upgraded version of the cache engine to be run on the clusters in the Global Datastore.

Parameter globalReplicationGroupDescription : A description of the Global Datastore

Implementation

Future<ModifyGlobalReplicationGroupResult> modifyGlobalReplicationGroup({
  required bool applyImmediately,
  required String globalReplicationGroupId,
  bool? automaticFailoverEnabled,
  String? cacheNodeType,
  String? engineVersion,
  String? globalReplicationGroupDescription,
}) async {
  ArgumentError.checkNotNull(applyImmediately, 'applyImmediately');
  ArgumentError.checkNotNull(
      globalReplicationGroupId, 'globalReplicationGroupId');
  final $request = <String, dynamic>{};
  $request['ApplyImmediately'] = applyImmediately;
  $request['GlobalReplicationGroupId'] = globalReplicationGroupId;
  automaticFailoverEnabled
      ?.also((arg) => $request['AutomaticFailoverEnabled'] = arg);
  cacheNodeType?.also((arg) => $request['CacheNodeType'] = arg);
  engineVersion?.also((arg) => $request['EngineVersion'] = arg);
  globalReplicationGroupDescription
      ?.also((arg) => $request['GlobalReplicationGroupDescription'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'ModifyGlobalReplicationGroup',
    version: '2015-02-02',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ModifyGlobalReplicationGroupMessage'],
    shapes: shapes,
    resultWrapper: 'ModifyGlobalReplicationGroupResult',
  );
  return ModifyGlobalReplicationGroupResult.fromXml($result);
}