// *** 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.Tctest.Dayu
{
    [TctestResourceType("tctest:Dayu/cCPolicyV2:CCPolicyV2")]
    public partial class CCPolicyV2 : Pulumi.CustomResource
    {
        /// <summary>
        /// Bussiness 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("tctest:Dayu/cCPolicyV2:CCPolicyV2", name, args ?? new CCPolicyV2Args(), MakeResourceOptions(options, ""))
        {
        }

        private CCPolicyV2(string name, Input<string> id, CCPolicyV2State? state = null, CustomResourceOptions? options = null)
            : base("tctest:Dayu/cCPolicyV2:CCPolicyV2", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
            };
            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>
        /// Bussiness 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>
        /// Bussiness 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()
        {
        }
    }
}
