v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1446252177.2 KB

Creates a security policy to be used by one or more OpenSearch Serverless collections. Security policies provide access to a collection and its OpenSearch Dashboards endpoint from public networks or specific VPC endpoints. They also allow you to secure a collection with a KMS encryption key. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-network.html">Network access for Amazon OpenSearch Serverless</a> and <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-encryption.html">Encryption at rest for Amazon OpenSearch Serverless</a>.

post/#X-Amz-Target=OpenSearchServerless.CreateSecurityPolicy

Headers

X-Amz-Target'OpenSearchServerless.CreateSecurityPolicy' required

Request body

type'encryption' | 'network' required

The type of security policy.

namestring required

The name of the policy.

descriptionstring

A description of the policy. Typically used to store information about the permissions defined in the policy.

policystring required

The JSON policy document to use as the content for the new policy.

clientTokenstring

Unique, case-sensitive identifier to ensure idempotency of the request.

Response

Success