Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

SMN

Updated on 2024-12-27 GMT+08:00

SMN charges messages separately. For details, see SMN Pricing Details.

Functions

  • A topic is a specified event for message publishing or subscription notification. It serves as a message sending channel, where publishers and subscribers can interact with each other. Before configuring notifications, you must create a topic.
  • VOD notification types include Transcoding completed, Snapshot captured, Review completed, Video uploaded, Audio extraction completed, and Thumbnail created. Subscription is to associate a subscriber to a topic. A user can have multiple topics, and each topic has multiple subscribers.

Process Flow

Figure 1 shows the process of configuring notifications.

Figure 1 Process of configuring notifications
  1. Create an SMN Topic on the SMN console.
  2. Configure a topic policy to authorize VOD to publish messages to the topic.
  3. Configure notifications on the VOD console so that you can receive notifications during operations such as transcoding, snapshot capturing, and review.

Creating an SMN Topic

  1. Log in to the SMN console.
  2. In the navigation pane on the left, choose Topic Management > Topics.
  3. Click Create Topic in the upper right corner.

    The Create Topic dialog box is displayed. Table 1 describes the required parameters.
    Table 1 Topic parameters

    Parameter

    Description

    Topic Name

    Specifies the topic name, which

    • Contains only letters, digits, hyphens (-), and underscores (_), and must start with a letter or digit.
    • Contains 1 to 255 characters.
    • Must be unique and cannot be modified after the topic is created.

    Display Name

    This parameter is optional. When sending an email:

    • If the display name is not specified, the sender is displayed as username@example.com.
    • If the display name is specified, the email sender is presented as Display name<username@example.com>.

    Enterprise Project

    Centrally manages cloud resources and members by project.

    Tag

    Specifies a key-value pair. Tags identify cloud resources so that you can easily categorize and search for your resources.

  4. Click OK.
  5. Click Add Subscription in the Operation column of the new topic. The Add Subscription dialog box is displayed.

    Configure the subscription protocol and endpoints. See Figure 2.
    Figure 2 Adding a subscription

    Table 2 describes the subscription parameters.

    Table 2 Subscription parameters

    Parameter

    Description

    Topic Name

    Name of the topic to be subscribed to. Retain the default value.

    Protocol

    Message notification method. Select a protocol from the drop-down list.

    The common protocols used by MPC are SMS, Email, HTTP, and HTTPS.

    Endpoint

    Specifies the IP address of a subscription endpoint. You can enter up to 10 SMS, email, HTTP, or HTTPS endpoints, one in each line.

    • SMS: Enter one or more valid phone numbers.

      The format is + country code phone number, for example, +8600000000000.

      Subscribers will receive a subscription confirmation message valid for 48 hours and must confirm the subscription to receive messages published to the topic.

    • Email: Enter one or more valid email addresses, for example, username@example.com.

      Subscribers will receive a subscription confirmation email valid for 48 hours and must confirm the subscription to receive messages published to the topic.

    • If you select HTTP or HTTPS, enter a public network address and confirm the subscription, for example, https://example.com/notification/action.

      HTTPS is recommended, as it is more secure than HTTP.

  6. Click OK to add a subscription. You can view the subscription on Topic Management > Subscriptions.

    After the subscription is added, the configured subscription endpoint will receive a subscription confirmation message. The subscription confirmation link is valid for 48 hours. You need to confirm the subscription within the validity period so that you can receive messages published to the topic.

Configuring a Topic Policy

  1. In the navigation pane of the SMN console, choose Topic Management > Topics.
  2. Click More > Configure Topic Policy in the Operation column.
  3. Configure topic policy parameters by referring to Figure 3.

    Figure 3 Configuring a topic policy

    Topic policies are classified into basic mode and advanced mode. The basic mode simply specifies which users or cloud services have permissions to publish messages to a topic. See Figure 3.

    Table 3 Description for configuring a topic policy in basic mode

    Item

    Settings

    Description

    Users who can publish messages to this topic

    Topic creator

    Only the topic creator has permission to publish messages to the topic.

    All users

    All users have permission to publish messages to the topic.

    Specified user accounts

    Only specified users have permission to publish messages to the topic.

    Users are specified in the format urn:csp:iam::domainId:root,

    in which domainId indicates the account ID of a user. Every two users are separated with a comma (,). SMN does not limit the number of users you can specify, but the total length of a topic policy cannot exceed 30 KB.
    NOTE:
    • Enter the account ID of the user and click OK. Other information is automatically supplemented by the system.
    • To obtain a user's account ID, log in to the SMN console, hover the mouse over the username in the upper right corner and choose My Credentials from the drop-down list.

    Services that can publish messages to this topic

    See Figure 3.

    Select VOD. VOD has the permissions to access the topic.

