<filename>sdk/dotnet/Waf/Instance.cs// *** 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.AliCloud.Waf
{
    /// <summary>
    /// Provides a WAF Instance resource to create instance in the Web Application Firewall.
    /// 
    /// For information about WAF and how to use it, see [What is Alibaba Cloud WAF](https://www.alibabacloud.com/help/doc-detail/28517.htm).
    /// 
    /// &gt; **NOTE:** Available in 1.83.0+ .
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var @default = new AliCloud.Waf.Instance("default", new()
    ///     {
    ///         BigScreen = "0",
    ///         ExclusiveIpPackage = "1",
    ///         ExtBandwidth = "50",
    ///         ExtDomainPackage = "1",
    ///         LogStorage = "3",
    ///         LogTime = "180",
    ///         PackageCode = "version_3",
    ///         Period = 1,
    ///         PrefessionalService = "false",
    ///         ResourceGroupId = "rs-abc12345",
    ///         SubscriptionType = "Subscription",
    ///         WafLog = "false",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// WAF instance can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:waf/instance:Instance default waf-cn-132435
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:waf/instance:Instance")]
    public partial class Instance : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Specify whether big screen is supported. Valid values: ["0", "1"]. "0" for false and "1" for true.
        /// </summary>
        [Output("bigScreen")]
        public Output<string> BigScreen { get; private set; } = null!;

        /// <summary>
        /// Specify the number of exclusive WAF IP addresses.
        /// </summary>
        [Output("exclusiveIpPackage")]
        public Output<string> ExclusiveIpPackage { get; private set; } = null!;

        /// <summary>
        /// The extra bandwidth. Unit: Mbit/s.
        /// </summary>
        [Output("extBandwidth")]
        public Output<string> ExtBandwidth { get; private set; } = null!;

        /// <summary>
        /// The number of extra domains.
        /// </summary>
        [Output("extDomainPackage")]
        public Output<string> ExtDomainPackage { get; private set; } = null!;

        /// <summary>
        /// Log storage size. Unit: T. Valid values: [3, 5, 10, 20, 50].
        /// </summary>
        [Output("logStorage")]
        public Output<string> LogStorage { get; private set; } = null!;

        /// <summary>
        /// Log storage period. Unit: day. Valid values: [180, 360].
        /// </summary>
        [Output("logTime")]
        public Output<string> LogTime { get; private set; } = null!;

        /// <summary>
        /// Type of configuration change. Valid value: Upgrade.
        /// </summary>
        [Output("modifyType")]
        public Output<string?> ModifyType { get; private set; } = null!;

        /// <summary>
        /// Subscription plan:
        /// * China site customers can purchase the following versions of China Mainland region, valid values: ["version_3", "version_4", "version_5"].
        /// * China site customers can purchase the following versions of International region, valid values: ["version_pro_asia", "version_business_asia", "version_enterprise_asia"]
        /// * International site customers can purchase the following versions of China Mainland region: ["version_pro_china", "version_business_china", "version_enterprise_china"]
        /// * International site customers can purchase the following versions of International region: ["version_pro", "version_business", "version_enterprise"].
        /// </summary>
        [Output("packageCode")]
        public Output<string> PackageCode { get; private set; } = null!;

        /// <summary>
        /// Service time of Web Application Firewall.
        /// </summary>
        [Output("period")]
        public Output<int?> Period { get; private set; } = null!;

        /// <summary>
        /// Specify whether professional service is supported. Valid values: ["true", "false"]
        /// </summary>
        [Output("prefessionalService")]
        public Output<string> PrefessionalService { get; private set; } = null!;

        /// <summary>
        /// The instance region ID.
        /// </summary>
        [Output("region")]
        public Output<string?> Region { get; private set; } = null!;

        /// <summary>
        /// Renewal period of WAF service. Unit: month
        /// </summary>
        [Output("renewPeriod")]
        public Output<int?> RenewPeriod { get; private set; } = null!;

        /// <summary>
        /// Renewal status of WAF service. Valid values: 
        /// * AutoRenewal: The service time of WAF is renewed automatically.
        /// * ManualRenewal (default): The service time of WAF is renewed manually.Specifies whether to configure a Layer-7 proxy, such as Anti-DDoS Pro or CDN, to filter the inbound traffic before it is forwarded to WAF. Valid values: "On" and "Off". Default to "Off".
        /// </summary>
        [Output("renewalStatus")]
        public Output<string?> RenewalStatus { get; private set; } = null!;

        /// <summary>
        /// The resource group ID.
        /// </summary>
        [Output("resourceGroupId")]
        public Output<string?> ResourceGroupId { get; private set; } = null!;

        /// <summary>
        /// The status of the instance.
        /// </summary>
        [Output("status")]
        public Output<int> Status { get; private set; } = null!;

        /// <summary>
        /// Subscription of WAF service. Valid values: ["Subscription", "PayAsYouGo"].
        /// </summary>
        [Output("subscriptionType")]
        public Output<string> SubscriptionType { get; private set; } = null!;

        /// <summary>
        /// Specify whether Log service is supported. Valid values: ["true", "false"]
        /// </summary>
        [Output("wafLog")]
        public Output<string> WafLog { get; private set; } = null!;


        /// <summary>
        /// Create a Instance 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 Instance(string name, InstanceArgs args, CustomResourceOptions? options = null)
            : base("alicloud:waf/instance:Instance", name, args ?? new InstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Instance(string name, Input<string> id, InstanceState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:waf/instance:Instance", 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/rhysmdnz/pulumi-alicloud",
            };
            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 Instance 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 Instance Get(string name, Input<string> id, InstanceState? state = null, CustomResourceOptions? options = null)
        {
            return new Instance(name, id, state, options);
        }
    }

    public sealed class InstanceArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Specify whether big screen is supported. Valid values: ["0", "1"]. "0" for false and "1" for true.
        /// </summary>
        [Input("bigScreen", required: true)]
        public Input<string> BigScreen { get; set; } = null!;

        /// <summary>
        /// Specify the number of exclusive WAF IP addresses.
        /// </summary>
        [Input("exclusiveIpPackage", required: true)]
        public Input<string> ExclusiveIpPackage { get; set; } = null!;

        /// <summary>
        /// The extra bandwidth. Unit: Mbit/s.
        /// </summary>
        [Input("extBandwidth", required: true)]
        public Input<string> ExtBandwidth { get; set; } = null!;

        /// <summary>
        /// The number of extra domains.
        /// </summary>
        [Input("extDomainPackage", required: true)]
        public Input<string> ExtDomainPackage { get; set; } = null!;

        /// <summary>
        /// Log storage size. Unit: T. Valid values: [3, 5, 10, 20, 50].
        /// </summary>
        [Input("logStorage", required: true)]
        public Input<string> LogStorage { get; set; } = null!;

        /// <summary>
        /// Log storage period. Unit: day. Valid values: [180, 360].
        /// </summary>
        [Input("logTime", required: true)]
        public Input<string> LogTime { get; set; } = null!;

        /// <summary>
        /// Type of configuration change. Valid value: Upgrade.
        /// </summary>
        [Input("modifyType")]
        public Input<string>? ModifyType { get; set; }

        /// <summary>
        /// Subscription plan:
        /// * China site customers can purchase the following versions of China Mainland region, valid values: ["version_3", "version_4", "version_5"].
        /// * China site customers can purchase the following versions of International region, valid values: ["version_pro_asia", "version_business_asia", "version_enterprise_asia"]
        /// * International site customers can purchase the following versions of China Mainland region: ["version_pro_china", "version_business_china", "version_enterprise_china"]
        /// * International site customers can purchase the following versions of International region: ["version_pro", "version_business", "version_enterprise"].
        /// </summary>
        [Input("packageCode", required: true)]
        public Input<string> PackageCode { get; set; } = null!;

        /// <summary>
        /// Service time of Web Application Firewall.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// Specify whether professional service is supported. Valid values: ["true", "false"]
        /// </summary>
        [Input("prefessionalService", required: true)]
        public Input<string> PrefessionalService { get; set; } = null!;

        /// <summary>
        /// The instance region ID.
        /// </summary>
        [Input("region")]
        public Input<string>? Region { get; set; }

        /// <summary>
        /// Renewal period of WAF service. Unit: month
        /// </summary>
        [Input("renewPeriod")]
        public Input<int>? RenewPeriod { get; set; }

        /// <summary>
        /// Renewal status of WAF service. Valid values: 
        /// * AutoRenewal: The service time of WAF is renewed automatically.
        /// * ManualRenewal (default): The service time of WAF is renewed manually.Specifies whether to configure a Layer-7 proxy, such as Anti-DDoS Pro or CDN, to filter the inbound traffic before it is forwarded to WAF. Valid values: "On" and "Off". Default to "Off".
        /// </summary>
        [Input("renewalStatus")]
        public Input<string>? RenewalStatus { get; set; }

        /// <summary>
        /// The resource group ID.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// Subscription of WAF service. Valid values: ["Subscription", "PayAsYouGo"].
        /// </summary>
        [Input("subscriptionType", required: true)]
        public Input<string> SubscriptionType { get; set; } = null!;

        /// <summary>
        /// Specify whether Log service is supported. Valid values: ["true", "false"]
        /// </summary>
        [Input("wafLog", required: true)]
        public Input<string> WafLog { get; set; } = null!;

        public InstanceArgs()
        {
        }
        public static new InstanceArgs Empty => new InstanceArgs();
    }

    public sealed class InstanceState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Specify whether big screen is supported. Valid values: ["0", "1"]. "0" for false and "1" for true.
        /// </summary>
        [Input("bigScreen")]
        public Input<string>? BigScreen { get; set; }

        /// <summary>
        /// Specify the number of exclusive WAF IP addresses.
        /// </summary>
        [Input("exclusiveIpPackage")]
        public Input<string>? ExclusiveIpPackage { get; set; }

        /// <summary>
        /// The extra bandwidth. Unit: Mbit/s.
        /// </summary>
        [Input("extBandwidth")]
        public Input<string>? ExtBandwidth { get; set; }

        /// <summary>
        /// The number of extra domains.
        /// </summary>
        [Input("extDomainPackage")]
        public Input<string>? ExtDomainPackage { get; set; }

        /// <summary>
        /// Log storage size. Unit: T. Valid values: [3, 5, 10, 20, 50].
        /// </summary>
        [Input("logStorage")]
        public Input<string>? LogStorage { get; set; }

        /// <summary>
        /// Log storage period. Unit: day. Valid values: [180, 360].
        /// </summary>
        [Input("logTime")]
        public Input<string>? LogTime { get; set; }

        /// <summary>
        /// Type of configuration change. Valid value: Upgrade.
        /// </summary>
        [Input("modifyType")]
        public Input<string>? ModifyType { get; set; }

        /// <summary>
        /// Subscription plan:
        /// * China site customers can purchase the following versions of China Mainland region, valid values: ["version_3", "version_4", "version_5"].
        /// * China site customers can purchase the following versions of International region, valid values: ["version_pro_asia", "version_business_asia", "version_enterprise_asia"]
        /// * International site customers can purchase the following versions of China Mainland region: ["version_pro_china", "version_business_china", "version_enterprise_china"]
        /// * International site customers can purchase the following versions of International region: ["version_pro", "version_business", "version_enterprise"].
        /// </summary>
        [Input("packageCode")]
        public Input<string>? PackageCode { get; set; }

        /// <summary>
        /// Service time of Web Application Firewall.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// Specify whether professional service is supported. Valid values: ["true", "false"]
        /// </summary>
        [Input("prefessionalService")]
        public Input<string>? PrefessionalService { get; set; }

        /// <summary>
        /// The instance region ID.
        /// </summary>
        [Input("region")]
        public Input<string>? Region { get; set; }

        /// <summary>
        /// Renewal period of WAF service. Unit: month
        /// </summary>
        [Input("renewPeriod")]
        public Input<int>? RenewPeriod { get; set; }

        /// <summary>
        /// Renewal status of WAF service. Valid values: 
        /// * AutoRenewal: The service time of WAF is renewed automatically.
        /// * ManualRenewal (default): The service time of WAF is renewed manually.Specifies whether to configure a Layer-7 proxy, such as Anti-DDoS Pro or CDN, to filter the inbound traffic before it is forwarded to WAF. Valid values: "On" and "Off". Default to "Off".
        /// </summary>
        [Input("renewalStatus")]
        public Input<string>? RenewalStatus { get; set; }

        /// <summary>
        /// The resource group ID.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// The status of the instance.
        /// </summary>
        [Input("status")]
        public Input<int>? Status { get; set; }

        /// <summary>
        /// Subscription of WAF service. Valid values: ["Subscription", "PayAsYouGo"].
        /// </summary>
        [Input("subscriptionType")]
        public Input<string>? SubscriptionType { get; set; }

        /// <summary>
        /// Specify whether Log service is supported. Valid values: ["true", "false"]
        /// </summary>
        [Input("wafLog")]
        public Input<string>? WafLog { get; set; }

        public InstanceState()
        {
        }
        public static new InstanceState Empty => new InstanceState();
    }
}
