<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.Teo
{
    /// <summary>
    /// Provides a resource to create a teo security_policy
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var securityPolicy = new Tencentcloud.Teo.SecurityPolicy("securityPolicy", new Tencentcloud.Teo.SecurityPolicyArgs
    ///         {
    ///             Config = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigArgs
    ///             {
    ///                 AclConfig = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigAclConfigArgs
    ///                 {
    ///                     Switch = "off",
    ///                 },
    ///                 BotConfig = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigBotConfigArgs
    ///                 {
    ///                     IntelligenceRule = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigBotConfigIntelligenceRuleArgs
    ///                     {
    ///                         Items = 
    ///                         {
    ///                             new Tencentcloud.Teo.Inputs.SecurityPolicyConfigBotConfigIntelligenceRuleItemArgs
    ///                             {
    ///                                 Action = "drop",
    ///                                 Label = "evil_bot",
    ///                             },
    ///                             new Tencentcloud.Teo.Inputs.SecurityPolicyConfigBotConfigIntelligenceRuleItemArgs
    ///                             {
    ///                                 Action = "alg",
    ///                                 Label = "suspect_bot",
    ///                             },
    ///                             new Tencentcloud.Teo.Inputs.SecurityPolicyConfigBotConfigIntelligenceRuleItemArgs
    ///                             {
    ///                                 Action = "monitor",
    ///                                 Label = "good_bot",
    ///                             },
    ///                             new Tencentcloud.Teo.Inputs.SecurityPolicyConfigBotConfigIntelligenceRuleItemArgs
    ///                             {
    ///                                 Action = "trans",
    ///                                 Label = "normal",
    ///                             },
    ///                         },
    ///                         Switch = "off",
    ///                     },
    ///                     ManagedRule = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigBotConfigManagedRuleArgs
    ///                     {
    ///                         Action = "monitor",
    ///                         AlgManagedIds = {},
    ///                         CapManagedIds = {},
    ///                         DropManagedIds = {},
    ///                         MonManagedIds = {},
    ///                         PageId = 0,
    ///                         PunishTime = 0,
    ///                         ResponseCode = 0,
    ///                         RuleId = 0,
    ///                         TransManagedIds = {},
    ///                     },
    ///                     PortraitRule = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigBotConfigPortraitRuleArgs
    ///                     {
    ///                         AlgManagedIds = {},
    ///                         CapManagedIds = {},
    ///                         DropManagedIds = {},
    ///                         MonManagedIds = {},
    ///                         RuleId = -1,
    ///                         Switch = "off",
    ///                     },
    ///                     Switch = "off",
    ///                 },
    ///                 DropPageConfig = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigDropPageConfigArgs
    ///                 {
    ///                     AclDropPageDetail = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigDropPageConfigAclDropPageDetailArgs
    ///                     {
    ///                         Name = "-",
    ///                         PageId = 0,
    ///                         StatusCode = 569,
    ///                         Type = "default",
    ///                     },
    ///                     Switch = "on",
    ///                     WafDropPageDetail = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigDropPageConfigWafDropPageDetailArgs
    ///                     {
    ///                         Name = "-",
    ///                         PageId = 0,
    ///                         StatusCode = 566,
    ///                         Type = "default",
    ///                     },
    ///                 },
    ///                 ExceptConfig = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigExceptConfigArgs
    ///                 {
    ///                     Switch = "on",
    ///                 },
    ///                 IpTableConfig = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigIpTableConfigArgs
    ///                 {
    ///                     Switch = "off",
    ///                 },
    ///                 RateLimitConfig = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigRateLimitConfigArgs
    ///                 {
    ///                     Intelligence = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigRateLimitConfigIntelligenceArgs
    ///                     {
    ///                         Action = "monitor",
    ///                         Switch = "off",
    ///                     },
    ///                     Switch = "on",
    ///                     Template = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigRateLimitConfigTemplateArgs
    ///                     {
    ///                         Detail = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigRateLimitConfigTemplateDetailArgs
    ///                         {
    ///                             Action = "alg",
    ///                             Id = 831807989,
    ///                             Mode = "sup_loose",
    ///                             Period = 1,
    ///                             PunishTime = 0,
    ///                             Threshold = 2000,
    ///                         },
    ///                         Mode = "sup_loose",
    ///                     },
    ///                 },
    ///                 SwitchConfig = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigSwitchConfigArgs
    ///                 {
    ///                     WebSwitch = "on",
    ///                 },
    ///                 WafConfig = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigWafConfigArgs
    ///                 {
    ///                     AiRule = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigWafConfigAiRuleArgs
    ///                     {
    ///                         Mode = "smart_status_close",
    ///                     },
    ///                     Level = "strict",
    ///                     Mode = "block",
    ///                     Switch = "on",
    ///                     WafRules = new Tencentcloud.Teo.Inputs.SecurityPolicyConfigWafConfigWafRulesArgs
    ///                     {
    ///                         BlockRuleIds = 
    ///                         {
    ///                             22,
    ///                             84214562,
    ///                             106246133,
    ///                             106246507,
    ///                             106246508,
    ///                             106246523,
    ///                             106246524,
    ///                             106246679,
    ///                             106247029,
    ///                             106247048,
    ///                             106247140,
    ///                             106247356,
    ///                             106247357,
    ///                             106247358,
    ///                             106247378,
    ///                             106247389,
    ///                             106247392,
    ///                             106247394,
    ///                             106247405,
    ///                             106247409,
    ///                             106247413,
    ///                             106247558,
    ///                             106247795,
    ///                             106247819,
    ///                             106248021,
    ///                         },
    ///                         ObserveRuleIds = {},
    ///                         Switch = "off",
    ///                     },
    ///                 },
    ///             },
    ///             Entity = "aaa.sfurnace.work",
    ///             ZoneId = "zone-2983wizgxqvm",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// teo security_policy can be imported using the zoneId#entity, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Teo/securityPolicy:SecurityPolicy security_policy zone-2983wizgxqvm#aaa.sfurnace.work
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Teo/securityPolicy:SecurityPolicy")]
    public partial class SecurityPolicy : Pulumi.CustomResource
    {
        /// <summary>
        /// Security policy configuration.
        /// </summary>
        [Output("config")]
        public Output<Outputs.SecurityPolicyConfig> Config { get; private set; } = null!;

        /// <summary>
        /// Subdomain.
        /// </summary>
        [Output("entity")]
        public Output<string> Entity { get; private set; } = null!;

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


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

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

    public sealed class SecurityPolicyArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Security policy configuration.
        /// </summary>
        [Input("config")]
        public Input<Inputs.SecurityPolicyConfigArgs>? Config { get; set; }

        /// <summary>
        /// Subdomain.
        /// </summary>
        [Input("entity", required: true)]
        public Input<string> Entity { get; set; } = null!;

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

        public SecurityPolicyArgs()
        {
        }
    }

    public sealed class SecurityPolicyState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Security policy configuration.
        /// </summary>
        [Input("config")]
        public Input<Inputs.SecurityPolicyConfigGetArgs>? Config { get; set; }

        /// <summary>
        /// Subdomain.
        /// </summary>
        [Input("entity")]
        public Input<string>? Entity { get; set; }

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

        public SecurityPolicyState()
        {
        }
    }
}
