Alibaba Cloud

v3.15.0 published on Thursday, Jan 13, 2022 by Pulumi

LoadBalancer

Provides a ALB Load Balancer resource.

For information about ALB Load Balancer and how to use it, see What is Load Balancer.

NOTE: Available in v1.132.0+.

Create a LoadBalancer Resource

new LoadBalancer(name: string, args: LoadBalancerArgs, opts?: CustomResourceOptions);
@overload
def LoadBalancer(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 access_log_config: Optional[LoadBalancerAccessLogConfigArgs] = None,
                 address_allocated_mode: Optional[str] = None,
                 address_type: Optional[str] = None,
                 deletion_protection_enabled: Optional[bool] = None,
                 dry_run: Optional[bool] = None,
                 load_balancer_billing_config: Optional[LoadBalancerLoadBalancerBillingConfigArgs] = None,
                 load_balancer_edition: Optional[str] = None,
                 load_balancer_name: Optional[str] = None,
                 modification_protection_config: Optional[LoadBalancerModificationProtectionConfigArgs] = None,
                 resource_group_id: Optional[str] = None,
                 tags: Optional[Mapping[str, Any]] = None,
                 vpc_id: Optional[str] = None,
                 zone_mappings: Optional[Sequence[LoadBalancerZoneMappingArgs]] = None)
@overload
def LoadBalancer(resource_name: str,
                 args: LoadBalancerArgs,
                 opts: Optional[ResourceOptions] = None)
