subscriptions
Creates, updates, deletes, gets or lists a subscriptions resource.
Overview
| Name | subscriptions |
| Type | Resource |
| Id | aws.qbusiness.subscriptions |
Fields
The following fields are returned by SELECT queries:
- list_subscriptions
| Name | Datatype | Description |
|---|---|---|
current_subscription | object | The type of your current Amazon Q Business subscription. |
next_subscription | object | The type of the Amazon Q Business subscription for the next month. |
principal | object | A user or group in the IAM Identity Center instance connected to the Amazon Q Business application. |
subscription_arn | string | The 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_id | string | The identifier of the Amazon Q Business subscription to be updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_subscriptions | select | application_id, region | nextToken, maxResults | Lists all subscriptions created in an Amazon Q Business application. |
create_subscription | insert | application_id, region, principal, type | 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. | |
update_subscription | update | application_id, subscription_id, region, type | 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. | |
cancel_subscription | exec | application_id, subscription_id, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
application_id | string | The identifier of the Amazon Q Business application for which the subscription is being cancelled. |
region | string | AWS region (default: us-east-1) |
subscription_id | string | The identifier of the Amazon Q Business subscription being cancelled. |
maxResults | integer | The maximum number of Amazon Q Business subscriptions to return. |
nextToken | string | If 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
- list_subscriptions
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
- create_subscription
- Manifest
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
;
# Description fields are for documentation purposes
- name: subscriptions
props:
- name: application_id
value: "{{ application_id }}"
description: Required parameter for the subscriptions resource.
- name: region
value: "{{ region }}"
description: Required parameter for the subscriptions resource.
- name: principal
description: |
A user or group in the IAM Identity Center instance connected to the Amazon Q Business application.
value:
user: "{{ user }}"
group: "{{ group }}"
- name: type
value: "{{ type }}"
valid_values: ['Q_LITE', 'Q_BUSINESS']
- name: clientToken
value: "{{ clientToken }}"
UPDATE examples
- update_subscription
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
- cancel_subscription
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
;