// *** 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.Redis
{
    /// <summary>
    /// Provides a resource to create a redis param
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var param = new Tencentcloud.Redis.Param("param", new Tencentcloud.Redis.ParamArgs
    ///         {
    ///             InstanceId = "crs-c1nl9rpv",
    ///             InstanceParams = 
    ///             {
    ///                 { "cluster-node-timeout", "15000" },
    ///                 { "disable-command-list", "\"\"" },
    ///                 { "hash-max-ziplist-entries", "512" },
    ///                 { "hash-max-ziplist-value", "64" },
    ///                 { "hz", "10" },
    ///                 { "lazyfree-lazy-eviction", "yes" },
    ///                 { "lazyfree-lazy-expire", "yes" },
    ///                 { "lazyfree-lazy-server-del", "yes" },
    ///                 { "maxmemory-policy", "noeviction" },
    ///                 { "notify-keyspace-events", "\"\"" },
    ///                 { "proxy-slowlog-log-slower-than", "500" },
    ///                 { "replica-lazy-flush", "yes" },
    ///                 { "sentineauth", "no" },
    ///                 { "set-max-intset-entries", "512" },
    ///                 { "slowlog-log-slower-than", "10" },
    ///                 { "timeout", "31536000" },
    ///                 { "zset-max-ziplist-entries", "128" },
    ///                 { "zset-max-ziplist-value", "64" },
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// redis param can be imported using the instanceId, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Redis/param:Param param crs-c1nl9rpv
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Redis/param:Param")]
    public partial class Param : Pulumi.CustomResource
    {
        /// <summary>
        /// The ID of instance.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;

        /// <summary>
        /// A list of parameters modified by the instance.
        /// </summary>
        [Output("instanceParams")]
        public Output<ImmutableDictionary<string, object>> InstanceParams { get; private set; } = null!;


        /// <summary>
        /// Create a Param 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 Param(string name, ParamArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Redis/param:Param", name, args ?? new ParamArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Param(string name, Input<string> id, ParamState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Redis/param:Param", 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 Param 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 Param Get(string name, Input<string> id, ParamState? state = null, CustomResourceOptions? options = null)
        {
            return new Param(name, id, state, options);
        }
    }

    public sealed class ParamArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of instance.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        [Input("instanceParams", required: true)]
        private InputMap<object>? _instanceParams;

        /// <summary>
        /// A list of parameters modified by the instance.
        /// </summary>
        public InputMap<object> InstanceParams
        {
            get => _instanceParams ?? (_instanceParams = new InputMap<object>());
            set => _instanceParams = value;
        }

        public ParamArgs()
        {
        }
    }

    public sealed class ParamState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of instance.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        [Input("instanceParams")]
        private InputMap<object>? _instanceParams;

        /// <summary>
        /// A list of parameters modified by the instance.
        /// </summary>
        public InputMap<object> InstanceParams
        {
            get => _instanceParams ?? (_instanceParams = new InputMap<object>());
            set => _instanceParams = value;
        }

        public ParamState()
        {
        }
    }
}
