View notification policy details
Requests
HTTP request
GET /apis/aiops.alauda.io/v1beta1/namespaces/{namespace}/notifications/{name}
read the specified Notification
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | True | name of the Notification |
| namespace | string | True | object name and auth scope, such as for teams and projects |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| resourceVersion | string | False | When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. |
| pretty | string | False | If 'true', then the output is pretty printed. |
Responses
Content-Type
application/json,
application/yaml
Status code: 200
OK
Sample response
Notification is the Schema for the 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"
}
]
}
}Parameters
| Name | Type | Description |
|---|---|---|
| apiVersion | string | See common parameters |
| kind | string | See common parameters |
| metadata | object | See common parameters |
| spec | object |
Spec defines the specification of a notification
Path: spec |
| spec.subscriptions | array |
Subscriptions for this notification
Path: spec.subscriptions |
| spec.subscriptions[] | object |
NotificationSubscription defines a subscription for notification
Path: spec.subscriptions[] |
| subscriptions[].method | string |
Method of recipient, such as email/dingding/sms/webhook
Path: spec.subscriptions[].method |
| subscriptions[].receivers | array |
Receivers, at least one notification receiver should be added
Path: spec.subscriptions[].receivers |
| subscriptions[].receivers[] | object |
Path: spec.subscriptions[].receivers[] |
| receivers[].name | string |
Path: spec.subscriptions[].receivers[].name |
| receivers[].namespace | string |
Path: spec.subscriptions[].receivers[].namespace |
| subscriptions[].template | string |
Template to render notification message
Path: spec.subscriptions[].template |