<gh_stars>0// *** 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>
    /// ## Import
    /// 
    /// ```sh
    ///  $ pulumi import elasticstack:index/ingestPipeline:IngestPipeline my_ingest_pipeline &lt;cluster_uuid&gt;/&lt;ingest pipeline name&gt;
    /// ```
    /// </summary>
    [ElasticstackResourceType("elasticstack:index/ingestPipeline:IngestPipeline")]
    public partial class IngestPipeline : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Description of the ingest pipeline.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

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

        /// <summary>
        /// Optional user metadata about the index template.
        /// </summary>
        [Output("metadata")]
        public Output<string?> Metadata { get; private set; } = null!;

        /// <summary>
        /// The name of the ingest pipeline.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline’s remaining processors. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/processors.html. Each record must be a valid JSON document
        /// </summary>
        [Output("onFailures")]
        public Output<ImmutableArray<string>> OnFailures { get; private set; } = null!;

        /// <summary>
        /// Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/processors.html. Each record must be a valid JSON document.
        /// </summary>
        [Output("processors")]
        public Output<ImmutableArray<string>> Processors { get; private set; } = null!;


        /// <summary>
        /// Create a IngestPipeline 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 IngestPipeline(string name, IngestPipelineArgs args, CustomResourceOptions? options = null)
            : base("elasticstack:index/ingestPipeline:IngestPipeline", name, args ?? new IngestPipelineArgs(), MakeResourceOptions(options, ""))
        {
        }

        private IngestPipeline(string name, Input<string> id, IngestPipelineState? state = null, CustomResourceOptions? options = null)
            : base("elasticstack:index/ingestPipeline:IngestPipeline", 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 IngestPipeline 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 IngestPipeline Get(string name, Input<string> id, IngestPipelineState? state = null, CustomResourceOptions? options = null)
        {
            return new IngestPipeline(name, id, state, options);
        }
    }

    public sealed class IngestPipelineArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description of the ingest pipeline.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

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

        /// <summary>
        /// Optional user metadata about the index template.
        /// </summary>
        [Input("metadata")]
        public Input<string>? Metadata { get; set; }

        /// <summary>
        /// The name of the ingest pipeline.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("onFailures")]
        private InputList<string>? _onFailures;

        /// <summary>
        /// Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline’s remaining processors. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/processors.html. Each record must be a valid JSON document
        /// </summary>
        public InputList<string> OnFailures
        {
            get => _onFailures ?? (_onFailures = new InputList<string>());
            set => _onFailures = value;
        }

        [Input("processors", required: true)]
        private InputList<string>? _processors;

        /// <summary>
        /// Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/processors.html. Each record must be a valid JSON document.
        /// </summary>
        public InputList<string> Processors
        {
            get => _processors ?? (_processors = new InputList<string>());
            set => _processors = value;
        }

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

    public sealed class IngestPipelineState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description of the ingest pipeline.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

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

        /// <summary>
        /// Optional user metadata about the index template.
        /// </summary>
        [Input("metadata")]
        public Input<string>? Metadata { get; set; }

        /// <summary>
        /// The name of the ingest pipeline.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("onFailures")]
        private InputList<string>? _onFailures;

        /// <summary>
        /// Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline’s remaining processors. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/processors.html. Each record must be a valid JSON document
        /// </summary>
        public InputList<string> OnFailures
        {
            get => _onFailures ?? (_onFailures = new InputList<string>());
            set => _onFailures = value;
        }

        [Input("processors")]
        private InputList<string>? _processors;

        /// <summary>
        /// Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/processors.html. Each record must be a valid JSON document.
        /// </summary>
        public InputList<string> Processors
        {
            get => _processors ?? (_processors = new InputList<string>());
            set => _processors = value;
        }

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