差异化更新通知对象
请求信息
请求行
PATCH /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-patch+json
,
application/merge-patch+json
,
application/apply-patch+yaml
请求体示例
Patch 方法,为了给 Kubernetes Patch 请求体一个具体的名称和类型。
{
"metadata": {
"annotations": {
"cpaas.io/operator": "admin@cpaas.io"
}
}
}
返回信息
Content-Type
application/json
,
application/yaml
状态码: 200
OK
返回体示例
NotificationReceiver 是 Servers API 的结构。
{
"apiVersion": "aiops.alauda.io/v1beta1",
"kind": "NotificationReceiver",
"metadata": {
"annotations": {
"cpaas.io/creator": "admin@cpaas.io",
"cpaas.io/display-name": "wechat",
"cpaas.io/updated-at": "2021-06-11T10:22:14Z"
},
"creationTimestamp": "2021-06-11T10:22:14Z",
"generation": 1,
"labels": {
"cpaas.io/destination-md5": "ccac854043d6bd56288c8d1939512e2b",
"cpaas.io/display-name-md5": "855a3b1b5f04a16bb093201a1e8c4910",
"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-11T10:22:14Z"
}
],
"name": "https---qyapi-weixin-qq-com-cgi-bin-webhook-send-key-29a3522e-8ffb-44e2-a4da-4498daee033c-4fj3k",
"namespace": "cpaas-system",
"resourceVersion": "10511939",
"selfLink": "/apis/aiops.alauda.io/v1beta1/namespaces/cpaas-system/notificationreceivers/https---qyapi-weixin-qq-com-cgi-bin-webhook-send-key-29a3522e-8ffb-44e2-a4da-4498daee033c-4fj3k",
"uid": "cd67e29e-6437-412c-8321-011333741228"
},
"spec": {
"destination": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=29a3522e-8ffb-44e2-a4da-4498daee033c"
}
}
返回体说明
名称 | 类型 | 描述 |
---|---|---|
apiVersion | string | 查看公共参数 |
kind | string | 查看公共参数 |
metadata | object | 查看公共参数 |
spec | object |
NotificationReceiverSpec 定义了通知对象的期望状态。
字段路径:spec |
spec.destination | string |
Destination 定义了接收方的目的地。
字段路径:spec.destination |