updateConnectivityInfo method

Future<UpdateConnectivityInfoResponse> updateConnectivityInfo({
  1. required List<ConnectivityInfo> connectivityInfo,
  2. required String thingName,
})

Updates 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 IoT Greengrass discovery API, 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 IoT Greengrass Version 2 Developer Guide.

May throw InternalServerException. May throw ValidationException.

Parameter connectivityInfo : The connectivity information for the core device.

Parameter thingName : The name of the core device. This is also the name of the IoT thing.

Implementation

Future<UpdateConnectivityInfoResponse> updateConnectivityInfo({
  required List<ConnectivityInfo> connectivityInfo,
  required String thingName,
}) async {
  final $payload = <String, dynamic>{
    'ConnectivityInfo': connectivityInfo,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/greengrass/things/${Uri.encodeComponent(thingName)}/connectivityInfo',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateConnectivityInfoResponse.fromJson(response);
}