func NewLoadBalancer(ctx *Context, name string, args LoadBalancerArgs, opts ...ResourceOption) (*LoadBalancer, error)
public LoadBalancer(string name, LoadBalancerArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args LoadBalancerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args LoadBalancerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args LoadBalancerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LoadBalancerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

LoadBalancer Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The LoadBalancer resource accepts the following input properties:

AddressType string
The type of IP address that the ALB instance uses to provide services. Valid values: Intranet, Internet.
LoadBalancerBillingConfig Pulumi.AliCloud.Alb.Inputs.LoadBalancerLoadBalancerBillingConfigArgs
The configuration of the billing method.
LoadBalancerEdition string
The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: Basic and Standard.
LoadBalancerName string
The name of the resource.
VpcId string
The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
ZoneMappings List<Pulumi.AliCloud.Alb.Inputs.LoadBalancerZoneMappingArgs>
The zones and vSwitches. You must specify at least two zones.
AccessLogConfig Pulumi.AliCloud.Alb.Inputs.LoadBalancerAccessLogConfigArgs
The Access Logging Configuration Structure.
AddressAllocatedMode string
The method in which IP addresses are assigned. Valid values: Fixed and Dynamic. Default value: Dynamic. *Fixed: The ALB instance uses a fixed IP address. *Dynamic: An IP address is dynamically assigned to each zone of the ALB instance.
DeletionProtectionEnabled bool
The deletion protection enabled. Valid values: true and false. Default value: false.
DryRun bool
Specifies whether to precheck the API request. Valid values: true and false.
ModificationProtectionConfig Pulumi.AliCloud.Alb.Inputs.LoadBalancerModificationProtectionConfigArgs
Modify the Protection Configuration.
ResourceGroupId string
The ID of the resource group.
Tags Dictionary<string, object>
AddressType string
The type of IP address that the ALB instance uses to provide services. Valid values: Intranet, Internet.
LoadBalancerBillingConfig LoadBalancerLoadBalancerBillingConfigArgs
The configuration of the billing method.
LoadBalancerEdition string
The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: Basic and Standard.
LoadBalancerName string
The name of the resource.
VpcId string
The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
ZoneMappings []LoadBalancerZoneMappingArgs
The zones and vSwitches. You must specify at least two zones.
AccessLogConfig LoadBalancerAccessLogConfigArgs
The Access Logging Configuration Structure.
AddressAllocatedMode string
The method in which IP addresses are assigned. Valid values: Fixed and Dynamic. Default value: Dynamic. *Fixed: The ALB instance uses a fixed IP address. *Dynamic: An IP address is dynamically assigned to each zone of the ALB instance.
DeletionProtectionEnabled bool
The deletion protection enabled. Valid values: true and false. Default value: false.
DryRun bool
Specifies whether to precheck the API request. Valid values: true and false.
ModificationProtectionConfig LoadBalancerModificationProtectionConfigArgs
Modify the Protection Configuration.
ResourceGroupId string
The ID of the resource group.
Tags map[string]interface{}
addressType string
The type of IP address that the ALB instance uses to provide services. Valid values: Intranet, Internet.
loadBalancerBillingConfig LoadBalancerLoadBalancerBillingConfigArgs
The configuration of the billing method.
loadBalancerEdition string
The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: Basic and Standard.
loadBalancerName string
The name of the resource.
vpcId string
The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
zoneMappings LoadBalancerZoneMappingArgs[]
The zones and vSwitches. You must specify at least two zones.
accessLogConfig LoadBalancerAccessLogConfigArgs
The Access Logging Configuration Structure.
addressAllocatedMode string
The method in which IP addresses are assigned. Valid values: Fixed and Dynamic. Default value: Dynamic. *Fixed: The ALB instance uses a fixed IP address. *Dynamic: An IP address is dynamically assigned to each zone of the ALB instance.
deletionProtectionEnabled boolean
The deletion protection enabled. Valid values: true and false. Default value: false.
dryRun boolean
Specifies whether to precheck the API request. Valid values: true and false.
modificationProtectionConfig LoadBalancerModificationProtectionConfigArgs
Modify the Protection Configuration.
resourceGroupId string
The ID of the resource group.
tags {[key: string]: any}
address_type str
The type of IP address that the ALB instance uses to provide services. Valid values: Intranet, Internet.
load_balancer_billing_config LoadBalancerLoadBalancerBillingConfigArgs
The configuration of the billing method.
load_balancer_edition str
The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: Basic and Standard.
load_balancer_name str
The name of the resource.
vpc_id str
The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
zone_mappings Sequence[LoadBalancerZoneMappingArgs]
The zones and vSwitches. You must specify at least two zones.
access_log_config LoadBalancerAccessLogConfigArgs
The Access Logging Configuration Structure.
address_allocated_mode str
The method in which IP addresses are assigned. Valid values: Fixed and Dynamic. Default value: Dynamic. *Fixed: The ALB instance uses a fixed IP address. *Dynamic: An IP address is dynamically assigned to each zone of the ALB instance.
deletion_protection_enabled bool
The deletion protection enabled. Valid values: true and false. Default value: false.
dry_run bool
Specifies whether to precheck the API request. Valid values: true and false.
modification_protection_config LoadBalancerModificationProtectionConfigArgs
Modify the Protection Configuration.
resource_group_id str
The ID of the resource group.
tags Mapping[str, Any]

Outputs

All input properties are implicitly available as output properties. Additionally, the LoadBalancer resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Status string
Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: NonProtection and ConsoleProtection.
Id string
The provider-assigned unique ID for this managed resource.
Status string
Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: NonProtection and ConsoleProtection.
id string
The provider-assigned unique ID for this managed resource.
status string
Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: NonProtection and ConsoleProtection.
id str
The provider-assigned unique ID for this managed resource.
status str
Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: NonProtection and ConsoleProtection.

Look up an Existing LoadBalancer Resource

Get an existing LoadBalancer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: LoadBalancerState, opts?: CustomResourceOptions): LoadBalancer
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_log_config: Optional[LoadBalancerAccessLogConfigArgs] = None,
        address_allocated_mode: Optional[str] = None,
        address_type: Optional[str] = None,
        deletion_protection_enabled: Optional[bool] = None,
        dry_run: Optional[bool] = None,
        load_balancer_billing_config: Optional[LoadBalancerLoadBalancerBillingConfigArgs] = None,
        load_balancer_edition: Optional[str] = None,
        load_balancer_name: Optional[str] = None,
        modification_protection_config: Optional[LoadBalancerModificationProtectionConfigArgs] = None,
        resource_group_id: Optional[str] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, Any]] = None,
        vpc_id: Optional[str] = None,
        zone_mappings: Optional[Sequence[LoadBalancerZoneMappingArgs]] = None) -> LoadBalancer
