awswrangler.opensearch.create_collection

awswrangler.opensearch.create_collection(name: str, collection_type: str = 'SEARCH', description: str = '', encryption_policy: dict[str, Any] | list[dict[str, Any]] | None = None, kms_key_arn: str | None = None, network_policy: dict[str, Any] | list[dict[str, Any]] | None = None, vpc_endpoints: list[str] | None = None, data_policy: list[dict[str, Any]] | None = None, boto3_session: Session | None = None) dict[str, Any]

Create Amazon OpenSearch Serverless collection.

Creates Amazon OpenSearch Serverless collection, corresponding encryption and network policies, and data policy, if data_policy provided.

More in [Amazon OpenSearch Serverless (preview)] (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless.html)

Warning

This API is experimental and may change in future AWS SDK for Pandas releases.

Parameters:
  • name (str) – Collection name.

  • collection_type (str) – Collection type. Allowed values are SEARCH, and TIMESERIES.

  • description (str) – Collection description.

  • encryption_policy (Union[Dict[str, Any], List[Dict[str, Any]]], optional) –

    Encryption policy of a form: { “Rules”: […] }

    If not provided, default policy using AWS-managed KMS key will be created. To use user-defined key, provide kms_key_arn.

  • kms_key_arn (str, optional) – Encryption key.

  • network_policy (Union[Dict[str, Any], List[Dict[str, Any]]], optional) –

    Network policy of a form: [{ “Rules”: […] }]

    If not provided, default network policy allowing public access to the collection will be created. To create the collection in the VPC, provide vpc_endpoints.

  • vpc_endpoints (List[str], optional) – List of VPC endpoints for access to non-public collection.

  • data_policy (Union[Dict[str, Any], List[Dict[str, Any]]], optional) – Data policy of a form: [{ “Rules”: […] }]

  • boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 Session will be used if boto3_session receive None.

Returns:

Collection details – Collection details

Return type:

Dict[str, Any]