首页 / API 文档 / 运维中心 / 通知对象 / 更新通知对象

更新通知对象

请求信息

请求行

PUT /apis/aiops.alauda.io/v1beta1/namespaces/{namespace}/notificationreceivers/{name}

更新指定的通知对象。

请求行参数

名称 类型 是否必填项 描述
name string 通知对象的名称。
namespace string 命名空间。对象名称和身份验证范围,例如团队和项目。

请求参数

名称 类型 是否必填项 描述
dryRun string 当该参数出现时,表示不应该持久化修改。一个无效的或无法识别的 dryRun 指令将导致错误响应,并且不会进一步处理请求。有效值为:All,将处理所有的试运行阶段。
fieldManager string fieldManager 是与正在进行这些更改的参与者或实体相关联的名称。值必须少于 128 字符,且仅包含可打印字符,参见 https://golang.org/pkg/unicode/#IsPrint。
pretty string 如果为 true,则会将返回结果输出成适合打印的格式。

请求体

Content-Type application/json, application/yaml

请求体示例

NotificationReceiver 是 Servers API 的结构。

{
   "apiVersion": "aiops.alauda.io/v1beta1",
   "kind": "NotificationReceiver",
   "metadata": {
     "annotations": {
       "cpaas.io/display-name": "fdfadsf"
     },
     "labels": {
       "cpaas.io/type": "wechat"
     },
     "name": "https---abc232-9vo0f",
     "namespace": "cpaas-system",
     "resourceVersion": "35533700"
   },
   "spec": {
     "destination": "https://abc232fdfa"
   }
 }

请求体说明

名称 类型 是否必填项 描述
apiVersion string 查看公共参数
kind string 查看公共参数
metadata object 查看公共参数
spec object NotificationReceiverSpec 定义了通知对象的期望状态。
字段路径:spec
spec.destination string Destination 定义了接收方的目的地。
字段路径:spec.destination

返回信息

Content-Type application/json, application/yaml

状态码: 200

OK

返回体示例

NotificationReceiver 是 Servers API 的结构。

{
   "apiVersion": "aiops.alauda.io/v1beta1",
   "kind": "NotificationReceiver",
   "metadata": {
     "annotations": {
       "cpaas.io/display-name": "fdfadsf",
       "cpaas.io/operator": "admin@cpaas.io",
       "cpaas.io/updated-at": "2021-06-24T09:20:50Z"
     },
     "creationTimestamp": "2021-06-24T08:52:18Z",
     "generation": 2,
     "labels": {
       "cpaas.io/destination-md5": "25bbab5750d9c9c928833d00306b30a4",
       "cpaas.io/display-name-md5": "af9a3ed05e1b50379f4eca5bd14e232d",
       "cpaas.io/type": "wechat"
     },
     "managedFields": [
       {
         "apiVersion": "aiops.alauda.io/v1beta1",
         "fieldsType": "FieldsV1",
         "fieldsV1": {
           "f:metadata": {
             "f:annotations": {
               ".": {},
               "f:cpaas.io/display-name": {}
             },
             "f:labels": {
               ".": {},
               "f:cpaas.io/type": {}
             }
           },
           "f:spec": {
             ".": {},
             "f:destination": {}
           }
         },
         "manager": "Mozilla",
         "operation": "Update",
         "time": "2021-06-24T08:52:18Z"
       }
     ],
     "name": "https---abc232-9vo0f",
     "namespace": "cpaas-system",
     "resourceVersion": "35562329",
     "selfLink": "/apis/aiops.alauda.io/v1beta1/namespaces/cpaas-system/notificationreceivers/https---abc232-9vo0f",
     "uid": "c81f5dd4-bcd5-4001-9249-073058ef4397"
   },
   "spec": {
     "destination": "https://abc232fdfa"
   }
 }

返回体说明

名称 类型 描述
apiVersion string 查看公共参数
kind string 查看公共参数
metadata object 查看公共参数
spec object NotificationReceiverSpec 定义了通知对象的期望状态。
字段路径:spec
spec.destination string Destination 定义了接收方的目的地。
字段路径:spec.destination

其他状态码

状态码: 201

Created

状态码: 401

Unauthorized