<reponame>Kagashino/pulumi-tctest// *** 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/ddosPolicyV2:DdosPolicyV2")]
    public partial class DdosPolicyV2 : Pulumi.CustomResource
    {
        /// <summary>
        /// Port ACL policy for DDoS protection.
        /// </summary>
        [Output("acls")]
        public Output<ImmutableArray<Outputs.DdosPolicyV2Acl>> Acls { get; private set; } = null!;

        /// <summary>
        /// DDoS-protected IP blacklist and whitelist.
        /// </summary>
        [Output("blackWhiteIps")]
        public Output<ImmutableArray<Outputs.DdosPolicyV2BlackWhiteIp>> BlackWhiteIps { get; private set; } = null!;

        /// <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>
        /// AI protection switch, take the value [`on`, `off`].
        /// </summary>
        [Output("ddosAi")]
        public Output<string?> DdosAi { get; private set; } = null!;

        /// <summary>
        /// DDoS connection suppression options.
        /// </summary>
        [Output("ddosConnectLimit")]
        public Output<Outputs.DdosPolicyV2DdosConnectLimit?> DdosConnectLimit { get; private set; } = null!;

        /// <summary>
        /// DDoS-protected area block configuration.
        /// </summary>
        [Output("ddosGeoIpBlockConfigs")]
        public Output<ImmutableArray<Outputs.DdosPolicyV2DdosGeoIpBlockConfig>> DdosGeoIpBlockConfigs { get; private set; } = null!;

        /// <summary>
        /// Protection class, value [`low`, `middle`, `high`].
        /// </summary>
        [Output("ddosLevel")]
        public Output<string?> DdosLevel { get; private set; } = null!;

        /// <summary>
        /// Access speed limit configuration for DDoS protection.
        /// </summary>
        [Output("ddosSpeedLimitConfigs")]
        public Output<ImmutableArray<Outputs.DdosPolicyV2DdosSpeedLimitConfig>> DdosSpeedLimitConfigs { get; private set; } = null!;

        /// <summary>
        /// DDoS cleaning threshold, value[0, 60, 80, 100, 150, 200, 250, 300, 400, 500, 700, 1000]; When the value is set to 0, it
        /// means that the default value is adopted.
        /// </summary>
        [Output("ddosThreshold")]
        public Output<int?> DdosThreshold { get; private set; } = null!;

        /// <summary>
        /// Feature filtering rules for DDoS protection.
        /// </summary>
        [Output("packetFilters")]
        public Output<ImmutableArray<Outputs.DdosPolicyV2PacketFilter>> PacketFilters { get; private set; } = null!;

        /// <summary>
        /// Protocol block configuration for DDoS protection.
        /// </summary>
        [Output("protocolBlockConfigs")]
        public Output<ImmutableArray<Outputs.DdosPolicyV2ProtocolBlockConfig>> ProtocolBlockConfigs { get; private set; } = null!;

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


        /// <summary>
        /// Create a DdosPolicyV2 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 DdosPolicyV2(string name, DdosPolicyV2Args args, CustomResourceOptions? options = null)
            : base("tctest:Dayu/ddosPolicyV2:DdosPolicyV2", name, args ?? new DdosPolicyV2Args(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class DdosPolicyV2Args : Pulumi.ResourceArgs
    {
        [Input("acls")]
        private InputList<Inputs.DdosPolicyV2AclArgs>? _acls;

        /// <summary>
        /// Port ACL policy for DDoS protection.
        /// </summary>
        public InputList<Inputs.DdosPolicyV2AclArgs> Acls
        {
            get => _acls ?? (_acls = new InputList<Inputs.DdosPolicyV2AclArgs>());
            set => _acls = value;
        }

        [Input("blackWhiteIps")]
        private InputList<Inputs.DdosPolicyV2BlackWhiteIpArgs>? _blackWhiteIps;

        /// <summary>
        /// DDoS-protected IP blacklist and whitelist.
        /// </summary>
        public InputList<Inputs.DdosPolicyV2BlackWhiteIpArgs> BlackWhiteIps
        {
            get => _blackWhiteIps ?? (_blackWhiteIps = new InputList<Inputs.DdosPolicyV2BlackWhiteIpArgs>());
            set => _blackWhiteIps = value;
        }

        /// <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; }

        /// <summary>
        /// AI protection switch, take the value [`on`, `off`].
        /// </summary>
        [Input("ddosAi")]
        public Input<string>? DdosAi { get; set; }

        /// <summary>
        /// DDoS connection suppression options.
        /// </summary>
        [Input("ddosConnectLimit")]
        public Input<Inputs.DdosPolicyV2DdosConnectLimitArgs>? DdosConnectLimit { get; set; }

        [Input("ddosGeoIpBlockConfigs")]
        private InputList<Inputs.DdosPolicyV2DdosGeoIpBlockConfigArgs>? _ddosGeoIpBlockConfigs;

        /// <summary>
        /// DDoS-protected area block configuration.
        /// </summary>
        public InputList<Inputs.DdosPolicyV2DdosGeoIpBlockConfigArgs> DdosGeoIpBlockConfigs
        {
            get => _ddosGeoIpBlockConfigs ?? (_ddosGeoIpBlockConfigs = new InputList<Inputs.DdosPolicyV2DdosGeoIpBlockConfigArgs>());
            set => _ddosGeoIpBlockConfigs = value;
        }

        /// <summary>
        /// Protection class, value [`low`, `middle`, `high`].
        /// </summary>
        [Input("ddosLevel")]
        public Input<string>? DdosLevel { get; set; }

        [Input("ddosSpeedLimitConfigs")]
        private InputList<Inputs.DdosPolicyV2DdosSpeedLimitConfigArgs>? _ddosSpeedLimitConfigs;

        /// <summary>
        /// Access speed limit configuration for DDoS protection.
        /// </summary>
        public InputList<Inputs.DdosPolicyV2DdosSpeedLimitConfigArgs> DdosSpeedLimitConfigs
        {
            get => _ddosSpeedLimitConfigs ?? (_ddosSpeedLimitConfigs = new InputList<Inputs.DdosPolicyV2DdosSpeedLimitConfigArgs>());
            set => _ddosSpeedLimitConfigs = value;
        }

        /// <summary>
        /// DDoS cleaning threshold, value[0, 60, 80, 100, 150, 200, 250, 300, 400, 500, 700, 1000]; When the value is set to 0, it
        /// means that the default value is adopted.
        /// </summary>
        [Input("ddosThreshold")]
        public Input<int>? DdosThreshold { get; set; }

        [Input("packetFilters")]
        private InputList<Inputs.DdosPolicyV2PacketFilterArgs>? _packetFilters;

        /// <summary>
        /// Feature filtering rules for DDoS protection.
        /// </summary>
        public InputList<Inputs.DdosPolicyV2PacketFilterArgs> PacketFilters
        {
            get => _packetFilters ?? (_packetFilters = new InputList<Inputs.DdosPolicyV2PacketFilterArgs>());
            set => _packetFilters = value;
        }

        [Input("protocolBlockConfigs")]
        private InputList<Inputs.DdosPolicyV2ProtocolBlockConfigArgs>? _protocolBlockConfigs;

        /// <summary>
        /// Protocol block configuration for DDoS protection.
        /// </summary>
        public InputList<Inputs.DdosPolicyV2ProtocolBlockConfigArgs> ProtocolBlockConfigs
        {
            get => _protocolBlockConfigs ?? (_protocolBlockConfigs = new InputList<Inputs.DdosPolicyV2ProtocolBlockConfigArgs>());
            set => _protocolBlockConfigs = value;
        }

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

        public DdosPolicyV2Args()
        {
        }
    }

    public sealed class DdosPolicyV2State : Pulumi.ResourceArgs
    {
        [Input("acls")]
        private InputList<Inputs.DdosPolicyV2AclGetArgs>? _acls;

        /// <summary>
        /// Port ACL policy for DDoS protection.
        /// </summary>
        public InputList<Inputs.DdosPolicyV2AclGetArgs> Acls
        {
            get => _acls ?? (_acls = new InputList<Inputs.DdosPolicyV2AclGetArgs>());
            set => _acls = value;
        }

        [Input("blackWhiteIps")]
        private InputList<Inputs.DdosPolicyV2BlackWhiteIpGetArgs>? _blackWhiteIps;

        /// <summary>
        /// DDoS-protected IP blacklist and whitelist.
        /// </summary>
        public InputList<Inputs.DdosPolicyV2BlackWhiteIpGetArgs> BlackWhiteIps
        {
            get => _blackWhiteIps ?? (_blackWhiteIps = new InputList<Inputs.DdosPolicyV2BlackWhiteIpGetArgs>());
            set => _blackWhiteIps = value;
        }

        /// <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; }

        /// <summary>
        /// AI protection switch, take the value [`on`, `off`].
        /// </summary>
        [Input("ddosAi")]
        public Input<string>? DdosAi { get; set; }

        /// <summary>
        /// DDoS connection suppression options.
        /// </summary>
        [Input("ddosConnectLimit")]
        public Input<Inputs.DdosPolicyV2DdosConnectLimitGetArgs>? DdosConnectLimit { get; set; }

        [Input("ddosGeoIpBlockConfigs")]
        private InputList<Inputs.DdosPolicyV2DdosGeoIpBlockConfigGetArgs>? _ddosGeoIpBlockConfigs;

        /// <summary>
        /// DDoS-protected area block configuration.
        /// </summary>
        public InputList<Inputs.DdosPolicyV2DdosGeoIpBlockConfigGetArgs> DdosGeoIpBlockConfigs
        {
            get => _ddosGeoIpBlockConfigs ?? (_ddosGeoIpBlockConfigs = new InputList<Inputs.DdosPolicyV2DdosGeoIpBlockConfigGetArgs>());
            set => _ddosGeoIpBlockConfigs = value;
        }

        /// <summary>
        /// Protection class, value [`low`, `middle`, `high`].
        /// </summary>
        [Input("ddosLevel")]
        public Input<string>? DdosLevel { get; set; }

        [Input("ddosSpeedLimitConfigs")]
        private InputList<Inputs.DdosPolicyV2DdosSpeedLimitConfigGetArgs>? _ddosSpeedLimitConfigs;

        /// <summary>
        /// Access speed limit configuration for DDoS protection.
        /// </summary>
        public InputList<Inputs.DdosPolicyV2DdosSpeedLimitConfigGetArgs> DdosSpeedLimitConfigs
        {
            get => _ddosSpeedLimitConfigs ?? (_ddosSpeedLimitConfigs = new InputList<Inputs.DdosPolicyV2DdosSpeedLimitConfigGetArgs>());
            set => _ddosSpeedLimitConfigs = value;
        }

        /// <summary>
        /// DDoS cleaning threshold, value[0, 60, 80, 100, 150, 200, 250, 300, 400, 500, 700, 1000]; When the value is set to 0, it
        /// means that the default value is adopted.
        /// </summary>
        [Input("ddosThreshold")]
        public Input<int>? DdosThreshold { get; set; }

        [Input("packetFilters")]
        private InputList<Inputs.DdosPolicyV2PacketFilterGetArgs>? _packetFilters;

        /// <summary>
        /// Feature filtering rules for DDoS protection.
        /// </summary>
        public InputList<Inputs.DdosPolicyV2PacketFilterGetArgs> PacketFilters
        {
            get => _packetFilters ?? (_packetFilters = new InputList<Inputs.DdosPolicyV2PacketFilterGetArgs>());
            set => _packetFilters = value;
        }

        [Input("protocolBlockConfigs")]
        private InputList<Inputs.DdosPolicyV2ProtocolBlockConfigGetArgs>? _protocolBlockConfigs;

        /// <summary>
        /// Protocol block configuration for DDoS protection.
        /// </summary>
        public InputList<Inputs.DdosPolicyV2ProtocolBlockConfigGetArgs> ProtocolBlockConfigs
        {
            get => _protocolBlockConfigs ?? (_protocolBlockConfigs = new InputList<Inputs.DdosPolicyV2ProtocolBlockConfigGetArgs>());
            set => _protocolBlockConfigs = value;
        }

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

        public DdosPolicyV2State()
        {
        }
    }
}
