Skip to main content

load_balancers

Creates, updates, deletes, gets or lists a load_balancers resource.

Overview

Nameload_balancers
TypeResource
Idazure.network.load_balancers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
inboundNatRulePortMappingsarrayCollection of inbound NAT rule port mappings.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_inbound_nat_rule_port_mappingsselectgroup_name, load_balancer_name, backend_pool_name, subscription_idList of inbound NAT rule port mappings.
getselectresource_group_name, load_balancer_name, subscription_id$expand, detailLevelGets the specified load balancer.
listselectresource_group_name, subscription_idGets all the load balancers in a resource group.
list_allselectsubscription_idGets all the load balancers in a subscription.
create_or_updateinsertresource_group_name, load_balancer_name, subscription_idCreates or updates a load balancer.
update_tagsupdateresource_group_name, load_balancer_name, subscription_idUpdates a load balancer tags.
create_or_updatereplaceresource_group_name, load_balancer_name, subscription_idCreates or updates a load balancer.
deletedeleteresource_group_name, load_balancer_name, subscription_idDeletes the specified load balancer.
migrate_to_ip_basedexecgroup_name, load_balancer_name, subscription_idMigrate load balancer to IP Based.
swap_public_ip_addressesexeclocation, subscription_idSwaps VIPs between two load balancers.

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.

NameDatatypeDescription
backend_pool_namestringThe name of the backend address pool. Required.
group_namestringRequired.
load_balancer_namestringThe name of the load balancer. Required.
locationstringThe name of the Azure region. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$expandstringExpands referenced resources. Default value is None.
detailLevelstringControls 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 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
;

INSERT examples

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
;

UPDATE examples

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

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

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 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 }}"
}'
;