ServerlessLifecyclePolicy

class ServerlessLifecyclePolicy : KotlinCustomResource

Resource for managing an AWS OpenSearch Serverless Lifecycle Policy. See AWS documentation for lifecycle policies.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.opensearch.ServerlessLifecyclePolicy;
import com.pulumi.aws.opensearch.ServerlessLifecyclePolicyArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ServerlessLifecyclePolicy("example", ServerlessLifecyclePolicyArgs.builder()
.type("retention")
.policy(serializeJson(
jsonObject(
jsonProperty("Rules", jsonArray(
jsonObject(
jsonProperty("ResourceType", "index"),
jsonProperty("Resource", jsonArray("index/autoparts-inventory/*")),
jsonProperty("MinIndexRetention", "81d")
),
jsonObject(
jsonProperty("ResourceType", "index"),
jsonProperty("Resource", jsonArray("index/sales/orders*")),
jsonProperty("NoMinIndexRetention", true)
)
))
)))
.build());
}
}

Import

Using pulumi import, import OpenSearch Serverless Lifecycle Policy using the name and type arguments separated by a slash (/). For example:

$ pulumi import aws:opensearch/serverlessLifecyclePolicy:ServerlessLifecyclePolicy example example/retention

*/

Properties

Link copied to clipboard
val description: Output<String>?

Description of the policy.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Name of the policy.

Link copied to clipboard
val policy: Output<String>

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

Link copied to clipboard
val policyVersion: Output<String>

Version of the policy.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val type: Output<String>

Type of lifecycle policy. Must be retention. The following arguments are optional:

Link copied to clipboard
val urn: Output<String>