AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::OpenSearchServerless::LifecyclePolicy

CfnLifecyclePolicy

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](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-lifecycle.html#serverless-lifecycle-create) .

Import

import { CfnLifecyclePolicy } from 'aws-cdk-lib/aws-opensearchserverless';

Or use the module namespace:

import * as opensearchserverless from 'aws-cdk-lib/aws-opensearchserverless';
// opensearchserverless.CfnLifecyclePolicy

Properties

Configuration passed to the constructor as CfnLifecyclePolicyProps.

nameRequired
string

The name of the lifecycle policy.

policyRequired
string

The JSON policy document without any whitespaces.

typeRequired
string

The type of lifecycle policy.

descriptionOptional
string

The description of the lifecycle policy.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-opensearchserverless
CFN TypeAWS::OpenSearchServerless::LifecyclePolicy
Properties4

External Links