Configuring Notifications

  1. Log in to the VOD console.
  2. In the navigation pane, choose Global Settings > Notification Settings.

    Figure 4 Configuring notifications

  3. Select one or more events.

    NOTICE:

    If you select both Snapshot captured and Thumbnail created, only Snapshot captured will trigger notifications.

  4. Select one or more message types.

    NOTE:

    If Template message and JSON message are both selected, you will receive template messages via SMS and email, and receive JSON messages via HTTP and HTTPS.

    • Select Template message. Table 2 describes what a template message looks like. The variables in the notification text message are subject to the actual operation.
      Table 4 Template message

      Event

      Status

      Message Body

      Transcoding completed

      Completed

      Dear user, your video transcoding task has been completed. Video ID: {asset_id}; name: {title}. Log in to the VOD console or call a VOD API to view transcoding details.

      Failed

      Dear user, an error occurred when transcoding your video. Video ID: {asset_id}; name: {title}; error code: {err_code}; error information: {err_msg}.

      Snapshot captured

      Completed

      Dear user, your snapshot task has been completed. Video ID: {asset_id}; name: {title}. Log in to the VOD console or call a VOD API to view snapshot details.

      Failed

      Dear user, an error occurred when processing your snapshot task. Video ID: {asset_id}; name: {title}; error code: {err_code}; error information: {err_msg}.

      Review completed

      Completed

      Dear user, your review task has been completed. Video ID: {asset_id}; name: {title}; review advice: {suggestion}. Log in to the VOD console or call a VOD API to view review details.

      Failed

      Dear user, an error occurred when reviewing your video. Video ID: {asset_id}; name: {title}; error code: {err_code}; error information: {err_msg}.

      Video uploaded

      Completed

      Dear user, your video has been uploaded. Video ID: {asset_id}; name: {title}. Log in to the VOD console or call a VOD API to view video details.

      Failed

      Dear user, an error occurred when uploading your video. Video ID: {asset_id}; name: {title}; error code: {err_code}; error information: {err_msg}.

      Audio extraction completed

      Completed

      Dear user, your audio extraction task has been completed. Audio ID: {asset_id}; name: {title}. Log in to the VOD console or call a VOD API to view audio details.

      Failed

      Dear user, an error occurred when processing your audio extraction task. Audio ID: {asset_id}; name: {title}; error code: {err_code}; error information: {err_msg}.

      Thumbnail created

      Completed

      Dear user, your video thumbnail has been created. Video ID: {asset_id}; name: {title}. Log in to the VOD console or call a VOD API to view video details.

      Failed

      Dear user, your video thumbnail fails to be created. Video ID: {asset_id}; name: {title}; error code: {err_code}; error information: {err_msg}.

      Parse complete

      Completed

      Dear user, your video has been parsed. Video ID: {asset_id}; name: {title}. Log in to the VOD console or call a VOD API to view video details.

      Failed

      Dear user, an error occurred when parsing your video. Video ID: {asset_id}; name: {title}; error code: {err_code}; error information: {err_msg}.

    • Select JSON message. Table 3 describes what a template message looks like.
      Table 5 JSON message

      Parameter

      Description

      Type

      event_type

      Event type. The options are as follows:

      • transcodeComplete: transcoding (encryption) completed
      • thumbnailComplete: snapshot captured
      • reviewComplete: review completed
      • createComplete: media file created
      • audioExtractComplete: audio extracted
      • coverComplete: thumbnail created
      • parseComplete: media file parsed

      String

      transcode_info

      Transcoding (including encryption) message. For details, see Transcoding Message Body.

      TranscodeInfo

      thumbnail_info

      Snapshot message. For details, see Snapshot Message Body.

      ThumbnailInfo

      review_info

      Review message. For details, see Review Message Body.

      ReviewInfo

      create_info

      Media file upload message. For details, see Media Upload and Audio Extraction Message Body.

      AssetInfo

      audio_extract_info

      Audio extraction message. For details, see Media Upload and Audio Extraction Message Body.

      AssetInfo

      cover_info

      Thumbnail message. For details, see Thumbnail Message Body.

      CoverInfo

      parse_info

      Media file parsing completion message. This parameter is available only when a media file has been parsed. For details, see Media Asset Parsing Message Body.

      ParseInfo

  5. Select an SMN topic.
  6. Click OK.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback