Skip to main content

load_balancers

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

Overview

Nameload_balancers
TypeResource
Idazure.container_service.load_balancers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
allowServicePlacementbooleanWhether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it.
nodeSelectorobjectNodes that match this selector will be possible members of this load balancer.
primaryAgentPoolNamestringRequired field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer. Required.
provisioningStatestringThe current provisioning state.
serviceLabelSelectorobjectOnly services that must match this selector can be placed on this load balancer.
serviceNamespaceSelectorobjectServices created in namespaces that match the selector can be placed on this load balancer.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, resource_name, load_balancer_name, subscription_idGets the specified load balancer.
list_by_managed_clusterselectresource_group_name, resource_name, subscription_idGets a list of load balancers in the specified managed cluster.
create_or_updateinsertresource_group_name, resource_name, load_balancer_name, subscription_idCreates or updates a load balancer in the specified managed cluster.
create_or_updatereplaceresource_group_name, resource_name, load_balancer_name, subscription_idCreates or updates a load balancer in the specified managed cluster.
deletedeleteresource_group_name, resource_name, load_balancer_name, subscription_idDeletes a load balancer in the specified managed cluster.

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
load_balancer_namestringThe name of the load balancer. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringThe name of the managed cluster resource. Required.
subscription_idstring

SELECT examples

Gets the specified load balancer.

SELECT
id,
name,
allowServicePlacement,
nodeSelector,
primaryAgentPoolName,
provisioningState,
serviceLabelSelector,
serviceNamespaceSelector,
systemData,
type
FROM azure.container_service.load_balancers
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND load_balancer_name = '{{ load_balancer_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a load balancer in the specified managed cluster.

INSERT INTO azure.container_service.load_balancers (
properties,
resource_group_name,
resource_name,
load_balancer_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ load_balancer_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Creates or updates a load balancer in the specified managed cluster.

REPLACE azure.container_service.load_balancers
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND load_balancer_name = '{{ load_balancer_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes a load balancer in the specified managed cluster.

DELETE FROM azure.container_service.load_balancers
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND load_balancer_name = '{{ load_balancer_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;