Skip to content

Create Lifecycle Policy

opensearchserviceserverless_create_lifecycle_policy R Documentation

Creates a lifecyle policy to be applied to OpenSearch Serverless indexes

Description

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 Creating data lifecycle policies.

Usage

opensearchserviceserverless_create_lifecycle_policy(type, name,
  description, policy, clientToken)

Arguments

type

[required] The type of lifecycle policy.

name

[required] The name of the lifecycle policy.

description

A description of the lifecycle policy.

policy

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

clientToken

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

Value

A list with the following syntax:

list(
  lifecyclePolicyDetail = list(
    type = "retention",
    name = "string",
    policyVersion = "string",
    description = "string",
    policy = list(),
    createdDate = 123,
    lastModifiedDate = 123
  )
)

Request syntax

svc$create_lifecycle_policy(
  type = "retention",
  name = "string",
  description = "string",
  policy = "string",
  clientToken = "string"
)