// *** 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.Dayu
{
    /// <summary>
    /// Use this resource to create a dayu CC self-define https policy
    /// 
    /// &gt; **NOTE:** creating CC self-define https policy need a valid resource `tencentcloud.Dayu.L7Rule`; The resource only support Anti-DDoS of resource type `bgpip`.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var testPolicy = new Tencentcloud.Dayu.CcHttpsPolicy("testPolicy", new Tencentcloud.Dayu.CcHttpsPolicyArgs
    ///         {
    ///             ResourceType = tencentcloud_dayu_l7_rule.Test_rule.Resource_type,
    ///             ResourceId = tencentcloud_dayu_l7_rule.Test_rule.Resource_id,
    ///             RuleId = tencentcloud_dayu_l7_rule.Test_rule.Rule_id,
    ///             Domain = tencentcloud_dayu_l7_rule.Test_rule.Domain,
    ///             Action = "drop",
    ///             Switch = true,
    ///             RuleLists = 
    ///             {
    ///                 new Tencentcloud.Dayu.Inputs.CcHttpsPolicyRuleListArgs
    ///                 {
    ///                     Skey = "cgi",
    ///                     Operator = "include",
    ///                     Value = "123",
    ///                 },
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Dayu/ccHttpsPolicy:CcHttpsPolicy")]
    public partial class CcHttpsPolicy : Pulumi.CustomResource
    {
        /// <summary>
        /// Action mode. Valid values are `alg` and `drop`.
        /// </summary>
        [Output("action")]
        public Output<string> Action { get; private set; } = null!;

        /// <summary>
        /// Create time of the CC self-define https policy.
        /// </summary>
        [Output("createTime")]
        public Output<string> CreateTime { get; private set; } = null!;

        /// <summary>
        /// Domain that the CC self-define https policy works for, only valid when `protocol` is `https`.
        /// </summary>
        [Output("domain")]
        public Output<string> Domain { get; private set; } = null!;

        /// <summary>
        /// Ip of the CC self-define https policy.
        /// </summary>
        [Output("ipLists")]
        public Output<ImmutableArray<string>> IpLists { get; private set; } = null!;

        /// <summary>
        /// Name of the CC self-define https policy. Length should between 1 and 20.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Id of the CC self-define https policy.
        /// </summary>
        [Output("policyId")]
        public Output<string> PolicyId { get; private set; } = null!;

        /// <summary>
        /// ID of the resource that the CC self-define https policy works for.
        /// </summary>
        [Output("resourceId")]
        public Output<string> ResourceId { get; private set; } = null!;

        /// <summary>
        /// Type of the resource that the CC self-define https policy works for, valid value is `bgpip`.
        /// </summary>
        [Output("resourceType")]
        public Output<string> ResourceType { get; private set; } = null!;

        /// <summary>
        /// Rule id of the domain that the CC self-define https policy works for, only valid when `protocol` is `https`.
        /// </summary>
        [Output("ruleId")]
        public Output<string> RuleId { get; private set; } = null!;

        /// <summary>
        /// Rule list of the CC self-define https policy.
        /// </summary>
        [Output("ruleLists")]
        public Output<ImmutableArray<Outputs.CcHttpsPolicyRuleList>> RuleLists { get; private set; } = null!;

        /// <summary>
        /// Indicate the CC self-define https policy takes effect or not.
        /// </summary>
        [Output("switch")]
        public Output<bool?> Switch { get; private set; } = null!;


        /// <summary>
        /// Create a CcHttpsPolicy 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 CcHttpsPolicy(string name, CcHttpsPolicyArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Dayu/ccHttpsPolicy:CcHttpsPolicy", name, args ?? new CcHttpsPolicyArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class CcHttpsPolicyArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Action mode. Valid values are `alg` and `drop`.
        /// </summary>
        [Input("action")]
        public Input<string>? Action { get; set; }

        /// <summary>
        /// Domain that the CC self-define https policy works for, only valid when `protocol` is `https`.
        /// </summary>
        [Input("domain", required: true)]
        public Input<string> Domain { get; set; } = null!;

        /// <summary>
        /// Name of the CC self-define https policy. Length should between 1 and 20.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// ID of the resource that the CC self-define https policy works for.
        /// </summary>
        [Input("resourceId", required: true)]
        public Input<string> ResourceId { get; set; } = null!;

        /// <summary>
        /// Type of the resource that the CC self-define https policy works for, valid value is `bgpip`.
        /// </summary>
        [Input("resourceType", required: true)]
        public Input<string> ResourceType { get; set; } = null!;

        /// <summary>
        /// Rule id of the domain that the CC self-define https policy works for, only valid when `protocol` is `https`.
        /// </summary>
        [Input("ruleId", required: true)]
        public Input<string> RuleId { get; set; } = null!;

        [Input("ruleLists", required: true)]
        private InputList<Inputs.CcHttpsPolicyRuleListArgs>? _ruleLists;

        /// <summary>
        /// Rule list of the CC self-define https policy.
        /// </summary>
        public InputList<Inputs.CcHttpsPolicyRuleListArgs> RuleLists
        {
            get => _ruleLists ?? (_ruleLists = new InputList<Inputs.CcHttpsPolicyRuleListArgs>());
            set => _ruleLists = value;
        }

        /// <summary>
        /// Indicate the CC self-define https policy takes effect or not.
        /// </summary>
        [Input("switch")]
        public Input<bool>? Switch { get; set; }

        public CcHttpsPolicyArgs()
        {
        }
    }

    public sealed class CcHttpsPolicyState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Action mode. Valid values are `alg` and `drop`.
        /// </summary>
        [Input("action")]
        public Input<string>? Action { get; set; }

        /// <summary>
        /// Create time of the CC self-define https policy.
        /// </summary>
        [Input("createTime")]
        public Input<string>? CreateTime { get; set; }

        /// <summary>
        /// Domain that the CC self-define https policy works for, only valid when `protocol` is `https`.
        /// </summary>
        [Input("domain")]
        public Input<string>? Domain { get; set; }

        [Input("ipLists")]
        private InputList<string>? _ipLists;

        /// <summary>
        /// Ip of the CC self-define https policy.
        /// </summary>
        public InputList<string> IpLists
        {
            get => _ipLists ?? (_ipLists = new InputList<string>());
            set => _ipLists = value;
        }

        /// <summary>
        /// Name of the CC self-define https policy. Length should between 1 and 20.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Id of the CC self-define https policy.
        /// </summary>
        [Input("policyId")]
        public Input<string>? PolicyId { get; set; }

        /// <summary>
        /// ID of the resource that the CC self-define https policy works for.
        /// </summary>
        [Input("resourceId")]
        public Input<string>? ResourceId { get; set; }

        /// <summary>
        /// Type of the resource that the CC self-define https policy works for, valid value is `bgpip`.
        /// </summary>
        [Input("resourceType")]
        public Input<string>? ResourceType { get; set; }

        /// <summary>
        /// Rule id of the domain that the CC self-define https policy works for, only valid when `protocol` is `https`.
        /// </summary>
        [Input("ruleId")]
        public Input<string>? RuleId { get; set; }

        [Input("ruleLists")]
        private InputList<Inputs.CcHttpsPolicyRuleListGetArgs>? _ruleLists;

        /// <summary>
        /// Rule list of the CC self-define https policy.
        /// </summary>
        public InputList<Inputs.CcHttpsPolicyRuleListGetArgs> RuleLists
        {
            get => _ruleLists ?? (_ruleLists = new InputList<Inputs.CcHttpsPolicyRuleListGetArgs>());
            set => _ruleLists = value;
        }

        /// <summary>
        /// Indicate the CC self-define https policy takes effect or not.
        /// </summary>
        [Input("switch")]
        public Input<bool>? Switch { get; set; }

        public CcHttpsPolicyState()
        {
        }
    }
}