func GetLoadBalancer(ctx *Context, name string, id IDInput, state *LoadBalancerState, opts ...ResourceOption) (*LoadBalancer, error)
public static LoadBalancer Get(string name, Input<string> id, LoadBalancerState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AccessLogConfig Pulumi.AliCloud.Alb.Inputs.LoadBalancerAccessLogConfigArgs
The Access Logging Configuration Structure.
AddressAllocatedMode string
The method in which IP addresses are assigned. Valid values: Fixed and Dynamic. Default value: Dynamic. *Fixed: The ALB instance uses a fixed IP address. *Dynamic: An IP address is dynamically assigned to each zone of the ALB instance.
AddressType string
The type of IP address that the ALB instance uses to provide services. Valid values: Intranet, Internet.
DeletionProtectionEnabled bool
The deletion protection enabled. Valid values: true and false. Default value: false.
DryRun bool
Specifies whether to precheck the API request. Valid values: true and false.
LoadBalancerBillingConfig Pulumi.AliCloud.Alb.Inputs.LoadBalancerLoadBalancerBillingConfigArgs
The configuration of the billing method.
LoadBalancerEdition string
The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: Basic and Standard.
LoadBalancerName string
The name of the resource.
ModificationProtectionConfig Pulumi.AliCloud.Alb.Inputs.LoadBalancerModificationProtectionConfigArgs
Modify the Protection Configuration.
ResourceGroupId string
The ID of the resource group.
Status string
Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: NonProtection and ConsoleProtection.
Tags Dictionary<string, object>
VpcId string
The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
ZoneMappings List<Pulumi.AliCloud.Alb.Inputs.LoadBalancerZoneMappingArgs>
The zones and vSwitches. You must specify at least two zones.
AccessLogConfig LoadBalancerAccessLogConfigArgs
The Access Logging Configuration Structure.
AddressAllocatedMode string
The method in which IP addresses are assigned. Valid values: Fixed and Dynamic. Default value: Dynamic. *Fixed: The ALB instance uses a fixed IP address. *Dynamic: An IP address is dynamically assigned to each zone of the ALB instance.
AddressType string
The type of IP address that the ALB instance uses to provide services. Valid values: Intranet, Internet.
DeletionProtectionEnabled bool
The deletion protection enabled. Valid values: true and false. Default value: false.
DryRun bool
Specifies whether to precheck the API request. Valid values: true and false.
LoadBalancerBillingConfig LoadBalancerLoadBalancerBillingConfigArgs
The configuration of the billing method.
LoadBalancerEdition string
The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: Basic and Standard.
LoadBalancerName string
The name of the resource.
ModificationProtectionConfig LoadBalancerModificationProtectionConfigArgs
Modify the Protection Configuration.
ResourceGroupId string
The ID of the resource group.
Status string
Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: NonProtection and ConsoleProtection.
Tags map[string]interface{}
VpcId string
The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
ZoneMappings []LoadBalancerZoneMappingArgs
The zones and vSwitches. You must specify at least two zones.
accessLogConfig LoadBalancerAccessLogConfigArgs
The Access Logging Configuration Structure.
addressAllocatedMode string
The method in which IP addresses are assigned. Valid values: Fixed and Dynamic. Default value: Dynamic. *Fixed: The ALB instance uses a fixed IP address. *Dynamic: An IP address is dynamically assigned to each zone of the ALB instance.
addressType string
The type of IP address that the ALB instance uses to provide services. Valid values: Intranet, Internet.
deletionProtectionEnabled boolean
The deletion protection enabled. Valid values: true and false. Default value: false.
dryRun boolean
Specifies whether to precheck the API request. Valid values: true and false.
loadBalancerBillingConfig LoadBalancerLoadBalancerBillingConfigArgs
The configuration of the billing method.
loadBalancerEdition string
The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: Basic and Standard.
loadBalancerName string
The name of the resource.
modificationProtectionConfig LoadBalancerModificationProtectionConfigArgs
Modify the Protection Configuration.
resourceGroupId string
The ID of the resource group.
status string
Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: NonProtection and ConsoleProtection.
tags {[key: string]: any}
vpcId string
The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
zoneMappings LoadBalancerZoneMappingArgs[]
The zones and vSwitches. You must specify at least two zones.
access_log_config LoadBalancerAccessLogConfigArgs
The Access Logging Configuration Structure.
address_allocated_mode str
The method in which IP addresses are assigned. Valid values: Fixed and Dynamic. Default value: Dynamic. *Fixed: The ALB instance uses a fixed IP address. *Dynamic: An IP address is dynamically assigned to each zone of the ALB instance.
address_type str
The type of IP address that the ALB instance uses to provide services. Valid values: Intranet, Internet.
deletion_protection_enabled bool
The deletion protection enabled. Valid values: true and false. Default value: false.
dry_run bool
Specifies whether to precheck the API request. Valid values: true and false.
load_balancer_billing_config LoadBalancerLoadBalancerBillingConfigArgs
The configuration of the billing method.
load_balancer_edition str
The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: Basic and Standard.
load_balancer_name str
The name of the resource.
modification_protection_config LoadBalancerModificationProtectionConfigArgs
Modify the Protection Configuration.
resource_group_id str
The ID of the resource group.
status str
Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: NonProtection and ConsoleProtection.
tags Mapping[str, Any]
vpc_id str
The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
zone_mappings Sequence[LoadBalancerZoneMappingArgs]
The zones and vSwitches. You must specify at least two zones.

Supporting Types

LoadBalancerAccessLogConfig

LogProject string
The log service that access logs are shipped to.
LogStore string
The log service that access logs are shipped to.
LogProject string
The log service that access logs are shipped to.
LogStore string
The log service that access logs are shipped to.
logProject string
The log service that access logs are shipped to.
logStore string
The log service that access logs are shipped to.
log_project str
The log service that access logs are shipped to.
log_store str
The log service that access logs are shipped to.

LoadBalancerLoadBalancerBillingConfig

PayType string
The billing method of the ALB instance. Valid value: PayAsYouGo.
PayType string
The billing method of the ALB instance. Valid value: PayAsYouGo.
payType string
The billing method of the ALB instance. Valid value: PayAsYouGo.
pay_type str
The billing method of the ALB instance. Valid value: PayAsYouGo.

LoadBalancerModificationProtectionConfig

Reason string
The reason for modification protection. This parameter must be 2 to 128 characters in length, and can contain letters, digits, periods, underscores, and hyphens. The reason must start with a letter. This parameter is required only if ModificationProtectionStatus is set to ConsoleProtection.
Status string
Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: NonProtection and ConsoleProtection.
Reason string
The reason for modification protection. This parameter must be 2 to 128 characters in length, and can contain letters, digits, periods, underscores, and hyphens. The reason must start with a letter. This parameter is required only if ModificationProtectionStatus is set to ConsoleProtection.
Status string
Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: NonProtection and ConsoleProtection.
reason string
The reason for modification protection. This parameter must be 2 to 128 characters in length, and can contain letters, digits, periods, underscores, and hyphens. The reason must start with a letter. This parameter is required only if ModificationProtectionStatus is set to ConsoleProtection.
status string
Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: NonProtection and ConsoleProtection.
reason str
The reason for modification protection. This parameter must be 2 to 128 characters in length, and can contain letters, digits, periods, underscores, and hyphens. The reason must start with a letter. This parameter is required only if ModificationProtectionStatus is set to ConsoleProtection.
status str
Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: NonProtection and ConsoleProtection.

LoadBalancerZoneMapping

VswitchId string
The ID of the vSwitch that corresponds to the zone. Each zone can use only one vSwitch and subnet.
ZoneId string
The ID of the zone to which the ALB instance belongs.
VswitchId string
The ID of the vSwitch that corresponds to the zone. Each zone can use only one vSwitch and subnet.
ZoneId string
The ID of the zone to which the ALB instance belongs.
vswitchId string
The ID of the vSwitch that corresponds to the zone. Each zone can use only one vSwitch and subnet.
zoneId string
The ID of the zone to which the ALB instance belongs.
vswitch_id str
The ID of the vSwitch that corresponds to the zone. Each zone can use only one vSwitch and subnet.
zone_id str
The ID of the zone to which the ALB instance belongs.

Import

ALB Load Balancer can be imported using the id, e.g.

 $ pulumi import alicloud:alb/loadBalancer:LoadBalancer example <id>

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.