load_balancers
Creates, updates, deletes, gets or lists a load_balancers resource.
Overview
| Name | load_balancers |
| Type | Resource |
| Id | azure.network.load_balancers |
Fields
The following fields are returned by SELECT queries:
- list_inbound_nat_rule_port_mappings
- get
- list
- list_all
| Name | Datatype | Description |
|---|---|---|
inboundNatRulePortMappings | array | Collection of inbound NAT rule port mappings. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
backendAddressPools | array | Collection of backend address pools used by a load balancer. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
extendedLocation | object | The extended location of the load balancer. |
frontendIPConfigurations | array | Object representing the frontend IPs to be used for the load balancer. |
inboundNatPools | array | Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound NAT rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. |
inboundNatRules | array | Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. |
loadBalancingRules | array | Object collection representing the load balancing rules Gets the provisioning. |
location | string | Resource location. |
outboundRules | array | The outbound rules. |
probes | array | Collection of probe objects used in the load balancer. |
provisioningState | string | The provisioning state of the load balancer resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
resourceGuid | string | The resource GUID property of the load balancer resource. |
scope | string | Indicates the scope of the load balancer: external (Public) or internal (Private). Known values are: "Public" and "Private". (Public, Private) |
sku | object | The load balancer SKU. |
tags | object | Resource tags. |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
backendAddressPools | array | Collection of backend address pools used by a load balancer. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
extendedLocation | object | The extended location of the load balancer. |
frontendIPConfigurations | array | Object representing the frontend IPs to be used for the load balancer. |
inboundNatPools | array | Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound NAT rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. |
inboundNatRules | array | Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. |
loadBalancingRules | array | Object collection representing the load balancing rules Gets the provisioning. |
location | string | Resource location. |
outboundRules | array | The outbound rules. |
probes | array | Collection of probe objects used in the load balancer. |
provisioningState | string | The provisioning state of the load balancer resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
resourceGuid | string | The resource GUID property of the load balancer resource. |
scope | string | Indicates the scope of the load balancer: external (Public) or internal (Private). Known values are: "Public" and "Private". (Public, Private) |
sku | object | The load balancer SKU. |
tags | object | Resource tags. |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
backendAddressPools | array | Collection of backend address pools used by a load balancer. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
extendedLocation | object | The extended location of the load balancer. |
frontendIPConfigurations | array | Object representing the frontend IPs to be used for the load balancer. |
inboundNatPools | array | Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound NAT rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. |
inboundNatRules | array | Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. |
loadBalancingRules | array | Object collection representing the load balancing rules Gets the provisioning. |
location | string | Resource location. |
outboundRules | array | The outbound rules. |
probes | array | Collection of probe objects used in the load balancer. |
provisioningState | string | The provisioning state of the load balancer resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
resourceGuid | string | The resource GUID property of the load balancer resource. |
scope | string | Indicates the scope of the load balancer: external (Public) or internal (Private). Known values are: "Public" and "Private". (Public, Private) |
sku | object | The load balancer SKU. |
tags | object | Resource tags. |
type | string | Resource type. |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
backend_pool_name | string | The name of the backend address pool. Required. |
group_name | string | Required. |
load_balancer_name | string | The name of the load balancer. Required. |
location | string | The name of the Azure region. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
$expand | string | Expands referenced resources. Default value is None. |
detailLevel | string | Controls verbosity of the returned load balancer resource. When set to 'Reduced', read-only back-reference collections (e.g., rules referencing frontendIPConfigurations) are omitted from the response. "Reduced" Default value is None. |
SELECT examples
- list_inbound_nat_rule_port_mappings
- get
- list
- list_all
List of inbound NAT rule port mappings.
SELECT
inboundNatRulePortMappings
FROM azure.network.load_balancers
WHERE group_name = '{{ group_name }}' -- required
AND load_balancer_name = '{{ load_balancer_name }}' -- required
AND backend_pool_name = '{{ backend_pool_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets the specified load balancer.
SELECT
id,
name,
backendAddressPools,
etag,
extendedLocation,
frontendIPConfigurations,
inboundNatPools,
inboundNatRules,
loadBalancingRules,
location,
outboundRules,
probes,
provisioningState,
resourceGuid,
scope,
sku,
tags,
type
FROM azure.network.load_balancers
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND load_balancer_name = '{{ load_balancer_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
AND detailLevel = '{{ detailLevel }}'
;
Gets all the load balancers in a resource group.
SELECT
id,
name,
backendAddressPools,
etag,
extendedLocation,
frontendIPConfigurations,
inboundNatPools,
inboundNatRules,
loadBalancingRules,
location,
outboundRules,
probes,
provisioningState,
resourceGuid,
scope,
sku,
tags,
type
FROM azure.network.load_balancers
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets all the load balancers in a subscription.
SELECT
id,
name,
backendAddressPools,
etag,
extendedLocation,
frontendIPConfigurations,
inboundNatPools,
inboundNatRules,
loadBalancingRules,
location,
outboundRules,
probes,
provisioningState,
resourceGuid,
scope,
sku,
tags,
type
FROM azure.network.load_balancers
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates a load balancer.
INSERT INTO azure.network.load_balancers (
id,
location,
tags,
properties,
extendedLocation,
sku,
resource_group_name,
load_balancer_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ extendedLocation }}',
'{{ sku }}',
'{{ resource_group_name }}',
'{{ load_balancer_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
extendedLocation,
location,
properties,
sku,
tags,
type
;
# Description fields are for documentation purposes
- name: load_balancers
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the load_balancers resource.
- name: load_balancer_name
value: "{{ load_balancer_name }}"
description: Required parameter for the load_balancers resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the load_balancers resource.
- name: id
value: "{{ id }}"
description: |
Resource ID.
- name: location
value: "{{ location }}"
description: |
Resource location.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: properties
description: |
Properties of load balancer.
value:
frontendIPConfigurations:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
inboundNatRules:
- id: "{{ id }}"
inboundNatPools:
- id: "{{ id }}"
outboundRules:
- id: "{{ id }}"
loadBalancingRules:
- id: "{{ id }}"
privateIPAddress: "{{ privateIPAddress }}"
privateIPAllocationMethod: "{{ privateIPAllocationMethod }}"
privateIPAddressVersion: "{{ privateIPAddressVersion }}"
subnet:
id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
addressPrefix: "{{ addressPrefix }}"
addressPrefixes: "{{ addressPrefixes }}"
networkSecurityGroup: "{{ networkSecurityGroup }}"
routeTable: "{{ routeTable }}"
natGateway: "{{ natGateway }}"
serviceEndpoints: "{{ serviceEndpoints }}"
serviceEndpointPolicies: "{{ serviceEndpointPolicies }}"
privateEndpoints: "{{ privateEndpoints }}"
ipConfigurations: "{{ ipConfigurations }}"
ipConfigurationProfiles: "{{ ipConfigurationProfiles }}"
ipAllocations: "{{ ipAllocations }}"
resourceNavigationLinks: "{{ resourceNavigationLinks }}"
serviceAssociationLinks: "{{ serviceAssociationLinks }}"
delegations: "{{ delegations }}"
purpose: "{{ purpose }}"
provisioningState: "{{ provisioningState }}"
privateEndpointNetworkPolicies: "{{ privateEndpointNetworkPolicies }}"
privateLinkServiceNetworkPolicies: "{{ privateLinkServiceNetworkPolicies }}"
applicationGatewayIPConfigurations: "{{ applicationGatewayIPConfigurations }}"
sharingScope: "{{ sharingScope }}"
defaultOutboundAccess: {{ defaultOutboundAccess }}
ipamPoolPrefixAllocations: "{{ ipamPoolPrefixAllocations }}"
serviceGateway: "{{ serviceGateway }}"
etag: "{{ etag }}"
publicIPAddress:
id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
location: "{{ location }}"
tags: "{{ tags }}"
properties:
publicIPAllocationMethod: "{{ publicIPAllocationMethod }}"
publicIPAddressVersion: "{{ publicIPAddressVersion }}"
ipConfiguration: "{{ ipConfiguration }}"
dnsSettings: "{{ dnsSettings }}"
ddosSettings: "{{ ddosSettings }}"
ipTags: "{{ ipTags }}"
ipAddress: "{{ ipAddress }}"
publicIPPrefix: "{{ publicIPPrefix }}"
idleTimeoutInMinutes: {{ idleTimeoutInMinutes }}
resourceGuid: "{{ resourceGuid }}"
provisioningState: "{{ provisioningState }}"
servicePublicIPAddress: "{{ servicePublicIPAddress }}"
natGateway: "{{ natGateway }}"
migrationPhase: "{{ migrationPhase }}"
linkedPublicIPAddress: "{{ linkedPublicIPAddress }}"
deleteOption: "{{ deleteOption }}"
extendedLocation:
name: "{{ name }}"
type: "{{ type }}"
sku:
name: "{{ name }}"
tier: "{{ tier }}"
etag: "{{ etag }}"
zones:
- "{{ zones }}"
publicIPPrefix:
id: "{{ id }}"
gatewayLoadBalancer:
id: "{{ id }}"
provisioningState: "{{ provisioningState }}"
ddosSettings:
ddosCustomPolicy:
id: "{{ id }}"
etag: "{{ etag }}"
zones: "{{ zones }}"
backendAddressPools:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
location: "{{ location }}"
tunnelInterfaces:
- port: {{ port }}
identifier: {{ identifier }}
protocol: "{{ protocol }}"
type: "{{ type }}"
loadBalancerBackendAddresses:
- properties:
virtualNetwork: "{{ virtualNetwork }}"
subnet: "{{ subnet }}"
ipAddress: "{{ ipAddress }}"
networkInterfaceIPConfiguration: "{{ networkInterfaceIPConfiguration }}"
loadBalancerFrontendIPConfiguration: "{{ loadBalancerFrontendIPConfiguration }}"
inboundNatRulesPortMapping: "{{ inboundNatRulesPortMapping }}"
adminState: "{{ adminState }}"
name: "{{ name }}"
backendIPConfigurations:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
gatewayLoadBalancer: "{{ gatewayLoadBalancer }}"
virtualNetworkTaps: "{{ virtualNetworkTaps }}"
applicationGatewayBackendAddressPools: "{{ applicationGatewayBackendAddressPools }}"
loadBalancerBackendAddressPools: "{{ loadBalancerBackendAddressPools }}"
loadBalancerInboundNatRules: "{{ loadBalancerInboundNatRules }}"
privateIPAddress: "{{ privateIPAddress }}"
privateIPAddressPrefixLength: {{ privateIPAddressPrefixLength }}
privateIPAllocationMethod: "{{ privateIPAllocationMethod }}"
privateIPAddressVersion: "{{ privateIPAddressVersion }}"
subnet: "{{ subnet }}"
primary: {{ primary }}
publicIPAddress: "{{ publicIPAddress }}"
applicationSecurityGroups: "{{ applicationSecurityGroups }}"
provisioningState: "{{ provisioningState }}"
privateLinkConnectionProperties: "{{ privateLinkConnectionProperties }}"
etag: "{{ etag }}"
loadBalancingRules:
- id: "{{ id }}"
outboundRule:
id: "{{ id }}"
outboundRules:
- id: "{{ id }}"
inboundNatRules:
- id: "{{ id }}"
provisioningState: "{{ provisioningState }}"
drainPeriodInSeconds: {{ drainPeriodInSeconds }}
virtualNetwork:
id: "{{ id }}"
syncMode: "{{ syncMode }}"
etag: "{{ etag }}"
loadBalancingRules:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
frontendIPConfiguration:
id: "{{ id }}"
backendAddressPool:
id: "{{ id }}"
backendAddressPools:
- id: "{{ id }}"
probe:
id: "{{ id }}"
protocol: "{{ protocol }}"
loadDistribution: "{{ loadDistribution }}"
frontendPort: {{ frontendPort }}
backendPort: {{ backendPort }}
idleTimeoutInMinutes: {{ idleTimeoutInMinutes }}
enableFloatingIP: {{ enableFloatingIP }}
enableTcpReset: {{ enableTcpReset }}
disableOutboundSnat: {{ disableOutboundSnat }}
enableConnectionTracking: {{ enableConnectionTracking }}
provisioningState: "{{ provisioningState }}"
etag: "{{ etag }}"
probes:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
loadBalancingRules:
- id: "{{ id }}"
protocol: "{{ protocol }}"
port: {{ port }}
intervalInSeconds: {{ intervalInSeconds }}
noHealthyBackendsBehavior: "{{ noHealthyBackendsBehavior }}"
numberOfProbes: {{ numberOfProbes }}
probeThreshold: {{ probeThreshold }}
requestPath: "{{ requestPath }}"
provisioningState: "{{ provisioningState }}"
etag: "{{ etag }}"
inboundNatRules:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
frontendIPConfiguration:
id: "{{ id }}"
backendIPConfiguration:
id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
gatewayLoadBalancer: "{{ gatewayLoadBalancer }}"
virtualNetworkTaps: "{{ virtualNetworkTaps }}"
applicationGatewayBackendAddressPools: "{{ applicationGatewayBackendAddressPools }}"
loadBalancerBackendAddressPools: "{{ loadBalancerBackendAddressPools }}"
loadBalancerInboundNatRules: "{{ loadBalancerInboundNatRules }}"
privateIPAddress: "{{ privateIPAddress }}"
privateIPAddressPrefixLength: {{ privateIPAddressPrefixLength }}
privateIPAllocationMethod: "{{ privateIPAllocationMethod }}"
privateIPAddressVersion: "{{ privateIPAddressVersion }}"
subnet: "{{ subnet }}"
primary: {{ primary }}
publicIPAddress: "{{ publicIPAddress }}"
applicationSecurityGroups: "{{ applicationSecurityGroups }}"
provisioningState: "{{ provisioningState }}"
privateLinkConnectionProperties: "{{ privateLinkConnectionProperties }}"
etag: "{{ etag }}"
protocol: "{{ protocol }}"
frontendPort: {{ frontendPort }}
backendPort: {{ backendPort }}
idleTimeoutInMinutes: {{ idleTimeoutInMinutes }}
enableFloatingIP: {{ enableFloatingIP }}
enableTcpReset: {{ enableTcpReset }}
frontendPortRangeStart: {{ frontendPortRangeStart }}
frontendPortRangeEnd: {{ frontendPortRangeEnd }}
backendAddressPool:
id: "{{ id }}"
provisioningState: "{{ provisioningState }}"
etag: "{{ etag }}"
inboundNatPools:
- id: "{{ id }}"
properties:
frontendIPConfiguration:
id: "{{ id }}"
protocol: "{{ protocol }}"
frontendPortRangeStart: {{ frontendPortRangeStart }}
frontendPortRangeEnd: {{ frontendPortRangeEnd }}
backendPort: {{ backendPort }}
idleTimeoutInMinutes: {{ idleTimeoutInMinutes }}
enableFloatingIP: {{ enableFloatingIP }}
enableTcpReset: {{ enableTcpReset }}
provisioningState: "{{ provisioningState }}"
name: "{{ name }}"
etag: "{{ etag }}"
type: "{{ type }}"
outboundRules:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
allocatedOutboundPorts: {{ allocatedOutboundPorts }}
frontendIPConfigurations:
- id: "{{ id }}"
backendAddressPool:
id: "{{ id }}"
provisioningState: "{{ provisioningState }}"
protocol: "{{ protocol }}"
enableTcpReset: {{ enableTcpReset }}
idleTimeoutInMinutes: {{ idleTimeoutInMinutes }}
etag: "{{ etag }}"
resourceGuid: "{{ resourceGuid }}"
provisioningState: "{{ provisioningState }}"
scope: "{{ scope }}"
- name: extendedLocation
description: |
The extended location of the load balancer.
value:
name: "{{ name }}"
type: "{{ type }}"
- name: sku
description: |
The load balancer SKU.
value:
name: "{{ name }}"
tier: "{{ tier }}"
UPDATE examples
- update_tags
Updates a load balancer tags.
UPDATE azure.network.load_balancers
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND load_balancer_name = '{{ load_balancer_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
extendedLocation,
location,
properties,
sku,
tags,
type;
REPLACE examples
- create_or_update
Creates or updates a load balancer.
REPLACE azure.network.load_balancers
SET
id = '{{ id }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}',
extendedLocation = '{{ extendedLocation }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND load_balancer_name = '{{ load_balancer_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
extendedLocation,
location,
properties,
sku,
tags,
type;
DELETE examples
- delete
Deletes the specified load balancer.
DELETE FROM azure.network.load_balancers
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND load_balancer_name = '{{ load_balancer_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- migrate_to_ip_based
- swap_public_ip_addresses
Migrate load balancer to IP Based.
EXEC azure.network.load_balancers.migrate_to_ip_based
@group_name='{{ group_name }}' --required,
@load_balancer_name='{{ load_balancer_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"pools": "{{ pools }}"
}'
;
Swaps VIPs between two load balancers.
EXEC azure.network.load_balancers.swap_public_ip_addresses
@location='{{ location }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"frontendIPConfigurations": "{{ frontendIPConfigurations }}"
}'
;