2022/07/19 - Amazon Sagemaker Edge Manager - 1 new 1 updated api methods
Changes Fixed an issue with cross account QueryLineage
Use to get the active deployments from a device.
See also: AWS API Documentation
Request Syntax
client.get_deployments(
    DeviceName='string',
    DeviceFleetName='string'
)
string
[REQUIRED]
The unique name of the device you want to get the configuration of active deployments from.
string
[REQUIRED]
The name of the fleet that the device belongs to.
dict
Response Syntax
{
    'Deployments': [
        {
            'DeploymentName': 'string',
            'Type': 'Model',
            'FailureHandlingPolicy': 'ROLLBACK_ON_FAILURE'|'DO_NOTHING',
            'Definitions': [
                {
                    'ModelHandle': 'string',
                    'S3Url': 'string',
                    'Checksum': {
                        'Type': 'SHA1',
                        'Sum': 'string'
                    },
                    'State': 'DEPLOY'|'UNDEPLOY'
                },
            ]
        },
    ]
}
Response Structure
(dict) --
Deployments (list) --
Returns a list of the configurations of the active deployments on the device.
(dict) --
Information about a deployment on an edge device that is registered with SageMaker Edge Manager.
DeploymentName (string) --
The name and unique ID of the deployment.
Type (string) --
The type of the deployment.
FailureHandlingPolicy (string) --
Determines whether to rollback to previous configuration if deployment fails.
Definitions (list) --
Returns a list of Definition objects.
(dict) --
ModelHandle (string) --
The unique model handle.
S3Url (string) --
The absolute S3 location of the model.
Checksum (dict) --
The checksum information of the model.
Type (string) --
The type of the checksum.
Sum (string) --
The checksum of the model.
State (string) --
The desired state of the model.
{'DeploymentResult': {'DeploymentEndTime': 'timestamp',
                      'DeploymentModels': [{'DesiredState': 'DEPLOY | UNDEPLOY',
                                            'ModelHandle': 'string',
                                            'ModelName': 'string',
                                            'ModelVersion': 'string',
                                            'RollbackFailureReason': 'string',
                                            'State': 'DEPLOY | UNDEPLOY',
                                            'Status': 'SUCCESS | FAIL',
                                            'StatusReason': 'string'}],
                      'DeploymentName': 'string',
                      'DeploymentStartTime': 'timestamp',
                      'DeploymentStatus': 'string',
                      'DeploymentStatusMessage': 'string'}}
    Use to get the current status of devices registered on SageMaker Edge Manager.
See also: AWS API Documentation
Request Syntax
client.send_heartbeat(
    AgentMetrics=[
        {
            'Dimension': 'string',
            'MetricName': 'string',
            'Value': 123.0,
            'Timestamp': datetime(2015, 1, 1)
        },
    ],
    Models=[
        {
            'ModelName': 'string',
            'ModelVersion': 'string',
            'LatestSampleTime': datetime(2015, 1, 1),
            'LatestInference': datetime(2015, 1, 1),
            'ModelMetrics': [
                {
                    'Dimension': 'string',
                    'MetricName': 'string',
                    'Value': 123.0,
                    'Timestamp': datetime(2015, 1, 1)
                },
            ]
        },
    ],
    AgentVersion='string',
    DeviceName='string',
    DeviceFleetName='string',
    DeploymentResult={
        'DeploymentName': 'string',
        'DeploymentStatus': 'string',
        'DeploymentStatusMessage': 'string',
        'DeploymentStartTime': datetime(2015, 1, 1),
        'DeploymentEndTime': datetime(2015, 1, 1),
        'DeploymentModels': [
            {
                'ModelHandle': 'string',
                'ModelName': 'string',
                'ModelVersion': 'string',
                'DesiredState': 'DEPLOY'|'UNDEPLOY',
                'State': 'DEPLOY'|'UNDEPLOY',
                'Status': 'SUCCESS'|'FAIL',
                'StatusReason': 'string',
                'RollbackFailureReason': 'string'
            },
        ]
    }
)
list
For internal use. Returns a list of SageMaker Edge Manager agent operating metrics.
(dict) --
Information required for edge device metrics.
Dimension (string) --
The dimension of metrics published.
MetricName (string) --
Returns the name of the metric.
Value (float) --
Returns the value of the metric.
Timestamp (datetime) --
Timestamp of when the metric was requested.
list
Returns a list of models deployed on the the device.
(dict) --
Information about a model deployed on an edge device that is registered with SageMaker Edge Manager.
ModelName (string) --
The name of the model.
ModelVersion (string) --
The version of the model.
LatestSampleTime (datetime) --
The timestamp of the last data sample taken.
LatestInference (datetime) --
The timestamp of the last inference that was made.
ModelMetrics (list) --
Information required for model metrics.
(dict) --
Information required for edge device metrics.
Dimension (string) --
The dimension of metrics published.
MetricName (string) --
Returns the name of the metric.
Value (float) --
Returns the value of the metric.
Timestamp (datetime) --
Timestamp of when the metric was requested.
string
[REQUIRED]
Returns the version of the agent.
string
[REQUIRED]
The unique name of the device.
string
[REQUIRED]
The name of the fleet that the device belongs to.
dict
Returns the result of a deployment on the device.
DeploymentName (string) --
The name and unique ID of the deployment.
DeploymentStatus (string) --
Returns the bucket error code.
DeploymentStatusMessage (string) --
Returns the detailed error message.
DeploymentStartTime (datetime) --
The timestamp of when the deployment was started on the agent.
DeploymentEndTime (datetime) --
The timestamp of when the deployment was ended, and the agent got the deployment results.
DeploymentModels (list) --
Returns a list of models deployed on the agent.
(dict) --
ModelHandle (string) --
The unique handle of the model.
ModelName (string) --
The name of the model.
ModelVersion (string) --
The version of the model.
DesiredState (string) --
The desired state of the model.
State (string) --
Returns the current state of the model.
Status (string) --
Returns the deployment status of the model.
StatusReason (string) --
Returns the error message for the deployment status result.
RollbackFailureReason (string) --
Returns the error message if there is a rollback.
None