Notification Channels - List
列出给定实验室中的通知通道。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels?api-version=2018-09-15
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels?api-version=2018-09-15&$expand={$expand}&$filter={$filter}&$top={$top}&$orderby={$orderby}
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
lab
|
path | True |
string |
实验室的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
subscription
|
path | True |
string minLength: 1 |
目标订阅的 ID。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
|
$expand
|
query |
string |
指定$expand查询。 示例:“properties($select=webHookUrl)” |
|
|
$filter
|
query |
string |
要应用于作的筛选器。 示例:“$filter=contains(name,'myName') |
|
|
$orderby
|
query |
string |
结果的排序表达式,使用 OData 表示法。 示例:“$orderby=name desc” |
|
|
$top
|
query |
integer (int32) |
要从作返回的最大资源数。 示例:“$top=10” |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
Azure 操作已成功完成。 |
|
| Other Status Codes |
意外的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流程。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
NotificationChannels_List
示例请求
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels?api-version=2018-09-15
示例响应
{
"value": [
{
"name": "autoshutdown",
"type": "Microsoft.DevTestLab/labs/notificationChannels",
"id": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/notificationChannels/{notificationChannelName}",
"location": "{location}",
"properties": {
"description": "Integration configured for auto-shutdown",
"createdDate": "2021-01-05T02:12:10.6566371+00:00",
"emailRecipient": "{email}",
"events": [
{
"eventName": "AutoShutdown"
}
],
"notificationLocale": "en",
"provisioningState": "Succeeded",
"uniqueIdentifier": "{uniqueIdentifier}",
"webHookUrl": "{webhookUrl}"
},
"tags": {
"tagName1": "tagValue1"
}
},
{
"name": "costThreshold",
"type": "Microsoft.DevTestLab/labs/notificationChannels",
"id": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/notificationChannels/{notificationChannelName}",
"location": "{location}",
"properties": {
"description": "Integration configured for cost",
"createdDate": "2021-01-05T02:14:05.2392034+00:00",
"events": [
{
"eventName": "Cost"
}
],
"notificationLocale": "en",
"provisioningState": "Succeeded",
"uniqueIdentifier": "{uniqueIdentifier}",
"webHookUrl": "{webhookUrl}"
},
"tags": {
"tagName1": "tagValue1"
}
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
created |
创建资源的标识的类型。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
| Event |
要通知的事件。 |
|
Notification |
通知。 |
|
Notification |
启用此通知的事件类型(即 AutoShutdown、Cost) |
|
Notification |
列表作的响应。 |
|
system |
与创建和上次修改资源相关的元数据。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
Event
要通知的事件。
| 名称 | 类型 | 说明 |
|---|---|---|
| eventName |
启用此通知的事件类型(即 AutoShutdown、Cost) |
NotificationChannel
通知。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源的完全限定资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| location |
string |
资源所在的地理位置 |
| name |
string |
资源的名称 |
| properties.createdDate |
string (date-time) |
通知通道的创建日期。 |
| properties.description |
string |
通知说明。 |
| properties.emailRecipient |
string |
要向其发送通知的电子邮件收件人(可以是分号分隔电子邮件地址的列表)。 |
| properties.events |
Event[] |
启用此通知的事件列表。 |
| properties.notificationLocale |
string |
发送通知时要使用的区域设置(不受支持的语言的回退为 EN)。 |
| properties.provisioningState |
string |
资源的预配状态。 |
| properties.uniqueIdentifier |
string |
资源的唯一不可变标识符(Guid)。 |
| properties.webHookUrl |
string |
要向其发送通知的 Webhook URL。 |
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| tags |
object |
资源标记。 |
| type |
string |
资源的类型。 例如,“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
NotificationChannelEventType
启用此通知的事件类型(即 AutoShutdown、Cost)
| 值 | 说明 |
|---|---|
| AutoShutdown | |
| Cost |
NotificationChannelList
列表作的响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| nextLink |
string (uri) |
指向下一页项的链接 |
| value |
此页上的 NotificationChannel 项 |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
资源上次修改的时间戳 (UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |