LoadBalancer
Create a LoadBalancer Resource
new LoadBalancer(name: string, args?: LoadBalancerArgs, opts?: CustomResourceOptions);def LoadBalancer(resource_name, opts=None, address=None, address_ip_version=None, address_type=None, bandwidth=None, delete_protection=None, instance_charge_type=None, internet=None, internet_charge_type=None, master_zone_id=None, name=None, period=None, resource_group_id=None, slave_zone_id=None, specification=None, tags=None, vswitch_id=None, __props__=None);func NewLoadBalancer(ctx *Context, name string, args *LoadBalancerArgs, opts ...ResourceOption) (*LoadBalancer, error)public LoadBalancer(string name, LoadBalancerArgs? args = null, 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.
- opts ResourceOptions
- A bag of options that control this 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 Programming Model docs.
Inputs
The LoadBalancer resource accepts the following input properties:
- Address string
Specify the IP address of the private network for the SLB instance, which must be in the destination CIDR block of the correspond ing switch.
- Address
Ip stringVersion The IP version of the SLB instance to be created, which can be set to ipv4 or ipv6 . Default to “ipv4”. Now, only internet instance support ipv6 address.
- Address
Type string The network type of the SLB instance. Valid values: [“internet”, “intranet”]. If load balancer launched in VPC, this value must be “intranet”. - internet: After an Internet SLB instance is created, the system allocates a public IP address so that the instance can forward requests from the Internet. - intranet: After an intranet SLB instance is created, the system allocates an intranet IP address so that the instance can only forward intranet requests.
- Bandwidth int
Valid value is between 1 and 1000, If argument “internet_charge_type” is “paybytraffic”, then this value will be ignore.
- Delete
Protection string Whether enable the deletion protection or not. on: Enable deletion protection. off: Disable deletion protection. Default to off. Only postpaid instance support this function.
- Instance
Charge stringType The billing method of the load balancer. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
- Internet bool
Field ‘internet’ has been deprecated from provider version 1.55.3. Use ‘address_type’ replaces it.
- Internet
Charge stringType Valid values are
PayByBandwidth,PayByTraffic. If this value is “PayByBandwidth”, then argument “internet” must be “true”. Default is “PayByTraffic”. If load balancer launched in VPC, this value must be “PayByTraffic”. Before version 1.10.1, the valid values are “paybybandwidth” and “paybytraffic”.- Master
Zone stringId The primary zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- Name string
- Period int
The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values: [1-9, 12, 24, 36].- Resource
Group stringId The Id of resource group which the SLB belongs.
- Slave
Zone stringId The standby zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- Specification string
The specification of the Server Load Balancer instance. Default to empty string indicating it is “Shared-Performance” instance. Launching “Performance-guaranteed” instance, it is must be specified and it valid values are: “slb.s1.small”, “slb.s2.small”, “slb.s2.medium”, “slb.s3.small”, “slb.s3.medium”, “slb.s3.large” and “slb.s4.large”.
- Dictionary<string, object>
A mapping of tags to assign to the resource. The
tagscan have a maximum of 10 tag for every load balancer instance.- Vswitch
Id string The VSwitch ID to launch in. If
address_typeis internet, it will be ignore.
- Address string
Specify the IP address of the private network for the SLB instance, which must be in the destination CIDR block of the correspond ing switch.
- Address
Ip stringVersion The IP version of the SLB instance to be created, which can be set to ipv4 or ipv6 . Default to “ipv4”. Now, only internet instance support ipv6 address.
- Address
Type string The network type of the SLB instance. Valid values: [“internet”, “intranet”]. If load balancer launched in VPC, this value must be “intranet”. - internet: After an Internet SLB instance is created, the system allocates a public IP address so that the instance can forward requests from the Internet. - intranet: After an intranet SLB instance is created, the system allocates an intranet IP address so that the instance can only forward intranet requests.
- Bandwidth int
Valid value is between 1 and 1000, If argument “internet_charge_type” is “paybytraffic”, then this value will be ignore.
- Delete
Protection string Whether enable the deletion protection or not. on: Enable deletion protection. off: Disable deletion protection. Default to off. Only postpaid instance support this function.
- Instance
Charge stringType The billing method of the load balancer. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
- Internet bool
Field ‘internet’ has been deprecated from provider version 1.55.3. Use ‘address_type’ replaces it.
- Internet
Charge stringType Valid values are
PayByBandwidth,PayByTraffic. If this value is “PayByBandwidth”, then argument “internet” must be “true”. Default is “PayByTraffic”. If load balancer launched in VPC, this value must be “PayByTraffic”. Before version 1.10.1, the valid values are “paybybandwidth” and “paybytraffic”.- Master
Zone stringId The primary zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- Name string
- Period int
The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values: [1-9, 12, 24, 36].- Resource
Group stringId The Id of resource group which the SLB belongs.
- Slave
Zone stringId The standby zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- Specification string
The specification of the Server Load Balancer instance. Default to empty string indicating it is “Shared-Performance” instance. Launching “Performance-guaranteed” instance, it is must be specified and it valid values are: “slb.s1.small”, “slb.s2.small”, “slb.s2.medium”, “slb.s3.small”, “slb.s3.medium”, “slb.s3.large” and “slb.s4.large”.
- map[string]interface{}
A mapping of tags to assign to the resource. The
tagscan have a maximum of 10 tag for every load balancer instance.- Vswitch
Id string The VSwitch ID to launch in. If
address_typeis internet, it will be ignore.
- address string
Specify the IP address of the private network for the SLB instance, which must be in the destination CIDR block of the correspond ing switch.
- address
Ip stringVersion The IP version of the SLB instance to be created, which can be set to ipv4 or ipv6 . Default to “ipv4”. Now, only internet instance support ipv6 address.
- address
Type string The network type of the SLB instance. Valid values: [“internet”, “intranet”]. If load balancer launched in VPC, this value must be “intranet”. - internet: After an Internet SLB instance is created, the system allocates a public IP address so that the instance can forward requests from the Internet. - intranet: After an intranet SLB instance is created, the system allocates an intranet IP address so that the instance can only forward intranet requests.
- bandwidth number
Valid value is between 1 and 1000, If argument “internet_charge_type” is “paybytraffic”, then this value will be ignore.
- delete
Protection string Whether enable the deletion protection or not. on: Enable deletion protection. off: Disable deletion protection. Default to off. Only postpaid instance support this function.
- instance
Charge stringType The billing method of the load balancer. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
- internet boolean
Field ‘internet’ has been deprecated from provider version 1.55.3. Use ‘address_type’ replaces it.
- internet
Charge stringType Valid values are
PayByBandwidth,PayByTraffic. If this value is “PayByBandwidth”, then argument “internet” must be “true”. Default is “PayByTraffic”. If load balancer launched in VPC, this value must be “PayByTraffic”. Before version 1.10.1, the valid values are “paybybandwidth” and “paybytraffic”.- master
Zone stringId The primary zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- name string
- period number
The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values: [1-9, 12, 24, 36].- resource
Group stringId The Id of resource group which the SLB belongs.
- slave
Zone stringId The standby zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- specification string
The specification of the Server Load Balancer instance. Default to empty string indicating it is “Shared-Performance” instance. Launching “Performance-guaranteed” instance, it is must be specified and it valid values are: “slb.s1.small”, “slb.s2.small”, “slb.s2.medium”, “slb.s3.small”, “slb.s3.medium”, “slb.s3.large” and “slb.s4.large”.
- {[key: string]: any}
A mapping of tags to assign to the resource. The
tagscan have a maximum of 10 tag for every load balancer instance.- vswitch
Id string The VSwitch ID to launch in. If
address_typeis internet, it will be ignore.
- address str
Specify the IP address of the private network for the SLB instance, which must be in the destination CIDR block of the correspond ing switch.
- address_
ip_ strversion The IP version of the SLB instance to be created, which can be set to ipv4 or ipv6 . Default to “ipv4”. Now, only internet instance support ipv6 address.
- address_
type str The network type of the SLB instance. Valid values: [“internet”, “intranet”]. If load balancer launched in VPC, this value must be “intranet”. - internet: After an Internet SLB instance is created, the system allocates a public IP address so that the instance can forward requests from the Internet. - intranet: After an intranet SLB instance is created, the system allocates an intranet IP address so that the instance can only forward intranet requests.
- bandwidth float
Valid value is between 1 and 1000, If argument “internet_charge_type” is “paybytraffic”, then this value will be ignore.
- delete_
protection str Whether enable the deletion protection or not. on: Enable deletion protection. off: Disable deletion protection. Default to off. Only postpaid instance support this function.
- instance_
charge_ strtype The billing method of the load balancer. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
- internet bool
Field ‘internet’ has been deprecated from provider version 1.55.3. Use ‘address_type’ replaces it.
- internet_
charge_ strtype Valid values are
PayByBandwidth,PayByTraffic. If this value is “PayByBandwidth”, then argument “internet” must be “true”. Default is “PayByTraffic”. If load balancer launched in VPC, this value must be “PayByTraffic”. Before version 1.10.1, the valid values are “paybybandwidth” and “paybytraffic”.- master_
zone_ strid The primary zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- name str
- period float
The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values: [1-9, 12, 24, 36].- resource_
group_ strid The Id of resource group which the SLB belongs.
- slave_
zone_ strid The standby zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- specification str
The specification of the Server Load Balancer instance. Default to empty string indicating it is “Shared-Performance” instance. Launching “Performance-guaranteed” instance, it is must be specified and it valid values are: “slb.s1.small”, “slb.s2.small”, “slb.s2.medium”, “slb.s3.small”, “slb.s3.medium”, “slb.s3.large” and “slb.s4.large”.
- Dict[str, Any]
A mapping of tags to assign to the resource. The
tagscan have a maximum of 10 tag for every load balancer instance.- vswitch_
id str The VSwitch ID to launch in. If
address_typeis internet, it will be ignore.
Outputs
All input properties are implicitly available as output properties. Additionally, the LoadBalancer resource produces the following output properties:
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): LoadBalancerstatic get(resource_name, id, opts=None, address=None, address_ip_version=None, address_type=None, bandwidth=None, delete_protection=None, instance_charge_type=None, internet=None, internet_charge_type=None, master_zone_id=None, name=None, period=None, resource_group_id=None, slave_zone_id=None, specification=None, tags=None, vswitch_id=None, __props__=None);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:
- Address string
Specify the IP address of the private network for the SLB instance, which must be in the destination CIDR block of the correspond ing switch.
- Address
Ip stringVersion The IP version of the SLB instance to be created, which can be set to ipv4 or ipv6 . Default to “ipv4”. Now, only internet instance support ipv6 address.
- Address
Type string The network type of the SLB instance. Valid values: [“internet”, “intranet”]. If load balancer launched in VPC, this value must be “intranet”. - internet: After an Internet SLB instance is created, the system allocates a public IP address so that the instance can forward requests from the Internet. - intranet: After an intranet SLB instance is created, the system allocates an intranet IP address so that the instance can only forward intranet requests.
- Bandwidth int
Valid value is between 1 and 1000, If argument “internet_charge_type” is “paybytraffic”, then this value will be ignore.
- Delete
Protection string Whether enable the deletion protection or not. on: Enable deletion protection. off: Disable deletion protection. Default to off. Only postpaid instance support this function.
- Instance
Charge stringType The billing method of the load balancer. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
- Internet bool
Field ‘internet’ has been deprecated from provider version 1.55.3. Use ‘address_type’ replaces it.
- Internet
Charge stringType Valid values are
PayByBandwidth,PayByTraffic. If this value is “PayByBandwidth”, then argument “internet” must be “true”. Default is “PayByTraffic”. If load balancer launched in VPC, this value must be “PayByTraffic”. Before version 1.10.1, the valid values are “paybybandwidth” and “paybytraffic”.- Master
Zone stringId The primary zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- Name string
- Period int
The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values: [1-9, 12, 24, 36].- Resource
Group stringId The Id of resource group which the SLB belongs.
- Slave
Zone stringId The standby zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- Specification string
The specification of the Server Load Balancer instance. Default to empty string indicating it is “Shared-Performance” instance. Launching “Performance-guaranteed” instance, it is must be specified and it valid values are: “slb.s1.small”, “slb.s2.small”, “slb.s2.medium”, “slb.s3.small”, “slb.s3.medium”, “slb.s3.large” and “slb.s4.large”.
- Dictionary<string, object>
A mapping of tags to assign to the resource. The
tagscan have a maximum of 10 tag for every load balancer instance.- Vswitch
Id string The VSwitch ID to launch in. If
address_typeis internet, it will be ignore.
- Address string
Specify the IP address of the private network for the SLB instance, which must be in the destination CIDR block of the correspond ing switch.
- Address
Ip stringVersion The IP version of the SLB instance to be created, which can be set to ipv4 or ipv6 . Default to “ipv4”. Now, only internet instance support ipv6 address.
- Address
Type string The network type of the SLB instance. Valid values: [“internet”, “intranet”]. If load balancer launched in VPC, this value must be “intranet”. - internet: After an Internet SLB instance is created, the system allocates a public IP address so that the instance can forward requests from the Internet. - intranet: After an intranet SLB instance is created, the system allocates an intranet IP address so that the instance can only forward intranet requests.
- Bandwidth int
Valid value is between 1 and 1000, If argument “internet_charge_type” is “paybytraffic”, then this value will be ignore.
- Delete
Protection string Whether enable the deletion protection or not. on: Enable deletion protection. off: Disable deletion protection. Default to off. Only postpaid instance support this function.
- Instance
Charge stringType The billing method of the load balancer. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
- Internet bool
Field ‘internet’ has been deprecated from provider version 1.55.3. Use ‘address_type’ replaces it.
- Internet
Charge stringType Valid values are
PayByBandwidth,PayByTraffic. If this value is “PayByBandwidth”, then argument “internet” must be “true”. Default is “PayByTraffic”. If load balancer launched in VPC, this value must be “PayByTraffic”. Before version 1.10.1, the valid values are “paybybandwidth” and “paybytraffic”.- Master
Zone stringId The primary zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- Name string
- Period int
The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values: [1-9, 12, 24, 36].- Resource
Group stringId The Id of resource group which the SLB belongs.
- Slave
Zone stringId The standby zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- Specification string
The specification of the Server Load Balancer instance. Default to empty string indicating it is “Shared-Performance” instance. Launching “Performance-guaranteed” instance, it is must be specified and it valid values are: “slb.s1.small”, “slb.s2.small”, “slb.s2.medium”, “slb.s3.small”, “slb.s3.medium”, “slb.s3.large” and “slb.s4.large”.
- map[string]interface{}
A mapping of tags to assign to the resource. The
tagscan have a maximum of 10 tag for every load balancer instance.- Vswitch
Id string The VSwitch ID to launch in. If
address_typeis internet, it will be ignore.
- address string
Specify the IP address of the private network for the SLB instance, which must be in the destination CIDR block of the correspond ing switch.
- address
Ip stringVersion The IP version of the SLB instance to be created, which can be set to ipv4 or ipv6 . Default to “ipv4”. Now, only internet instance support ipv6 address.
- address
Type string The network type of the SLB instance. Valid values: [“internet”, “intranet”]. If load balancer launched in VPC, this value must be “intranet”. - internet: After an Internet SLB instance is created, the system allocates a public IP address so that the instance can forward requests from the Internet. - intranet: After an intranet SLB instance is created, the system allocates an intranet IP address so that the instance can only forward intranet requests.
- bandwidth number
Valid value is between 1 and 1000, If argument “internet_charge_type” is “paybytraffic”, then this value will be ignore.
- delete
Protection string Whether enable the deletion protection or not. on: Enable deletion protection. off: Disable deletion protection. Default to off. Only postpaid instance support this function.
- instance
Charge stringType The billing method of the load balancer. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
- internet boolean
Field ‘internet’ has been deprecated from provider version 1.55.3. Use ‘address_type’ replaces it.
- internet
Charge stringType Valid values are
PayByBandwidth,PayByTraffic. If this value is “PayByBandwidth”, then argument “internet” must be “true”. Default is “PayByTraffic”. If load balancer launched in VPC, this value must be “PayByTraffic”. Before version 1.10.1, the valid values are “paybybandwidth” and “paybytraffic”.- master
Zone stringId The primary zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- name string
- period number
The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values: [1-9, 12, 24, 36].- resource
Group stringId The Id of resource group which the SLB belongs.
- slave
Zone stringId The standby zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- specification string
The specification of the Server Load Balancer instance. Default to empty string indicating it is “Shared-Performance” instance. Launching “Performance-guaranteed” instance, it is must be specified and it valid values are: “slb.s1.small”, “slb.s2.small”, “slb.s2.medium”, “slb.s3.small”, “slb.s3.medium”, “slb.s3.large” and “slb.s4.large”.
- {[key: string]: any}
A mapping of tags to assign to the resource. The
tagscan have a maximum of 10 tag for every load balancer instance.- vswitch
Id string The VSwitch ID to launch in. If
address_typeis internet, it will be ignore.
- address str
Specify the IP address of the private network for the SLB instance, which must be in the destination CIDR block of the correspond ing switch.
- address_
ip_ strversion The IP version of the SLB instance to be created, which can be set to ipv4 or ipv6 . Default to “ipv4”. Now, only internet instance support ipv6 address.
- address_
type str The network type of the SLB instance. Valid values: [“internet”, “intranet”]. If load balancer launched in VPC, this value must be “intranet”. - internet: After an Internet SLB instance is created, the system allocates a public IP address so that the instance can forward requests from the Internet. - intranet: After an intranet SLB instance is created, the system allocates an intranet IP address so that the instance can only forward intranet requests.
- bandwidth float
Valid value is between 1 and 1000, If argument “internet_charge_type” is “paybytraffic”, then this value will be ignore.
- delete_
protection str Whether enable the deletion protection or not. on: Enable deletion protection. off: Disable deletion protection. Default to off. Only postpaid instance support this function.
- instance_
charge_ strtype The billing method of the load balancer. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
- internet bool
Field ‘internet’ has been deprecated from provider version 1.55.3. Use ‘address_type’ replaces it.
- internet_
charge_ strtype Valid values are
PayByBandwidth,PayByTraffic. If this value is “PayByBandwidth”, then argument “internet” must be “true”. Default is “PayByTraffic”. If load balancer launched in VPC, this value must be “PayByTraffic”. Before version 1.10.1, the valid values are “paybybandwidth” and “paybytraffic”.- master_
zone_ strid The primary zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- name str
- period float
The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values: [1-9, 12, 24, 36].- resource_
group_ strid The Id of resource group which the SLB belongs.
- slave_
zone_ strid The standby zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
- specification str
The specification of the Server Load Balancer instance. Default to empty string indicating it is “Shared-Performance” instance. Launching “Performance-guaranteed” instance, it is must be specified and it valid values are: “slb.s1.small”, “slb.s2.small”, “slb.s2.medium”, “slb.s3.small”, “slb.s3.medium”, “slb.s3.large” and “slb.s4.large”.
- Dict[str, Any]
A mapping of tags to assign to the resource. The
tagscan have a maximum of 10 tag for every load balancer instance.- vswitch_
id str The VSwitch ID to launch in. If
address_typeis internet, it will be ignore.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.