Class LoadBalancer
Provides a DigitalOcean Load Balancer resource. This can be used to create, modify, and delete Load Balancers.
Inherited Members
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public class LoadBalancer : CustomResource
Constructors
View SourceLoadBalancer(String, LoadBalancerArgs, CustomResourceOptions)
Create a LoadBalancer resource with the given unique name, arguments, and options.
Declaration
public LoadBalancer(string name, LoadBalancerArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| LoadBalancerArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAlgorithm
The load balancing algorithm used to determine
which backend Droplet will be selected by a client. It must be either round_robin
or least_connections. The default value is round_robin.
Declaration
public Output<string> Algorithm { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DropletIds
A list of the IDs of each droplet to be attached to the Load Balancer.
Declaration
public Output<ImmutableArray<int>> DropletIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.Int32>> |
DropletTag
The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
Declaration
public Output<string> DropletTag { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EnableBackendKeepalive
A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.
Declaration
public Output<bool?> EnableBackendKeepalive { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
EnableProxyProtocol
A boolean value indicating whether PROXY
Protocol should be used to pass information from connecting client requests to
the backend service. Default value is false.
Declaration
public Output<bool?> EnableProxyProtocol { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
ForwardingRules
A list of forwarding_rule to be assigned to the
Load Balancer. The forwarding_rule block is documented below.
Declaration
public Output<ImmutableArray<LoadBalancerForwardingRule>> ForwardingRules { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<LoadBalancerForwardingRule>> |
Healthcheck
A healthcheck block to be assigned to the
Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.
Declaration
public Output<LoadBalancerHealthcheck> Healthcheck { get; }
Property Value
| Type | Description |
|---|---|
| Output<LoadBalancerHealthcheck> |
Ip
Declaration
public Output<string> Ip { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The Load Balancer name
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RedirectHttpToHttps
A boolean value indicating whether
HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443.
Default value is false.
Declaration
public Output<bool?> RedirectHttpToHttps { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Region
The region to start in
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Status
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StickySessions
A sticky_sessions block to be assigned to the
Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.
Declaration
public Output<LoadBalancerStickySessions> StickySessions { get; }
Property Value
| Type | Description |
|---|---|
| Output<LoadBalancerStickySessions> |
Urn
The uniform resource name for the Load Balancer
Declaration
public Output<string> Urn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VpcUuid
The ID of the VPC where the load balancer will be located.
Declaration
public Output<string> VpcUuid { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, LoadBalancerState, CustomResourceOptions)
Get an existing LoadBalancer resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static LoadBalancer Get(string name, Input<string> id, LoadBalancerState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| LoadBalancerState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| LoadBalancer |