contents
Creates, updates, deletes, gets or lists a contents resource.
Overview
| Name | contents |
| Type | Resource |
| Id | aws.qconnect.contents |
Fields
The following fields are returned by SELECT queries:
- get_content
- search_content
- list_contents
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the content. (pattern: <code>[a-zA-Z0-9\s_.,-]+.*</code>) |
content_arn | string | The Amazon Resource Name (ARN) of the content. (pattern: <code>arn:[a-z-]?:wisdom:[a-z0-9-]?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}</code>) |
content_id | string | The identifier of the content. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>) |
content_type | string | The media type of the content. (pattern: <code>(text/(plain|html|csv))|(application/(pdf|vnd.openxmlformats-officedocument.wordprocessingml.document))|(application/x.wisdom-json;source=(salesforce|servicenow|zendesk))</code>) |
knowledge_base_arn | string | The Amazon Resource Name (ARN) of the knowledge base. (pattern: <code>arn:[a-z-]?:wisdom:[a-z0-9-]?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}</code>) |
knowledge_base_id | string | The identifier of the knowledge base. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>) |
link_out_uri | string | The URI of the content. |
metadata | object | A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q in Connect, you can store an external version identifier as metadata to utilize for determining drift. |
revision_id | string | The identifier of the content revision. |
status | string | The status of the content. (CREATE_IN_PROGRESS, CREATE_FAILED, ACTIVE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETED, UPDATE_FAILED) |
tags | object | The tags used to organize, track, or control access for this resource. |
title_ | string | The title of the content. |
url | string | The URL of the content. |
url_expiry | string (date-time) | The expiration time of the URL as an epoch timestamp. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the content. (pattern: <code>[a-zA-Z0-9\s_.,-]+.*</code>) |
content_arn | string | The Amazon Resource Name (ARN) of the content. (pattern: <code>arn:[a-z-]?:wisdom:[a-z0-9-]?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}</code>) |
content_id | string | The identifier of the content. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>) |
content_type | string | The media type of the content. (pattern: <code>(text/(plain|html|csv))|(application/(pdf|vnd.openxmlformats-officedocument.wordprocessingml.document))|(application/x.wisdom-json;source=(salesforce|servicenow|zendesk))</code>) |
knowledge_base_arn | string | The Amazon Resource Name (ARN) of the knowledge base. (pattern: <code>arn:[a-z-]?:wisdom:[a-z0-9-]?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}</code>) |
knowledge_base_id | string | The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>) |
metadata | object | A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q in Connect, you can store an external version identifier as metadata to utilize for determining drift. |
revision_id | string | The identifier of the revision of the content. |
status | string | The status of the content. (CREATE_IN_PROGRESS, CREATE_FAILED, ACTIVE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETED, UPDATE_FAILED) |
tags | object | The tags used to organize, track, or control access for this resource. |
title_ | string | The title of the content. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the content. (pattern: <code>[a-zA-Z0-9\s_.,-]+.*</code>) |
content_arn | string | The Amazon Resource Name (ARN) of the content. (pattern: <code>arn:[a-z-]?:wisdom:[a-z0-9-]?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}</code>) |
content_id | string | The identifier of the content. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>) |
content_type | string | The media type of the content. (pattern: <code>(text/(plain|html|csv))|(application/(pdf|vnd.openxmlformats-officedocument.wordprocessingml.document))|(application/x.wisdom-json;source=(salesforce|servicenow|zendesk))</code>) |
knowledge_base_arn | string | The Amazon Resource Name (ARN) of the knowledge base. (pattern: <code>arn:[a-z-]?:wisdom:[a-z0-9-]?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}</code>) |
knowledge_base_id | string | The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>) |
metadata | object | A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q in Connect, you can store an external version identifier as metadata to utilize for determining drift. |
revision_id | string | The identifier of the revision of the content. |
status | string | The status of the content. (CREATE_IN_PROGRESS, CREATE_FAILED, ACTIVE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETED, UPDATE_FAILED) |
tags | object | The tags used to organize, track, or control access for this resource. |
title_ | string | The title of the content. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_content | select | content_id, knowledge_base_id, region | Retrieves content, including a pre-signed URL to download the content. | |
search_content | select | knowledge_base_id, region | nextToken, maxResults | Searches for content in a specified knowledge base. Can be used to get a specific content resource by its name. |
list_contents | select | knowledge_base_id, region | nextToken, maxResults | Lists the content. |
create_content | insert | knowledge_base_id, region, name, uploadId | Creates Amazon Q in Connect content. Before to calling this API, use StartContentUpload to upload an asset. | |
update_content | update | knowledge_base_id, content_id, region | Updates information about the content. | |
delete_content | delete | knowledge_base_id, content_id, region | Deletes the content. | |
start_content_upload | exec | knowledge_base_id, region, contentType | Get a URL to upload content to a knowledge base. To upload content, first make a PUT request to the returned URL with your file, making sure to include the required headers. Then use CreateContent to finalize the content creation process or UpdateContent to modify an existing resource. You can only upload content to a knowledge base of type CUSTOM. |
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 |
|---|---|---|
content_id | string | The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN. |
knowledge_base_id | string | The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results to return per page. |
nextToken | string | The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. |
SELECT examples
- get_content
- search_content
- list_contents
Retrieves content, including a pre-signed URL to download the content.
SELECT
name,
content_arn,
content_id,
content_type,
knowledge_base_arn,
knowledge_base_id,
link_out_uri,
metadata,
revision_id,
status,
tags,
title_,
url,
url_expiry
FROM aws.qconnect.contents
WHERE content_id = '{{ content_id }}' -- required
AND knowledge_base_id = '{{ knowledge_base_id }}' -- required
AND region = '{{ region }}' -- required
;
Searches for content in a specified knowledge base. Can be used to get a specific content resource by its name.
SELECT
name,
content_arn,
content_id,
content_type,
knowledge_base_arn,
knowledge_base_id,
metadata,
revision_id,
status,
tags,
title_
FROM aws.qconnect.contents
WHERE knowledge_base_id = '{{ knowledge_base_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
Lists the content.
SELECT
name,
content_arn,
content_id,
content_type,
knowledge_base_arn,
knowledge_base_id,
metadata,
revision_id,
status,
tags,
title_
FROM aws.qconnect.contents
WHERE knowledge_base_id = '{{ knowledge_base_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_content
- Manifest
Creates Amazon Q in Connect content. Before to calling this API, use StartContentUpload to upload an asset.
INSERT INTO aws.qconnect.contents (
name,
title,
overrideLinkOutUri,
metadata,
uploadId,
clientToken,
tags,
knowledge_base_id,
region
)
SELECT
'{{ name }}' /* required */,
'{{ title }}',
'{{ overrideLinkOutUri }}',
'{{ metadata }}',
'{{ uploadId }}' /* required */,
'{{ clientToken }}',
'{{ tags }}',
'{{ knowledge_base_id }}',
'{{ region }}'
RETURNING
content
;
# Description fields are for documentation purposes
- name: contents
props:
- name: knowledge_base_id
value: "{{ knowledge_base_id }}"
description: Required parameter for the contents resource.
- name: region
value: "{{ region }}"
description: Required parameter for the contents resource.
- name: name
value: "{{ name }}"
- name: title
value: "{{ title }}"
- name: overrideLinkOutUri
value: "{{ overrideLinkOutUri }}"
- name: metadata
value: "{{ metadata }}"
- name: uploadId
value: "{{ uploadId }}"
- name: clientToken
value: "{{ clientToken }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_content
Updates information about the content.
UPDATE aws.qconnect.contents
SET
revisionId = '{{ revisionId }}',
title = '{{ title }}',
overrideLinkOutUri = '{{ overrideLinkOutUri }}',
removeOverrideLinkOutUri = {{ removeOverrideLinkOutUri }},
metadata = '{{ metadata }}',
uploadId = '{{ uploadId }}'
WHERE
knowledge_base_id = '{{ knowledge_base_id }}' --required
AND content_id = '{{ content_id }}' --required
AND region = '{{ region }}' --required
RETURNING
content;
DELETE examples
- delete_content
Deletes the content.
DELETE FROM aws.qconnect.contents
WHERE knowledge_base_id = '{{ knowledge_base_id }}' --required
AND content_id = '{{ content_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- start_content_upload
Get a URL to upload content to a knowledge base. To upload content, first make a PUT request to the returned URL with your file, making sure to include the required headers. Then use CreateContent to finalize the content creation process or UpdateContent to modify an existing resource. You can only upload content to a knowledge base of type CUSTOM.
EXEC aws.qconnect.contents.start_content_upload
@knowledge_base_id='{{ knowledge_base_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"contentType": "{{ contentType }}",
"presignedUrlTimeToLive": {{ presignedUrlTimeToLive }}
}'
;