elasticstack.ElasticsearchSnapshotLifecycle
Explore with Pulumi AI
Creates or updates a snapshot lifecycle policy. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html
Example Usage
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: "<daily-snap-{now/d}>",
repository: repo.name,
indices: [
"data-*",
"important",
],
ignoreUnavailable: false,
includeGlobalState: false,
expireAfter: "30d",
minCount: 5,
maxCount: 50,
});
import pulumi
import pulumi_elasticstack as elasticstack
# create a repository for snapshots
repo = elasticstack.ElasticsearchSnapshotRepository("repo", fs={
"location": "/tmp/snapshots",
"compress": True,
"max_restore_bytes_per_sec": "20mb",
})
# create a SLM policy and use the above created repository
slm_policy = elasticstack.ElasticsearchSnapshotLifecycle("slmPolicy",
schedule="0 30 1 * * ?",
snapshot_name="<daily-snap-{now/d}>",
repository=repo.name,
indices=[
"data-*",
"important",
],
ignore_unavailable=False,
include_global_state=False,
expire_after="30d",
min_count=5,
max_count=50)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/elasticstack/elasticstack"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// create a repository for snapshots
repo, err := elasticstack.NewElasticsearchSnapshotRepository(ctx, "repo", &elasticstack.ElasticsearchSnapshotRepositoryArgs{
Fs: &elasticstack.ElasticsearchSnapshotRepositoryFsArgs{
Location: pulumi.String("/tmp/snapshots"),
Compress: pulumi.Bool(true),
MaxRestoreBytesPerSec: pulumi.String("20mb"),
},
})
if err != nil {
return err
}
// create a SLM policy and use the above created repository
_, err = elasticstack.NewElasticsearchSnapshotLifecycle(ctx, "slmPolicy", &elasticstack.ElasticsearchSnapshotLifecycleArgs{
Schedule: pulumi.String("0 30 1 * * ?"),
SnapshotName: pulumi.String("<daily-snap-{now/d}>"),
Repository: repo.Name,
Indices: pulumi.StringArray{
pulumi.String("data-*"),
pulumi.String("important"),
},
IgnoreUnavailable: pulumi.Bool(false),
IncludeGlobalState: pulumi.Bool(false),
ExpireAfter: pulumi.String("30d"),
MinCount: pulumi.Float64(5),
MaxCount: pulumi.Float64(50),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Elasticstack = Pulumi.Elasticstack;
return await Deployment.RunAsync(() =>
{
// create a repository for snapshots
var repo = new Elasticstack.ElasticsearchSnapshotRepository("repo", new()
{
Fs = new Elasticstack.Inputs.ElasticsearchSnapshotRepositoryFsArgs
{
Location = "/tmp/snapshots",
Compress = true,
MaxRestoreBytesPerSec = "20mb",
},
});
// create a SLM policy and use the above created repository
var slmPolicy = new Elasticstack.ElasticsearchSnapshotLifecycle("slmPolicy", new()
{
Schedule = "0 30 1 * * ?",
SnapshotName = "<daily-snap-{now/d}>",
Repository = repo.Name,
Indices = new[]
{
"data-*",
"important",
},
IgnoreUnavailable = false,
IncludeGlobalState = false,
ExpireAfter = "30d",
MinCount = 5,
MaxCount = 50,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.elasticstack.ElasticsearchSnapshotRepository;
import com.pulumi.elasticstack.ElasticsearchSnapshotRepositoryArgs;
import com.pulumi.elasticstack.inputs.ElasticsearchSnapshotRepositoryFsArgs;
import com.pulumi.elasticstack.ElasticsearchSnapshotLifecycle;
import com.pulumi.elasticstack.ElasticsearchSnapshotLifecycleArgs;
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) {
// create a repository for snapshots
var repo = new ElasticsearchSnapshotRepository("repo", ElasticsearchSnapshotRepositoryArgs.builder()
.fs(ElasticsearchSnapshotRepositoryFsArgs.builder()
.location("/tmp/snapshots")
.compress(true)
.maxRestoreBytesPerSec("20mb")
.build())
.build());
// create a SLM policy and use the above created repository
var slmPolicy = new ElasticsearchSnapshotLifecycle("slmPolicy", ElasticsearchSnapshotLifecycleArgs.builder()
.schedule("0 30 1 * * ?")
.snapshotName("<daily-snap-{now/d}>")
.repository(repo.name())
.indices(
"data-*",
"important")
.ignoreUnavailable(false)
.includeGlobalState(false)
.expireAfter("30d")
.minCount(5)
.maxCount(50)
.build());
}
}
resources:
# create a repository for snapshots
repo:
type: elasticstack:ElasticsearchSnapshotRepository
properties:
fs:
location: /tmp/snapshots
compress: true
maxRestoreBytesPerSec: 20mb
# create a SLM policy and use the above created repository
slmPolicy:
type: elasticstack:ElasticsearchSnapshotLifecycle
properties:
schedule: 0 30 1 * * ?
snapshotName: <daily-snap-{now/d}>
repository: ${repo.name}
indices:
- data-*
- important
ignoreUnavailable: false
includeGlobalState: false
expireAfter: 30d
minCount: 5
maxCount: 50
Create ElasticsearchSnapshotLifecycle Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ElasticsearchSnapshotLifecycle(name: string, args: ElasticsearchSnapshotLifecycleArgs, opts?: CustomResourceOptions);
@overload
def ElasticsearchSnapshotLifecycle(resource_name: str,
args: ElasticsearchSnapshotLifecycleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ElasticsearchSnapshotLifecycle(resource_name: str,
opts: Optional[ResourceOptions] = None,
repository: Optional[str] = None,
schedule: Optional[str] = None,
indices: Optional[Sequence[str]] = None,
feature_states: Optional[Sequence[str]] = None,
ignore_unavailable: Optional[bool] = None,
include_global_state: Optional[bool] = None,
elasticsearch_connection: Optional[ElasticsearchSnapshotLifecycleElasticsearchConnectionArgs] = None,
max_count: Optional[float] = None,
metadata: Optional[str] = None,
min_count: Optional[float] = None,
name: Optional[str] = None,
partial: Optional[bool] = None,
expire_after: Optional[str] = None,
expand_wildcards: Optional[str] = None,
snapshot_name: Optional[str] = None)
func NewElasticsearchSnapshotLifecycle(ctx *Context, name string, args ElasticsearchSnapshotLifecycleArgs, opts ...ResourceOption) (*ElasticsearchSnapshotLifecycle, error)
public ElasticsearchSnapshotLifecycle(string name, ElasticsearchSnapshotLifecycleArgs args, CustomResourceOptions? opts = null)
public ElasticsearchSnapshotLifecycle(String name, ElasticsearchSnapshotLifecycleArgs args)
public ElasticsearchSnapshotLifecycle(String name, ElasticsearchSnapshotLifecycleArgs args, CustomResourceOptions options)
type: elasticstack:ElasticsearchSnapshotLifecycle
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ElasticsearchSnapshotLifecycleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ElasticsearchSnapshotLifecycleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ElasticsearchSnapshotLifecycleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ElasticsearchSnapshotLifecycleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ElasticsearchSnapshotLifecycleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var elasticsearchSnapshotLifecycleResource = new Elasticstack.ElasticsearchSnapshotLifecycle("elasticsearchSnapshotLifecycleResource", new()
{
Repository = "string",
Schedule = "string",
Indices = new[]
{
"string",
},
FeatureStates = new[]
{
"string",
},
IgnoreUnavailable = false,
IncludeGlobalState = false,
MaxCount = 0,
Metadata = "string",
MinCount = 0,
Name = "string",
Partial = false,
ExpireAfter = "string",
ExpandWildcards = "string",
SnapshotName = "string",
});
example, err := elasticstack.NewElasticsearchSnapshotLifecycle(ctx, "elasticsearchSnapshotLifecycleResource", &elasticstack.ElasticsearchSnapshotLifecycleArgs{
Repository: pulumi.String("string"),
Schedule: pulumi.String("string"),
Indices: pulumi.StringArray{
pulumi.String("string"),
},
FeatureStates: pulumi.StringArray{
pulumi.String("string"),
},
IgnoreUnavailable: pulumi.Bool(false),
IncludeGlobalState: pulumi.Bool(false),
MaxCount: pulumi.Float64(0),
Metadata: pulumi.String("string"),
MinCount: pulumi.Float64(0),
Name: pulumi.String("string"),
Partial: pulumi.Bool(false),
ExpireAfter: pulumi.String("string"),
ExpandWildcards: pulumi.String("string"),
SnapshotName: pulumi.String("string"),
})
var elasticsearchSnapshotLifecycleResource = new ElasticsearchSnapshotLifecycle("elasticsearchSnapshotLifecycleResource", ElasticsearchSnapshotLifecycleArgs.builder()
.repository("string")
.schedule("string")
.indices("string")
.featureStates("string")
.ignoreUnavailable(false)
.includeGlobalState(false)
.maxCount(0)
.metadata("string")
.minCount(0)
.name("string")
.partial(false)
.expireAfter("string")
.expandWildcards("string")
.snapshotName("string")
.build());
elasticsearch_snapshot_lifecycle_resource = elasticstack.ElasticsearchSnapshotLifecycle("elasticsearchSnapshotLifecycleResource",
repository="string",
schedule="string",
indices=["string"],
feature_states=["string"],
ignore_unavailable=False,
include_global_state=False,
max_count=0,
metadata="string",
min_count=0,
name="string",
partial=False,
expire_after="string",
expand_wildcards="string",
snapshot_name="string")
const elasticsearchSnapshotLifecycleResource = new elasticstack.ElasticsearchSnapshotLifecycle("elasticsearchSnapshotLifecycleResource", {
repository: "string",
schedule: "string",
indices: ["string"],
featureStates: ["string"],
ignoreUnavailable: false,
includeGlobalState: false,
maxCount: 0,
metadata: "string",
minCount: 0,
name: "string",
partial: false,
expireAfter: "string",
expandWildcards: "string",
snapshotName: "string",
});
type: elasticstack:ElasticsearchSnapshotLifecycle
properties:
expandWildcards: string
expireAfter: string
featureStates:
- string
ignoreUnavailable: false
includeGlobalState: false
indices:
- string
maxCount: 0
metadata: string
minCount: 0
name: string
partial: false
repository: string
schedule: string
snapshotName: string
ElasticsearchSnapshotLifecycle Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ElasticsearchSnapshotLifecycle resource accepts the following input properties:
- Repository string
- Repository used to store snapshots created by this policy.
- Schedule string
- Periodic or absolute schedule at which the policy creates snapshots.
- Elasticsearch
Connection ElasticsearchSnapshot Lifecycle Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- Expand
Wildcards string - Determines how wildcard patterns in the
indices
parameter match data streams and indices. Supports comma-separated values, such asclosed,hidden
. - Expire
After string - Time period after which a snapshot is considered expired and eligible for deletion.
- Feature
States List<string> - Feature states to include in the snapshot.
- bool
- If
false
, the snapshot fails if any data stream or index in indices is missing or closed. Iftrue
, the snapshot ignores missing or closed data streams and indices. - Include
Global boolState - If
true
, include the cluster state in the snapshot. - Indices List<string>
- Comma-separated list of data streams and indices to include in the snapshot.
- Max
Count double - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
- Metadata string
- Attaches arbitrary metadata to the snapshot.
- Min
Count double - Minimum number of snapshots to retain, even if the snapshots have expired.
- Name string
- ID for the snapshot lifecycle policy you want to create or update.
- Partial bool
- If
false
, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - Snapshot
Name string - Name automatically assigned to each snapshot created by the policy.
- Repository string
- Repository used to store snapshots created by this policy.
- Schedule string
- Periodic or absolute schedule at which the policy creates snapshots.
- Elasticsearch
Connection ElasticsearchSnapshot Lifecycle Elasticsearch Connection Args - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- Expand
Wildcards string - Determines how wildcard patterns in the
indices
parameter match data streams and indices. Supports comma-separated values, such asclosed,hidden
. - Expire
After string - Time period after which a snapshot is considered expired and eligible for deletion.
- Feature
States []string - Feature states to include in the snapshot.
- bool
- If
false
, the snapshot fails if any data stream or index in indices is missing or closed. Iftrue
, the snapshot ignores missing or closed data streams and indices. - Include
Global boolState - If
true
, include the cluster state in the snapshot. - Indices []string
- Comma-separated list of data streams and indices to include in the snapshot.
- Max
Count float64 - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
- Metadata string
- Attaches arbitrary metadata to the snapshot.
- Min
Count float64 - Minimum number of snapshots to retain, even if the snapshots have expired.
- Name string
- ID for the snapshot lifecycle policy you want to create or update.
- Partial bool
- If
false
, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - Snapshot
Name string - Name automatically assigned to each snapshot created by the policy.
- repository String
- Repository used to store snapshots created by this policy.
- schedule String
- Periodic or absolute schedule at which the policy creates snapshots.
- elasticsearch
Connection ElasticsearchSnapshot Lifecycle Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- expand
Wildcards String - Determines how wildcard patterns in the
indices
parameter match data streams and indices. Supports comma-separated values, such asclosed,hidden
. - expire
After String - Time period after which a snapshot is considered expired and eligible for deletion.
- feature
States List<String> - Feature states to include in the snapshot.
- Boolean
- If
false
, the snapshot fails if any data stream or index in indices is missing or closed. Iftrue
, the snapshot ignores missing or closed data streams and indices. - include
Global BooleanState - If
true
, include the cluster state in the snapshot. - indices List<String>
- Comma-separated list of data streams and indices to include in the snapshot.
- max
Count Double - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
- metadata String
- Attaches arbitrary metadata to the snapshot.
- min
Count Double - Minimum number of snapshots to retain, even if the snapshots have expired.
- name String
- ID for the snapshot lifecycle policy you want to create or update.
- partial Boolean
- If
false
, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - snapshot
Name String - Name automatically assigned to each snapshot created by the policy.
- repository string
- Repository used to store snapshots created by this policy.
- schedule string
- Periodic or absolute schedule at which the policy creates snapshots.
- elasticsearch
Connection ElasticsearchSnapshot Lifecycle Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- expand
Wildcards string - Determines how wildcard patterns in the
indices
parameter match data streams and indices. Supports comma-separated values, such asclosed,hidden
. - expire
After string - Time period after which a snapshot is considered expired and eligible for deletion.
- feature
States string[] - Feature states to include in the snapshot.
- boolean
- If
false
, the snapshot fails if any data stream or index in indices is missing or closed. Iftrue
, the snapshot ignores missing or closed data streams and indices. - include
Global booleanState - If
true
, include the cluster state in the snapshot. - indices string[]
- Comma-separated list of data streams and indices to include in the snapshot.
- max
Count number - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
- metadata string
- Attaches arbitrary metadata to the snapshot.
- min
Count number - Minimum number of snapshots to retain, even if the snapshots have expired.
- name string
- ID for the snapshot lifecycle policy you want to create or update.
- partial boolean
- If
false
, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - snapshot
Name string - Name automatically assigned to each snapshot created by the policy.
- repository str
- Repository used to store snapshots created by this policy.
- schedule str
- Periodic or absolute schedule at which the policy creates snapshots.
- elasticsearch_
connection ElasticsearchSnapshot Lifecycle Elasticsearch Connection Args - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- expand_
wildcards str - Determines how wildcard patterns in the
indices
parameter match data streams and indices. Supports comma-separated values, such asclosed,hidden
. - expire_
after str - Time period after which a snapshot is considered expired and eligible for deletion.
- feature_
states Sequence[str] - Feature states to include in the snapshot.
- bool
- If
false
, the snapshot fails if any data stream or index in indices is missing or closed. Iftrue
, the snapshot ignores missing or closed data streams and indices. - include_
global_ boolstate - If
true
, include the cluster state in the snapshot. - indices Sequence[str]
- Comma-separated list of data streams and indices to include in the snapshot.
- max_
count float - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
- metadata str
- Attaches arbitrary metadata to the snapshot.
- min_
count float - Minimum number of snapshots to retain, even if the snapshots have expired.
- name str
- ID for the snapshot lifecycle policy you want to create or update.
- partial bool
- If
false
, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - snapshot_
name str - Name automatically assigned to each snapshot created by the policy.
- repository String
- Repository used to store snapshots created by this policy.
- schedule String
- Periodic or absolute schedule at which the policy creates snapshots.
- elasticsearch
Connection Property Map - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- expand
Wildcards String - Determines how wildcard patterns in the
indices
parameter match data streams and indices. Supports comma-separated values, such asclosed,hidden
. - expire
After String - Time period after which a snapshot is considered expired and eligible for deletion.
- feature
States List<String> - Feature states to include in the snapshot.
- Boolean
- If
false
, the snapshot fails if any data stream or index in indices is missing or closed. Iftrue
, the snapshot ignores missing or closed data streams and indices. - include
Global BooleanState - If
true
, include the cluster state in the snapshot. - indices List<String>
- Comma-separated list of data streams and indices to include in the snapshot.
- max
Count Number - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
- metadata String
- Attaches arbitrary metadata to the snapshot.
- min
Count Number - Minimum number of snapshots to retain, even if the snapshots have expired.
- name String
- ID for the snapshot lifecycle policy you want to create or update.
- partial Boolean
- If
false
, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - snapshot
Name String - Name automatically assigned to each snapshot created by the policy.
Outputs
All input properties are implicitly available as output properties. Additionally, the ElasticsearchSnapshotLifecycle resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ElasticsearchSnapshotLifecycle Resource
Get an existing ElasticsearchSnapshotLifecycle resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ElasticsearchSnapshotLifecycleState, opts?: CustomResourceOptions): ElasticsearchSnapshotLifecycle
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
elasticsearch_connection: Optional[ElasticsearchSnapshotLifecycleElasticsearchConnectionArgs] = None,
expand_wildcards: Optional[str] = None,
expire_after: Optional[str] = None,
feature_states: Optional[Sequence[str]] = None,
ignore_unavailable: Optional[bool] = None,
include_global_state: Optional[bool] = None,
indices: Optional[Sequence[str]] = None,
max_count: Optional[float] = None,
metadata: Optional[str] = None,
min_count: Optional[float] = None,
name: Optional[str] = None,
partial: Optional[bool] = None,
repository: Optional[str] = None,
schedule: Optional[str] = None,
snapshot_name: Optional[str] = None) -> ElasticsearchSnapshotLifecycle
func GetElasticsearchSnapshotLifecycle(ctx *Context, name string, id IDInput, state *ElasticsearchSnapshotLifecycleState, opts ...ResourceOption) (*ElasticsearchSnapshotLifecycle, error)
public static ElasticsearchSnapshotLifecycle Get(string name, Input<string> id, ElasticsearchSnapshotLifecycleState? state, CustomResourceOptions? opts = null)
public static ElasticsearchSnapshotLifecycle get(String name, Output<String> id, ElasticsearchSnapshotLifecycleState state, CustomResourceOptions options)
resources: _: type: elasticstack:ElasticsearchSnapshotLifecycle get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Elasticsearch
Connection ElasticsearchSnapshot Lifecycle Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- Expand
Wildcards string - Determines how wildcard patterns in the
indices
parameter match data streams and indices. Supports comma-separated values, such asclosed,hidden
. - Expire
After string - Time period after which a snapshot is considered expired and eligible for deletion.
- Feature
States List<string> - Feature states to include in the snapshot.
- bool
- If
false
, the snapshot fails if any data stream or index in indices is missing or closed. Iftrue
, the snapshot ignores missing or closed data streams and indices. - Include
Global boolState - If
true
, include the cluster state in the snapshot. - Indices List<string>
- Comma-separated list of data streams and indices to include in the snapshot.
- Max
Count double - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
- Metadata string
- Attaches arbitrary metadata to the snapshot.
- Min
Count double - Minimum number of snapshots to retain, even if the snapshots have expired.
- Name string
- ID for the snapshot lifecycle policy you want to create or update.
- Partial bool
- If
false
, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - Repository string
- Repository used to store snapshots created by this policy.
- Schedule string
- Periodic or absolute schedule at which the policy creates snapshots.
- Snapshot
Name string - Name automatically assigned to each snapshot created by the policy.
- Elasticsearch
Connection ElasticsearchSnapshot Lifecycle Elasticsearch Connection Args - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- Expand
Wildcards string - Determines how wildcard patterns in the
indices
parameter match data streams and indices. Supports comma-separated values, such asclosed,hidden
. - Expire
After string - Time period after which a snapshot is considered expired and eligible for deletion.
- Feature
States []string - Feature states to include in the snapshot.
- bool
- If
false
, the snapshot fails if any data stream or index in indices is missing or closed. Iftrue
, the snapshot ignores missing or closed data streams and indices. - Include
Global boolState - If
true
, include the cluster state in the snapshot. - Indices []string
- Comma-separated list of data streams and indices to include in the snapshot.
- Max
Count float64 - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
- Metadata string
- Attaches arbitrary metadata to the snapshot.
- Min
Count float64 - Minimum number of snapshots to retain, even if the snapshots have expired.
- Name string
- ID for the snapshot lifecycle policy you want to create or update.
- Partial bool
- If
false
, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - Repository string
- Repository used to store snapshots created by this policy.
- Schedule string
- Periodic or absolute schedule at which the policy creates snapshots.
- Snapshot
Name string - Name automatically assigned to each snapshot created by the policy.
- elasticsearch
Connection ElasticsearchSnapshot Lifecycle Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- expand
Wildcards String - Determines how wildcard patterns in the
indices
parameter match data streams and indices. Supports comma-separated values, such asclosed,hidden
. - expire
After String - Time period after which a snapshot is considered expired and eligible for deletion.
- feature
States List<String> - Feature states to include in the snapshot.
- Boolean
- If
false
, the snapshot fails if any data stream or index in indices is missing or closed. Iftrue
, the snapshot ignores missing or closed data streams and indices. - include
Global BooleanState - If
true
, include the cluster state in the snapshot. - indices List<String>
- Comma-separated list of data streams and indices to include in the snapshot.
- max
Count Double - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
- metadata String
- Attaches arbitrary metadata to the snapshot.
- min
Count Double - Minimum number of snapshots to retain, even if the snapshots have expired.
- name String
- ID for the snapshot lifecycle policy you want to create or update.
- partial Boolean
- If
false
, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - repository String
- Repository used to store snapshots created by this policy.
- schedule String
- Periodic or absolute schedule at which the policy creates snapshots.
- snapshot
Name String - Name automatically assigned to each snapshot created by the policy.
- elasticsearch
Connection ElasticsearchSnapshot Lifecycle Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- expand
Wildcards string - Determines how wildcard patterns in the
indices
parameter match data streams and indices. Supports comma-separated values, such asclosed,hidden
. - expire
After string - Time period after which a snapshot is considered expired and eligible for deletion.
- feature
States string[] - Feature states to include in the snapshot.
- boolean
- If
false
, the snapshot fails if any data stream or index in indices is missing or closed. Iftrue
, the snapshot ignores missing or closed data streams and indices. - include
Global booleanState - If
true
, include the cluster state in the snapshot. - indices string[]
- Comma-separated list of data streams and indices to include in the snapshot.
- max
Count number - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
- metadata string
- Attaches arbitrary metadata to the snapshot.
- min
Count number - Minimum number of snapshots to retain, even if the snapshots have expired.
- name string
- ID for the snapshot lifecycle policy you want to create or update.
- partial boolean
- If
false
, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - repository string
- Repository used to store snapshots created by this policy.
- schedule string
- Periodic or absolute schedule at which the policy creates snapshots.
- snapshot
Name string - Name automatically assigned to each snapshot created by the policy.
- elasticsearch_
connection ElasticsearchSnapshot Lifecycle Elasticsearch Connection Args - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- expand_
wildcards str - Determines how wildcard patterns in the
indices
parameter match data streams and indices. Supports comma-separated values, such asclosed,hidden
. - expire_
after str - Time period after which a snapshot is considered expired and eligible for deletion.
- feature_
states Sequence[str] - Feature states to include in the snapshot.
- bool
- If
false
, the snapshot fails if any data stream or index in indices is missing or closed. Iftrue
, the snapshot ignores missing or closed data streams and indices. - include_
global_ boolstate - If
true
, include the cluster state in the snapshot. - indices Sequence[str]
- Comma-separated list of data streams and indices to include in the snapshot.
- max_
count float - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
- metadata str
- Attaches arbitrary metadata to the snapshot.
- min_
count float - Minimum number of snapshots to retain, even if the snapshots have expired.
- name str
- ID for the snapshot lifecycle policy you want to create or update.
- partial bool
- If
false
, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - repository str
- Repository used to store snapshots created by this policy.
- schedule str
- Periodic or absolute schedule at which the policy creates snapshots.
- snapshot_
name str - Name automatically assigned to each snapshot created by the policy.
- elasticsearch
Connection Property Map - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- expand
Wildcards String - Determines how wildcard patterns in the
indices
parameter match data streams and indices. Supports comma-separated values, such asclosed,hidden
. - expire
After String - Time period after which a snapshot is considered expired and eligible for deletion.
- feature
States List<String> - Feature states to include in the snapshot.
- Boolean
- If
false
, the snapshot fails if any data stream or index in indices is missing or closed. Iftrue
, the snapshot ignores missing or closed data streams and indices. - include
Global BooleanState - If
true
, include the cluster state in the snapshot. - indices List<String>
- Comma-separated list of data streams and indices to include in the snapshot.
- max
Count Number - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
- metadata String
- Attaches arbitrary metadata to the snapshot.
- min
Count Number - Minimum number of snapshots to retain, even if the snapshots have expired.
- name String
- ID for the snapshot lifecycle policy you want to create or update.
- partial Boolean
- If
false
, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - repository String
- Repository used to store snapshots created by this policy.
- schedule String
- Periodic or absolute schedule at which the policy creates snapshots.
- snapshot
Name String - Name automatically assigned to each snapshot created by the policy.
Supporting Types
ElasticsearchSnapshotLifecycleElasticsearchConnection, ElasticsearchSnapshotLifecycleElasticsearchConnectionArgs
- Api
Key string - API Key to use for authentication to Elasticsearch
- Bearer
Token string - Bearer Token to use for authentication to Elasticsearch
- Ca
Data string - PEM-encoded custom Certificate Authority certificate
- Ca
File string - Path to a custom Certificate Authority certificate
- Cert
Data string - PEM encoded certificate for client auth
- Cert
File string - Path to a file containing the PEM encoded certificate for client auth
- Endpoints List<string>
- Es
Client stringAuthentication - ES Client Authentication field to be used with the JWT token
- Insecure bool
- Disable TLS certificate validation
- Key
Data string - PEM encoded private key for client auth
- Key
File string - Path to a file containing the PEM encoded private key for client auth
- Password string
- Password to use for API authentication to Elasticsearch.
- Username string
- Username to use for API authentication to Elasticsearch.
- Api
Key string - API Key to use for authentication to Elasticsearch
- Bearer
Token string - Bearer Token to use for authentication to Elasticsearch
- Ca
Data string - PEM-encoded custom Certificate Authority certificate
- Ca
File string - Path to a custom Certificate Authority certificate
- Cert
Data string - PEM encoded certificate for client auth
- Cert
File string - Path to a file containing the PEM encoded certificate for client auth
- Endpoints []string
- Es
Client stringAuthentication - ES Client Authentication field to be used with the JWT token
- Insecure bool
- Disable TLS certificate validation
- Key
Data string - PEM encoded private key for client auth
- Key
File string - Path to a file containing the PEM encoded private key for client auth
- Password string
- Password to use for API authentication to Elasticsearch.
- Username string
- Username to use for API authentication to Elasticsearch.
- api
Key String - API Key to use for authentication to Elasticsearch
- bearer
Token String - Bearer Token to use for authentication to Elasticsearch
- ca
Data String - PEM-encoded custom Certificate Authority certificate
- ca
File String - Path to a custom Certificate Authority certificate
- cert
Data String - PEM encoded certificate for client auth
- cert
File String - Path to a file containing the PEM encoded certificate for client auth
- endpoints List<String>
- es
Client StringAuthentication - ES Client Authentication field to be used with the JWT token
- insecure Boolean
- Disable TLS certificate validation
- key
Data String - PEM encoded private key for client auth
- key
File String - Path to a file containing the PEM encoded private key for client auth
- password String
- Password to use for API authentication to Elasticsearch.
- username String
- Username to use for API authentication to Elasticsearch.
- api
Key string - API Key to use for authentication to Elasticsearch
- bearer
Token string - Bearer Token to use for authentication to Elasticsearch
- ca
Data string - PEM-encoded custom Certificate Authority certificate
- ca
File string - Path to a custom Certificate Authority certificate
- cert
Data string - PEM encoded certificate for client auth
- cert
File string - Path to a file containing the PEM encoded certificate for client auth
- endpoints string[]
- es
Client stringAuthentication - ES Client Authentication field to be used with the JWT token
- insecure boolean
- Disable TLS certificate validation
- key
Data string - PEM encoded private key for client auth
- key
File string - Path to a file containing the PEM encoded private key for client auth
- password string
- Password to use for API authentication to Elasticsearch.
- username string
- Username to use for API authentication to Elasticsearch.
- api_
key str - API Key to use for authentication to Elasticsearch
- bearer_
token str - Bearer Token to use for authentication to Elasticsearch
- ca_
data str - PEM-encoded custom Certificate Authority certificate
- ca_
file str - Path to a custom Certificate Authority certificate
- cert_
data str - PEM encoded certificate for client auth
- cert_
file str - Path to a file containing the PEM encoded certificate for client auth
- endpoints Sequence[str]
- es_
client_ strauthentication - ES Client Authentication field to be used with the JWT token
- insecure bool
- Disable TLS certificate validation
- key_
data str - PEM encoded private key for client auth
- key_
file str - Path to a file containing the PEM encoded private key for client auth
- password str
- Password to use for API authentication to Elasticsearch.
- username str
- Username to use for API authentication to Elasticsearch.
- api
Key String - API Key to use for authentication to Elasticsearch
- bearer
Token String - Bearer Token to use for authentication to Elasticsearch
- ca
Data String - PEM-encoded custom Certificate Authority certificate
- ca
File String - Path to a custom Certificate Authority certificate
- cert
Data String - PEM encoded certificate for client auth
- cert
File String - Path to a file containing the PEM encoded certificate for client auth
- endpoints List<String>
- es
Client StringAuthentication - ES Client Authentication field to be used with the JWT token
- insecure Boolean
- Disable TLS certificate validation
- key
Data String - PEM encoded private key for client auth
- key
File String - Path to a file containing the PEM encoded private key for client auth
- password String
- Password to use for API authentication to Elasticsearch.
- username String
- Username to use for API authentication to Elasticsearch.
Import
$ pulumi import elasticstack:index/elasticsearchSnapshotLifecycle:ElasticsearchSnapshotLifecycle my_policy <cluster_uuid>/<slm policy name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- elasticstack elastic/terraform-provider-elasticstack
- License
- Notes
- This Pulumi package is based on the
elasticstack
Terraform Provider.