availability_group_listeners
Creates, updates, deletes, gets or lists a availability_group_listeners
resource.
Overview
Name | availability_group_listeners |
Type | Resource |
Id | azure.sql_vm.availability_group_listeners |
Fields
- vw_availability_group_listeners
- availability_group_listeners
Name | Datatype | Description |
---|---|---|
availabilityGroupListenerName | text | field from the properties object |
availability_group_configuration | text | field from the properties object |
availability_group_name | text | field from the properties object |
create_default_availability_group_if_not_exist | text | field from the properties object |
load_balancer_configurations | text | field from the properties object |
multi_subnet_ip_configurations | text | field from the properties object |
port | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
sqlVirtualMachineGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | The properties of an availability group listener. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | availabilityGroupListenerName, resourceGroupName, sqlVirtualMachineGroupName, subscriptionId | Gets an availability group listener. |
list_by_group | SELECT | resourceGroupName, sqlVirtualMachineGroupName, subscriptionId | Lists all availability group listeners in a SQL virtual machine group. |
create_or_update | INSERT | availabilityGroupListenerName, resourceGroupName, sqlVirtualMachineGroupName, subscriptionId | Creates or updates an availability group listener. |
delete | DELETE | availabilityGroupListenerName, resourceGroupName, sqlVirtualMachineGroupName, subscriptionId | Deletes an availability group listener. |
SELECT
examples
Lists all availability group listeners in a SQL virtual machine group.
- vw_availability_group_listeners
- availability_group_listeners
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 }}';
SELECT
properties,
systemData
FROM azure.sql_vm.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql_vm.availability_group_listeners (
availabilityGroupListenerName,
resourceGroupName,
sqlVirtualMachineGroupName,
subscriptionId,
properties
)
SELECT
'{{ availabilityGroupListenerName }}',
'{{ resourceGroupName }}',
'{{ sqlVirtualMachineGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: provisioningState
value: string
- name: availabilityGroupName
value: string
- name: loadBalancerConfigurations
value:
- - name: privateIpAddress
value:
- name: ipAddress
value: string
- name: subnetResourceId
value: string
- name: publicIpAddressResourceId
value: string
- name: loadBalancerResourceId
value: string
- name: probePort
value: integer
- name: sqlVirtualMachineInstances
value:
- string
- name: multiSubnetIpConfigurations
value:
- - name: sqlVirtualMachineInstance
value: string
- name: createDefaultAvailabilityGroupIfNotExist
value: boolean
- name: port
value: integer
- name: availabilityGroupConfiguration
value:
- name: replicas
value:
- - name: sqlVirtualMachineInstanceId
value: string
- name: role
value: string
- name: commit
value: string
- name: failover
value: string
- name: readableSecondary
value: string
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
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 }}';