Skip to main content

subscriptions

Creates, updates, deletes, gets or lists a subscriptions resource.

Overview

Namesubscriptions
TypeResource
Idaws.qbusiness.subscriptions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
current_subscriptionobjectThe type of your current Amazon Q Business subscription.
next_subscriptionobjectThe type of the Amazon Q Business subscription for the next month.
principalobjectA user or group in the IAM Identity Center instance connected to the Amazon Q Business application.
subscription_arnstringThe Amazon Resource Name (ARN) of the Amazon Q Business subscription that was updated. (pattern: <code>arn:[a-z0-9-.]{1,63}:[a-z0-9-.]{0,63}:[a-z0-9-.]{0,63}:[a-z0-9-.]{0,63}:[^/].{0,1023}</code>)
subscription_idstringThe identifier of the Amazon Q Business subscription to be updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_subscriptionsselectapplication_id, regionnextToken, maxResultsLists all subscriptions created in an Amazon Q Business application.
create_subscriptioninsertapplication_id, region, principal, typeSubscribes an IAM Identity Center user or a group to a pricing tier for an Amazon Q Business application. Amazon Q Business offers two subscription tiers: Q_LITE and Q_BUSINESS. Subscription tier determines feature access for the user. For more information on subscriptions and pricing tiers, see Amazon Q Business pricing. For an example IAM role policy for assigning subscriptions, see Set up required permissions in the Amazon Q Business User Guide.
update_subscriptionupdateapplication_id, subscription_id, region, typeUpdates 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.
cancel_subscriptionexecapplication_id, subscription_id, regionUnsubscribes a user or a group from their pricing tier in an Amazon Q Business application. An unsubscribed user or group loses all Amazon Q Business feature access at the start of next month.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
application_idstringThe identifier of the Amazon Q Business application for which the subscription is being cancelled.
regionstringAWS region (default: us-east-1)
subscription_idstringThe identifier of the Amazon Q Business subscription being cancelled.
maxResultsintegerThe maximum number of Amazon Q Business subscriptions to return.
nextTokenstringIf the maxResults response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q Business subscriptions.

SELECT examples

Lists all subscriptions created in an Amazon Q Business application.

SELECT
current_subscription,
next_subscription,
principal,
subscription_arn,
subscription_id
FROM aws.qbusiness.subscriptions
WHERE application_id = '{{ application_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;

INSERT examples

Subscribes an IAM Identity Center user or a group to a pricing tier for an Amazon Q Business application. Amazon Q Business offers two subscription tiers: Q_LITE and Q_BUSINESS. Subscription tier determines feature access for the user. For more information on subscriptions and pricing tiers, see Amazon Q Business pricing. For an example IAM role policy for assigning subscriptions, see Set up required permissions in the Amazon Q Business User Guide.

INSERT INTO aws.qbusiness.subscriptions (
principal,
type,
clientToken,
application_id,
region
)
SELECT
'{{ principal }}' /* required */,
'{{ type }}' /* required */,
'{{ clientToken }}',
'{{ application_id }}',
'{{ region }}'
RETURNING
current_subscription,
next_subscription,
subscription_arn,
subscription_id
;

UPDATE examples

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.

UPDATE aws.qbusiness.subscriptions
SET
type = '{{ type }}'
WHERE
application_id = '{{ application_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND region = '{{ region }}' --required
AND type = '{{ type }}' --required
RETURNING
current_subscription,
next_subscription,
subscription_arn;

Lifecycle Methods

Unsubscribes a user or a group from their pricing tier in an Amazon Q Business application. An unsubscribed user or group loses all Amazon Q Business feature access at the start of next month.

EXEC aws.qbusiness.subscriptions.cancel_subscription
@application_id='{{ application_id }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@region='{{ region }}' --required
;