sendHeartbeat method

Future<void> sendHeartbeat({
  1. required String agentVersion,
  2. required String deviceFleetName,
  3. required String deviceName,
  4. List<EdgeMetric>? agentMetrics,
  5. DeploymentResult? deploymentResult,
  6. List<Model>? models,
})

Use to get the current status of devices registered on SageMaker Edge Manager.

May throw InternalServiceException.

Parameter agentVersion : Returns the version of the agent.

Parameter deviceFleetName : The name of the fleet that the device belongs to.

Parameter deviceName : The unique name of the device.

Parameter agentMetrics : For internal use. Returns a list of SageMaker Edge Manager agent operating metrics.

Parameter deploymentResult : Returns the result of a deployment on the device.

Parameter models : Returns a list of models deployed on the the device.

Implementation

Future<void> sendHeartbeat({
  required String agentVersion,
  required String deviceFleetName,
  required String deviceName,
  List<EdgeMetric>? agentMetrics,
  DeploymentResult? deploymentResult,
  List<Model>? models,
}) async {
  final $payload = <String, dynamic>{
    'AgentVersion': agentVersion,
    'DeviceFleetName': deviceFleetName,
    'DeviceName': deviceName,
    if (agentMetrics != null) 'AgentMetrics': agentMetrics,
    if (deploymentResult != null) 'DeploymentResult': deploymentResult,
    if (models != null) 'Models': models,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/SendHeartbeat',
    exceptionFnMap: _exceptionFns,
  );
}