<filename>sdk/dotnet/Tencentcloud/Mysql/LocalBinlogConfig.cs// *** 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.Mysql
{
    /// <summary>
    /// Provides a resource to create a mysql local_binlog_config
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var localBinlogConfig = new Tencentcloud.Mysql.LocalBinlogConfig("localBinlogConfig", new Tencentcloud.Mysql.LocalBinlogConfigArgs
    ///         {
    ///             InstanceId = "cdb-fitq5t9h",
    ///             MaxUsage = 50,
    ///             SaveHours = 140,
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// mysql local_binlog_config can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Mysql/localBinlogConfig:LocalBinlogConfig local_binlog_config instance_id
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Mysql/localBinlogConfig:LocalBinlogConfig")]
    public partial class LocalBinlogConfig : Pulumi.CustomResource
    {
        /// <summary>
        /// Instance ID in the format of cdb-c1nl9rpv. It is the same as the instance ID displayed in the TencentDB console.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;

        /// <summary>
        /// Space utilization of local binlog. Value range: [30,50].
        /// </summary>
        [Output("maxUsage")]
        public Output<int> MaxUsage { get; private set; } = null!;

        /// <summary>
        /// Retention period of local binlog. Valid range: 72-168 hours. When there is disaster recovery instance, the valid range will be 120-168 hours.
        /// </summary>
        [Output("saveHours")]
        public Output<int> SaveHours { get; private set; } = null!;


        /// <summary>
        /// Create a LocalBinlogConfig 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 LocalBinlogConfig(string name, LocalBinlogConfigArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Mysql/localBinlogConfig:LocalBinlogConfig", name, args ?? new LocalBinlogConfigArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class LocalBinlogConfigArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Instance ID in the format of cdb-c1nl9rpv. It is the same as the instance ID displayed in the TencentDB console.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        /// <summary>
        /// Space utilization of local binlog. Value range: [30,50].
        /// </summary>
        [Input("maxUsage", required: true)]
        public Input<int> MaxUsage { get; set; } = null!;

        /// <summary>
        /// Retention period of local binlog. Valid range: 72-168 hours. When there is disaster recovery instance, the valid range will be 120-168 hours.
        /// </summary>
        [Input("saveHours", required: true)]
        public Input<int> SaveHours { get; set; } = null!;

        public LocalBinlogConfigArgs()
        {
        }
    }

    public sealed class LocalBinlogConfigState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Instance ID in the format of cdb-c1nl9rpv. It is the same as the instance ID displayed in the TencentDB console.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        /// <summary>
        /// Space utilization of local binlog. Value range: [30,50].
        /// </summary>
        [Input("maxUsage")]
        public Input<int>? MaxUsage { get; set; }

        /// <summary>
        /// Retention period of local binlog. Valid range: 72-168 hours. When there is disaster recovery instance, the valid range will be 120-168 hours.
        /// </summary>
        [Input("saveHours")]
        public Input<int>? SaveHours { get; set; }

        public LocalBinlogConfigState()
        {
        }
    }
}
