<reponame>zlepper/pulumi-elasticstack// *** 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! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Elasticstack
{
    /// <summary>
    /// 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
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Elasticstack = Pulumi.Elasticstack;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var myUrlRepo = new Elasticstack.SnapshotRepository("myUrlRepo", new()
    ///     {
    ///         Url = new Elasticstack.Inputs.SnapshotRepositoryUrlArgs
    ///         {
    ///             Url = "https://example.com/repo",
    ///         },
    ///     });
    /// 
    ///     var myFsRepo = new Elasticstack.SnapshotRepository("myFsRepo", new()
    ///     {
    ///         Fs = new Elasticstack.Inputs.SnapshotRepositoryFsArgs
    ///         {
    ///             Compress = true,
    ///             Location = "/tmp",
    ///             MaxRestoreBytesPerSec = "10mb",
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// ```sh
    ///  $ pulumi import elasticstack:index/snapshotRepository:SnapshotRepository my_repository &lt;cluster_uuid&gt;/&lt;repository name&gt;
    /// ```
    /// </summary>
    [ElasticstackResourceType("elasticstack:index/snapshotRepository:SnapshotRepository")]
    public partial class SnapshotRepository : global::Pulumi.CustomResource
    {
        /// <summary>
        /// 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
        /// </summary>
        [Output("azure")]
        public Output<Outputs.SnapshotRepositoryAzure?> Azure { get; private set; } = null!;

        /// <summary>
        /// Elasticsearch connection configuration block.
        /// </summary>
        [Output("elasticsearchConnection")]
        public Output<Outputs.SnapshotRepositoryElasticsearchConnection?> ElasticsearchConnection { get; private set; } = null!;

        /// <summary>
        /// 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.
        /// </summary>
        [Output("fs")]
        public Output<Outputs.SnapshotRepositoryFs?> Fs { get; private set; } = null!;

        /// <summary>
        /// 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
        /// </summary>
        [Output("gcs")]
        public Output<Outputs.SnapshotRepositoryGcs?> Gcs { get; private set; } = null!;

        /// <summary>
        /// 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
        /// </summary>
        [Output("hdfs")]
        public Output<Outputs.SnapshotRepositoryHdfs?> Hdfs { get; private set; } = null!;

        /// <summary>
        /// Name of the snapshot repository to register or update.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// 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
        /// </summary>
        [Output("s3")]
        public Output<Outputs.SnapshotRepositoryS3?> S3 { get; private set; } = null!;

        /// <summary>
        /// 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.
        /// </summary>
        [Output("url")]
        public Output<Outputs.SnapshotRepositoryUrl?> Url { get; private set; } = null!;

        /// <summary>
        /// If true, the request verifies the repository is functional on all master and data nodes in the cluster.
        /// </summary>
        [Output("verify")]
        public Output<bool?> Verify { get; private set; } = null!;


        /// <summary>
        /// Create a SnapshotRepository resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public SnapshotRepository(string name, SnapshotRepositoryArgs? args = null, CustomResourceOptions? options = null)
            : base("elasticstack:index/snapshotRepository:SnapshotRepository", name, args ?? new SnapshotRepositoryArgs(), MakeResourceOptions(options, ""))
        {
        }

        private SnapshotRepository(string name, Input<string> id, SnapshotRepositoryState? state = null, CustomResourceOptions? options = null)
            : base("elasticstack:index/snapshotRepository:SnapshotRepository", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/zlepper",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing SnapshotRepository resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static SnapshotRepository Get(string name, Input<string> id, SnapshotRepositoryState? state = null, CustomResourceOptions? options = null)
        {
            return new SnapshotRepository(name, id, state, options);
        }
    }

    public sealed class SnapshotRepositoryArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// 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
        /// </summary>
        [Input("azure")]
        public Input<Inputs.SnapshotRepositoryAzureArgs>? Azure { get; set; }

        /// <summary>
        /// Elasticsearch connection configuration block.
        /// </summary>
        [Input("elasticsearchConnection")]
        public Input<Inputs.SnapshotRepositoryElasticsearchConnectionArgs>? ElasticsearchConnection { get; set; }

        /// <summary>
        /// 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.
        /// </summary>
        [Input("fs")]
        public Input<Inputs.SnapshotRepositoryFsArgs>? Fs { get; set; }

        /// <summary>
        /// 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
        /// </summary>
        [Input("gcs")]
        public Input<Inputs.SnapshotRepositoryGcsArgs>? Gcs { get; set; }

        /// <summary>
        /// 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
        /// </summary>
        [Input("hdfs")]
        public Input<Inputs.SnapshotRepositoryHdfsArgs>? Hdfs { get; set; }

        /// <summary>
        /// Name of the snapshot repository to register or update.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// 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
        /// </summary>
        [Input("s3")]
        public Input<Inputs.SnapshotRepositoryS3Args>? S3 { get; set; }

        /// <summary>
        /// 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.
        /// </summary>
        [Input("url")]
        public Input<Inputs.SnapshotRepositoryUrlArgs>? Url { get; set; }

        /// <summary>
        /// If true, the request verifies the repository is functional on all master and data nodes in the cluster.
        /// </summary>
        [Input("verify")]
        public Input<bool>? Verify { get; set; }

        public SnapshotRepositoryArgs()
        {
        }
        public static new SnapshotRepositoryArgs Empty => new SnapshotRepositoryArgs();
    }

    public sealed class SnapshotRepositoryState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// 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
        /// </summary>
        [Input("azure")]
        public Input<Inputs.SnapshotRepositoryAzureGetArgs>? Azure { get; set; }

        /// <summary>
        /// Elasticsearch connection configuration block.
        /// </summary>
        [Input("elasticsearchConnection")]
        public Input<Inputs.SnapshotRepositoryElasticsearchConnectionGetArgs>? ElasticsearchConnection { get; set; }

        /// <summary>
        /// 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.
        /// </summary>
        [Input("fs")]
        public Input<Inputs.SnapshotRepositoryFsGetArgs>? Fs { get; set; }

        /// <summary>
        /// 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
        /// </summary>
        [Input("gcs")]
        public Input<Inputs.SnapshotRepositoryGcsGetArgs>? Gcs { get; set; }

        /// <summary>
        /// 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
        /// </summary>
        [Input("hdfs")]
        public Input<Inputs.SnapshotRepositoryHdfsGetArgs>? Hdfs { get; set; }

        /// <summary>
        /// Name of the snapshot repository to register or update.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// 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
        /// </summary>
        [Input("s3")]
        public Input<Inputs.SnapshotRepositoryS3GetArgs>? S3 { get; set; }

        /// <summary>
        /// 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.
        /// </summary>
        [Input("url")]
        public Input<Inputs.SnapshotRepositoryUrlGetArgs>? Url { get; set; }

        /// <summary>
        /// If true, the request verifies the repository is functional on all master and data nodes in the cluster.
        /// </summary>
        [Input("verify")]
        public Input<bool>? Verify { get; set; }

        public SnapshotRepositoryState()
        {
        }
        public static new SnapshotRepositoryState Empty => new SnapshotRepositoryState();
    }
}
