create_knowledge_base
async
¶
create_knowledge_base(
name: Name,
knowledge_base_type: KnowledgeBaseType,
*,
config_overrides: Optional[AsyncWisdomClientConfig] = None,
client_token: Optional[NonEmptyString] = None,
source_configuration: Optional[SourceConfiguration] = None,
rendering_configuration: Optional[RenderingConfiguration] = None,
server_side_encryption_configuration: Optional[
ServerSideEncryptionConfiguration
] = None,
description: Optional[Description] = None,
tags: Optional[Tags] = None,
) -> CreateKnowledgeBaseResponse
Creates a knowledge base.
When using this API, you cannot reuse Amazon AppIntegrations DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do, you'll get an InvalidRequestException error.
For example, you're programmatically managing your external knowledge base, and you want to add or remove one of the fields that is being ingested from Salesforce. Do the following:
-
Call DeleteKnowledgeBase.
-
Call DeleteDataIntegration.
-
Call CreateDataIntegration to recreate the DataIntegration or a create different one.
-
Call CreateKnowledgeBase.
Parameters:
-
client_token(Optional[NonEmptyString], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
-
name(Name) –The name of the knowledge base.
-
knowledge_base_type(KnowledgeBaseType) –The type of knowledge base. Only CUSTOM knowledge bases allow you to upload your own content. EXTERNAL knowledge bases support integrations with third-party systems whose content is synchronized automatically.
-
source_configuration(Optional[SourceConfiguration], default:None) –The source of the knowledge base content. Only set this argument for EXTERNAL knowledge bases.
-
rendering_configuration(Optional[RenderingConfiguration], default:None) –Information about how to render the content.
-
server_side_encryption_configuration(Optional[ServerSideEncryptionConfiguration], default:None) –The configuration information for the customer managed key used for encryption.
This KMS key must have a policy that allows
kms:CreateGrant,kms:DescribeKey, andkms:Decrypt/kms:GenerateDataKeypermissions to the IAM identity using the key to invoke Wisdom.For more information about setting up a customer managed key for Wisdom, see Enable Amazon Connect Wisdom for your instance.
-
description(Optional[Description], default:None) –The description.
-
tags(Optional[Tags], default:None) –The tags used to organize, track, or control access for this resource.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–The request could not be processed because of conflict in the current state of the resource. For example, if you're using a
CreateAPI (such asCreateAssistant) that accepts name, a conflicting resource (usually with the same name) is being created or mutated. -
ServiceQuotaExceededException–You've exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use service quotas to request a service quota increase.
-
ValidationException–The input fails to satisfy the constraints specified by a service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_wisdom/_services/async_wisdom.py
1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 | |