// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "./types"; import * as utilities from "./utilities"; /** * Registers or updates a snapshot repository. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/put-snapshot-repo-api.html and https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as elasticstack from "@pulumi/elasticstack"; * * const myUrlRepo = new elasticstack.ElasticsearchSnapshotRepository("my_url_repo", { * url: { * url: "https://example.com/repo", * }, * }); * const myFsRepo = new elasticstack.ElasticsearchSnapshotRepository("my_fs_repo", { * fs: { * compress: true, * location: "/tmp", * maxRestoreBytesPerSec: "10mb", * }, * }); * ``` * * ## Import * * ```sh * $ pulumi import elasticstack:index/elasticsearchSnapshotRepository:ElasticsearchSnapshotRepository my_repository / * ``` */ export class ElasticsearchSnapshotRepository extends pulumi.CustomResource { /** * Get an existing ElasticsearchSnapshotRepository 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. */ public static get(name: string, id: pulumi.Input, state?: ElasticsearchSnapshotRepositoryState, opts?: pulumi.CustomResourceOptions): ElasticsearchSnapshotRepository { return new ElasticsearchSnapshotRepository(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'elasticstack:index/elasticsearchSnapshotRepository:ElasticsearchSnapshotRepository'; /** * Returns true if the given object is an instance of ElasticsearchSnapshotRepository. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is ElasticsearchSnapshotRepository { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ElasticsearchSnapshotRepository.__pulumiType; } /** * Support for using Azure Blob storage as a repository for Snapshot/Restore. See: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-azure.html */ public readonly azure!: pulumi.Output; /** * Used to establish connection to Elasticsearch server. Overrides environment variables if present. */ public readonly elasticsearchConnection!: pulumi.Output; /** * Shared filesystem repository. Repositories of this type use a shared filesystem to store snapshots. This filesystem must be accessible to all master and data nodes in the cluster. */ public readonly fs!: pulumi.Output; /** * Support for using the Google Cloud Storage service as a repository for Snapshot/Restore. See: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-gcs.html */ public readonly gcs!: pulumi.Output; /** * Support for using HDFS File System as a repository for Snapshot/Restore. See: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-hdfs.html */ public readonly hdfs!: pulumi.Output; /** * Internal identifier of the resource */ public /*out*/ readonly id!: pulumi.Output; /** * Name of the snapshot repository to register or update. */ public readonly name!: pulumi.Output; /** * Support for using AWS S3 as a repository for Snapshot/Restore. See: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-s3-repository.html */ public readonly s3!: pulumi.Output; /** * URL repository. Repositories of this type are read-only for the cluster. This means the cluster can retrieve or restore snapshots from the repository but cannot write or create snapshots in it. */ public readonly url!: pulumi.Output; /** * If true, the request verifies the repository is functional on all master and data nodes in the cluster. */ public readonly verify!: pulumi.Output; /** * Create a ElasticsearchSnapshotRepository 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?: ElasticsearchSnapshotRepositoryArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: ElasticsearchSnapshotRepositoryArgs | ElasticsearchSnapshotRepositoryState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as ElasticsearchSnapshotRepositoryState | undefined; resourceInputs["azure"] = state ? state.azure : undefined; resourceInputs["elasticsearchConnection"] = state ? state.elasticsearchConnection : undefined; resourceInputs["fs"] = state ? state.fs : undefined; resourceInputs["gcs"] = state ? state.gcs : undefined; resourceInputs["hdfs"] = state ? state.hdfs : undefined; resourceInputs["id"] = state ? state.id : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["s3"] = state ? state.s3 : undefined; resourceInputs["url"] = state ? state.url : undefined; resourceInputs["verify"] = state ? state.verify : undefined; } else { const args = argsOrState as ElasticsearchSnapshotRepositoryArgs | undefined; resourceInputs["azure"] = args ? args.azure : undefined; resourceInputs["elasticsearchConnection"] = args ? args.elasticsearchConnection : undefined; resourceInputs["fs"] = args ? args.fs : undefined; resourceInputs["gcs"] = args ? args.gcs : undefined; resourceInputs["hdfs"] = args ? args.hdfs : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["s3"] = args ? args.s3 : undefined; resourceInputs["url"] = args ? args.url : undefined; resourceInputs["verify"] = args ? args.verify : undefined; resourceInputs["id"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ElasticsearchSnapshotRepository.__pulumiType, name, resourceInputs, opts); } } /** * Input properties used for looking up and filtering ElasticsearchSnapshotRepository resources. */ export interface ElasticsearchSnapshotRepositoryState { /** * Support for using Azure Blob storage as a repository for Snapshot/Restore. See: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-azure.html */ azure?: pulumi.Input; /** * Used to establish connection to Elasticsearch server. Overrides environment variables if present. */ elasticsearchConnection?: pulumi.Input; /** * Shared filesystem repository. Repositories of this type use a shared filesystem to store snapshots. This filesystem must be accessible to all master and data nodes in the cluster. */ fs?: pulumi.Input; /** * Support for using the Google Cloud Storage service as a repository for Snapshot/Restore. See: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-gcs.html */ gcs?: pulumi.Input; /** * Support for using HDFS File System as a repository for Snapshot/Restore. See: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-hdfs.html */ hdfs?: pulumi.Input; /** * Internal identifier of the resource */ id?: pulumi.Input; /** * Name of the snapshot repository to register or update. */ name?: pulumi.Input; /** * Support for using AWS S3 as a repository for Snapshot/Restore. See: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-s3-repository.html */ s3?: pulumi.Input; /** * URL repository. Repositories of this type are read-only for the cluster. This means the cluster can retrieve or restore snapshots from the repository but cannot write or create snapshots in it. */ url?: pulumi.Input; /** * If true, the request verifies the repository is functional on all master and data nodes in the cluster. */ verify?: pulumi.Input; } /** * The set of arguments for constructing a ElasticsearchSnapshotRepository resource. */ export interface ElasticsearchSnapshotRepositoryArgs { /** * Support for using Azure Blob storage as a repository for Snapshot/Restore. See: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-azure.html */ azure?: pulumi.Input; /** * Used to establish connection to Elasticsearch server. Overrides environment variables if present. */ elasticsearchConnection?: pulumi.Input; /** * Shared filesystem repository. Repositories of this type use a shared filesystem to store snapshots. This filesystem must be accessible to all master and data nodes in the cluster. */ fs?: pulumi.Input; /** * Support for using the Google Cloud Storage service as a repository for Snapshot/Restore. See: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-gcs.html */ gcs?: pulumi.Input; /** * Support for using HDFS File System as a repository for Snapshot/Restore. See: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-hdfs.html */ hdfs?: pulumi.Input; /** * Name of the snapshot repository to register or update. */ name?: pulumi.Input; /** * Support for using AWS S3 as a repository for Snapshot/Restore. See: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-s3-repository.html */ s3?: pulumi.Input; /** * URL repository. Repositories of this type are read-only for the cluster. This means the cluster can retrieve or restore snapshots from the repository but cannot write or create snapshots in it. */ url?: pulumi.Input; /** * If true, the request verifies the repository is functional on all master and data nodes in the cluster. */ verify?: pulumi.Input; }