knowledge_bases
Creates, updates, deletes, gets or lists a knowledge_bases resource.
Overview
| Name | knowledge_bases |
| Type | Resource |
| Id | aws.quicksight.knowledge_bases |
Fields
The following fields are returned by SELECT queries:
- describe_knowledge_base
- list_knowledge_bases
| Name | Datatype | Description |
|---|---|---|
knowledge_base | object | The knowledge base. |
request_id | string | The Amazon Web Services request ID for this operation. |
status | integer | The HTTP status of the request. |
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time that the knowledge base was created. |
data_source_arn | string | The ARN of the data source associated with the knowledge base. (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>) |
document_count | integer (int64) | The number of documents in the knowledge base. |
knowledge_base_arn | string | The Amazon Resource Name (ARN) of the knowledge base. (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>) |
knowledge_base_id | string | The unique identifier for the knowledge base. (pattern: <code>[0-9a-zA-Z-_=.+]+</code>) |
knowledge_base_size_bytes | integer (int64) | The size of the knowledge base in bytes. |
name | string | The name of the knowledge base. (pattern: <code>[\p{L}\p{N}][\p{L}\p{N} _-.]*</code>) |
primary_owner_arn | string | The ARN of the primary owner of the knowledge base. |
primary_owner_username | string | The username of the primary owner of the knowledge base. |
status | string | The status of the knowledge base. (CREATING, UPDATING, ACTIVE, FAILED, DELETING) |
type | string | The type of the knowledge base. |
updated_at | string (date-time) | The date and time that the knowledge base was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_knowledge_base | select | aws_account_id, knowledge_base_id, region | Describes a knowledge base. | |
list_knowledge_bases | select | aws_account_id, region | max-results, next-token | Lists all knowledge bases in an Amazon QuickSight account. |
create_knowledge_base | insert | aws_account_id, region, KnowledgeBaseId, DataSourceArn, KnowledgeBaseConfiguration | Creates a knowledge base from a specified data source. Supported data source connector types include: S3_KNOWLEDGE_BASE – Uses an Amazon S3 bucket as the data source. WEB_CRAWLER – Uses web pages indexed by the built-in web crawler as the data source. GOOGLE_DRIVE – Uses Google Drive as the data source. Supports service account authentication only. SHAREPOINT – Uses SharePoint as the data source. Supports two-legged OAuth only. ONE_DRIVE – Uses OneDrive as the data source. Supports two-legged OAuth only. | |
update_knowledge_base | update | aws_account_id, knowledge_base_id, region | Updates the properties of an existing knowledge base. | |
delete_knowledge_base | delete | aws_account_id, knowledge_base_id, region | Deletes a knowledge base. | |
batch_delete_knowledge_base | exec | aws_account_id, region, KnowledgeBaseIds | Deletes one or more knowledge bases. | |
search_knowledge_bases | exec | aws_account_id, region | Searches for a subset of knowledge bases based on specified filters. |
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 |
|---|---|---|
aws_account_id | string | The ID of the Amazon Web Services account that contains the knowledge base. |
knowledge_base_id | string | The unique identifier for the knowledge base. |
region | string | AWS region (default: us-east-1) |
max-results | integer | The maximum number of results to return. |
next-token | string | The token for the next set of results, or null if there are no more results. |
SELECT examples
- describe_knowledge_base
- list_knowledge_bases
Describes a knowledge base.
SELECT
knowledge_base,
request_id,
status
FROM aws.quicksight.knowledge_bases
WHERE aws_account_id = '{{ aws_account_id }}' -- required
AND knowledge_base_id = '{{ knowledge_base_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists all knowledge bases in an Amazon QuickSight account.
SELECT
created_at,
data_source_arn,
document_count,
knowledge_base_arn,
knowledge_base_id,
knowledge_base_size_bytes,
name,
primary_owner_arn,
primary_owner_username,
status,
type,
updated_at
FROM aws.quicksight.knowledge_bases
WHERE aws_account_id = '{{ aws_account_id }}' -- required
AND region = '{{ region }}' -- required
AND `max-results` = '{{ max-results }}'
AND `next-token` = '{{ next-token }}'
;
INSERT examples
- create_knowledge_base
- Manifest
Creates a knowledge base from a specified data source. Supported data source connector types include: S3_KNOWLEDGE_BASE – Uses an Amazon S3 bucket as the data source. WEB_CRAWLER – Uses web pages indexed by the built-in web crawler as the data source. GOOGLE_DRIVE – Uses Google Drive as the data source. Supports service account authentication only. SHAREPOINT – Uses SharePoint as the data source. Supports two-legged OAuth only. ONE_DRIVE – Uses OneDrive as the data source. Supports two-legged OAuth only.
INSERT INTO aws.quicksight.knowledge_bases (
KnowledgeBaseId,
Name,
DataSourceArn,
KnowledgeBaseConfiguration,
Description,
Permissions,
MediaExtractionConfiguration,
AccessControlConfiguration,
PrimaryOwnerArn,
Tags,
aws_account_id,
region
)
SELECT
'{{ KnowledgeBaseId }}' /* required */,
'{{ Name }}',
'{{ DataSourceArn }}' /* required */,
'{{ KnowledgeBaseConfiguration }}' /* required */,
'{{ Description }}',
'{{ Permissions }}',
'{{ MediaExtractionConfiguration }}',
'{{ AccessControlConfiguration }}',
'{{ PrimaryOwnerArn }}',
'{{ Tags }}',
'{{ aws_account_id }}',
'{{ region }}'
RETURNING
creation_status,
knowledge_base_arn,
knowledge_base_id,
request_id,
status
;
# Description fields are for documentation purposes
- name: knowledge_bases
props:
- name: aws_account_id
value: "{{ aws_account_id }}"
description: Required parameter for the knowledge_bases resource.
- name: region
value: "{{ region }}"
description: Required parameter for the knowledge_bases resource.
- name: KnowledgeBaseId
value: "{{ KnowledgeBaseId }}"
- name: Name
value: "{{ Name }}"
- name: DataSourceArn
value: "{{ DataSourceArn }}"
- name: KnowledgeBaseConfiguration
description: |
The configuration settings for a knowledge base.
value:
templateConfiguration:
template: "{{ template }}"
- name: Description
value: "{{ Description }}"
- name: Permissions
value:
- Principal: "{{ Principal }}"
Actions: "{{ Actions }}"
- name: MediaExtractionConfiguration
description: |
The configuration for media extraction from knowledge base documents.
value:
imageExtractionConfiguration:
imageExtractionStatus: "{{ imageExtractionStatus }}"
audioExtractionConfiguration:
audioExtractionStatus: "{{ audioExtractionStatus }}"
videoExtractionConfiguration:
videoExtractionStatus: "{{ videoExtractionStatus }}"
videoExtractionType: "{{ videoExtractionType }}"
- name: AccessControlConfiguration
description: |
The access control settings for a knowledge base. Use this structure to enable or disable document-level access control lists (ACLs) that filter query results based on the permissions from the source data connector.
value:
isACLEnabled: {{ isACLEnabled }}
- name: PrimaryOwnerArn
value: "{{ PrimaryOwnerArn }}"
- name: Tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_knowledge_base
Updates the properties of an existing knowledge base.
UPDATE aws.quicksight.knowledge_bases
SET
Name = '{{ Name }}',
Description = '{{ Description }}',
KnowledgeBaseConfiguration = '{{ KnowledgeBaseConfiguration }}',
MediaExtractionConfiguration = '{{ MediaExtractionConfiguration }}',
IsEmailNotificationOptedForIngestionFailures = {{ IsEmailNotificationOptedForIngestionFailures }},
AccessControlConfiguration = '{{ AccessControlConfiguration }}'
WHERE
aws_account_id = '{{ aws_account_id }}' --required
AND knowledge_base_id = '{{ knowledge_base_id }}' --required
AND region = '{{ region }}' --required
RETURNING
knowledge_base_arn,
knowledge_base_id,
request_id,
status;
DELETE examples
- delete_knowledge_base
Deletes a knowledge base.
DELETE FROM aws.quicksight.knowledge_bases
WHERE aws_account_id = '{{ aws_account_id }}' --required
AND knowledge_base_id = '{{ knowledge_base_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- batch_delete_knowledge_base
- search_knowledge_bases
Deletes one or more knowledge bases.
EXEC aws.quicksight.knowledge_bases.batch_delete_knowledge_base
@aws_account_id='{{ aws_account_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"KnowledgeBaseIds": "{{ KnowledgeBaseIds }}"
}'
;
Searches for a subset of knowledge bases based on specified filters.
EXEC aws.quicksight.knowledge_bases.search_knowledge_bases
@aws_account_id='{{ aws_account_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"NextToken": "{{ NextToken }}",
"MaxResults": {{ MaxResults }},
"Filters": "{{ Filters }}",
"SortBy": "{{ SortBy }}"
}'
;