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)
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 (
dict
[str
,Any
] |list
[dict
[str
,Any
]] |None
) –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
|None
) – Encryption key.network_policy (
dict
[str
,Any
] |list
[dict
[str
,Any
]] |None
) –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
] |None
) – List of VPC endpoints for access to non-public collection.data_policy (
list
[dict
[str
,Any
]] |None
) – Data policy of a form: [{ “Rules”: […] }]boto3_session (
Session
|None
) – The default boto3 session will be used if boto3_session isNone
.
- Return type:
dict
[str
,Any
]- Returns:
Collection details