updateSubscription method
Updates the pricing tier for an Amazon Q Business subscription. Upgrades are instant. Downgrades apply at the start of the next month. Subscription tier determines feature access for the user. For more information on subscriptions and pricing tiers, see Amazon Q Business pricing.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter applicationId :
The identifier of the Amazon Q Business application where the subscription
update should take effect.
Parameter subscriptionId :
The identifier of the Amazon Q Business subscription to be updated.
Parameter type :
The type of the Amazon Q Business subscription to be updated.
Implementation
Future<UpdateSubscriptionResponse> updateSubscription({
required String applicationId,
required String subscriptionId,
required SubscriptionType type,
}) async {
final $payload = <String, dynamic>{
'type': type.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/subscriptions/${Uri.encodeComponent(subscriptionId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateSubscriptionResponse.fromJson(response);
}