// *** 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 application_proxy
    /// 
    /// ## Import
    /// 
    /// teo application_proxy can be imported using the zoneId#proxyId, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Teo/applicationProxy:ApplicationProxy application_proxy zone-2983wizgxqvm#proxy-6972528a-373a-11ed-afca-52540044a456
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Teo/applicationProxy:ApplicationProxy")]
    public partial class ApplicationProxy : Pulumi.CustomResource
    {
        /// <summary>
        /// - `0`: Disable acceleration.- `1`: Enable acceleration.
        /// </summary>
        [Output("accelerateType")]
        public Output<int> AccelerateType { get; private set; } = null!;

        /// <summary>
        /// Acceleration area. Valid values: `mainland`, `overseas`.
        /// </summary>
        [Output("area")]
        public Output<string> Area { get; private set; } = null!;

        /// <summary>
        /// Application proxy block status. Valid values: `banned`, `banning`, `recover`, `recovering`.
        /// </summary>
        [Output("banStatus")]
        public Output<string> BanStatus { get; private set; } = null!;

        /// <summary>
        /// When `ProxyType` is hostname, this field is the ID of the subdomain.
        /// </summary>
        [Output("hostId")]
        public Output<string> HostId { get; private set; } = null!;

        /// <summary>
        /// IPv6 access configuration.
        /// </summary>
        [Output("ipv6")]
        public Output<Outputs.ApplicationProxyIpv6> Ipv6 { get; private set; } = null!;

        /// <summary>
        /// Scheduling mode.- `ip`: Anycast IP.- `domain`: CNAME.
        /// </summary>
        [Output("platType")]
        public Output<string> PlatType { get; private set; } = null!;

        /// <summary>
        /// Proxy ID.
        /// </summary>
        [Output("proxyId")]
        public Output<string> ProxyId { get; private set; } = null!;

        /// <summary>
        /// When `ProxyType` is hostname, `ProxyName` is the domain or subdomain name.When `ProxyType` is instance, `ProxyName` is the name of proxy application.
        /// </summary>
        [Output("proxyName")]
        public Output<string> ProxyName { get; private set; } = null!;

        /// <summary>
        /// Layer 4 proxy mode. Valid values:- `hostname`: subdomain mode.- `instance`: instance mode.
        /// </summary>
        [Output("proxyType")]
        public Output<string> ProxyType { get; private set; } = null!;

        /// <summary>
        /// Scheduling information.
        /// </summary>
        [Output("scheduleValues")]
        public Output<ImmutableArray<string>> ScheduleValues { get; private set; } = null!;

        /// <summary>
        /// - `0`: Disable security protection.- `1`: Enable security protection.
        /// </summary>
        [Output("securityType")]
        public Output<int> SecurityType { get; private set; } = null!;

        /// <summary>
        /// Session persistence duration. Value range: 30-3600 (in seconds), default value is 600.
        /// </summary>
        [Output("sessionPersistTime")]
        public Output<int> SessionPersistTime { get; private set; } = null!;

        /// <summary>
        /// Status of this application proxy. Valid values to set is `online` and `offline`.- `online`: Enable.- `offline`: Disable.- `progress`: Deploying.- `stopping`: Deactivating.- `fail`: Deploy or deactivate failed.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// Last modification date.
        /// </summary>
        [Output("updateTime")]
        public Output<string> UpdateTime { get; private set; } = null!;

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


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

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

    public sealed class ApplicationProxyArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// - `0`: Disable acceleration.- `1`: Enable acceleration.
        /// </summary>
        [Input("accelerateType", required: true)]
        public Input<int> AccelerateType { get; set; } = null!;

        /// <summary>
        /// IPv6 access configuration.
        /// </summary>
        [Input("ipv6")]
        public Input<Inputs.ApplicationProxyIpv6Args>? Ipv6 { get; set; }

        /// <summary>
        /// Scheduling mode.- `ip`: Anycast IP.- `domain`: CNAME.
        /// </summary>
        [Input("platType", required: true)]
        public Input<string> PlatType { get; set; } = null!;

        /// <summary>
        /// When `ProxyType` is hostname, `ProxyName` is the domain or subdomain name.When `ProxyType` is instance, `ProxyName` is the name of proxy application.
        /// </summary>
        [Input("proxyName", required: true)]
        public Input<string> ProxyName { get; set; } = null!;

        /// <summary>
        /// Layer 4 proxy mode. Valid values:- `hostname`: subdomain mode.- `instance`: instance mode.
        /// </summary>
        [Input("proxyType")]
        public Input<string>? ProxyType { get; set; }

        /// <summary>
        /// - `0`: Disable security protection.- `1`: Enable security protection.
        /// </summary>
        [Input("securityType", required: true)]
        public Input<int> SecurityType { get; set; } = null!;

        /// <summary>
        /// Session persistence duration. Value range: 30-3600 (in seconds), default value is 600.
        /// </summary>
        [Input("sessionPersistTime")]
        public Input<int>? SessionPersistTime { get; set; }

        /// <summary>
        /// Status of this application proxy. Valid values to set is `online` and `offline`.- `online`: Enable.- `offline`: Disable.- `progress`: Deploying.- `stopping`: Deactivating.- `fail`: Deploy or deactivate failed.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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

        public ApplicationProxyArgs()
        {
        }
    }

    public sealed class ApplicationProxyState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// - `0`: Disable acceleration.- `1`: Enable acceleration.
        /// </summary>
        [Input("accelerateType")]
        public Input<int>? AccelerateType { get; set; }

        /// <summary>
        /// Acceleration area. Valid values: `mainland`, `overseas`.
        /// </summary>
        [Input("area")]
        public Input<string>? Area { get; set; }

        /// <summary>
        /// Application proxy block status. Valid values: `banned`, `banning`, `recover`, `recovering`.
        /// </summary>
        [Input("banStatus")]
        public Input<string>? BanStatus { get; set; }

        /// <summary>
        /// When `ProxyType` is hostname, this field is the ID of the subdomain.
        /// </summary>
        [Input("hostId")]
        public Input<string>? HostId { get; set; }

        /// <summary>
        /// IPv6 access configuration.
        /// </summary>
        [Input("ipv6")]
        public Input<Inputs.ApplicationProxyIpv6GetArgs>? Ipv6 { get; set; }

        /// <summary>
        /// Scheduling mode.- `ip`: Anycast IP.- `domain`: CNAME.
        /// </summary>
        [Input("platType")]
        public Input<string>? PlatType { get; set; }

        /// <summary>
        /// Proxy ID.
        /// </summary>
        [Input("proxyId")]
        public Input<string>? ProxyId { get; set; }

        /// <summary>
        /// When `ProxyType` is hostname, `ProxyName` is the domain or subdomain name.When `ProxyType` is instance, `ProxyName` is the name of proxy application.
        /// </summary>
        [Input("proxyName")]
        public Input<string>? ProxyName { get; set; }

        /// <summary>
        /// Layer 4 proxy mode. Valid values:- `hostname`: subdomain mode.- `instance`: instance mode.
        /// </summary>
        [Input("proxyType")]
        public Input<string>? ProxyType { get; set; }

        [Input("scheduleValues")]
        private InputList<string>? _scheduleValues;

        /// <summary>
        /// Scheduling information.
        /// </summary>
        public InputList<string> ScheduleValues
        {
            get => _scheduleValues ?? (_scheduleValues = new InputList<string>());
            set => _scheduleValues = value;
        }

        /// <summary>
        /// - `0`: Disable security protection.- `1`: Enable security protection.
        /// </summary>
        [Input("securityType")]
        public Input<int>? SecurityType { get; set; }

        /// <summary>
        /// Session persistence duration. Value range: 30-3600 (in seconds), default value is 600.
        /// </summary>
        [Input("sessionPersistTime")]
        public Input<int>? SessionPersistTime { get; set; }

        /// <summary>
        /// Status of this application proxy. Valid values to set is `online` and `offline`.- `online`: Enable.- `offline`: Disable.- `progress`: Deploying.- `stopping`: Deactivating.- `fail`: Deploy or deactivate failed.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// Last modification date.
        /// </summary>
        [Input("updateTime")]
        public Input<string>? UpdateTime { get; set; }

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

        public ApplicationProxyState()
        {
        }
    }
}
