import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "./types"; /** * Creates or updates a snapshot lifecycle policy. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as elasticstack from "@pulumi/elasticstack"; * * // create a repository for snapshots * const repo = new elasticstack.ElasticsearchSnapshotRepository("repo", {fs: { * location: "/tmp/snapshots", * compress: true, * maxRestoreBytesPerSec: "20mb", * }}); * // create a SLM policy and use the above created repository * const slmPolicy = new elasticstack.ElasticsearchSnapshotLifecycle("slmPolicy", { * schedule: "0 30 1 * * ?", * snapshotName: "", * repository: repo.name, * indices: [ * "data-*", * "important", * ], * ignoreUnavailable: false, * includeGlobalState: false, * expireAfter: "30d", * minCount: 5, * maxCount: 50, * }); * ``` * * ## Import * * ```sh * $ pulumi import elasticstack:index/elasticsearchSnapshotLifecycle:ElasticsearchSnapshotLifecycle my_policy / * ``` */ export declare class ElasticsearchSnapshotLifecycle extends pulumi.CustomResource { /** * Get an existing ElasticsearchSnapshotLifecycle 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, state?: ElasticsearchSnapshotLifecycleState, opts?: pulumi.CustomResourceOptions): ElasticsearchSnapshotLifecycle; /** * Returns true if the given object is an instance of ElasticsearchSnapshotLifecycle. 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 ElasticsearchSnapshotLifecycle; /** * Used to establish connection to Elasticsearch server. Overrides environment variables if present. */ readonly elasticsearchConnection: pulumi.Output; /** * Determines how wildcard patterns in the `indices` parameter match data streams and indices. Supports comma-separated values, such as `closed,hidden`. */ readonly expandWildcards: pulumi.Output; /** * Time period after which a snapshot is considered expired and eligible for deletion. */ readonly expireAfter: pulumi.Output; /** * Feature states to include in the snapshot. */ readonly featureStates: pulumi.Output; /** * Internal identifier of the resource */ readonly id: pulumi.Output; /** * If `false`, the snapshot fails if any data stream or index in indices is missing or closed. If `true`, the snapshot ignores missing or closed data streams and indices. */ readonly ignoreUnavailable: pulumi.Output; /** * If `true`, include the cluster state in the snapshot. */ readonly includeGlobalState: pulumi.Output; /** * Comma-separated list of data streams and indices to include in the snapshot. */ readonly indices: pulumi.Output; /** * Maximum number of snapshots to retain, even if the snapshots have not yet expired. */ readonly maxCount: pulumi.Output; /** * Attaches arbitrary metadata to the snapshot. */ readonly metadata: pulumi.Output; /** * Minimum number of snapshots to retain, even if the snapshots have expired. */ readonly minCount: pulumi.Output; /** * ID for the snapshot lifecycle policy you want to create or update. */ readonly name: pulumi.Output; /** * If `false`, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. */ readonly partial: pulumi.Output; /** * Repository used to store snapshots created by this policy. */ readonly repository: pulumi.Output; /** * Periodic or absolute schedule at which the policy creates snapshots. */ readonly schedule: pulumi.Output; /** * Name automatically assigned to each snapshot created by the policy. */ readonly snapshotName: pulumi.Output; /** * Create a ElasticsearchSnapshotLifecycle 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: ElasticsearchSnapshotLifecycleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ElasticsearchSnapshotLifecycle resources. */ export interface ElasticsearchSnapshotLifecycleState { /** * Used to establish connection to Elasticsearch server. Overrides environment variables if present. */ elasticsearchConnection?: pulumi.Input; /** * Determines how wildcard patterns in the `indices` parameter match data streams and indices. Supports comma-separated values, such as `closed,hidden`. */ expandWildcards?: pulumi.Input; /** * Time period after which a snapshot is considered expired and eligible for deletion. */ expireAfter?: pulumi.Input; /** * Feature states to include in the snapshot. */ featureStates?: pulumi.Input[]>; /** * Internal identifier of the resource */ id?: pulumi.Input; /** * If `false`, the snapshot fails if any data stream or index in indices is missing or closed. If `true`, the snapshot ignores missing or closed data streams and indices. */ ignoreUnavailable?: pulumi.Input; /** * If `true`, include the cluster state in the snapshot. */ includeGlobalState?: pulumi.Input; /** * Comma-separated list of data streams and indices to include in the snapshot. */ indices?: pulumi.Input[]>; /** * Maximum number of snapshots to retain, even if the snapshots have not yet expired. */ maxCount?: pulumi.Input; /** * Attaches arbitrary metadata to the snapshot. */ metadata?: pulumi.Input; /** * Minimum number of snapshots to retain, even if the snapshots have expired. */ minCount?: pulumi.Input; /** * ID for the snapshot lifecycle policy you want to create or update. */ name?: pulumi.Input; /** * If `false`, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. */ partial?: pulumi.Input; /** * Repository used to store snapshots created by this policy. */ repository?: pulumi.Input; /** * Periodic or absolute schedule at which the policy creates snapshots. */ schedule?: pulumi.Input; /** * Name automatically assigned to each snapshot created by the policy. */ snapshotName?: pulumi.Input; } /** * The set of arguments for constructing a ElasticsearchSnapshotLifecycle resource. */ export interface ElasticsearchSnapshotLifecycleArgs { /** * Used to establish connection to Elasticsearch server. Overrides environment variables if present. */ elasticsearchConnection?: pulumi.Input; /** * Determines how wildcard patterns in the `indices` parameter match data streams and indices. Supports comma-separated values, such as `closed,hidden`. */ expandWildcards?: pulumi.Input; /** * Time period after which a snapshot is considered expired and eligible for deletion. */ expireAfter?: pulumi.Input; /** * Feature states to include in the snapshot. */ featureStates?: pulumi.Input[]>; /** * If `false`, the snapshot fails if any data stream or index in indices is missing or closed. If `true`, the snapshot ignores missing or closed data streams and indices. */ ignoreUnavailable?: pulumi.Input; /** * If `true`, include the cluster state in the snapshot. */ includeGlobalState?: pulumi.Input; /** * Comma-separated list of data streams and indices to include in the snapshot. */ indices?: pulumi.Input[]>; /** * Maximum number of snapshots to retain, even if the snapshots have not yet expired. */ maxCount?: pulumi.Input; /** * Attaches arbitrary metadata to the snapshot. */ metadata?: pulumi.Input; /** * Minimum number of snapshots to retain, even if the snapshots have expired. */ minCount?: pulumi.Input; /** * ID for the snapshot lifecycle policy you want to create or update. */ name?: pulumi.Input; /** * If `false`, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. */ partial?: pulumi.Input; /** * Repository used to store snapshots created by this policy. */ repository: pulumi.Input; /** * Periodic or absolute schedule at which the policy creates snapshots. */ schedule: pulumi.Input; /** * Name automatically assigned to each snapshot created by the policy. */ snapshotName?: pulumi.Input; }