watchers
Creates, updates, deletes, gets or lists a watchers
resource.
Overview
Name | watchers |
Type | Resource |
Id | azure.db_watcher.watchers |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list_by_subscription
Azure operation completed successfully.
Name | Datatype | Description |
---|---|---|
identity | object | The managed service identities assigned to this resource. |
location | string | The geo-location where the resource lives |
properties | object | The resource-specific properties for this resource. |
tags | object | Resource tags. |
Azure operation completed successfully.
Name | Datatype | Description |
---|---|---|
identity | object | The managed service identities assigned to this resource. |
location | string | The geo-location where the resource lives |
properties | object | The resource-specific properties for this resource. |
tags | object | Resource tags. |
Azure operation completed successfully.
Name | Datatype | Description |
---|---|---|
identity | object | The managed service identities assigned to this resource. |
location | string | The geo-location where the resource lives |
properties | object | The resource-specific properties for this resource. |
tags | object | Resource tags. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , resourceGroupName , watcherName | Get a Watcher | |
list_by_resource_group | select | subscriptionId , resourceGroupName | List Watcher resources by resource group | |
list_by_subscription | select | subscriptionId | List Watcher resources by subscription ID | |
create_or_update | insert | subscriptionId , resourceGroupName , watcherName | Create a Watcher | |
update | update | subscriptionId , resourceGroupName , watcherName | Update a Watcher | |
delete | delete | subscriptionId , resourceGroupName , watcherName | Delete a Watcher | |
start | exec | subscriptionId , resourceGroupName , watcherName | The action to start monitoring all targets configured for a database watcher. | |
stop | exec | subscriptionId , resourceGroupName , watcherName | The action to stop monitoring all targets configured for a database watcher. |
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 |
---|---|---|
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
watcherName | string | The database watcher name. |
SELECT
examples
- get
- list_by_resource_group
- list_by_subscription
Get a Watcher
SELECT
identity,
location,
properties,
tags
FROM azure.db_watcher.watchers
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND watcherName = '{{ watcherName }}' -- required
;
List Watcher resources by resource group
SELECT
identity,
location,
properties,
tags
FROM azure.db_watcher.watchers
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
;
List Watcher resources by subscription ID
SELECT
identity,
location,
properties,
tags
FROM azure.db_watcher.watchers
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Create a Watcher
INSERT INTO azure.db_watcher.watchers (
data__properties,
data__identity,
data__tags,
data__location,
subscriptionId,
resourceGroupName,
watcherName
)
SELECT
'{{ properties }}',
'{{ identity }}',
'{{ tags }}',
'{{ location }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ watcherName }}'
RETURNING
identity,
location,
properties,
tags
;
# Description fields are for documentation purposes
- name: watchers
props:
- name: subscriptionId
value: string (uuid)
description: Required parameter for the watchers resource.
- name: resourceGroupName
value: string
description: Required parameter for the watchers resource.
- name: watcherName
value: string
description: Required parameter for the watchers resource.
- name: properties
value: object
description: |
The resource-specific properties for this resource.
- name: identity
value: object
description: |
The managed service identities assigned to this resource.
- name: tags
value: object
description: |
Resource tags.
- name: location
value: string
description: |
The geo-location where the resource lives
UPDATE
examples
- update
Update a Watcher
UPDATE azure.db_watcher.watchers
SET
data__identity = '{{ identity }}',
data__tags = '{{ tags }}',
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND watcherName = '{{ watcherName }}' --required
RETURNING
identity,
location,
properties,
tags;
DELETE
examples
- delete
Delete a Watcher
DELETE FROM azure.db_watcher.watchers
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND watcherName = '{{ watcherName }}' --required
;
Lifecycle Methods
- start
- stop
The action to start monitoring all targets configured for a database watcher.
EXEC azure.db_watcher.watchers.start
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@watcherName='{{ watcherName }}' --required
;
The action to stop monitoring all targets configured for a database watcher.
EXEC azure.db_watcher.watchers.stop
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@watcherName='{{ watcherName }}' --required
;