Defined Type: elasticsearch::snapshot_repository

Defined in:
manifests/snapshot_repository.pp

Overview

This define allows you to insert, update or delete Elasticsearch snapshot

repositories.

Parameters:

  • ensure (Enum['absent', 'present']) (defaults to: 'present')

    Controls whether the named index template should be present or absent in the cluster.

  • api_basic_auth_password (Optional[String]) (defaults to: $elasticsearch::api_basic_auth_password)

    HTTP basic auth password to use when communicating over the Elasticsearch API.

  • api_basic_auth_username (Optional[String]) (defaults to: $elasticsearch::api_basic_auth_username)

    HTTP basic auth username to use when communicating over the Elasticsearch API.

  • api_ca_file (Optional[Stdlib::Absolutepath]) (defaults to: $elasticsearch::api_ca_file)

    Path to a CA file which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.

  • api_ca_path (Optional[Stdlib::Absolutepath]) (defaults to: $elasticsearch::api_ca_path)

    Path to a directory with CA files which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.

  • api_host (String) (defaults to: $elasticsearch::api_host)

    Host name or IP address of the ES instance to connect to.

  • api_port (Integer[0, 65535]) (defaults to: $elasticsearch::api_port)

    Port number of the ES instance to connect to

  • api_protocol (Enum['http', 'https']) (defaults to: $elasticsearch::api_protocol)

    Protocol that should be used to connect to the Elasticsearch API.

  • api_timeout (Integer) (defaults to: $elasticsearch::api_timeout)

    Timeout period (in seconds) for the Elasticsearch API.

  • repository_type (Optional[String]) (defaults to: undef)

    Snapshot repository type.

  • location (String)

    Location of snapshots. Mandatory

  • compress (Boolean) (defaults to: true)

    Compress the snapshot metadata files?

  • chunk_size (Optional[String]) (defaults to: undef)

    Chunk size to break big files down into.

  • max_restore_rate (Optional[String]) (defaults to: undef)

    Throttle value for node restore rate.

  • max_snapshot_rate (Optional[String]) (defaults to: undef)

    Throttle value for node snapshot rate.

  • validate_tls (Boolean) (defaults to: $elasticsearch::validate_tls)

    Determines whether the validity of SSL/TLS certificates received from the Elasticsearch API should be verified or ignored.

Author:

  • Gavin Williams <fatmcgav@gmail.com>

  • Richard Pijnenburg <richard.pijnenburg@elasticsearch.com>

  • Tyler Langlois <tyler.langlois@elastic.co>



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'manifests/snapshot_repository.pp', line 62

define elasticsearch::snapshot_repository (
  String                          $location,
  Enum['absent', 'present']       $ensure                  = 'present',
  Optional[String]                $api_basic_auth_password = $elasticsearch::api_basic_auth_password,
  Optional[String]                $api_basic_auth_username = $elasticsearch::api_basic_auth_username,
  Optional[Stdlib::Absolutepath]  $api_ca_file             = $elasticsearch::api_ca_file,
  Optional[Stdlib::Absolutepath]  $api_ca_path             = $elasticsearch::api_ca_path,
  String                          $api_host                = $elasticsearch::api_host,
  Integer[0, 65535]               $api_port                = $elasticsearch::api_port,
  Enum['http', 'https']           $api_protocol            = $elasticsearch::api_protocol,
  Integer                         $api_timeout             = $elasticsearch::api_timeout,
  Boolean                         $compress                = true,
  Optional[String]                $chunk_size              = undef,
  Optional[String]                $max_restore_rate        = undef,
  Optional[String]                $max_snapshot_rate       = undef,
  Optional[String]                $repository_type         = undef,
  Boolean                         $validate_tls            = $elasticsearch::validate_tls,
) {
  es_instance_conn_validator { "${name}-snapshot":
    server  => $api_host,
    port    => $api_port,
    timeout => $api_timeout,
  }
  -> elasticsearch_snapshot_repository { $name:
    ensure            => $ensure,
    chunk_size        => $chunk_size,
    compress          => $compress,
    location          => $location,
    max_restore_rate  => $max_restore_rate,
    max_snapshot_rate => $max_snapshot_rate,
    type              => $repository_type,
    protocol          => $api_protocol,
    host              => $api_host,
    port              => $api_port,
    timeout           => $api_timeout,
    username          => $api_basic_auth_username,
    password          => $api_basic_auth_password,
    ca_file           => $api_ca_file,
    ca_path           => $api_ca_path,
    validate_tls      => $validate_tls,
  }
}