Create Notification information
Requests
HTTP request
POST /apis/aiops.alauda.io/v1beta1/namespaces/{namespace}/notificationmessages
create a NotificationMessage
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| namespace | string | True | object name and auth scope, such as for teams and projects |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| dryRun | string | False | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
| fieldManager | string | False | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. |
| pretty | string | False | If 'true', then the output is pretty printed. |
Request body
Content-Type
application/json,
application/yaml
Sample request
NotificationMessage is the Schema for the templates API.
{
"apiVersion": "aiops.alauda.io/v1beta3",
"kind": "NotificationMessage",
"metadata": {
"creationTimestamp": null,
"name": "alert-global-cpaas-auth-controller2-rules-workload.replicas.available-42c6y-0kxtibw",
"namespace": "cpaas-system"
},
"spec": {
"body": {
"annotations": {
"alert_current_value": "0",
"alert_notifications": "[{\"namespace\":\"cpaas-system\",\"name\":\"cpaas-admin-notification\"}]"
},
"endsAt": "2021-06-24T07:59:19.480389856Z",
"labels": {
"alert_cluster": "global",
"alert_indicator": "workload.replicas.available",
"alert_indicator_aggregate_range": "0",
"alert_indicator_comparison": "\u003c",
"alert_indicator_threshold": "1",
"alert_involved_object_kind": "Deployment",
"alert_involved_object_name": "auth-controller2",
"alert_involved_object_namespace": "cpaas-system",
"alert_name": "workload.replicas.available-42c6y",
"alert_project": "system",
"alert_resource": "cpaas-auth-controller2-rules",
"alertname": "workload.replicas.available-42c6y-2889db663056b1879842e72460165f2b",
"severity": "Medium"
},
"startsAt": "2021-06-24T07:46:19.480389856Z",
"status": "resolved"
},
"notifications": [
{
"name": "cpaas-admin-notification"
}
]
}
}Parmeters
| Name | Type | Required | Description |
|---|---|---|---|
| apiVersion | string | True | See common parameters |
| kind | string | True | See common parameters |
| metadata | object | True | See common parameters |
| spec | object | True |
Spec define the specification of NotificationMessage
Path: spec |
| spec.body | object | True |
Message body, json in any form
Path: spec.body |
| spec.notifications | array | True |
Notifications associated by this message
Path: spec.notifications |
| spec.notifications[] | object | True |
NotificationItem define the info of a Notification related to NotificationMessage
Path: spec.notifications[] |
| notifications[].name | string | True |
Name specify the Notification name
Path: spec.notifications[].name |
Responses
Content-Type
application/json,
application/yaml
Status code: 201
Created
Sample response
NotificationMessage is the Schema for the templates API.
{
"apiVersion": "aiops.alauda.io/v1beta3",
"kind": "NotificationMessage",
"metadata": {
"creationTimestamp": null,
"name": "alert-global-cpaas-auth-controller2-rules-workload.replicas.available-42c6y-0kxtibw",
"namespace": "cpaas-system"
},
"spec": {
"body": {
"annotations": {
"alert_current_value": "0",
"alert_notifications": "[{\"namespace\":\"cpaas-system\",\"name\":\"cpaas-admin-notification\"}]"
},
"endsAt": "2021-06-24T07:59:19.480389856Z",
"labels": {
"alert_cluster": "global",
"alert_indicator": "workload.replicas.available",
"alert_indicator_aggregate_range": "0",
"alert_indicator_comparison": "\u003c",
"alert_indicator_threshold": "1",
"alert_involved_object_kind": "Deployment",
"alert_involved_object_name": "auth-controller2",
"alert_involved_object_namespace": "cpaas-system",
"alert_name": "workload.replicas.available-42c6y",
"alert_project": "system",
"alert_resource": "cpaas-auth-controller2-rules",
"alertname": "workload.replicas.available-42c6y-2889db663056b1879842e72460165f2b",
"severity": "Medium"
},
"startsAt": "2021-06-24T07:46:19.480389856Z",
"status": "resolved"
},
"notifications": [
{
"name": "cpaas-admin-notification"
}
]
}
}Parameters
| Name | Type | Description |
|---|---|---|
| apiVersion | string | See common parameters |
| kind | string | See common parameters |
| metadata | object | See common parameters |
| spec | object |
Spec define the specification of NotificationMessage
Path: spec |
| spec.body | object |
Message body, json in any form
Path: spec.body |
| spec.notifications | array |
Notifications associated by this message
Path: spec.notifications |
| spec.notifications[] | object |
NotificationItem define the info of a Notification related to NotificationMessage
Path: spec.notifications[] |
| notifications[].name | string |
Name specify the Notification name
Path: spec.notifications[].name |