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.
Parameters:
-
thing_name
(CoreDeviceThingName)
–
The name of the core device. This is also the name of the IoT thing.
-
connectivity_info
(connectivityInfoList)
–
The connectivity information for the core device.
Raises:
-
InternalServerException
–
IoT Greengrass can't process your request right now. Try again later.
-
ValidationException
–
The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_greengrassv2/_services/greengrass_v2.py
| def update_connectivity_info(
self,
thing_name: "capo_greengrassv2.types.core_device_thing_name.CoreDeviceThingName",
connectivity_info: "capo_greengrassv2.types.connectivity_info_list.connectivityInfoList",
*,
config_overrides: Optional[GreengrassV2ClientConfig] = None,
) -> "capo_greengrassv2.types.update_connectivity_info_response.UpdateConnectivityInfoResponse":
"""<p>Updates connectivity information for a Greengrass core device.</p> <p>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 <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-discover-api.html">IoT Greengrass discovery API</a>, IoT Greengrass returns connectivity information for all of the core devices where the client device can connect. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/connect-client-devices.html">Connect client devices to core devices</a> in the <i>IoT Greengrass Version 2 Developer Guide</i>.</p>
Args:
thing_name: <p>The name of the core device. This is also the name of the IoT thing.</p>
connectivity_info: <p>The connectivity information for the core device.</p>
Raises:
capo_greengrassv2.errors.internal_server_exception.InternalServerException: <p>IoT Greengrass can't process your request right now. Try again later.</p>
capo_greengrassv2.errors.validation_exception.ValidationException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.</p>
capo_greengrassv2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_greengrassv2.types.update_connectivity_info_request.UpdateConnectivityInfoRequest]",
) -> OperationResponse[
"capo_greengrassv2.types.update_connectivity_info_response.UpdateConnectivityInfoResponse"
]:
import capo_greengrassv2._operations.greengrass_v2.update_connectivity_info
output, http_response = (
capo_greengrassv2._operations.greengrass_v2.update_connectivity_info.update_connectivity_info(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateConnectivityInfo")
)
input_: capo_greengrassv2.types.update_connectivity_info_request.UpdateConnectivityInfoRequest = {
"thing_name": thing_name,
"connectivity_info": connectivity_info,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|