Watcher - List By Automation Account
Retrieve a list of watchers.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers?api-version=2019-06-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers?$filter={$filter}&api-version=2019-06-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
automation
|
path | True |
string |
The name of the automation account. |
resource
|
path | True |
string |
Name of an Azure Resource group. Regex pattern: |
subscription
|
path | True |
string |
Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client Api Version. |
$filter
|
query |
string |
The filter to apply on the operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
Other Status Codes |
Automation error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
List watchers by Automation Account
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyTestAutomationAccount/watchers?api-version=2019-06-01
Sample Response
{
"value": [
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyTestAutomationAccount/watchers/MyTestWatcher",
"name": "MyTestWatcher",
"properties": {
"executionFrequencyInSeconds": 60,
"scriptName": "MyTestWatcher",
"scriptParameters": null,
"description": "This is a test watcher.",
"status": null,
"scriptRunOn": "MyTestHybridWorkerGroup",
"creationTime": "2016-12-20T21:36:48.597+00:00",
"lastModifiedBy": null,
"lastModifiedTime": "2016-12-20T21:36:48.597+00:00"
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyTestAutomationAccount/watchers/MyTestWatcher01",
"name": "MyTestWatcher01",
"properties": {
"executionFrequencyInSeconds": 60,
"scriptName": "MyTestWatcher",
"scriptParameters": null,
"description": "This is a test watcher.",
"status": null,
"scriptRunOn": "MyTestHybridWorkerGroup",
"creationTime": "2016-12-20T20:47:24.697+00:00",
"lastModifiedBy": null,
"lastModifiedTime": "2016-12-20T20:47:24.697+00:00"
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyTestAutomationAccount/watchers/MyTestWatcher02",
"name": "MyTestWatcher02",
"properties": {
"executionFrequencyInSeconds": 60,
"scriptName": "MyTestWatcher",
"scriptParameters": null,
"description": "This is a test watcher.",
"status": null,
"scriptRunOn": "MyTestHybridWorkerGroup",
"creationTime": "2016-12-20T21:26:35.647+00:00",
"lastModifiedBy": null,
"lastModifiedTime": "2016-12-20T21:26:35.647+00:00"
}
}
]
}
Definitions
Name | Description |
---|---|
Error |
Error response of an operation failure |
Watcher |
Definition of the watcher type. |
Watcher |
The response model for the list watcher operation. |
ErrorResponse
Error response of an operation failure
Name | Type | Description |
---|---|---|
code |
string |
Error code |
message |
string |
Error message indicating why the operation failed. |
Watcher
Definition of the watcher type.
Name | Type | Description |
---|---|---|
etag |
string |
Gets or sets the etag of the resource. |
id |
string |
Fully qualified resource Id for the resource |
location |
string |
The geo-location where the resource lives |
name |
string |
The name of the resource |
properties.creationTime |
string |
Gets or sets the creation time. |
properties.description |
string |
Gets or sets the description. |
properties.executionFrequencyInSeconds |
integer |
Gets or sets the frequency at which the watcher is invoked. |
properties.lastModifiedBy |
string |
Details of the user who last modified the watcher. |
properties.lastModifiedTime |
string |
Gets or sets the last modified time. |
properties.scriptName |
string |
Gets or sets the name of the script the watcher is attached to, i.e. the name of an existing runbook. |
properties.scriptParameters |
object |
Gets or sets the parameters of the script. |
properties.scriptRunOn |
string |
Gets or sets the name of the hybrid worker group the watcher will run on. |
properties.status |
string |
Gets the current status of the watcher. |
tags |
object |
Resource tags. |
type |
string |
The type of the resource. |
WatcherListResult
The response model for the list watcher operation.
Name | Type | Description |
---|---|---|
nextLink |
string |
Gets or sets the next link. |
value |
Watcher[] |
Gets or sets a list of watchers. |