// *** 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;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.ApiGateway
{
    /// <summary>
    /// Provides a resource to create a apiGateway plugin
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Text.Json;
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var plugin = new Tencentcloud.ApiGateway.Plugin("plugin", new Tencentcloud.ApiGateway.PluginArgs
    ///         {
    ///             PluginName = "terraform-plugin-test",
    ///             PluginType = "IPControl",
    ///             PluginData = JsonSerializer.Serialize(new Dictionary&lt;string, object?&gt;
    ///             {
    ///                 { "type", "white_list" },
    ///                 { "blocks", @"1.1.1.1
    /// 2.2.2.2" },
    ///             }),
    ///             Description = "terraform test",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// apiGateway plugin can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:ApiGateway/plugin:Plugin plugin plugin_id
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:ApiGateway/plugin:Plugin")]
    public partial class Plugin : Pulumi.CustomResource
    {
        /// <summary>
        /// Description of plugin.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Statement to define plugin.
        /// </summary>
        [Output("pluginData")]
        public Output<string> PluginData { get; private set; } = null!;

        /// <summary>
        /// Name of the user define plugin. It must start with a letter and end with letter or number, the rest can contain letters, numbers and dashes(-). The length range is from 2 to 50.
        /// </summary>
        [Output("pluginName")]
        public Output<string> PluginName { get; private set; } = null!;

        /// <summary>
        /// Type of plugin. Now support IPControl, TrafficControl, Cors, CustomReq, CustomAuth, Routing, TrafficControlByParameter, CircuitBreaker, ProxyCache.
        /// </summary>
        [Output("pluginType")]
        public Output<string> PluginType { get; private set; } = null!;


        /// <summary>
        /// Create a Plugin 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 Plugin(string name, PluginArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:ApiGateway/plugin:Plugin", name, args ?? new PluginArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Plugin(string name, Input<string> id, PluginState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:ApiGateway/plugin:Plugin", 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/tencentcloudstack",
            };
            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 Plugin 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 Plugin Get(string name, Input<string> id, PluginState? state = null, CustomResourceOptions? options = null)
        {
            return new Plugin(name, id, state, options);
        }
    }

    public sealed class PluginArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description of plugin.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Statement to define plugin.
        /// </summary>
        [Input("pluginData", required: true)]
        public Input<string> PluginData { get; set; } = null!;

        /// <summary>
        /// Name of the user define plugin. It must start with a letter and end with letter or number, the rest can contain letters, numbers and dashes(-). The length range is from 2 to 50.
        /// </summary>
        [Input("pluginName", required: true)]
        public Input<string> PluginName { get; set; } = null!;

        /// <summary>
        /// Type of plugin. Now support IPControl, TrafficControl, Cors, CustomReq, CustomAuth, Routing, TrafficControlByParameter, CircuitBreaker, ProxyCache.
        /// </summary>
        [Input("pluginType", required: true)]
        public Input<string> PluginType { get; set; } = null!;

        public PluginArgs()
        {
        }
    }

    public sealed class PluginState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description of plugin.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Statement to define plugin.
        /// </summary>
        [Input("pluginData")]
        public Input<string>? PluginData { get; set; }

        /// <summary>
        /// Name of the user define plugin. It must start with a letter and end with letter or number, the rest can contain letters, numbers and dashes(-). The length range is from 2 to 50.
        /// </summary>
        [Input("pluginName")]
        public Input<string>? PluginName { get; set; }

        /// <summary>
        /// Type of plugin. Now support IPControl, TrafficControl, Cors, CustomReq, CustomAuth, Routing, TrafficControlByParameter, CircuitBreaker, ProxyCache.
        /// </summary>
        [Input("pluginType")]
        public Input<string>? PluginType { get; set; }

        public PluginState()
        {
        }
    }
}
