create_collection
async
¶
create_collection(
name: CollectionName,
*,
config_overrides: Optional[AsyncOpenSearchServerlessClientConfig] = None,
type: Optional[CollectionType] = None,
description: Optional[str] = None,
tags: Optional[Tags] = None,
standby_replicas: Optional[StandbyReplicas] = None,
vector_options: Optional[VectorOptions] = None,
collection_group_name: Optional[CollectionGroupName] = None,
encryption_config: Optional[EncryptionConfig] = None,
deletion_protection: Optional[DeletionProtection] = None,
client_token: Optional[ClientToken] = None,
) -> CreateCollectionResponse
Creates a new OpenSearch Serverless collection. For more information, see Creating and managing Amazon OpenSearch Serverless collections.
Parameters:
-
name(CollectionName) –Name of the collection.
-
type(Optional[CollectionType], default:None) –The type of collection.
-
description(Optional[str], default:None) –Description of the collection.
-
tags(Optional[Tags], default:None) –An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Serverless collection.
-
standby_replicas(Optional[StandbyReplicas], default:None) –Indicates whether standby replicas should be used for a collection.
-
vector_options(Optional[VectorOptions], default:None) –Configuration options for vector search capabilities in the collection.
-
collection_group_name(Optional[CollectionGroupName], default:None) –The name of the collection group to associate with the collection.
-
encryption_config(Optional[EncryptionConfig], default:None) –Encryption settings for the collection.
-
deletion_protection(Optional[DeletionProtection], default:None) –Indicates whether to enable deletion protection for the collection. When set to
ENABLED, the collection cannot be deleted. -
client_token(Optional[ClientToken], default:None) –Unique, case-sensitive identifier to ensure idempotency of the request.
Raises:
-
ConflictException–When creating a resource, thrown when a resource with the same name already exists or is being created. When deleting a resource, thrown when the resource is not in the ACTIVE, FAILED, or UPDATE_FAILED state.
-
InternalServerException–Thrown when an error internal to the service occurs while processing a request.
-
OcuLimitExceededException–Thrown when the collection you're attempting to create results in a number of search or indexing OCUs that exceeds the account limit.
-
ServiceQuotaExceededException–Thrown when you attempt to create more resources than the service allows based on service quotas.
-
ValidationException–Thrown when the HTTP request contains invalid input or is missing required input.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_opensearchserverless/_services/async_open_search_serverless.py
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 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 | |