watchers
Creates, updates, deletes, gets or lists a watchers
resource.
Overview
Name | watchers |
Type | Resource |
Id | azure.automation.watchers |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_automation_account
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource Id for the resource |
name | string | The name of the resource |
etag | string | Gets or sets the etag of the resource. |
location | string | The geo-location where the resource lives |
properties | object | Gets or sets the watcher properties. |
tags | object | Resource tags. |
type | string | The type of the resource. |
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource Id for the resource |
name | string | The name of the resource |
etag | string | Gets or sets the etag of the resource. |
location | string | The geo-location where the resource lives |
properties | object | Gets or sets the watcher properties. |
tags | object | Resource tags. |
type | string | The type of the resource. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , automationAccountName , watcherName , subscriptionId | Retrieve the watcher identified by watcher name. | |
list_by_automation_account | select | resourceGroupName , automationAccountName , subscriptionId | $filter | Retrieve a list of watchers. |
create_or_update | insert | resourceGroupName , automationAccountName , watcherName , subscriptionId | Create the watcher identified by watcher name. | |
update | update | resourceGroupName , automationAccountName , watcherName , subscriptionId | Update the watcher identified by watcher name. | |
delete | delete | resourceGroupName , automationAccountName , watcherName , subscriptionId | Delete the watcher by name. | |
start | exec | resourceGroupName , automationAccountName , watcherName , subscriptionId | Resume the watcher identified by watcher name. | |
stop | exec | resourceGroupName , automationAccountName , watcherName , subscriptionId | Resume the watcher identified by watcher name. |
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 |
---|---|---|
automationAccountName | string | The name of the automation account. |
resourceGroupName | string | Name of an Azure Resource group. |
subscriptionId | string | Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
watcherName | string | The watcher name. |
$filter | string | The filter to apply on the operation. |
SELECT
examples
- get
- list_by_automation_account
Retrieve the watcher identified by watcher name.
SELECT
id,
name,
etag,
location,
properties,
tags,
type
FROM azure.automation.watchers
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND automationAccountName = '{{ automationAccountName }}' -- required
AND watcherName = '{{ watcherName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Retrieve a list of watchers.
SELECT
id,
name,
etag,
location,
properties,
tags,
type
FROM azure.automation.watchers
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND automationAccountName = '{{ automationAccountName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $filter = '{{ $filter }}'
;
INSERT
examples
- create_or_update
- Manifest
Create the watcher identified by watcher name.
INSERT INTO azure.automation.watchers (
data__properties,
data__etag,
data__tags,
data__location,
resourceGroupName,
automationAccountName,
watcherName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ etag }}',
'{{ tags }}',
'{{ location }}',
'{{ resourceGroupName }}',
'{{ automationAccountName }}',
'{{ watcherName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;
# Description fields are for documentation purposes
- name: watchers
props:
- name: resourceGroupName
value: string
description: Required parameter for the watchers resource.
- name: automationAccountName
value: string
description: Required parameter for the watchers resource.
- name: watcherName
value: string
description: Required parameter for the watchers resource.
- name: subscriptionId
value: string
description: Required parameter for the watchers resource.
- name: properties
value: object
description: |
Gets or sets the watcher properties.
- name: etag
value: string
description: |
Gets or sets the etag of the resource.
- name: tags
value: object
description: |
Resource tags.
- name: location
value: string
description: |
The geo-location where the resource lives
UPDATE
examples
- update
Update the watcher identified by watcher name.
UPDATE azure.automation.watchers
SET
data__properties = '{{ properties }}',
data__name = '{{ name }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND automationAccountName = '{{ automationAccountName }}' --required
AND watcherName = '{{ watcherName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;
DELETE
examples
- delete
Delete the watcher by name.
DELETE FROM azure.automation.watchers
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND automationAccountName = '{{ automationAccountName }}' --required
AND watcherName = '{{ watcherName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;
Lifecycle Methods
- start
- stop
Resume the watcher identified by watcher name.
EXEC azure.automation.watchers.start
@resourceGroupName='{{ resourceGroupName }}' --required,
@automationAccountName='{{ automationAccountName }}' --required,
@watcherName='{{ watcherName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;
Resume the watcher identified by watcher name.
EXEC azure.automation.watchers.stop
@resourceGroupName='{{ resourceGroupName }}' --required,
@automationAccountName='{{ automationAccountName }}' --required,
@watcherName='{{ watcherName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;