terms
Creates, updates, deletes, gets or lists a terms resource.
Overview
| Name | terms |
| Type | Resource |
| Id | aws.cognito_idp.terms |
Fields
The following fields are returned by SELECT queries:
- describe_terms
- list_terms
| Name | Datatype | Description |
|---|---|---|
client_id | string | The ID of the app client that the terms documents are assigned to. (pattern: <code>[\w+]+</code>) |
creation_date | string (date-time) | The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java Date object. |
enforcement | string | This parameter is reserved for future use and currently accepts one value. (NONE) |
last_modified_date | string (date-time) | The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java Date object. |
links | object | A map of URLs to languages. For each localized language that will view the requested TermsName, assign a URL. A selection of cognito:default displays for all languages that don't have a language-specific URL. For example, "cognito:default": "https://terms.example.com", "cognito:spanish": "https://terms.example.com/es". |
terms_id | string | The ID of the terms documents. (pattern: <code>^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$</code>) |
terms_name | string | The type and friendly name of the terms documents. (pattern: <code>^(terms-of-use|privacy-policy)$</code>) |
terms_source | string | This parameter is reserved for future use and currently accepts one value. (LINK) |
user_pool_id | string | The ID of the user pool that contains the terms documents. (pattern: <code>[\w-]+_[0-9a-zA-Z]+</code>) |
| Name | Datatype | Description |
|---|---|---|
next_token | string | This API operation returns a limited number of results. The pagination token is an identifier that you can present in an additional API request with the same parameters. When you include the pagination token, Amazon Cognito returns the next set of items after the current list. Subsequent requests return a new pagination token. By use of this token, you can paginate through the full list of items. |
terms | array | A summary of the requested terms documents. Includes unique identifiers for later changes to the terms documents. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_terms | select | region | Returns details for the requested terms documents ID. For more information, see Terms documents. Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy. Learn more Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints | |
list_terms | select | region | Returns details about all terms documents for the requested user pool. Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy. Learn more Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints | |
create_terms | insert | region, UserPoolId, ClientId, TermsName, TermsSource, Enforcement | Creates terms documents for the requested app client. When Terms and conditions and Privacy policy documents are configured, the app client displays links to them in the sign-up page of managed login for the app client. You can provide URLs for terms documents in the languages that are supported by managed login localization. Amazon Cognito directs users to the terms documents for their current language, with fallback to default if no document exists for the language. Each request accepts one type of terms document and a map of language-to-link for that document type. You must provide both types of terms documents in at least one language before Amazon Cognito displays your terms documents. Supply each type in separate requests. For more information, see Terms documents. Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy. Learn more Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints | |
update_terms | update | region, TermsId, UserPoolId | Modifies existing terms documents for the requested app client. When Terms and conditions and Privacy policy documents are configured, the app client displays links to them in the sign-up page of managed login for the app client. You can provide URLs for terms documents in the languages that are supported by managed login localization. Amazon Cognito directs users to the terms documents for their current language, with fallback to default if no document exists for the language. Each request accepts one type of terms document and a map of language-to-link for that document type. You must provide both types of terms documents in at least one language before Amazon Cognito displays your terms documents. Supply each type in separate requests. For more information, see Terms documents. Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy. Learn more Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints | |
delete_terms | delete | region | Deletes the terms documents with the requested ID from your app client. Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy. Learn more Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_terms
- list_terms
Returns details for the requested terms documents ID. For more information, see Terms documents. Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy. Learn more Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints
SELECT
client_id,
creation_date,
enforcement,
last_modified_date,
links,
terms_id,
terms_name,
terms_source,
user_pool_id
FROM aws.cognito_idp.terms
WHERE region = '{{ region }}' -- required
;
Returns details about all terms documents for the requested user pool. Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy. Learn more Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints
SELECT
next_token,
terms
FROM aws.cognito_idp.terms
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_terms
- Manifest
Creates terms documents for the requested app client. When Terms and conditions and Privacy policy documents are configured, the app client displays links to them in the sign-up page of managed login for the app client. You can provide URLs for terms documents in the languages that are supported by managed login localization. Amazon Cognito directs users to the terms documents for their current language, with fallback to default if no document exists for the language. Each request accepts one type of terms document and a map of language-to-link for that document type. You must provide both types of terms documents in at least one language before Amazon Cognito displays your terms documents. Supply each type in separate requests. For more information, see Terms documents. Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy. Learn more Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints
INSERT INTO aws.cognito_idp.terms (
UserPoolId,
ClientId,
TermsName,
TermsSource,
Enforcement,
Links,
region
)
SELECT
'{{ UserPoolId }}' /* required */,
'{{ ClientId }}' /* required */,
'{{ TermsName }}' /* required */,
'{{ TermsSource }}' /* required */,
'{{ Enforcement }}' /* required */,
'{{ Links }}',
'{{ region }}'
RETURNING
terms
;
# Description fields are for documentation purposes
- name: terms
props:
- name: region
value: "{{ region }}"
description: Required parameter for the terms resource.
- name: UserPoolId
value: "{{ UserPoolId }}"
description: |
The ID of the user pool where you want to create terms documents.
- name: ClientId
value: "{{ ClientId }}"
description: |
The ID of the app client where you want to create terms documents. Must be an app client in the requested user pool.
- name: TermsName
value: "{{ TermsName }}"
description: |
A friendly name for the document that you want to create in the current request. Must begin with terms-of-use or privacy-policy as identification of the document type. Provide URLs for both terms-of-use and privacy-policy in separate requests.
- name: TermsSource
value: "{{ TermsSource }}"
description: |
This parameter is reserved for future use and currently accepts only one value.
valid_values: ['LINK']
- name: Enforcement
value: "{{ Enforcement }}"
description: |
This parameter is reserved for future use and currently accepts only one value.
valid_values: ['NONE']
- name: Links
value: "{{ Links }}"
description: |
A map of URLs to languages. For each localized language that will view the requested TermsName, assign a URL. A selection of cognito:default displays for all languages that don't have a language-specific URL. For example, "cognito:default": "https://terms.example.com", "cognito:spanish": "https://terms.example.com/es".
UPDATE examples
- update_terms
Modifies existing terms documents for the requested app client. When Terms and conditions and Privacy policy documents are configured, the app client displays links to them in the sign-up page of managed login for the app client. You can provide URLs for terms documents in the languages that are supported by managed login localization. Amazon Cognito directs users to the terms documents for their current language, with fallback to default if no document exists for the language. Each request accepts one type of terms document and a map of language-to-link for that document type. You must provide both types of terms documents in at least one language before Amazon Cognito displays your terms documents. Supply each type in separate requests. For more information, see Terms documents. Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy. Learn more Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints
UPDATE aws.cognito_idp.terms
SET
TermsId = '{{ TermsId }}',
UserPoolId = '{{ UserPoolId }}',
TermsName = '{{ TermsName }}',
TermsSource = '{{ TermsSource }}',
Enforcement = '{{ Enforcement }}',
Links = '{{ Links }}'
WHERE
region = '{{ region }}' --required
AND TermsId = '{{ TermsId }}' --required
AND UserPoolId = '{{ UserPoolId }}' --required
RETURNING
terms;
DELETE examples
- delete_terms
Deletes the terms documents with the requested ID from your app client. Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy. Learn more Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints
DELETE FROM aws.cognito_idp.terms
WHERE region = '{{ region }}' --required
;