UNPKG

@piclemx/pulumi-opensearch

Version:

A Pulumi package for creating and managing Opensearch resources. Based on terraform-provider-opensearch: version v2.2.1

108 lines (107 loc) 3.38 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides an OpenSearch Index State Management (ISM) policy. Please refer to the OpenSearch ISM documentation for details. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fs from "fs"; * import * as opensearch from "@piclemx/pulumi-opensearch"; * * // Create an ISM policy * const cleanup = new opensearch.IsmPolicy("cleanup", { * policyId: "delete_after_15d", * body: fs.readFileSync(`${path.module}/policies/delete_after_15d.json`, "utf8"), * }); * ``` * * ## Import * * ```sh * $ pulumi import opensearch:index/ismPolicy:IsmPolicy cleanup delete_after_15d * ``` */ export declare class IsmPolicy extends pulumi.CustomResource { /** * Get an existing IsmPolicy resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: IsmPolicyState, opts?: pulumi.CustomResourceOptions): IsmPolicy; /** * Returns true if the given object is an instance of IsmPolicy. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is IsmPolicy; /** * The policy document. */ readonly body: pulumi.Output<string>; /** * The id of the ISM policy. */ readonly policyId: pulumi.Output<string>; /** * The primary term of the ISM policy version. */ readonly primaryTerm: pulumi.Output<number>; /** * The sequence number of the ISM policy version. */ readonly seqNo: pulumi.Output<number>; /** * Create a IsmPolicy resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: IsmPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering IsmPolicy resources. */ export interface IsmPolicyState { /** * The policy document. */ body?: pulumi.Input<string>; /** * The id of the ISM policy. */ policyId?: pulumi.Input<string>; /** * The primary term of the ISM policy version. */ primaryTerm?: pulumi.Input<number>; /** * The sequence number of the ISM policy version. */ seqNo?: pulumi.Input<number>; } /** * The set of arguments for constructing a IsmPolicy resource. */ export interface IsmPolicyArgs { /** * The policy document. */ body: pulumi.Input<string>; /** * The id of the ISM policy. */ policyId: pulumi.Input<string>; /** * The primary term of the ISM policy version. */ primaryTerm?: pulumi.Input<number>; /** * The sequence number of the ISM policy version. */ seqNo?: pulumi.Input<number>; }