// *** 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.AliCloud.Sddp
{
    /// <summary>
    /// Provides a Data Security Center Data Limit resource.
    /// 
    /// For information about Data Security Center Data Limit and how to use it, see [What is Data Limit](https://www.alibabacloud.com/help/en/doc-detail/158987.html).
    /// 
    /// &gt; **NOTE:** Available in v1.159.0+.
    /// 
    /// ## Import
    /// 
    /// Data Security Center Data Limit can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:sddp/dataLimit:DataLimit example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:sddp/dataLimit:DataLimit")]
    public partial class DataLimit : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Whether to enable the log auditing feature. Valid values: `0`, `1`.
        /// </summary>
        [Output("auditStatus")]
        public Output<int> AuditStatus { get; private set; } = null!;

        /// <summary>
        /// The type of the database. Valid values: `MySQL`, `SQLServer`.
        /// </summary>
        [Output("engineType")]
        public Output<string?> EngineType { get; private set; } = null!;

        /// <summary>
        /// The lang.
        /// </summary>
        [Output("lang")]
        public Output<string?> Lang { get; private set; } = null!;

        /// <summary>
        /// The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: `180`, `30`, `365`, `90`. **NOTE:** The`log_store_day` is valid when the `audit_status` is `1`.
        /// </summary>
        [Output("logStoreDay")]
        public Output<int?> LogStoreDay { get; private set; } = null!;

        /// <summary>
        /// The ID of the data asset.
        /// </summary>
        [Output("parentId")]
        public Output<string?> ParentId { get; private set; } = null!;

        /// <summary>
        /// The password that is used to connect to the database.
        /// </summary>
        [Output("password")]
        public Output<string?> Password { get; private set; } = null!;

        /// <summary>
        /// The port that is used to connect to the database.
        /// </summary>
        [Output("port")]
        public Output<int?> Port { get; private set; } = null!;

        /// <summary>
        /// The type of the service to which the data asset belongs. Valid values: `MaxCompute`, `OSS`, `RDS`.
        /// </summary>
        [Output("resourceType")]
        public Output<string> ResourceType { get; private set; } = null!;

        /// <summary>
        /// The region ID of the data asset.
        /// </summary>
        [Output("serviceRegionId")]
        public Output<string?> ServiceRegionId { get; private set; } = null!;

        /// <summary>
        /// The name of the service to which the data asset belongs.
        /// </summary>
        [Output("userName")]
        public Output<string?> UserName { get; private set; } = null!;


        /// <summary>
        /// Create a DataLimit 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 DataLimit(string name, DataLimitArgs args, CustomResourceOptions? options = null)
            : base("alicloud:sddp/dataLimit:DataLimit", name, args ?? new DataLimitArgs(), MakeResourceOptions(options, ""))
        {
        }

        private DataLimit(string name, Input<string> id, DataLimitState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:sddp/dataLimit:DataLimit", 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/rhysmdnz/pulumi-alicloud",
            };
            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 DataLimit 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 DataLimit Get(string name, Input<string> id, DataLimitState? state = null, CustomResourceOptions? options = null)
        {
            return new DataLimit(name, id, state, options);
        }
    }

    public sealed class DataLimitArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Whether to enable the log auditing feature. Valid values: `0`, `1`.
        /// </summary>
        [Input("auditStatus")]
        public Input<int>? AuditStatus { get; set; }

        /// <summary>
        /// The type of the database. Valid values: `MySQL`, `SQLServer`.
        /// </summary>
        [Input("engineType")]
        public Input<string>? EngineType { get; set; }

        /// <summary>
        /// The lang.
        /// </summary>
        [Input("lang")]
        public Input<string>? Lang { get; set; }

        /// <summary>
        /// The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: `180`, `30`, `365`, `90`. **NOTE:** The`log_store_day` is valid when the `audit_status` is `1`.
        /// </summary>
        [Input("logStoreDay")]
        public Input<int>? LogStoreDay { get; set; }

        /// <summary>
        /// The ID of the data asset.
        /// </summary>
        [Input("parentId")]
        public Input<string>? ParentId { get; set; }

        /// <summary>
        /// The password that is used to connect to the database.
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

        /// <summary>
        /// The port that is used to connect to the database.
        /// </summary>
        [Input("port")]
        public Input<int>? Port { get; set; }

        /// <summary>
        /// The type of the service to which the data asset belongs. Valid values: `MaxCompute`, `OSS`, `RDS`.
        /// </summary>
        [Input("resourceType", required: true)]
        public Input<string> ResourceType { get; set; } = null!;

        /// <summary>
        /// The region ID of the data asset.
        /// </summary>
        [Input("serviceRegionId")]
        public Input<string>? ServiceRegionId { get; set; }

        /// <summary>
        /// The name of the service to which the data asset belongs.
        /// </summary>
        [Input("userName")]
        public Input<string>? UserName { get; set; }

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

    public sealed class DataLimitState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Whether to enable the log auditing feature. Valid values: `0`, `1`.
        /// </summary>
        [Input("auditStatus")]
        public Input<int>? AuditStatus { get; set; }

        /// <summary>
        /// The type of the database. Valid values: `MySQL`, `SQLServer`.
        /// </summary>
        [Input("engineType")]
        public Input<string>? EngineType { get; set; }

        /// <summary>
        /// The lang.
        /// </summary>
        [Input("lang")]
        public Input<string>? Lang { get; set; }

        /// <summary>
        /// The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: `180`, `30`, `365`, `90`. **NOTE:** The`log_store_day` is valid when the `audit_status` is `1`.
        /// </summary>
        [Input("logStoreDay")]
        public Input<int>? LogStoreDay { get; set; }

        /// <summary>
        /// The ID of the data asset.
        /// </summary>
        [Input("parentId")]
        public Input<string>? ParentId { get; set; }

        /// <summary>
        /// The password that is used to connect to the database.
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

        /// <summary>
        /// The port that is used to connect to the database.
        /// </summary>
        [Input("port")]
        public Input<int>? Port { get; set; }

        /// <summary>
        /// The type of the service to which the data asset belongs. Valid values: `MaxCompute`, `OSS`, `RDS`.
        /// </summary>
        [Input("resourceType")]
        public Input<string>? ResourceType { get; set; }

        /// <summary>
        /// The region ID of the data asset.
        /// </summary>
        [Input("serviceRegionId")]
        public Input<string>? ServiceRegionId { get; set; }

        /// <summary>
        /// The name of the service to which the data asset belongs.
        /// </summary>
        [Input("userName")]
        public Input<string>? UserName { get; set; }

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