notification

delete

Delete a notification with a given id.

maas $PROFILE notification delete [--help] [-d] [-k] id

Positional arguments

Argument

Effect

id

The ID of the resource (e.g., 1, abc123)

Command-line options

Option

Effect

–help, -h

Show this help message and exit.

-d, –debug

Display more information about API responses.

-k, –insecure

Disable SSL certificate check.

dismiss

Dismiss a notification with the given id. It is safe to call multiple times for the same notification.

maas $PROFILE notification dismiss [--help] [-d] [-k] id

Positional arguments

Argument

Effect

id

The ID of the resource (e.g., 1, abc123)

Command-line options

Option

Effect

–help, -h

Show this help message and exit.

-d, –debug

Display more information about API responses.

-k, –insecure

Disable SSL certificate check.

read

Read a notification with the given id.

maas $PROFILE notification read [--help] [-d] [-k] id

Positional arguments

Argument

Effect

id

The ID of the resource (e.g., 1, abc123)

Command-line options

Option

Effect

–help, -h

Show this help message and exit.

-d, –debug

Display more information about API responses.

-k, –insecure

Disable SSL certificate check.

update

Update a notification with a given id. This is available to admins only. Note: One of the user, users or admins parameters must be set to True for the notification to be visible to anyone.

maas $PROFILE notification update [--help] [-d] [-k] id [data ...]

Positional arguments

Argument

Effect

id

The ID of the resource (e.g., 1, abc123)

Command-line options

Option

Effect

–help, -h

Show this help message and exit.

-d, –debug

Display more information about API responses.

-k, –insecure

Disable SSL certificate check.

Keywords

Keyword “message”

Optional String. The message for this notification. May contain basic HTML, such as formatting. This string will be sanitised before display so that it doesn’t break MAAS HTML.

Keyword “context”

Optional String. JSON context. The root object must be an object (i.e. a mapping). The values herein can be referenced by message with Python’s “format” (not %) codes.

Keyword “category”

Optional String. Choose from: error, warning, success, or info. Defaults to info.

Keyword “ident”

Optional String. Unique identifier for this notification.

Keyword “user”

Optional String. User ID this notification is intended for. By default it will not be targeted to any individual user.

Keyword “users”

Optional Boolean. True to notify all users, defaults to false, i.e. not targeted to all users.

Keyword “admins”

Optional Boolean. True to notify all admins, defaults to false, i.e. not targeted to all admins.

Keyword “dismissable”

Optional Boolean. True to allow users dismissing the notification. Defaults to true.

Note: This command accepts JSON.

notifications create

Create a new notification. This is available to admins only. Note: One of the user, users or admins parameters must be set to True for the notification to be visible to anyone.

maas $PROFILE notifications create [--help] [-d] [-k] [data ...]

Command-line options

Option

Effect

–help, -h

Show this help message and exit.

-d, –debug

Display more information about API responses.

-k, –insecure

Disable SSL certificate check.

Keywords

Keyword “message”

Optional String. The message for this notification. May contain basic HTML, such as formatting. This string will be sanitised before display so that it doesn’t break MAAS HTML.

Keyword “context”

Optional String. JSON context. The root object must be an object (i.e. a mapping). The values herein can be referenced by message with Python’s “format” (not %) codes.

Keyword “category”

Optional String. Choose from: error, warning, success, or info. Defaults to info.

Keyword “ident”

Optional String. Unique identifier for this notification.

Keyword “user”

Optional String. User ID this notification is intended for. By default it will not be targeted to any individual user.

Keyword “users”

Optional Boolean. True to notify all users, defaults to false, i.e. not targeted to all users.

Keyword “admins”

Optional Boolean. True to notify all admins, defaults to false, i.e. not targeted to all admins.

Note: This command accepts JSON.

notifications read

List notifications relevant to the invoking user. Notifications that have been dismissed are not returned.

maas $PROFILE notifications read [--help] [-d] [-k]

Command-line options

Option

Effect

–help, -h

Show this help message and exit.

-d, –debug

Display more information about API responses.

-k, –insecure

Disable SSL certificate check.