When you use a device SDK, IoT Platform SDK, or AMQP SDK, you must specify the endpoint of an instance that you want your device to access. This topic describes how to obtain the instance endpoint.
Background information
For more information about how to use SDKs, see Device SDKs, IoT Platform SDKs, and Connect an AMQP client to IoT Platform.
Usage notes
- If you have devices that use MQTT, CoAP or HTTP to access IoT Platform instances, devices that use AMQP-based server-side subscription, or devices that call IoT Platform APIs, you must configure the public endpoint for these devices.
- If you have devices that use MQTT to access IoT Platform instances, devices that use AMQP-based server-side subscription, or devices that call IoT Platform APIs, you must configure the VPC endpoint for these devices.
- You can bind fixed IP addresses to the endpoint of an Enterprise Edition instance when devices are connected to IoT Platform by using MQTT.
Region
- Regions in mainland China
Region City Region ID Number of zones China (Shanghai) Shanghai cn-shanghai 11 - Regions outside mainland China
Region City Region ID Number of zones Singapore Singapore ap-southeast-1 3 Japan (Tokyo) Tokyo ap-northeast-1 2 US (Silicon Valley) Silicon Valley us-west-1 2 US (Virginia) Virginia us-east-1 2 Germany (Frankfurt) Frankfurt eu-central-1 3
For more information about region IDs, see Regions and zones.
View the endpoint of a public instance
Communication type | Endpoint format |
---|---|
MQTT | ${YourProductKey}.iot-as-mqtt.${YourRegionId}.aliyuncs.com:1883 , where:
|
CoAP | ${YourProductKey}.coap.cn-shanghai.link.aliyuncs.com:${port} , where:
|
HTTP | https://iot-as-http.${YourRegionId}.aliyuncs.com , where:
${YourRegionId}: Replace this variable with the ID of the region where your IoT Platform device resides. For more information about region IDs, see Region of this article.: |
AMQP | ${uid}.iot-amqp.${YourRegionId}.aliyuncs.com , where:
|
API requests | The API request is in the http://Endpoint/?Action=**&Parameters format. For more information, see Initiate API requests.
|
View the endpoint of an Enterprise Edition instance
Bind fixed IP addresses to an endpoint
Fixed IP addresses prevent your DNS records from being updated when IoT Platform expands its list of IP addresses. If you use IoT cards and your carrier does not support domain names, you can add your fixed IP address to the directional IP address list of the carrier.
We recommend that you use domain names to connect your device to IoT Platform. This way, you will be notified before an IP address is changed.
Perform the following steps to bind fixed IP addresses to the endpoint that devices access over Internet by using MQTT.For instances, two fixed IP addresses can be bound to the endpoint.
- On the Instance Details page of an instance, click View Developer Configurations in the upper-right corner.
- In the Developer Configurations panel, click Settings to the right of Fixed IP address on the MQTT tab.
- In the dialog box that appears, click OK to obtain two fixed IP addresses.
If MQTT devices no longer require the fixed IP addresses, click Unbind.