// *** 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 Pulumiverse.Vra.Loadbalancer
{
    /// <summary>
    /// Creates a VMware vRealize Automation load balancer resource.
    /// 
    /// ## Example Usage
    /// ### S
    /// 
    /// The following example shows how to create a load balancer resource.
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Vra = Pulumiverse.Vra;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var @this = new Vra.Loadbalancer.LoadBalancer("this", new()
    ///     {
    ///         ProjectId = vra_project.My_project.Id,
    ///         Description = "My Load Balancer",
    ///         CustomProperties = 
    ///         {
    ///             { "edgeClusterRouterStateLink", "/resources/routers/&lt;uuid&gt;" },
    ///             { "tier0LogicalRouterStateLink", "/resources/routers/&lt;uuid&gt;" },
    ///         },
    ///         Targets = new[]
    ///         {
    ///             new Vra.Loadbalancer.Inputs.LoadBalancerTargetArgs
    ///             {
    ///                 MachineId = vra_machine.My_machine.Id,
    ///             },
    ///         },
    ///         Nics = new[]
    ///         {
    ///             new Vra.Loadbalancer.Inputs.LoadBalancerNicArgs
    ///             {
    ///                 NetworkId = data.Vra_network.My_network.Id,
    ///             },
    ///         },
    ///         Routes = new[]
    ///         {
    ///             new Vra.Loadbalancer.Inputs.LoadBalancerRouteArgs
    ///             {
    ///                 Protocol = "TCP",
    ///                 Port = "80",
    ///                 MemberProtocol = "TCP",
    ///                 MemberPort = "80",
    ///                 HealthCheckConfigurations = new[]
    ///                 {
    ///                     new Vra.Loadbalancer.Inputs.LoadBalancerRouteHealthCheckConfigurationArgs
    ///                     {
    ///                         Protocol = "TCP",
    ///                         Port = "80",
    ///                         IntervalSeconds = 30,
    ///                         TimeoutSeconds = 10,
    ///                         UnhealthyThreshold = 2,
    ///                         HealthyThreshold = 10,
    ///                     },
    ///                 },
    ///             },
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// A block device resource supports the following arguments:
    /// </summary>
    [VraResourceType("vra:loadbalancer/loadBalancer:LoadBalancer")]
    public partial class LoadBalancer : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Primary address allocated or in use by this load balancer. The address could be an in the form of a publicly resolvable DNS name or an IP address.
        /// </summary>
        [Output("address")]
        public Output<string> Address { get; private set; } = null!;

        /// <summary>
        /// Date when the entity was created. The date is in ISO 6801 and UTC.
        /// </summary>
        [Output("createdAt")]
        public Output<string> CreatedAt { get; private set; } = null!;

        /// <summary>
        /// Additional custom properties that may be used to extend the machine.
        /// </summary>
        [Output("customProperties")]
        public Output<ImmutableDictionary<string, object>> CustomProperties { get; private set; } = null!;

        /// <summary>
        /// The id of the deployment that is associated with this resource.
        /// </summary>
        [Output("deploymentId")]
        public Output<string> DeploymentId { get; private set; } = null!;

        /// <summary>
        /// Describes machine within the scope of your organization and is not propagated to the cloud.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// External entity Id on the provider side.
        /// </summary>
        [Output("externalId")]
        public Output<string> ExternalId { get; private set; } = null!;

        /// <summary>
        /// The external regionId of the resource.
        /// </summary>
        [Output("externalRegionId")]
        public Output<string> ExternalRegionId { get; private set; } = null!;

        /// <summary>
        /// The external regionId of the resource.
        /// </summary>
        [Output("externalZoneId")]
        public Output<string> ExternalZoneId { get; private set; } = null!;

        /// <summary>
        /// An Internet-facing load balancer has a publicly resolvable DNS name, so it can route requests from clients over the Internet to the instances that are registered with the load balancer.
        /// </summary>
        [Output("internetFacing")]
        public Output<bool?> InternetFacing { get; private set; } = null!;

        /// <summary>
        /// HATEOAS of the entity.
        /// </summary>
        [Output("links")]
        public Output<ImmutableArray<Outputs.LoadBalancerLink>> Links { get; private set; } = null!;

        /// <summary>
        /// A human-friendly name used as an identifier in APIs that support this option.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// A set of network interface specifications for this load balancer.
        /// </summary>
        [Output("nics")]
        public Output<ImmutableArray<Outputs.LoadBalancerNic>> Nics { get; private set; } = null!;

        /// <summary>
        /// The id of the organization this entity belongs to.
        /// </summary>
        [Output("organizationId")]
        public Output<string> OrganizationId { get; private set; } = null!;

        /// <summary>
        /// Email of the user that owns the entity.
        /// </summary>
        [Output("owner")]
        public Output<string> Owner { get; private set; } = null!;

        /// <summary>
        /// The id of the project the current user belongs to.
        /// </summary>
        [Output("projectId")]
        public Output<string> ProjectId { get; private set; } = null!;

        /// <summary>
        /// The load balancer route configuration regarding ports and protocols.
        /// </summary>
        [Output("routes")]
        public Output<ImmutableArray<Outputs.LoadBalancerRoute>> Routes { get; private set; } = null!;

        /// <summary>
        /// A set of tag keys and optional values that were set on this resource instance.
        /// example:[ { "key" : "vmware.enumeration.type", "value": "nebs_block" } ]
        /// </summary>
        [Output("tags")]
        public Output<ImmutableArray<Outputs.LoadBalancerTag>> Tags { get; private set; } = null!;

        /// <summary>
        /// A list of links to target load balancer pool members. Links can be to either a machine or a machine's network interface.
        /// </summary>
        [Output("targets")]
        public Output<ImmutableArray<Outputs.LoadBalancerTarget>> Targets { get; private set; } = null!;

        /// <summary>
        /// Date when the entity was last updated. The date is ISO 8601 and UTC.
        /// </summary>
        [Output("updatedAt")]
        public Output<string> UpdatedAt { get; private set; } = null!;


        /// <summary>
        /// Create a LoadBalancer 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 LoadBalancer(string name, LoadBalancerArgs args, CustomResourceOptions? options = null)
            : base("vra:loadbalancer/loadBalancer:LoadBalancer", name, args ?? new LoadBalancerArgs(), MakeResourceOptions(options, ""))
        {
        }

        private LoadBalancer(string name, Input<string> id, LoadBalancerState? state = null, CustomResourceOptions? options = null)
            : base("vra:loadbalancer/loadBalancer:LoadBalancer", 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/pulumiverse",
            };
            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 LoadBalancer 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 LoadBalancer Get(string name, Input<string> id, LoadBalancerState? state = null, CustomResourceOptions? options = null)
        {
            return new LoadBalancer(name, id, state, options);
        }
    }

    public sealed class LoadBalancerArgs : global::Pulumi.ResourceArgs
    {
        [Input("customProperties")]
        private InputMap<object>? _customProperties;

        /// <summary>
        /// Additional custom properties that may be used to extend the machine.
        /// </summary>
        public InputMap<object> CustomProperties
        {
            get => _customProperties ?? (_customProperties = new InputMap<object>());
            set => _customProperties = value;
        }

        /// <summary>
        /// The id of the deployment that is associated with this resource.
        /// </summary>
        [Input("deploymentId")]
        public Input<string>? DeploymentId { get; set; }

        /// <summary>
        /// Describes machine within the scope of your organization and is not propagated to the cloud.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// An Internet-facing load balancer has a publicly resolvable DNS name, so it can route requests from clients over the Internet to the instances that are registered with the load balancer.
        /// </summary>
        [Input("internetFacing")]
        public Input<bool>? InternetFacing { get; set; }

        /// <summary>
        /// A human-friendly name used as an identifier in APIs that support this option.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("nics", required: true)]
        private InputList<Inputs.LoadBalancerNicArgs>? _nics;

        /// <summary>
        /// A set of network interface specifications for this load balancer.
        /// </summary>
        public InputList<Inputs.LoadBalancerNicArgs> Nics
        {
            get => _nics ?? (_nics = new InputList<Inputs.LoadBalancerNicArgs>());
            set => _nics = value;
        }

        /// <summary>
        /// The id of the project the current user belongs to.
        /// </summary>
        [Input("projectId", required: true)]
        public Input<string> ProjectId { get; set; } = null!;

        [Input("routes", required: true)]
        private InputList<Inputs.LoadBalancerRouteArgs>? _routes;

        /// <summary>
        /// The load balancer route configuration regarding ports and protocols.
        /// </summary>
        public InputList<Inputs.LoadBalancerRouteArgs> Routes
        {
            get => _routes ?? (_routes = new InputList<Inputs.LoadBalancerRouteArgs>());
            set => _routes = value;
        }

        [Input("tags")]
        private InputList<Inputs.LoadBalancerTagArgs>? _tags;

        /// <summary>
        /// A set of tag keys and optional values that were set on this resource instance.
        /// example:[ { "key" : "vmware.enumeration.type", "value": "nebs_block" } ]
        /// </summary>
        public InputList<Inputs.LoadBalancerTagArgs> Tags
        {
            get => _tags ?? (_tags = new InputList<Inputs.LoadBalancerTagArgs>());
            set => _tags = value;
        }

        [Input("targets")]
        private InputList<Inputs.LoadBalancerTargetArgs>? _targets;

        /// <summary>
        /// A list of links to target load balancer pool members. Links can be to either a machine or a machine's network interface.
        /// </summary>
        public InputList<Inputs.LoadBalancerTargetArgs> Targets
        {
            get => _targets ?? (_targets = new InputList<Inputs.LoadBalancerTargetArgs>());
            set => _targets = value;
        }

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

    public sealed class LoadBalancerState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Primary address allocated or in use by this load balancer. The address could be an in the form of a publicly resolvable DNS name or an IP address.
        /// </summary>
        [Input("address")]
        public Input<string>? Address { get; set; }

        /// <summary>
        /// Date when the entity was created. The date is in ISO 6801 and UTC.
        /// </summary>
        [Input("createdAt")]
        public Input<string>? CreatedAt { get; set; }

        [Input("customProperties")]
        private InputMap<object>? _customProperties;

        /// <summary>
        /// Additional custom properties that may be used to extend the machine.
        /// </summary>
        public InputMap<object> CustomProperties
        {
            get => _customProperties ?? (_customProperties = new InputMap<object>());
            set => _customProperties = value;
        }

        /// <summary>
        /// The id of the deployment that is associated with this resource.
        /// </summary>
        [Input("deploymentId")]
        public Input<string>? DeploymentId { get; set; }

        /// <summary>
        /// Describes machine within the scope of your organization and is not propagated to the cloud.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// External entity Id on the provider side.
        /// </summary>
        [Input("externalId")]
        public Input<string>? ExternalId { get; set; }

        /// <summary>
        /// The external regionId of the resource.
        /// </summary>
        [Input("externalRegionId")]
        public Input<string>? ExternalRegionId { get; set; }

        /// <summary>
        /// The external regionId of the resource.
        /// </summary>
        [Input("externalZoneId")]
        public Input<string>? ExternalZoneId { get; set; }

        /// <summary>
        /// An Internet-facing load balancer has a publicly resolvable DNS name, so it can route requests from clients over the Internet to the instances that are registered with the load balancer.
        /// </summary>
        [Input("internetFacing")]
        public Input<bool>? InternetFacing { get; set; }

        [Input("links")]
        private InputList<Inputs.LoadBalancerLinkGetArgs>? _links;

        /// <summary>
        /// HATEOAS of the entity.
        /// </summary>
        public InputList<Inputs.LoadBalancerLinkGetArgs> Links
        {
            get => _links ?? (_links = new InputList<Inputs.LoadBalancerLinkGetArgs>());
            set => _links = value;
        }

        /// <summary>
        /// A human-friendly name used as an identifier in APIs that support this option.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("nics")]
        private InputList<Inputs.LoadBalancerNicGetArgs>? _nics;

        /// <summary>
        /// A set of network interface specifications for this load balancer.
        /// </summary>
        public InputList<Inputs.LoadBalancerNicGetArgs> Nics
        {
            get => _nics ?? (_nics = new InputList<Inputs.LoadBalancerNicGetArgs>());
            set => _nics = value;
        }

        /// <summary>
        /// The id of the organization this entity belongs to.
        /// </summary>
        [Input("organizationId")]
        public Input<string>? OrganizationId { get; set; }

        /// <summary>
        /// Email of the user that owns the entity.
        /// </summary>
        [Input("owner")]
        public Input<string>? Owner { get; set; }

        /// <summary>
        /// The id of the project the current user belongs to.
        /// </summary>
        [Input("projectId")]
        public Input<string>? ProjectId { get; set; }

        [Input("routes")]
        private InputList<Inputs.LoadBalancerRouteGetArgs>? _routes;

        /// <summary>
        /// The load balancer route configuration regarding ports and protocols.
        /// </summary>
        public InputList<Inputs.LoadBalancerRouteGetArgs> Routes
        {
            get => _routes ?? (_routes = new InputList<Inputs.LoadBalancerRouteGetArgs>());
            set => _routes = value;
        }

        [Input("tags")]
        private InputList<Inputs.LoadBalancerTagGetArgs>? _tags;

        /// <summary>
        /// A set of tag keys and optional values that were set on this resource instance.
        /// example:[ { "key" : "vmware.enumeration.type", "value": "nebs_block" } ]
        /// </summary>
        public InputList<Inputs.LoadBalancerTagGetArgs> Tags
        {
            get => _tags ?? (_tags = new InputList<Inputs.LoadBalancerTagGetArgs>());
            set => _tags = value;
        }

        [Input("targets")]
        private InputList<Inputs.LoadBalancerTargetGetArgs>? _targets;

        /// <summary>
        /// A list of links to target load balancer pool members. Links can be to either a machine or a machine's network interface.
        /// </summary>
        public InputList<Inputs.LoadBalancerTargetGetArgs> Targets
        {
            get => _targets ?? (_targets = new InputList<Inputs.LoadBalancerTargetGetArgs>());
            set => _targets = value;
        }

        /// <summary>
        /// Date when the entity was last updated. The date is ISO 8601 and UTC.
        /// </summary>
        [Input("updatedAt")]
        public Input<string>? UpdatedAt { get; set; }

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