Simple Message Notification Service (SMN)

The SMN client is the command-line interface (CLI) for the Simple Message Notification Service (SMN) API and its extensions.

For help on a specific smn command, enter:

$ openstack smn help SUBCOMMAND

Topic operations

smn topic create

Create new SMN topic.

openstack smn topic create [--display-name <display_name>] <name>
--display-name <display_name>

Topic display name, which is presented as the name of the email sender in email messages.

name

Specifies the name of the NAT Gateway.

This command is provided by the otcextensions plugin.

smn topic delete

Deletes SMN Topic.

openstack smn topic delete <topic> [<topic> ...]
topic

Smn Topic(s) to delete (Name or ID)

This command is provided by the otcextensions plugin.

smn topic list

List SMN Topics.

openstack smn topic list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--offset <offset>]
    [--limit <limit>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--offset <offset>

Resources after this offset will be queried.

--limit <limit>

Limit to fetch number of records.

This command is provided by the otcextensions plugin.

smn topic show

Show Smn Topic details.

openstack smn topic show <topic>
topic

Specifies the Name or ID of the SMN topic.

This command is provided by the otcextensions plugin.

smn topic update

Update a SMN Topic.

openstack smn topic update --display-name <display_name> <topic>
--display-name <display_name>

Topic display name, which is presented as the name of the email sender in email messages.

topic

Specifies the Name or ID of the SMN Topic.

This command is provided by the otcextensions plugin.

Subscription operations

smn subscription create

Add a new Subscription to a SMN topic.

openstack smn subscription create
    --endpoint <endpoint>
    --protocol <protocol>
    [--remark <remark>]
    <topic>
--endpoint <endpoint>

Message endpoint.

--protocol <protocol>

Subscription protocol. Currently, the following protocols are supported: email: The endpoints are email address. sms: The endpoints are phone numbers. http and https: The endpoints are URLs.

--remark <remark>

Description of the subscription.

topic

Unique resource ID or name of a topic.

This command is provided by the otcextensions plugin.

smn subscription delete

Deletes SMN subscription.

openstack smn subscription delete <subscription> [<subscription> ...]
subscription

SMN Subscrition(s) to delete.

This command is provided by the otcextensions plugin.

smn subscription list

List SMN Subscriptions.

openstack smn subscription list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--offset <offset>]
    [--limit <limit>]
    [--topic <topic>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--offset <offset>

Resources after this offset will be queried.

--limit <limit>

Limit to fetch number of records. Value range: 1–100

--topic <topic>

Specify the topic ID or Name.

This command is provided by the otcextensions plugin.

Template operations

smn template create

Create new message template.

openstack smn template create
    --content <content>
    [--protocol {email,default,sms,dms,http,https}]
    <name>
--content <content>

Template content, which currently supports plain text only.

--protocol {email,default,sms,dms,http,https}

Protocol supported by the template.

name

Specifies the name of the message template.

This command is provided by the otcextensions plugin.

smn template delete

Deletes message template.

openstack smn template delete <template> [<template> ...]
template

message template(s) to delete (Name or ID)

This command is provided by the otcextensions plugin.

smn template list

List message templates.

openstack smn template list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--name <name>]
    [--protocol {email,default,sms,dms,http,https}]
    [--offset <offset>]
    [--limit <limit>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--name <name>

Message template name.

--protocol {email,default,sms,dms,http,https}

Protocol supported by the template.

--offset <offset>

Resources after this offset will be queried.

--limit <limit>

Limit to fetch number of records.

This command is provided by the otcextensions plugin.

smn template show

Show message template details.

openstack smn template show <template>
template

Specifies the Name or ID of the message template.

This command is provided by the otcextensions plugin.

smn template update

Update a message template.

openstack smn template update --content <content> <template>
--content <content>

Template content, which currently supports plain text only.

template

Specifies the Name or ID of the message template.

This command is provided by the otcextensions plugin.

SMS operations

smn sms send

Send a transactional SMS message to a specified phone number, usually used for verification code or notification.

openstack smn sms send <endpoint> <message>
endpoint

Phone number.

message

SMS message content.

This command is provided by the otcextensions plugin.

Message operations

smn message publish

Publish message. Three message formats are supported: - message - message_structure - message_template_name If the three formats are specified at the same time, they take effect in the following sequence: message_structure > message_template_name > message.

openstack smn message publish
    --subject <subject>
    [--time-to-live <time_to_live>]
    --message <message>
    [--message-structure <message_structure>]
    [--message-template-name <message_template_name>]
    <topic>
--subject <subject>

Message subject, which is used as the email subject when you publish email messages..

--time-to-live <time_to_live>

Time-to-live (TTL) of a message, specifically the maximum time period for retaining the message in the system. The default TTL is 3600s (one hour).

--message <message>

Message content. The message content is a UTF-8-coded character string of no more than 256 KB.

--message-structure <message_structure>

Message structure, which contains JSON character strings. Specify protocols in the structure, which can be http, https, email, dms, and sms. The default protocol is mandatory. If the system fails to match any other protocols, the default message is sent.

--message-template-name <message_template_name>

Message template name, which can be obtained according to Querying Message Templates.

topic

Unique resource ID or name of a topic.

This command is provided by the otcextensions plugin.