Skip to main content

availability_group_listeners

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

Overview

Nameavailability_group_listeners
TypeResource
Idazure.sql_vm.availability_group_listeners

Fields

NameDatatypeDescription
availabilityGroupListenerNametextfield from the properties object
availability_group_configurationtextfield from the properties object
availability_group_nametextfield from the properties object
create_default_availability_group_if_not_existtextfield from the properties object
load_balancer_configurationstextfield from the properties object
multi_subnet_ip_configurationstextfield from the properties object
porttextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
sqlVirtualMachineGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTavailabilityGroupListenerName, resourceGroupName, sqlVirtualMachineGroupName, subscriptionIdGets an availability group listener.
list_by_groupSELECTresourceGroupName, sqlVirtualMachineGroupName, subscriptionIdLists all availability group listeners in a SQL virtual machine group.
create_or_updateINSERTavailabilityGroupListenerName, resourceGroupName, sqlVirtualMachineGroupName, subscriptionIdCreates or updates an availability group listener.
deleteDELETEavailabilityGroupListenerName, resourceGroupName, sqlVirtualMachineGroupName, subscriptionIdDeletes an availability group listener.

SELECT examples

Lists all availability group listeners in a SQL virtual machine group.

SELECT
availabilityGroupListenerName,
availability_group_configuration,
availability_group_name,
create_default_availability_group_if_not_exist,
load_balancer_configurations,
multi_subnet_ip_configurations,
port,
provisioning_state,
resourceGroupName,
sqlVirtualMachineGroupName,
subscriptionId,
system_data
FROM azure.sql_vm.vw_availability_group_listeners
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND sqlVirtualMachineGroupName = '{{ sqlVirtualMachineGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new availability_group_listeners resource.

/*+ create */
INSERT INTO azure.sql_vm.availability_group_listeners (
availabilityGroupListenerName,
resourceGroupName,
sqlVirtualMachineGroupName,
subscriptionId,
properties
)
SELECT
'{{ availabilityGroupListenerName }}',
'{{ resourceGroupName }}',
'{{ sqlVirtualMachineGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified availability_group_listeners resource.

/*+ delete */
DELETE FROM azure.sql_vm.availability_group_listeners
WHERE availabilityGroupListenerName = '{{ availabilityGroupListenerName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND sqlVirtualMachineGroupName = '{{ sqlVirtualMachineGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';