// *** 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.Sae
{
    /// <summary>
    /// Provides an Alicloud Serverless App Engine (SAE) Application Load Balancer Attachment resource.
    /// 
    /// For information about Serverless App Engine (SAE) Load Balancer Internet Attachment and how to use it, see [alicloud.sae.LoadBalancerInternet](https://help.aliyun.com/document_detail/126360.html).
    /// 
    /// &gt; **NOTE:** Available in v1.164.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var example = new AliCloud.Sae.LoadBalancerInternet("example", new()
    ///     {
    ///         AppId = "your_application_id",
    ///         Internets = new[]
    ///         {
    ///             new AliCloud.Sae.Inputs.LoadBalancerInternetInternetArgs
    ///             {
    ///                 Port = 80,
    ///                 Protocol = "TCP",
    ///                 TargetPort = 8080,
    ///             },
    ///         },
    ///         InternetSlbId = "your_internet_slb_id",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// The resource can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:sae/loadBalancerInternet:LoadBalancerInternet example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:sae/loadBalancerInternet:LoadBalancerInternet")]
    public partial class LoadBalancerInternet : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The target application ID that needs to be bound to the SLB.
        /// </summary>
        [Output("appId")]
        public Output<string> AppId { get; private set; } = null!;

        /// <summary>
        /// Use designated public network SLBs that have been purchased to support non-shared instances.
        /// </summary>
        [Output("internetIp")]
        public Output<string> InternetIp { get; private set; } = null!;

        /// <summary>
        /// The internet SLB ID.
        /// </summary>
        [Output("internetSlbId")]
        public Output<string?> InternetSlbId { get; private set; } = null!;

        /// <summary>
        /// The bound private network SLB. See the following `Block internet`.
        /// </summary>
        [Output("internets")]
        public Output<ImmutableArray<Outputs.LoadBalancerInternetInternet>> Internets { get; private set; } = null!;


        /// <summary>
        /// Create a LoadBalancerInternet 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 LoadBalancerInternet(string name, LoadBalancerInternetArgs args, CustomResourceOptions? options = null)
            : base("alicloud:sae/loadBalancerInternet:LoadBalancerInternet", name, args ?? new LoadBalancerInternetArgs(), MakeResourceOptions(options, ""))
        {
        }

        private LoadBalancerInternet(string name, Input<string> id, LoadBalancerInternetState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:sae/loadBalancerInternet:LoadBalancerInternet", 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 LoadBalancerInternet 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 LoadBalancerInternet Get(string name, Input<string> id, LoadBalancerInternetState? state = null, CustomResourceOptions? options = null)
        {
            return new LoadBalancerInternet(name, id, state, options);
        }
    }

    public sealed class LoadBalancerInternetArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The target application ID that needs to be bound to the SLB.
        /// </summary>
        [Input("appId", required: true)]
        public Input<string> AppId { get; set; } = null!;

        /// <summary>
        /// The internet SLB ID.
        /// </summary>
        [Input("internetSlbId")]
        public Input<string>? InternetSlbId { get; set; }

        [Input("internets", required: true)]
        private InputList<Inputs.LoadBalancerInternetInternetArgs>? _internets;

        /// <summary>
        /// The bound private network SLB. See the following `Block internet`.
        /// </summary>
        public InputList<Inputs.LoadBalancerInternetInternetArgs> Internets
        {
            get => _internets ?? (_internets = new InputList<Inputs.LoadBalancerInternetInternetArgs>());
            set => _internets = value;
        }

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

    public sealed class LoadBalancerInternetState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The target application ID that needs to be bound to the SLB.
        /// </summary>
        [Input("appId")]
        public Input<string>? AppId { get; set; }

        /// <summary>
        /// Use designated public network SLBs that have been purchased to support non-shared instances.
        /// </summary>
        [Input("internetIp")]
        public Input<string>? InternetIp { get; set; }

        /// <summary>
        /// The internet SLB ID.
        /// </summary>
        [Input("internetSlbId")]
        public Input<string>? InternetSlbId { get; set; }

        [Input("internets")]
        private InputList<Inputs.LoadBalancerInternetInternetGetArgs>? _internets;

        /// <summary>
        /// The bound private network SLB. See the following `Block internet`.
        /// </summary>
        public InputList<Inputs.LoadBalancerInternetInternetGetArgs> Internets
        {
            get => _internets ?? (_internets = new InputList<Inputs.LoadBalancerInternetInternetGetArgs>());
            set => _internets = value;
        }

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