- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
SendHeartbeatCommand
Use to get the current status of devices registered on SageMaker Edge Manager.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SagemakerEdgeClient, SendHeartbeatCommand } from "@aws-sdk/client-sagemaker-edge"; // ES Modules import
// const { SagemakerEdgeClient, SendHeartbeatCommand } = require("@aws-sdk/client-sagemaker-edge"); // CommonJS import
const client = new SagemakerEdgeClient(config);
const input = { // SendHeartbeatRequest
AgentMetrics: [ // EdgeMetrics
{ // EdgeMetric
Dimension: "STRING_VALUE",
MetricName: "STRING_VALUE",
Value: Number("double"),
Timestamp: new Date("TIMESTAMP"),
},
],
Models: [ // Models
{ // Model
ModelName: "STRING_VALUE",
ModelVersion: "STRING_VALUE",
LatestSampleTime: new Date("TIMESTAMP"),
LatestInference: new Date("TIMESTAMP"),
ModelMetrics: [
{
Dimension: "STRING_VALUE",
MetricName: "STRING_VALUE",
Value: Number("double"),
Timestamp: new Date("TIMESTAMP"),
},
],
},
],
AgentVersion: "STRING_VALUE", // required
DeviceName: "STRING_VALUE", // required
DeviceFleetName: "STRING_VALUE", // required
DeploymentResult: { // DeploymentResult
DeploymentName: "STRING_VALUE",
DeploymentStatus: "STRING_VALUE",
DeploymentStatusMessage: "STRING_VALUE",
DeploymentStartTime: new Date("TIMESTAMP"),
DeploymentEndTime: new Date("TIMESTAMP"),
DeploymentModels: [ // DeploymentModels
{ // DeploymentModel
ModelHandle: "STRING_VALUE",
ModelName: "STRING_VALUE",
ModelVersion: "STRING_VALUE",
DesiredState: "DEPLOY" || "UNDEPLOY",
State: "DEPLOY" || "UNDEPLOY",
Status: "SUCCESS" || "FAIL",
StatusReason: "STRING_VALUE",
RollbackFailureReason: "STRING_VALUE",
},
],
},
};
const command = new SendHeartbeatCommand(input);
const response = await client.send(command);
// {};
SendHeartbeatCommand Input
See SendHeartbeatCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AgentVersion Required | string | undefined | Returns the version of the agent. |
DeviceFleetName Required | string | undefined | The name of the fleet that the device belongs to. |
DeviceName Required | string | undefined | The unique name of the device. |
AgentMetrics | EdgeMetric[] | undefined | For internal use. Returns a list of SageMaker Edge Manager agent operating metrics. |
DeploymentResult | DeploymentResult | undefined | Returns the result of a deployment on the device. |
Models | Model[] | undefined | Returns a list of models deployed on the the device. |
SendHeartbeatCommand Output
See SendHeartbeatCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServiceException | client | An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support. |
SagemakerEdgeServiceException | Base exception class for all service exceptions from SagemakerEdge service. |