<reponame>Dwonczykj/gember_deploy<gh_stars>0// *** 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 policy
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var demo = new Tencentcloud.Dayu.CcPolicyV2("demo", new Tencentcloud.Dayu.CcPolicyV2Args
    ///         {
    ///             Business = "bgpip",
    ///             CcBlackWhiteIps = 
    ///             {
    ///                 new Tencentcloud.Dayu.Inputs.CcPolicyV2CcBlackWhiteIpArgs
    ///                 {
    ///                     BlackWhiteIp = "1.2.3.4",
    ///                     Domain = "12.com",
    ///                     Protocol = "http",
    ///                     Type = "black",
    ///                 },
    ///             },
    ///             CcGeoIpPolicys = 
    ///             {
    ///                 new Tencentcloud.Dayu.Inputs.CcPolicyV2CcGeoIpPolicyArgs
    ///                 {
    ///                     Action = "drop",
    ///                     Domain = "12.com",
    ///                     Protocol = "http",
    ///                     RegionType = "china",
    ///                 },
    ///             },
    ///             CcPrecisionPolicys = 
    ///             {
    ///                 new Tencentcloud.Dayu.Inputs.CcPolicyV2CcPrecisionPolicyArgs
    ///                 {
    ///                     Domain = "1.com",
    ///                     Ip = "172.16.31.10",
    ///                     PolicyAction = "drop",
    ///                     Policys = 
    ///                     {
    ///                         new Tencentcloud.Dayu.Inputs.CcPolicyV2CcPrecisionPolicyPolicyArgs
    ///                         {
    ///                             FieldName = "cgi",
    ///                             FieldType = "value",
    ///                             Value = "12123.com",
    ///                             ValueOperator = "equal",
    ///                         },
    ///                     },
    ///                     Protocol = "http",
    ///                 },
    ///             },
    ///             CcPrecisionReqLimits = 
    ///             {
    ///                 new Tencentcloud.Dayu.Inputs.CcPolicyV2CcPrecisionReqLimitArgs
    ///                 {
    ///                     Domain = "11.com",
    ///                     Level = "loose",
    ///                     Policys = 
    ///                     {
    ///                         new Tencentcloud.Dayu.Inputs.CcPolicyV2CcPrecisionReqLimitPolicyArgs
    ///                         {
    ///                             Action = "alg",
    ///                             ExecuteDuration = 2,
    ///                             Mode = "equal",
    ///                             Period = 5,
    ///                             RequestNum = 12,
    ///                             Uri = "15.com",
    ///                         },
    ///                     },
    ///                     Protocol = "http",
    ///                 },
    ///             },
    ///             ResourceId = "bgpip-000004xf",
    ///             Thresholds = 
    ///             {
    ///                 new Tencentcloud.Dayu.Inputs.CcPolicyV2ThresholdArgs
    ///                 {
    ///                     Domain = "12.com",
    ///                     Threshold = 0,
    ///                 },
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Dayu/ccPolicyV2:CcPolicyV2")]
    public partial class CcPolicyV2 : Pulumi.CustomResource
    {
        /// <summary>
        /// Business of resource instance. bgpip indicates anti-anti-ip ip; bgp means exclusive package; bgp-multip means shared packet; net indicates anti-anti-ip pro version.
        /// </summary>
        [Output("business")]
        public Output<string> Business { get; private set; } = null!;

        /// <summary>
        /// Blacklist and whitelist.
        /// </summary>
        [Output("ccBlackWhiteIps")]
        public Output<ImmutableArray<Outputs.CcPolicyV2CcBlackWhiteIp>> CcBlackWhiteIps { get; private set; } = null!;

        /// <summary>
        /// Details of the CC region blocking policy list.
        /// </summary>
        [Output("ccGeoIpPolicys")]
        public Output<ImmutableArray<Outputs.CcPolicyV2CcGeoIpPolicy>> CcGeoIpPolicys { get; private set; } = null!;

        /// <summary>
        /// CC Precision Protection List.
        /// </summary>
        [Output("ccPrecisionPolicys")]
        public Output<ImmutableArray<Outputs.CcPolicyV2CcPrecisionPolicy>> CcPrecisionPolicys { get; private set; } = null!;

        /// <summary>
        /// CC frequency throttling policy.
        /// </summary>
        [Output("ccPrecisionReqLimits")]
        public Output<ImmutableArray<Outputs.CcPolicyV2CcPrecisionReqLimit>> CcPrecisionReqLimits { get; private set; } = null!;

        /// <summary>
        /// The ID of the resource instance.
        /// </summary>
        [Output("resourceId")]
        public Output<string> ResourceId { get; private set; } = null!;

        /// <summary>
        /// List of protection threshold configurations.
        /// </summary>
        [Output("thresholds")]
        public Output<ImmutableArray<Outputs.CcPolicyV2Threshold>> Thresholds { get; private set; } = null!;


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

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

    public sealed class CcPolicyV2Args : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Business of resource instance. bgpip indicates anti-anti-ip ip; bgp means exclusive package; bgp-multip means shared packet; net indicates anti-anti-ip pro version.
        /// </summary>
        [Input("business", required: true)]
        public Input<string> Business { get; set; } = null!;

        [Input("ccBlackWhiteIps")]
        private InputList<Inputs.CcPolicyV2CcBlackWhiteIpArgs>? _ccBlackWhiteIps;

        /// <summary>
        /// Blacklist and whitelist.
        /// </summary>
        public InputList<Inputs.CcPolicyV2CcBlackWhiteIpArgs> CcBlackWhiteIps
        {
            get => _ccBlackWhiteIps ?? (_ccBlackWhiteIps = new InputList<Inputs.CcPolicyV2CcBlackWhiteIpArgs>());
            set => _ccBlackWhiteIps = value;
        }

        [Input("ccGeoIpPolicys")]
        private InputList<Inputs.CcPolicyV2CcGeoIpPolicyArgs>? _ccGeoIpPolicys;

        /// <summary>
        /// Details of the CC region blocking policy list.
        /// </summary>
        public InputList<Inputs.CcPolicyV2CcGeoIpPolicyArgs> CcGeoIpPolicys
        {
            get => _ccGeoIpPolicys ?? (_ccGeoIpPolicys = new InputList<Inputs.CcPolicyV2CcGeoIpPolicyArgs>());
            set => _ccGeoIpPolicys = value;
        }

        [Input("ccPrecisionPolicys")]
        private InputList<Inputs.CcPolicyV2CcPrecisionPolicyArgs>? _ccPrecisionPolicys;

        /// <summary>
        /// CC Precision Protection List.
        /// </summary>
        public InputList<Inputs.CcPolicyV2CcPrecisionPolicyArgs> CcPrecisionPolicys
        {
            get => _ccPrecisionPolicys ?? (_ccPrecisionPolicys = new InputList<Inputs.CcPolicyV2CcPrecisionPolicyArgs>());
            set => _ccPrecisionPolicys = value;
        }

        [Input("ccPrecisionReqLimits")]
        private InputList<Inputs.CcPolicyV2CcPrecisionReqLimitArgs>? _ccPrecisionReqLimits;

        /// <summary>
        /// CC frequency throttling policy.
        /// </summary>
        public InputList<Inputs.CcPolicyV2CcPrecisionReqLimitArgs> CcPrecisionReqLimits
        {
            get => _ccPrecisionReqLimits ?? (_ccPrecisionReqLimits = new InputList<Inputs.CcPolicyV2CcPrecisionReqLimitArgs>());
            set => _ccPrecisionReqLimits = value;
        }

        /// <summary>
        /// The ID of the resource instance.
        /// </summary>
        [Input("resourceId", required: true)]
        public Input<string> ResourceId { get; set; } = null!;

        [Input("thresholds")]
        private InputList<Inputs.CcPolicyV2ThresholdArgs>? _thresholds;

        /// <summary>
        /// List of protection threshold configurations.
        /// </summary>
        public InputList<Inputs.CcPolicyV2ThresholdArgs> Thresholds
        {
            get => _thresholds ?? (_thresholds = new InputList<Inputs.CcPolicyV2ThresholdArgs>());
            set => _thresholds = value;
        }

        public CcPolicyV2Args()
        {
        }
    }

    public sealed class CcPolicyV2State : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Business of resource instance. bgpip indicates anti-anti-ip ip; bgp means exclusive package; bgp-multip means shared packet; net indicates anti-anti-ip pro version.
        /// </summary>
        [Input("business")]
        public Input<string>? Business { get; set; }

        [Input("ccBlackWhiteIps")]
        private InputList<Inputs.CcPolicyV2CcBlackWhiteIpGetArgs>? _ccBlackWhiteIps;

        /// <summary>
        /// Blacklist and whitelist.
        /// </summary>
        public InputList<Inputs.CcPolicyV2CcBlackWhiteIpGetArgs> CcBlackWhiteIps
        {
            get => _ccBlackWhiteIps ?? (_ccBlackWhiteIps = new InputList<Inputs.CcPolicyV2CcBlackWhiteIpGetArgs>());
            set => _ccBlackWhiteIps = value;
        }

        [Input("ccGeoIpPolicys")]
        private InputList<Inputs.CcPolicyV2CcGeoIpPolicyGetArgs>? _ccGeoIpPolicys;

        /// <summary>
        /// Details of the CC region blocking policy list.
        /// </summary>
        public InputList<Inputs.CcPolicyV2CcGeoIpPolicyGetArgs> CcGeoIpPolicys
        {
            get => _ccGeoIpPolicys ?? (_ccGeoIpPolicys = new InputList<Inputs.CcPolicyV2CcGeoIpPolicyGetArgs>());
            set => _ccGeoIpPolicys = value;
        }

        [Input("ccPrecisionPolicys")]
        private InputList<Inputs.CcPolicyV2CcPrecisionPolicyGetArgs>? _ccPrecisionPolicys;

        /// <summary>
        /// CC Precision Protection List.
        /// </summary>
        public InputList<Inputs.CcPolicyV2CcPrecisionPolicyGetArgs> CcPrecisionPolicys
        {
            get => _ccPrecisionPolicys ?? (_ccPrecisionPolicys = new InputList<Inputs.CcPolicyV2CcPrecisionPolicyGetArgs>());
            set => _ccPrecisionPolicys = value;
        }

        [Input("ccPrecisionReqLimits")]
        private InputList<Inputs.CcPolicyV2CcPrecisionReqLimitGetArgs>? _ccPrecisionReqLimits;

        /// <summary>
        /// CC frequency throttling policy.
        /// </summary>
        public InputList<Inputs.CcPolicyV2CcPrecisionReqLimitGetArgs> CcPrecisionReqLimits
        {
            get => _ccPrecisionReqLimits ?? (_ccPrecisionReqLimits = new InputList<Inputs.CcPolicyV2CcPrecisionReqLimitGetArgs>());
            set => _ccPrecisionReqLimits = value;
        }

        /// <summary>
        /// The ID of the resource instance.
        /// </summary>
        [Input("resourceId")]
        public Input<string>? ResourceId { get; set; }

        [Input("thresholds")]
        private InputList<Inputs.CcPolicyV2ThresholdGetArgs>? _thresholds;

        /// <summary>
        /// List of protection threshold configurations.
        /// </summary>
        public InputList<Inputs.CcPolicyV2ThresholdGetArgs> Thresholds
        {
            get => _thresholds ?? (_thresholds = new InputList<Inputs.CcPolicyV2ThresholdGetArgs>());
            set => _thresholds = value;
        }

        public CcPolicyV2State()
        {
        }
    }
}
