updateSubscription method

Future<void> updateSubscription({
  1. AutoRenew? autoRenew,
})

Updates the details of an existing subscription. Only enter values for parameters you want to change. Empty parameters are not updated.

May throw InternalErrorException. May throw LockedSubscriptionException. May throw ResourceNotFoundException. May throw InvalidParameterException. May throw OptimisticLockException.

Parameter autoRenew : When you initally create a subscription, AutoRenew is set to ENABLED. If ENABLED, the subscription will be automatically renewed at the end of the existing subscription period. You can change this by submitting an UpdateSubscription request. If the UpdateSubscription request does not included a value for AutoRenew, the existing value for AutoRenew remains unchanged.

Implementation

Future<void> updateSubscription({
  AutoRenew? autoRenew,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSShield_20160616.UpdateSubscription'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (autoRenew != null) 'AutoRenew': autoRenew.toValue(),
    },
  );
}