Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

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
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

System Subscriptions

Updated on 2023-11-24 GMT+08:00

Scenario

IEF provides the system subscription function for you to subscribe to IEF resource change events. When a resource is created, updated, or deleted, IEF will send a message to the specified API Gateway endpoint so that you can obtain resource changes in a timely manner.

System subscription is the special implementation of edge-cloud messages. IEF sends event messages about specific resources to a specified topic and calls an API of API Gateway to notify you of resource changes.

Events That Can Be Subscribed To

You can subscribe to the following events from IEF.

Table 1 Events that can be subscribed to

System Event

Topic

Resource Type

Operation

Instance creation

$hw/events/instance/+/created

Application instance

Create

Instance update

$hw/events/instance/+/updated

Application instance

Update

Instance deletion

$hw/events/instance/+/deleted

Application instance

Delete

Application deletion

$hw/events/deployment/+/deleted

Containerized application

Delete

Application creation

$hw/events/deployment/+/created

Containerized application

Create

Application update

$hw/events/deployment/+/updated

Containerized application

Update

Node creation

$hw/events/edgeNode/+/created

Edge node

Create

Node update

$hw/events/edgeNode/+/updated

Edge node

Update

Node deletion

$hw/events/edgeNode/+/deleted

Edge node

Delete

Node being brought online

$hw/events/edgeNode/+/online

Edge node

Bring online

Node being brought offline

$hw/events/edgeNode/+/offline

Edge node

Bring offline

Device creation

$hw/events/device/+/created

End device

Create

Device update

$hw/events/device/+/updated

End device

Update

Device deletion

$hw/events/device/+/deleted

End device

Delete

System Subscription Process

The system subscription process is as follows:

  1. Create an API on API Gateway for IEF to call.
  2. Create an API Gateway endpoint on IEF.
  3. Create a system subscription on IEF.

Creating an API

Create an API on API Gateway. For details, see API Gateway Introduction.

This API is called by IEF to send system event messages.

Creating an API Gateway Endpoint

  1. Log in to the IEF console, and click Switch Instance on the Dashboard page to select a platinum service instance.
  2. In the navigation pane, choose Edge-Cloud Messages > Endpoints.
  3. Click Create Endpoint in the upper right corner, and set the endpoint parameters.

    Figure 1 Creating an endpoint
    • Type: Select API Gateway.
    • Name: Enter an endpoint name.

  4. Click OK. The endpoint is successfully created and the endpoint list page is displayed.

Creating a System Subscription

  1. Log in to the IEF console, and click Switch Instance on the Dashboard page to select a platinum service instance.
  2. In the navigation pane, choose Edge-Cloud Messages > System Subscriptions.
  3. Click Create System Subscription in the upper right corner, and set the system subscription parameters.

    Figure 2 Creating a system subscription
    • Name: Enter a system subscription name.
      CAUTION:

      System subscriptions and message routes are of the same resource type. Their names cannot conflict with each other.

    • Topic: Select the resource and operation to be subscribed, for example, creating a containerized application. For details about the events that can be subscribed to, see Table 1.
    • Destination Endpoint: Select the endpoint created in Creating an API Gateway Endpoint.
    • Destination Endpoint Resource: Select the API created in Creating an API.

  4. Click Create.

Message Forwarding After Subscription

After a system subscription is created, IEF will forward a message when a system event occurs. The statistics about message forwarding can be viewed on the System Subscriptions page of the IEF console.

Figure 3 Number of forwarded messages

Meanwhile, IEF will call the API registered on API Gateway. The request body is as follows: (The request body uses the standard CloudEvents format. For details about CloudEvents, click here.)

{
	"data": {
		"event_type": "instance",
		"operation": "created",
		"timestamp": 134567677,
		"topic": "$hw/events/deployment/+/created",
		"name": "xxxx",
		"attributes": {"ID":"x"}
	},
        "datacontenttype": "application/json",
	"source": "sysevents",
	"id": "xxxx",
	"time": "2020-11-5 xxx"
}
  • data: system event data.
    • event_type: resource type. The value is a character string.
    • operation: operation performed on the resource. The value is a character string.
    • topic: topic to which a message is sent. The value is a character string.
    • timestamp: time when an event occurs. The value is of the UInt64 type.
    • name: resource name. The value is a character string.
    • attributes: resource attributes. This parameter is not contained in the request for deleting a resource. The value is of the Object type.
  • datacontenttype: format of the system event data content. The value is a character string.
  • source: source of the system event. The value is a character string.
  • id: system event ID, which is a character string.
  • time: time when the system event occurs. The value is a character string.

The following table lists the resource types, operations, and topics supported by IEF.

Table 2 Events that can be subscribed to

System Event

Topic

Resource Type

Operation

Instance creation

$hw/events/instance/+/created

Application instance

Create

Instance update

$hw/events/instance/+/updated

Application instance

Update

Instance deletion

$hw/events/instance/+/deleted

Application instance

Delete

Application deletion

$hw/events/deployment/+/deleted

Containerized application

Delete

Application creation

$hw/events/deployment/+/created

Containerized application

Create

Application update

$hw/events/deployment/+/updated

Containerized application

Update

Node creation

$hw/events/edgeNode/+/created

Edge node

Create

Node update

$hw/events/edgeNode/+/updated

Edge node

Update

Node deletion

$hw/events/edgeNode/+/deleted

Edge node

Delete

Node being brought online

$hw/events/edgeNode/+/online

Edge node

Bring online

Node being brought offline

$hw/events/edgeNode/+/offline

Edge node

Bring offline

Device creation

$hw/events/device/+/created

End device

Create

Device update

$hw/events/device/+/updated

End device

Update

Device deletion

$hw/events/device/+/deleted

End device

Delete

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback