alicloud.alb.LoadBalancer
Explore with Pulumi AI
Provides a ALB Load Balancer resource.
For information about ALB Load Balancer and how to use it, see What is Load Balancer.
NOTE: Available since v1.132.0.
Create LoadBalancer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LoadBalancer(name: string, args: LoadBalancerArgs, opts?: CustomResourceOptions);
@overload
def LoadBalancer(resource_name: str,
args: LoadBalancerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LoadBalancer(resource_name: str,
opts: Optional[ResourceOptions] = None,
load_balancer_billing_config: Optional[LoadBalancerLoadBalancerBillingConfigArgs] = None,
zone_mappings: Optional[Sequence[LoadBalancerZoneMappingArgs]] = None,
vpc_id: Optional[str] = None,
address_type: Optional[str] = None,
load_balancer_edition: Optional[str] = None,
bandwidth_package_id: Optional[str] = None,
dry_run: Optional[bool] = None,
ipv6_address_type: Optional[str] = None,
deletion_protection_enabled: Optional[bool] = None,
access_log_config: Optional[LoadBalancerAccessLogConfigArgs] = 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,
address_ip_version: Optional[str] = None,
address_allocated_mode: Optional[str] = None)
func NewLoadBalancer(ctx *Context, name string, args LoadBalancerArgs, opts ...ResourceOption) (*LoadBalancer, error)
public LoadBalancer(string name, LoadBalancerArgs args, CustomResourceOptions? opts = null)
public LoadBalancer(String name, LoadBalancerArgs args)
public LoadBalancer(String name, LoadBalancerArgs args, CustomResourceOptions options)
type: alicloud:alb:LoadBalancer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
- name String
- The unique name of the resource.
- args LoadBalancerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var loadBalancerResource = new AliCloud.Alb.LoadBalancer("loadBalancerResource", new()
{
LoadBalancerBillingConfig = new AliCloud.Alb.Inputs.LoadBalancerLoadBalancerBillingConfigArgs
{
PayType = "string",
},
ZoneMappings = new[]
{
new AliCloud.Alb.Inputs.LoadBalancerZoneMappingArgs
{
VswitchId = "string",
ZoneId = "string",
LoadBalancerAddresses = new[]
{
new AliCloud.Alb.Inputs.LoadBalancerZoneMappingLoadBalancerAddressArgs
{
Address = "string",
AllocationId = "string",
EipType = "string",
Ipv6Address = "string",
},
},
},
},
VpcId = "string",
AddressType = "string",
LoadBalancerEdition = "string",
BandwidthPackageId = "string",
DryRun = false,
Ipv6AddressType = "string",
DeletionProtectionEnabled = false,
AccessLogConfig = new AliCloud.Alb.Inputs.LoadBalancerAccessLogConfigArgs
{
LogProject = "string",
LogStore = "string",
},
LoadBalancerName = "string",
ModificationProtectionConfig = new AliCloud.Alb.Inputs.LoadBalancerModificationProtectionConfigArgs
{
Reason = "string",
Status = "string",
},
ResourceGroupId = "string",
Tags =
{
{ "string", "any" },
},
AddressIpVersion = "string",
AddressAllocatedMode = "string",
});
example, err := alb.NewLoadBalancer(ctx, "loadBalancerResource", &alb.LoadBalancerArgs{
LoadBalancerBillingConfig: &alb.LoadBalancerLoadBalancerBillingConfigArgs{
PayType: pulumi.String("string"),
},
ZoneMappings: alb.LoadBalancerZoneMappingArray{
&alb.LoadBalancerZoneMappingArgs{
VswitchId: pulumi.String("string"),
ZoneId: pulumi.String("string"),
LoadBalancerAddresses: alb.LoadBalancerZoneMappingLoadBalancerAddressArray{
&alb.LoadBalancerZoneMappingLoadBalancerAddressArgs{
Address: pulumi.String("string"),
AllocationId: pulumi.String("string"),
EipType: pulumi.String("string"),
Ipv6Address: pulumi.String("string"),
},
},
},
},
VpcId: pulumi.String("string"),
AddressType: pulumi.String("string"),
LoadBalancerEdition: pulumi.String("string"),
BandwidthPackageId: pulumi.String("string"),
DryRun: pulumi.Bool(false),
Ipv6AddressType: pulumi.String("string"),
DeletionProtectionEnabled: pulumi.Bool(false),
AccessLogConfig: &alb.LoadBalancerAccessLogConfigArgs{
LogProject: pulumi.String("string"),
LogStore: pulumi.String("string"),
},
LoadBalancerName: pulumi.String("string"),
ModificationProtectionConfig: &alb.LoadBalancerModificationProtectionConfigArgs{
Reason: pulumi.String("string"),
Status: pulumi.String("string"),
},
ResourceGroupId: pulumi.String("string"),
Tags: pulumi.Map{
"string": pulumi.Any("any"),
},
AddressIpVersion: pulumi.String("string"),
AddressAllocatedMode: pulumi.String("string"),
})
var loadBalancerResource = new LoadBalancer("loadBalancerResource", LoadBalancerArgs.builder()
.loadBalancerBillingConfig(LoadBalancerLoadBalancerBillingConfigArgs.builder()
.payType("string")
.build())
.zoneMappings(LoadBalancerZoneMappingArgs.builder()
.vswitchId("string")
.zoneId("string")
.loadBalancerAddresses(LoadBalancerZoneMappingLoadBalancerAddressArgs.builder()
.address("string")
.allocationId("string")
.eipType("string")
.ipv6Address("string")
.build())
.build())
.vpcId("string")
.addressType("string")
.loadBalancerEdition("string")
.bandwidthPackageId("string")
.dryRun(false)
.ipv6AddressType("string")
.deletionProtectionEnabled(false)
.accessLogConfig(LoadBalancerAccessLogConfigArgs.builder()
.logProject("string")
.logStore("string")
.build())
.loadBalancerName("string")
.modificationProtectionConfig(LoadBalancerModificationProtectionConfigArgs.builder()
.reason("string")
.status("string")
.build())
.resourceGroupId("string")
.tags(Map.of("string", "any"))
.addressIpVersion("string")
.addressAllocatedMode("string")
.build());
load_balancer_resource = alicloud.alb.LoadBalancer("loadBalancerResource",
load_balancer_billing_config=alicloud.alb.LoadBalancerLoadBalancerBillingConfigArgs(
pay_type="string",
),
zone_mappings=[alicloud.alb.LoadBalancerZoneMappingArgs(
vswitch_id="string",
zone_id="string",
load_balancer_addresses=[alicloud.alb.LoadBalancerZoneMappingLoadBalancerAddressArgs(
address="string",
allocation_id="string",
eip_type="string",
ipv6_address="string",
)],
)],
vpc_id="string",
address_type="string",
load_balancer_edition="string",
bandwidth_package_id="string",
dry_run=False,
ipv6_address_type="string",
deletion_protection_enabled=False,
access_log_config=alicloud.alb.LoadBalancerAccessLogConfigArgs(
log_project="string",
log_store="string",
),
load_balancer_name="string",
modification_protection_config=alicloud.alb.LoadBalancerModificationProtectionConfigArgs(
reason="string",
status="string",
),
resource_group_id="string",
tags={
"string": "any",
},
address_ip_version="string",
address_allocated_mode="string")
const loadBalancerResource = new alicloud.alb.LoadBalancer("loadBalancerResource", {
loadBalancerBillingConfig: {
payType: "string",
},
zoneMappings: [{
vswitchId: "string",
zoneId: "string",
loadBalancerAddresses: [{
address: "string",
allocationId: "string",
eipType: "string",
ipv6Address: "string",
}],
}],
vpcId: "string",
addressType: "string",
loadBalancerEdition: "string",
bandwidthPackageId: "string",
dryRun: false,
ipv6AddressType: "string",
deletionProtectionEnabled: false,
accessLogConfig: {
logProject: "string",
logStore: "string",
},
loadBalancerName: "string",
modificationProtectionConfig: {
reason: "string",
status: "string",
},
resourceGroupId: "string",
tags: {
string: "any",
},
addressIpVersion: "string",
addressAllocatedMode: "string",
});
type: alicloud:alb:LoadBalancer
properties:
accessLogConfig:
logProject: string
logStore: string
addressAllocatedMode: string
addressIpVersion: string
addressType: string
bandwidthPackageId: string
deletionProtectionEnabled: false
dryRun: false
ipv6AddressType: string
loadBalancerBillingConfig:
payType: string
loadBalancerEdition: string
loadBalancerName: string
modificationProtectionConfig:
reason: string
status: string
resourceGroupId: string
tags:
string: any
vpcId: string
zoneMappings:
- loadBalancerAddresses:
- address: string
allocationId: string
eipType: string
ipv6Address: string
vswitchId: string
zoneId: string
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:
- Address
Type string - The type of IP address that the SLB instance uses to provide services.
- Load
Balancer Pulumi.Billing Config Ali Cloud. Alb. Inputs. Load Balancer Load Balancer Billing Config - The configuration of the billing method. See
load_balancer_billing_config
below. - Load
Balancer stringEdition - The edition of the ALB instance.
- Vpc
Id string - The ID of the virtual private cloud (VPC) where the SLB instance is deployed.
- Zone
Mappings List<Pulumi.Ali Cloud. Alb. Inputs. Load Balancer Zone Mapping> - The zones and vSwitches. You must specify at least two zones. See
zone_mappings
below. - Access
Log Pulumi.Config Ali Cloud. Alb. Inputs. Load Balancer Access Log Config - The Access Logging Configuration Structure. See
access_log_config
below. - Address
Allocated stringMode - The method in which IP addresses are assigned. Valid values: Fixed: The ALB instance uses a fixed IP address. Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
- Address
Ip stringVersion - The protocol version. Value:
- IPv4:IPv4 type.
- DualStack: the dual-stack type.
- Bandwidth
Package stringId - The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.
- Deletion
Protection boolEnabled - Whether to enable delete protection. Value:true: on.false (default): Off.
- Dry
Run bool - Whether to PreCheck only this request, value:true: sends a check request and does not create a resource. Check items include whether required parameters are filled in, request format, and business restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.false (default): Sends a normal request, returns the HTTP_2xx status code after the check, and directly performs the operation.
- Ipv6Address
Type string - The address type of Ipv6.
- Load
Balancer stringName - The name of the resource.
- Modification
Protection Pulumi.Config Ali Cloud. Alb. Inputs. Load Balancer Modification Protection Config - Modify the Protection Configuration. See
modification_protection_config
below. - Resource
Group stringId - The ID of the resource group.
- Dictionary<string, object>
- The tag of the resource.
- Address
Type string - The type of IP address that the SLB instance uses to provide services.
- Load
Balancer LoadBilling Config Balancer Load Balancer Billing Config Args - The configuration of the billing method. See
load_balancer_billing_config
below. - Load
Balancer stringEdition - The edition of the ALB instance.
- Vpc
Id string - The ID of the virtual private cloud (VPC) where the SLB instance is deployed.
- Zone
Mappings []LoadBalancer Zone Mapping Args - The zones and vSwitches. You must specify at least two zones. See
zone_mappings
below. - Access
Log LoadConfig Balancer Access Log Config Args - The Access Logging Configuration Structure. See
access_log_config
below. - Address
Allocated stringMode - The method in which IP addresses are assigned. Valid values: Fixed: The ALB instance uses a fixed IP address. Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
- Address
Ip stringVersion - The protocol version. Value:
- IPv4:IPv4 type.
- DualStack: the dual-stack type.
- Bandwidth
Package stringId - The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.
- Deletion
Protection boolEnabled - Whether to enable delete protection. Value:true: on.false (default): Off.
- Dry
Run bool - Whether to PreCheck only this request, value:true: sends a check request and does not create a resource. Check items include whether required parameters are filled in, request format, and business restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.false (default): Sends a normal request, returns the HTTP_2xx status code after the check, and directly performs the operation.
- Ipv6Address
Type string - The address type of Ipv6.
- Load
Balancer stringName - The name of the resource.
- Modification
Protection LoadConfig Balancer Modification Protection Config Args - Modify the Protection Configuration. See
modification_protection_config
below. - Resource
Group stringId - The ID of the resource group.
- map[string]interface{}
- The tag of the resource.
- address
Type String - The type of IP address that the SLB instance uses to provide services.
- load
Balancer LoadBilling Config Balancer Load Balancer Billing Config - The configuration of the billing method. See
load_balancer_billing_config
below. - load
Balancer StringEdition - The edition of the ALB instance.
- vpc
Id String - The ID of the virtual private cloud (VPC) where the SLB instance is deployed.
- zone
Mappings List<LoadBalancer Zone Mapping> - The zones and vSwitches. You must specify at least two zones. See
zone_mappings
below. - access
Log LoadConfig Balancer Access Log Config - The Access Logging Configuration Structure. See
access_log_config
below. - address
Allocated StringMode - The method in which IP addresses are assigned. Valid values: Fixed: The ALB instance uses a fixed IP address. Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
- address
Ip StringVersion - The protocol version. Value:
- IPv4:IPv4 type.
- DualStack: the dual-stack type.
- bandwidth
Package StringId - The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.
- deletion
Protection BooleanEnabled - Whether to enable delete protection. Value:true: on.false (default): Off.
- dry
Run Boolean - Whether to PreCheck only this request, value:true: sends a check request and does not create a resource. Check items include whether required parameters are filled in, request format, and business restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.false (default): Sends a normal request, returns the HTTP_2xx status code after the check, and directly performs the operation.
- ipv6Address
Type String - The address type of Ipv6.
- load
Balancer StringName - The name of the resource.
- modification
Protection LoadConfig Balancer Modification Protection Config - Modify the Protection Configuration. See
modification_protection_config
below. - resource
Group StringId - The ID of the resource group.
- Map<String,Object>
- The tag of the resource.
- address
Type string - The type of IP address that the SLB instance uses to provide services.
- load
Balancer LoadBilling Config Balancer Load Balancer Billing Config - The configuration of the billing method. See
load_balancer_billing_config
below. - load
Balancer stringEdition - The edition of the ALB instance.
- vpc
Id string - The ID of the virtual private cloud (VPC) where the SLB instance is deployed.
- zone
Mappings LoadBalancer Zone Mapping[] - The zones and vSwitches. You must specify at least two zones. See
zone_mappings
below. - access
Log LoadConfig Balancer Access Log Config - The Access Logging Configuration Structure. See
access_log_config
below. - address
Allocated stringMode - The method in which IP addresses are assigned. Valid values: Fixed: The ALB instance uses a fixed IP address. Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
- address
Ip stringVersion - The protocol version. Value:
- IPv4:IPv4 type.
- DualStack: the dual-stack type.
- bandwidth
Package stringId - The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.
- deletion
Protection booleanEnabled - Whether to enable delete protection. Value:true: on.false (default): Off.
- dry
Run boolean - Whether to PreCheck only this request, value:true: sends a check request and does not create a resource. Check items include whether required parameters are filled in, request format, and business restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.false (default): Sends a normal request, returns the HTTP_2xx status code after the check, and directly performs the operation.
- ipv6Address
Type string - The address type of Ipv6.
- load
Balancer stringName - The name of the resource.
- modification
Protection LoadConfig Balancer Modification Protection Config - Modify the Protection Configuration. See
modification_protection_config
below. - resource
Group stringId - The ID of the resource group.
- {[key: string]: any}
- The tag of the resource.
- address_
type str - The type of IP address that the SLB instance uses to provide services.
- load_
balancer_ Loadbilling_ config Balancer Load Balancer Billing Config Args - The configuration of the billing method. See
load_balancer_billing_config
below. - load_
balancer_ stredition - The edition of the ALB instance.
- vpc_
id str - The ID of the virtual private cloud (VPC) where the SLB instance is deployed.
- zone_
mappings Sequence[LoadBalancer Zone Mapping Args] - The zones and vSwitches. You must specify at least two zones. See
zone_mappings
below. - access_
log_ Loadconfig Balancer Access Log Config Args - The Access Logging Configuration Structure. See
access_log_config
below. - address_
allocated_ strmode - The method in which IP addresses are assigned. Valid values: Fixed: The ALB instance uses a fixed IP address. Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
- address_
ip_ strversion - The protocol version. Value:
- IPv4:IPv4 type.
- DualStack: the dual-stack type.
- bandwidth_
package_ strid - The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.
- deletion_
protection_ boolenabled - Whether to enable delete protection. Value:true: on.false (default): Off.
- dry_
run bool - Whether to PreCheck only this request, value:true: sends a check request and does not create a resource. Check items include whether required parameters are filled in, request format, and business restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.false (default): Sends a normal request, returns the HTTP_2xx status code after the check, and directly performs the operation.
- ipv6_
address_ strtype - The address type of Ipv6.
- load_
balancer_ strname - The name of the resource.
- modification_
protection_ Loadconfig Balancer Modification Protection Config Args - Modify the Protection Configuration. See
modification_protection_config
below. - resource_
group_ strid - The ID of the resource group.
- Mapping[str, Any]
- The tag of the resource.
- address
Type String - The type of IP address that the SLB instance uses to provide services.
- load
Balancer Property MapBilling Config - The configuration of the billing method. See
load_balancer_billing_config
below. - load
Balancer StringEdition - The edition of the ALB instance.
- vpc
Id String - The ID of the virtual private cloud (VPC) where the SLB instance is deployed.
- zone
Mappings List<Property Map> - The zones and vSwitches. You must specify at least two zones. See
zone_mappings
below. - access
Log Property MapConfig - The Access Logging Configuration Structure. See
access_log_config
below. - address
Allocated StringMode - The method in which IP addresses are assigned. Valid values: Fixed: The ALB instance uses a fixed IP address. Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
- address
Ip StringVersion - The protocol version. Value:
- IPv4:IPv4 type.
- DualStack: the dual-stack type.
- bandwidth
Package StringId - The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.
- deletion
Protection BooleanEnabled - Whether to enable delete protection. Value:true: on.false (default): Off.
- dry
Run Boolean - Whether to PreCheck only this request, value:true: sends a check request and does not create a resource. Check items include whether required parameters are filled in, request format, and business restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.false (default): Sends a normal request, returns the HTTP_2xx status code after the check, and directly performs the operation.
- ipv6Address
Type String - The address type of Ipv6.
- load
Balancer StringName - The name of the resource.
- modification
Protection Property MapConfig - Modify the Protection Configuration. See
modification_protection_config
below. - resource
Group StringId - The ID of the resource group.
- Map<Any>
- The tag of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the LoadBalancer resource produces the following output properties:
- Create
Time string - The creation time of the resource.
- Dns
Name string - The domain name of the ALB instance. NOTE: Available in v1.158.0+.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Server Load Balancer Instance Status:, indicating that the instance listener will no longer forward traffic.(default).
- Create
Time string - The creation time of the resource.
- Dns
Name string - The domain name of the ALB instance. NOTE: Available in v1.158.0+.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Server Load Balancer Instance Status:, indicating that the instance listener will no longer forward traffic.(default).
- create
Time String - The creation time of the resource.
- dns
Name String - The domain name of the ALB instance. NOTE: Available in v1.158.0+.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Server Load Balancer Instance Status:, indicating that the instance listener will no longer forward traffic.(default).
- create
Time string - The creation time of the resource.
- dns
Name string - The domain name of the ALB instance. NOTE: Available in v1.158.0+.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- Server Load Balancer Instance Status:, indicating that the instance listener will no longer forward traffic.(default).
- create_
time str - The creation time of the resource.
- dns_
name str - The domain name of the ALB instance. NOTE: Available in v1.158.0+.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- Server Load Balancer Instance Status:, indicating that the instance listener will no longer forward traffic.(default).
- create
Time String - The creation time of the resource.
- dns
Name String - The domain name of the ALB instance. NOTE: Available in v1.158.0+.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Server Load Balancer Instance Status:, indicating that the instance listener will no longer forward traffic.(default).
Look up 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_ip_version: Optional[str] = None,
address_type: Optional[str] = None,
bandwidth_package_id: Optional[str] = None,
create_time: Optional[str] = None,
deletion_protection_enabled: Optional[bool] = None,
dns_name: Optional[str] = None,
dry_run: Optional[bool] = None,
ipv6_address_type: Optional[str] = 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)
public static LoadBalancer get(String name, Output<String> id, LoadBalancerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Access
Log Pulumi.Config Ali Cloud. Alb. Inputs. Load Balancer Access Log Config - The Access Logging Configuration Structure. See
access_log_config
below. - Address
Allocated stringMode - The method in which IP addresses are assigned. Valid values: Fixed: The ALB instance uses a fixed IP address. Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
- Address
Ip stringVersion - The protocol version. Value:
- IPv4:IPv4 type.
- DualStack: the dual-stack type.
- Address
Type string - The type of IP address that the SLB instance uses to provide services.
- Bandwidth
Package stringId - The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.
- Create
Time string - The creation time of the resource.
- Deletion
Protection boolEnabled - Whether to enable delete protection. Value:true: on.false (default): Off.
- Dns
Name string - The domain name of the ALB instance. NOTE: Available in v1.158.0+.
- Dry
Run bool - Whether to PreCheck only this request, value:true: sends a check request and does not create a resource. Check items include whether required parameters are filled in, request format, and business restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.false (default): Sends a normal request, returns the HTTP_2xx status code after the check, and directly performs the operation.
- Ipv6Address
Type string - The address type of Ipv6.
- Load
Balancer Pulumi.Billing Config Ali Cloud. Alb. Inputs. Load Balancer Load Balancer Billing Config - The configuration of the billing method. See
load_balancer_billing_config
below. - Load
Balancer stringEdition - The edition of the ALB instance.
- Load
Balancer stringName - The name of the resource.
- Modification
Protection Pulumi.Config Ali Cloud. Alb. Inputs. Load Balancer Modification Protection Config - Modify the Protection Configuration. See
modification_protection_config
below. - Resource
Group stringId - The ID of the resource group.
- Status string
- Server Load Balancer Instance Status:, indicating that the instance listener will no longer forward traffic.(default).
- Dictionary<string, object>
- The tag of the resource.
- Vpc
Id string - The ID of the virtual private cloud (VPC) where the SLB instance is deployed.
- Zone
Mappings List<Pulumi.Ali Cloud. Alb. Inputs. Load Balancer Zone Mapping> - The zones and vSwitches. You must specify at least two zones. See
zone_mappings
below.
- Access
Log LoadConfig Balancer Access Log Config Args - The Access Logging Configuration Structure. See
access_log_config
below. - Address
Allocated stringMode - The method in which IP addresses are assigned. Valid values: Fixed: The ALB instance uses a fixed IP address. Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
- Address
Ip stringVersion - The protocol version. Value:
- IPv4:IPv4 type.
- DualStack: the dual-stack type.
- Address
Type string - The type of IP address that the SLB instance uses to provide services.
- Bandwidth
Package stringId - The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.
- Create
Time string - The creation time of the resource.
- Deletion
Protection boolEnabled - Whether to enable delete protection. Value:true: on.false (default): Off.
- Dns
Name string - The domain name of the ALB instance. NOTE: Available in v1.158.0+.
- Dry
Run bool - Whether to PreCheck only this request, value:true: sends a check request and does not create a resource. Check items include whether required parameters are filled in, request format, and business restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.false (default): Sends a normal request, returns the HTTP_2xx status code after the check, and directly performs the operation.
- Ipv6Address
Type string - The address type of Ipv6.
- Load
Balancer LoadBilling Config Balancer Load Balancer Billing Config Args - The configuration of the billing method. See
load_balancer_billing_config
below. - Load
Balancer stringEdition - The edition of the ALB instance.
- Load
Balancer stringName - The name of the resource.
- Modification
Protection LoadConfig Balancer Modification Protection Config Args - Modify the Protection Configuration. See
modification_protection_config
below. - Resource
Group stringId - The ID of the resource group.
- Status string
- Server Load Balancer Instance Status:, indicating that the instance listener will no longer forward traffic.(default).
- map[string]interface{}
- The tag of the resource.
- Vpc
Id string - The ID of the virtual private cloud (VPC) where the SLB instance is deployed.
- Zone
Mappings []LoadBalancer Zone Mapping Args - The zones and vSwitches. You must specify at least two zones. See
zone_mappings
below.
- access
Log LoadConfig Balancer Access Log Config - The Access Logging Configuration Structure. See
access_log_config
below. - address
Allocated StringMode - The method in which IP addresses are assigned. Valid values: Fixed: The ALB instance uses a fixed IP address. Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
- address
Ip StringVersion - The protocol version. Value:
- IPv4:IPv4 type.
- DualStack: the dual-stack type.
- address
Type String - The type of IP address that the SLB instance uses to provide services.
- bandwidth
Package StringId - The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.
- create
Time String - The creation time of the resource.
- deletion
Protection BooleanEnabled - Whether to enable delete protection. Value:true: on.false (default): Off.
- dns
Name String - The domain name of the ALB instance. NOTE: Available in v1.158.0+.
- dry
Run Boolean - Whether to PreCheck only this request, value:true: sends a check request and does not create a resource. Check items include whether required parameters are filled in, request format, and business restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.false (default): Sends a normal request, returns the HTTP_2xx status code after the check, and directly performs the operation.
- ipv6Address
Type String - The address type of Ipv6.
- load
Balancer LoadBilling Config Balancer Load Balancer Billing Config - The configuration of the billing method. See
load_balancer_billing_config
below. - load
Balancer StringEdition - The edition of the ALB instance.
- load
Balancer StringName - The name of the resource.
- modification
Protection LoadConfig Balancer Modification Protection Config - Modify the Protection Configuration. See
modification_protection_config
below. - resource
Group StringId - The ID of the resource group.
- status String
- Server Load Balancer Instance Status:, indicating that the instance listener will no longer forward traffic.(default).
- Map<String,Object>
- The tag of the resource.
- vpc
Id String - The ID of the virtual private cloud (VPC) where the SLB instance is deployed.
- zone
Mappings List<LoadBalancer Zone Mapping> - The zones and vSwitches. You must specify at least two zones. See
zone_mappings
below.
- access
Log LoadConfig Balancer Access Log Config - The Access Logging Configuration Structure. See
access_log_config
below. - address
Allocated stringMode - The method in which IP addresses are assigned. Valid values: Fixed: The ALB instance uses a fixed IP address. Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
- address
Ip stringVersion - The protocol version. Value:
- IPv4:IPv4 type.
- DualStack: the dual-stack type.
- address
Type string - The type of IP address that the SLB instance uses to provide services.
- bandwidth
Package stringId - The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.
- create
Time string - The creation time of the resource.
- deletion
Protection booleanEnabled - Whether to enable delete protection. Value:true: on.false (default): Off.
- dns
Name string - The domain name of the ALB instance. NOTE: Available in v1.158.0+.
- dry
Run boolean - Whether to PreCheck only this request, value:true: sends a check request and does not create a resource. Check items include whether required parameters are filled in, request format, and business restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.false (default): Sends a normal request, returns the HTTP_2xx status code after the check, and directly performs the operation.
- ipv6Address
Type string - The address type of Ipv6.
- load
Balancer LoadBilling Config Balancer Load Balancer Billing Config - The configuration of the billing method. See
load_balancer_billing_config
below. - load
Balancer stringEdition - The edition of the ALB instance.
- load
Balancer stringName - The name of the resource.
- modification
Protection LoadConfig Balancer Modification Protection Config - Modify the Protection Configuration. See
modification_protection_config
below. - resource
Group stringId - The ID of the resource group.
- status string
- Server Load Balancer Instance Status:, indicating that the instance listener will no longer forward traffic.(default).
- {[key: string]: any}
- The tag of the resource.
- vpc
Id string - The ID of the virtual private cloud (VPC) where the SLB instance is deployed.
- zone
Mappings LoadBalancer Zone Mapping[] - The zones and vSwitches. You must specify at least two zones. See
zone_mappings
below.
- access_
log_ Loadconfig Balancer Access Log Config Args - The Access Logging Configuration Structure. See
access_log_config
below. - address_
allocated_ strmode - The method in which IP addresses are assigned. Valid values: Fixed: The ALB instance uses a fixed IP address. Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
- address_
ip_ strversion - The protocol version. Value:
- IPv4:IPv4 type.
- DualStack: the dual-stack type.
- address_
type str - The type of IP address that the SLB instance uses to provide services.
- bandwidth_
package_ strid - The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.
- create_
time str - The creation time of the resource.
- deletion_
protection_ boolenabled - Whether to enable delete protection. Value:true: on.false (default): Off.
- dns_
name str - The domain name of the ALB instance. NOTE: Available in v1.158.0+.
- dry_
run bool - Whether to PreCheck only this request, value:true: sends a check request and does not create a resource. Check items include whether required parameters are filled in, request format, and business restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.false (default): Sends a normal request, returns the HTTP_2xx status code after the check, and directly performs the operation.
- ipv6_
address_ strtype - The address type of Ipv6.
- load_
balancer_ Loadbilling_ config Balancer Load Balancer Billing Config Args - The configuration of the billing method. See
load_balancer_billing_config
below. - load_
balancer_ stredition - The edition of the ALB instance.
- load_
balancer_ strname - The name of the resource.
- modification_
protection_ Loadconfig Balancer Modification Protection Config Args - Modify the Protection Configuration. See
modification_protection_config
below. - resource_
group_ strid - The ID of the resource group.
- status str
- Server Load Balancer Instance Status:, indicating that the instance listener will no longer forward traffic.(default).
- Mapping[str, Any]
- The tag of the resource.
- vpc_
id str - The ID of the virtual private cloud (VPC) where the SLB instance is deployed.
- zone_
mappings Sequence[LoadBalancer Zone Mapping Args] - The zones and vSwitches. You must specify at least two zones. See
zone_mappings
below.
- access
Log Property MapConfig - The Access Logging Configuration Structure. See
access_log_config
below. - address
Allocated StringMode - The method in which IP addresses are assigned. Valid values: Fixed: The ALB instance uses a fixed IP address. Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
- address
Ip StringVersion - The protocol version. Value:
- IPv4:IPv4 type.
- DualStack: the dual-stack type.
- address
Type String - The type of IP address that the SLB instance uses to provide services.
- bandwidth
Package StringId - The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.
- create
Time String - The creation time of the resource.
- deletion
Protection BooleanEnabled - Whether to enable delete protection. Value:true: on.false (default): Off.
- dns
Name String - The domain name of the ALB instance. NOTE: Available in v1.158.0+.
- dry
Run Boolean - Whether to PreCheck only this request, value:true: sends a check request and does not create a resource. Check items include whether required parameters are filled in, request format, and business restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.false (default): Sends a normal request, returns the HTTP_2xx status code after the check, and directly performs the operation.
- ipv6Address
Type String - The address type of Ipv6.
- load
Balancer Property MapBilling Config - The configuration of the billing method. See
load_balancer_billing_config
below. - load
Balancer StringEdition - The edition of the ALB instance.
- load
Balancer StringName - The name of the resource.
- modification
Protection Property MapConfig - Modify the Protection Configuration. See
modification_protection_config
below. - resource
Group StringId - The ID of the resource group.
- status String
- Server Load Balancer Instance Status:, indicating that the instance listener will no longer forward traffic.(default).
- Map<Any>
- The tag of the resource.
- vpc
Id String - The ID of the virtual private cloud (VPC) where the SLB instance is deployed.
- zone
Mappings List<Property Map> - The zones and vSwitches. You must specify at least two zones. See
zone_mappings
below.
Supporting Types
LoadBalancerAccessLogConfig, LoadBalancerAccessLogConfigArgs
- Log
Project string - This Log Storage Project.
- Log
Store string - This Log Storage Method Is Increased.
- Log
Project string - This Log Storage Project.
- Log
Store string - This Log Storage Method Is Increased.
- log
Project String - This Log Storage Project.
- log
Store String - This Log Storage Method Is Increased.
- log
Project string - This Log Storage Project.
- log
Store string - This Log Storage Method Is Increased.
- log_
project str - This Log Storage Project.
- log_
store str - This Log Storage Method Is Increased.
- log
Project String - This Log Storage Project.
- log
Store String - This Log Storage Method Is Increased.
LoadBalancerLoadBalancerBillingConfig, LoadBalancerLoadBalancerBillingConfigArgs
- Pay
Type string - Pay Type. Valid values:
PayAsYouGo
. Note: provider changes the payment type toPayAsYouGo
, while the actual parameter on api isPostPay
.
- Pay
Type string - Pay Type. Valid values:
PayAsYouGo
. Note: provider changes the payment type toPayAsYouGo
, while the actual parameter on api isPostPay
.
- pay
Type String - Pay Type. Valid values:
PayAsYouGo
. Note: provider changes the payment type toPayAsYouGo
, while the actual parameter on api isPostPay
.
- pay
Type string - Pay Type. Valid values:
PayAsYouGo
. Note: provider changes the payment type toPayAsYouGo
, while the actual parameter on api isPostPay
.
- pay_
type str - Pay Type. Valid values:
PayAsYouGo
. Note: provider changes the payment type toPayAsYouGo
, while the actual parameter on api isPostPay
.
- pay
Type String - Pay Type. Valid values:
PayAsYouGo
. Note: provider changes the payment type toPayAsYouGo
, while the actual parameter on api isPostPay
.
LoadBalancerModificationProtectionConfig, LoadBalancerModificationProtectionConfigArgs
LoadBalancerZoneMapping, LoadBalancerZoneMappingArgs
- Vswitch
Id string - The ID of the vSwitch that corresponds to the zone. Each zone can use only one vSwitch and subnet.
- Zone
Id string - The ID of the zone to which the SLB instance belongs.
- Load
Balancer List<Pulumi.Addresses Ali Cloud. Alb. Inputs. Load Balancer Zone Mapping Load Balancer Address> - The SLB Instance Address.
- Vswitch
Id string - The ID of the vSwitch that corresponds to the zone. Each zone can use only one vSwitch and subnet.
- Zone
Id string - The ID of the zone to which the SLB instance belongs.
- Load
Balancer []LoadAddresses Balancer Zone Mapping Load Balancer Address - The SLB Instance Address.
- vswitch
Id String - The ID of the vSwitch that corresponds to the zone. Each zone can use only one vSwitch and subnet.
- zone
Id String - The ID of the zone to which the SLB instance belongs.
- load
Balancer List<LoadAddresses Balancer Zone Mapping Load Balancer Address> - The SLB Instance Address.
- vswitch
Id string - The ID of the vSwitch that corresponds to the zone. Each zone can use only one vSwitch and subnet.
- zone
Id string - The ID of the zone to which the SLB instance belongs.
- load
Balancer LoadAddresses Balancer Zone Mapping Load Balancer Address[] - The SLB Instance Address.
- 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 SLB instance belongs.
- load_
balancer_ Sequence[Loadaddresses Balancer Zone Mapping Load Balancer Address] - The SLB Instance Address.
- vswitch
Id String - The ID of the vSwitch that corresponds to the zone. Each zone can use only one vSwitch and subnet.
- zone
Id String - The ID of the zone to which the SLB instance belongs.
- load
Balancer List<Property Map>Addresses - The SLB Instance Address.
LoadBalancerZoneMappingLoadBalancerAddress, LoadBalancerZoneMappingLoadBalancerAddressArgs
- Address string
- IP Address. The Public IP Address, and Private IP Address from the Address Type.
- Allocation
Id string - The ID of the EIP instance.
- Eip
Type string - The type of the EIP instance.
- Ipv6Address string
- Ipv6 address.
- Address string
- IP Address. The Public IP Address, and Private IP Address from the Address Type.
- Allocation
Id string - The ID of the EIP instance.
- Eip
Type string - The type of the EIP instance.
- Ipv6Address string
- Ipv6 address.
- address String
- IP Address. The Public IP Address, and Private IP Address from the Address Type.
- allocation
Id String - The ID of the EIP instance.
- eip
Type String - The type of the EIP instance.
- ipv6Address String
- Ipv6 address.
- address string
- IP Address. The Public IP Address, and Private IP Address from the Address Type.
- allocation
Id string - The ID of the EIP instance.
- eip
Type string - The type of the EIP instance.
- ipv6Address string
- Ipv6 address.
- address str
- IP Address. The Public IP Address, and Private IP Address from the Address Type.
- allocation_
id str - The ID of the EIP instance.
- eip_
type str - The type of the EIP instance.
- ipv6_
address str - Ipv6 address.
- address String
- IP Address. The Public IP Address, and Private IP Address from the Address Type.
- allocation
Id String - The ID of the EIP instance.
- eip
Type String - The type of the EIP instance.
- ipv6Address String
- Ipv6 address.
Import
Alb Load Balancer can be imported using the id, e.g.
$ pulumi import alicloud:alb/loadBalancer:LoadBalancer example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.