// *** 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.Teo
{
    /// <summary>
    /// Provides a resource to create a teo ddos_policy
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var ddosPolicy = new Tencentcloud.Teo.DdosPolicy("ddosPolicy", new Tencentcloud.Teo.DdosPolicyArgs
    ///         {
    ///             DdosRule = new Tencentcloud.Teo.Inputs.DdosPolicyDdosRuleArgs
    ///             {
    ///                 Acl = new Tencentcloud.Teo.Inputs.DdosPolicyDdosRuleAclArgs
    ///                 {
    ///                     Switch = "on",
    ///                 },
    ///                 AllowBlock = new Tencentcloud.Teo.Inputs.DdosPolicyDdosRuleAllowBlockArgs
    ///                 {
    ///                     Switch = "on",
    ///                 },
    ///                 AntiPly = new Tencentcloud.Teo.Inputs.DdosPolicyDdosRuleAntiPlyArgs
    ///                 {
    ///                     AbnormalConnectNum = 0,
    ///                     AbnormalSynNum = 0,
    ///                     AbnormalSynRatio = 0,
    ///                     ConnectTimeout = 0,
    ///                     DestinationConnectLimit = 0,
    ///                     DestinationCreateLimit = 0,
    ///                     DropIcmp = "off",
    ///                     DropOther = "off",
    ///                     DropTcp = "off",
    ///                     DropUdp = "off",
    ///                     EmptyConnectProtect = "off",
    ///                     SourceConnectLimit = 0,
    ///                     SourceCreateLimit = 0,
    ///                     UdpShard = "off",
    ///                 },
    ///                 GeoIp = new Tencentcloud.Teo.Inputs.DdosPolicyDdosRuleGeoIpArgs
    ///                 {
    ///                     RegionIds = {},
    ///                     Switch = "on",
    ///                 },
    ///                 PacketFilter = new Tencentcloud.Teo.Inputs.DdosPolicyDdosRulePacketFilterArgs
    ///                 {
    ///                     Switch = "on",
    ///                 },
    ///                 SpeedLimit = new Tencentcloud.Teo.Inputs.DdosPolicyDdosRuleSpeedLimitArgs
    ///                 {
    ///                     FluxLimit = "0 bps",
    ///                     PackageLimit = "0 pps",
    ///                 },
    ///                 StatusInfo = new Tencentcloud.Teo.Inputs.DdosPolicyDdosRuleStatusInfoArgs
    ///                 {
    ///                     PlyLevel = "middle",
    ///                 },
    ///                 Switch = "on",
    ///             },
    ///             PolicyId = 1278,
    ///             ZoneId = "zone-2983wizgxqvm",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// teo ddos_policy can be imported using the id#ddosPolicy_id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Teo/ddosPolicy:DdosPolicy ddos_policy zone-2a1u0y616jz6#11587
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Teo/ddosPolicy:DdosPolicy")]
    public partial class DdosPolicy : Pulumi.CustomResource
    {
        /// <summary>
        /// DDoS Configuration of the zone.
        /// </summary>
        [Output("ddosRule")]
        public Output<Outputs.DdosPolicyDdosRule> DdosRule { get; private set; } = null!;

        /// <summary>
        /// Policy ID.
        /// </summary>
        [Output("policyId")]
        public Output<int> PolicyId { get; private set; } = null!;

        /// <summary>
        /// Site ID.
        /// </summary>
        [Output("zoneId")]
        public Output<string> ZoneId { get; private set; } = null!;


        /// <summary>
        /// Create a DdosPolicy 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 DdosPolicy(string name, DdosPolicyArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Teo/ddosPolicy:DdosPolicy", name, args ?? new DdosPolicyArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class DdosPolicyArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// DDoS Configuration of the zone.
        /// </summary>
        [Input("ddosRule")]
        public Input<Inputs.DdosPolicyDdosRuleArgs>? DdosRule { get; set; }

        /// <summary>
        /// Policy ID.
        /// </summary>
        [Input("policyId", required: true)]
        public Input<int> PolicyId { get; set; } = null!;

        /// <summary>
        /// Site ID.
        /// </summary>
        [Input("zoneId", required: true)]
        public Input<string> ZoneId { get; set; } = null!;

        public DdosPolicyArgs()
        {
        }
    }

    public sealed class DdosPolicyState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// DDoS Configuration of the zone.
        /// </summary>
        [Input("ddosRule")]
        public Input<Inputs.DdosPolicyDdosRuleGetArgs>? DdosRule { get; set; }

        /// <summary>
        /// Policy ID.
        /// </summary>
        [Input("policyId")]
        public Input<int>? PolicyId { get; set; }

        /// <summary>
        /// Site ID.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

        public DdosPolicyState()
        {
        }
    }
}
