v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1446252177.2 KB

Creates a lifecyle policy to be applied to OpenSearch Serverless indexes. Lifecycle policies define the number of days or hours to retain the data on an OpenSearch Serverless index. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-lifecycle.html#serverless-lifecycle-create">Creating data lifecycle policies</a>.

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

Headers

X-Amz-Target'OpenSearchServerless.CreateLifecyclePolicy' required

Request body

type'retention' required

The type of lifecycle policy.

namestring required

The name of the lifecycle policy.

descriptionstring

A description of the lifecycle policy.

policystring required

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

clientTokenstring

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

Response

Success