GetConnectivityInfo - Amazon IoT Greengrass
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

GetConnectivityInfo

Retrieves connectivity information for a Greengrass core device.

Connectivity information includes endpoints and ports where client devices can connect to an MQTT broker on the core device. When a client device calls the Amazon IoT Greengrass discovery API, Amazon IoT Greengrass returns connectivity information for all of the core devices where the client device can connect. For more information, see Connect client devices to core devices in the Amazon IoT Greengrass Version 2 Developer Guide.

Request Syntax

GET /greengrass/things/thingName/connectivityInfo HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

thingName

The name of the core device. This is also the name of the Amazon IoT thing.

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "ConnectivityInfo": [ { "HostAddress": "string", "Id": "string", "Metadata": "string", "PortNumber": number } ], "Message": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

ConnectivityInfo

The connectivity information for the core device.

Type: Array of ConnectivityInfo objects

Message

A message about the connectivity information request.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerException

Amazon IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500

ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: