updateSubscription method
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 InvalidParameterException.
May throw LockedSubscriptionException.
May throw OptimisticLockException.
May throw ResourceNotFoundException.
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.value,
},
);
}