查看通知策略详情
请求信息
请求行
GET /apis/aiops.alauda.io/v1beta1/namespaces/{namespace}/notifications/{name}
查看指定的通知的详细信息。
请求行参数
| 名称 | 类型 | 是否必填项 | 描述 | 
|---|---|---|---|
| name | string | 是 | 通知的名称。 | 
| namespace | string | 是 | 命名空间。对象名称和身份验证范围,例如团队和项目。 | 
请求参数
| 名称 | 类型 | 是否必填项 | 描述 | 
|---|---|---|---|
| resourceVersion | string | 否 | 如果未设置,则基于 quorum-read 标志从远程存储返回结果;如果它是 0,那么我们只是返回我们目前在缓存,没有保证;如果设置为非零,那么结果至少与给定的 resourceVersion 一样为最新的值。 | 
| pretty | string | 否 | 如果为 true,则会将返回结果输出成适合打印的格式。 | 
返回信息
Content-Type 
                application/json,
                application/yaml
状态码: 200
OK
返回体示例
Notification 是 notifications API 的结构。
{
   "apiVersion": "aiops.alauda.io/v1beta1",
   "kind": "Notification",
   "metadata": {
     "annotations": {
       "cpaas.io/creator": "admin@cpaas.io",
       "cpaas.io/description": "adfsdfa",
       "cpaas.io/display-name": "fadfadsf",
       "cpaas.io/updated-at": "2021-06-24T08:52:22Z"
     },
     "creationTimestamp": "2021-06-24T08:52:22Z",
     "generation": 1,
     "labels": {
       "notificationtemplate.cpaas.io/local-ares-template-template": "true"
     },
     "managedFields": [
       {
         "apiVersion": "aiops.alauda.io/v1beta1",
         "fieldsType": "FieldsV1",
         "fieldsV1": {
           "f:metadata": {
             "f:annotations": {
               ".": {},
               "f:cpaas.io/description": {},
               "f:cpaas.io/display-name": {}
             }
           },
           "f:spec": {
             ".": {},
             "f:subscriptions": {}
           }
         },
         "manager": "Mozilla",
         "operation": "Update",
         "time": "2021-06-24T08:52:22Z"
       }
     ],
     "name": "fdsfa",
     "namespace": "cpaas-system",
     "resourceVersion": "35533758",
     "selfLink": "/apis/aiops.alauda.io/v1beta1/namespaces/cpaas-system/notifications/fdsfa",
     "uid": "0f1d1c15-f070-4b32-a3eb-ee213acca18e"
   },
   "spec": {
     "subscriptions": [
       {
         "method": "wechat",
         "receivers": [
           {
             "name": "https---abc232-9vo0f",
             "namespace": "cpaas-system"
           }
         ],
         "template": "local-ares-template-template"
       }
     ]
   }
 }返回体说明
| 名称 | 类型 | 描述 | 
|---|---|---|
| apiVersion | string | 查看公共参数 | 
| kind | string | 查看公共参数 | 
| metadata | object | 查看公共参数 | 
| spec | object | Spec 定义了一个通知策略的详细信息,描述了通知策略的期望状态。 字段路径:spec | 
| spec.subscriptions | array | 通知的订阅信息列表。 字段路径:spec.subscriptions | 
| spec.subscriptions[] | object | NotificationSubscription 定义了通知策略的订阅方式。 字段路径:spec.subscriptions[] | 
| subscriptions[].method | string | 订阅方式。sms:短信;email:邮箱;webhook:Webhook;dingding:钉钉。 字段路径:spec.subscriptions[].method | 
| subscriptions[].receivers | array | 通知对象,至少要添加一个通知对象。 字段路径:spec.subscriptions[].receivers | 
| subscriptions[].receivers[] | object | 字段路径:spec.subscriptions[].receivers[] | 
| receivers[].name | string | 字段路径:spec.subscriptions[].receivers[].name | 
| receivers[].namespace | string | 字段路径:spec.subscriptions[].receivers[].namespace | 
| subscriptions[].template | string | 通知消息模板。 字段路径:spec.subscriptions[].template |