Amazon SageMaker Service

2022/07/18 - Amazon SageMaker Service - 9 new api methods

Changes  Amazon SageMaker Edge Manager provides lightweight model deployment feature to deploy machine learning models on requested devices.

ListStageDevices (new) Link ¶

Lists devices allocated to the stage, containing detailed device information and deployment status.

See also: AWS API Documentation

Request Syntax

client.list_stage_devices(
    NextToken='string',
    MaxResults=123,
    EdgeDeploymentPlanName='string',
    ExcludeDevicesDeployedInOtherStage=True|False,
    StageName='string'
)
type NextToken:

string

param NextToken:

The response from the last list when returning a list large enough to neeed tokening.

type MaxResults:

integer

param MaxResults:

The maximum number of requests to select.

type EdgeDeploymentPlanName:

string

param EdgeDeploymentPlanName:

[REQUIRED]

The name of the edge deployment plan.

type ExcludeDevicesDeployedInOtherStage:

boolean

param ExcludeDevicesDeployedInOtherStage:

Toggle for excluding devices deployed in other stages.

type StageName:

string

param StageName:

[REQUIRED]

The name of the stage in the deployment.

rtype:

dict

returns:

Response Syntax

{
    'DeviceDeploymentSummaries': [
        {
            'EdgeDeploymentPlanArn': 'string',
            'EdgeDeploymentPlanName': 'string',
            'StageName': 'string',
            'DeployedStageName': 'string',
            'DeviceFleetName': 'string',
            'DeviceName': 'string',
            'DeviceArn': 'string',
            'DeviceDeploymentStatus': 'READYTODEPLOY'|'INPROGRESS'|'DEPLOYED'|'FAILED'|'STOPPING'|'STOPPED',
            'DeviceDeploymentStatusMessage': 'string',
            'Description': 'string',
            'DeploymentStartTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • DeviceDeploymentSummaries (list) --

      List of summaries of devices allocated to the stage.

      • (dict) --

        Contains information summarizing device details and deployment status.

        • EdgeDeploymentPlanArn (string) --

          The ARN of the edge deployment plan.

        • EdgeDeploymentPlanName (string) --

          The name of the edge deployment plan.

        • StageName (string) --

          The name of the stage in the edge deployment plan.

        • DeployedStageName (string) --

          The name of the deployed stage.

        • DeviceFleetName (string) --

          The name of the fleet to which the device belongs to.

        • DeviceName (string) --

          The name of the device.

        • DeviceArn (string) --

          The ARN of the device.

        • DeviceDeploymentStatus (string) --

          The deployment status of the device.

        • DeviceDeploymentStatusMessage (string) --

          The detailed error message for the deployoment status result.

        • Description (string) --

          The description of the device.

        • DeploymentStartTime (datetime) --

          The time when the deployment on the device started.

    • NextToken (string) --

      The token to use when calling the next page of results.

CreateEdgeDeploymentPlan (new) Link ¶

Creates an edge deployment plan, consisting of multiple stages. Each stage may have a different deployment configuration and devices.

See also: AWS API Documentation

Request Syntax

client.create_edge_deployment_plan(
    EdgeDeploymentPlanName='string',
    ModelConfigs=[
        {
            'ModelHandle': 'string',
            'EdgePackagingJobName': 'string'
        },
    ],
    DeviceFleetName='string',
    Stages=[
        {
            'StageName': 'string',
            'DeviceSelectionConfig': {
                'DeviceSubsetType': 'PERCENTAGE'|'SELECTION'|'NAMECONTAINS',
                'Percentage': 123,
                'DeviceNames': [
                    'string',
                ],
                'DeviceNameContains': 'string'
            },
            'DeploymentConfig': {
                'FailureHandlingPolicy': 'ROLLBACK_ON_FAILURE'|'DO_NOTHING'
            }
        },
    ],
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type EdgeDeploymentPlanName:

string

param EdgeDeploymentPlanName:

[REQUIRED]

The name of the edge deployment plan.

type ModelConfigs:

list

param ModelConfigs:

[REQUIRED]

List of models associated with the edge deployment plan.

  • (dict) --

    Contains information about the configuration of a model in a deployment.

    • ModelHandle (string) -- [REQUIRED]

      The name the device application uses to reference this model.

    • EdgePackagingJobName (string) -- [REQUIRED]

      The edge packaging job associated with this deployment.

type DeviceFleetName:

string

param DeviceFleetName:

[REQUIRED]

The device fleet used for this edge deployment plan.

type Stages:

list

param Stages:

List of stages of the edge deployment plan. The number of stages is limited to 10 per deployment.

  • (dict) --

    Contains information about a stage in an edge deployment plan.

    • StageName (string) -- [REQUIRED]

      The name of the stage.

    • DeviceSelectionConfig (dict) -- [REQUIRED]

      Configuration of the devices in the stage.

      • DeviceSubsetType (string) -- [REQUIRED]

        Type of device subsets to deploy to the current stage.

      • Percentage (integer) --

        Percentage of devices in the fleet to deploy to the current stage.

      • DeviceNames (list) --

        List of devices chosen to deploy.

        • (string) --

      • DeviceNameContains (string) --

        A filter to select devices with names containing this name.

    • DeploymentConfig (dict) --

      Configuration of the deployment details.

      • FailureHandlingPolicy (string) -- [REQUIRED]

        Toggle that determines whether to rollback to previous configuration if the current deployment fails. By default this is turned on. You may turn this off if you want to investigate the errors yourself.

type Tags:

list

param Tags:

List of tags with which to tag the edge deployment plan.

  • (dict) --

    A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources.

    You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags.

    For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources. For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy.

    • Key (string) -- [REQUIRED]

      The tag key. Tag keys must be unique per resource.

    • Value (string) -- [REQUIRED]

      The tag value.

rtype:

dict

returns:

Response Syntax

{
    'EdgeDeploymentPlanArn': 'string'
}

Response Structure

  • (dict) --

    • EdgeDeploymentPlanArn (string) --

      The ARN of the edge deployment plan.

DeleteEdgeDeploymentPlan (new) Link ¶

Deletes an edge deployment plan if (and only if) all the stages in the plan are inactive or there are no stages in the plan.

See also: AWS API Documentation

Request Syntax

client.delete_edge_deployment_plan(
    EdgeDeploymentPlanName='string'
)
type EdgeDeploymentPlanName:

string

param EdgeDeploymentPlanName:

[REQUIRED]

The name of the edge deployment plan to delete.

returns:

None

CreateEdgeDeploymentStage (new) Link ¶

Creates a new stage in an existing edge deployment plan.

See also: AWS API Documentation

Request Syntax

client.create_edge_deployment_stage(
    EdgeDeploymentPlanName='string',
    Stages=[
        {
            'StageName': 'string',
            'DeviceSelectionConfig': {
                'DeviceSubsetType': 'PERCENTAGE'|'SELECTION'|'NAMECONTAINS',
                'Percentage': 123,
                'DeviceNames': [
                    'string',
                ],
                'DeviceNameContains': 'string'
            },
            'DeploymentConfig': {
                'FailureHandlingPolicy': 'ROLLBACK_ON_FAILURE'|'DO_NOTHING'
            }
        },
    ]
)
type EdgeDeploymentPlanName:

string

param EdgeDeploymentPlanName:

[REQUIRED]

The name of the edge deployment plan.

type Stages:

list

param Stages:

[REQUIRED]

List of stages to be added to the edge deployment plan.

  • (dict) --

    Contains information about a stage in an edge deployment plan.

    • StageName (string) -- [REQUIRED]

      The name of the stage.

    • DeviceSelectionConfig (dict) -- [REQUIRED]

      Configuration of the devices in the stage.

      • DeviceSubsetType (string) -- [REQUIRED]

        Type of device subsets to deploy to the current stage.

      • Percentage (integer) --

        Percentage of devices in the fleet to deploy to the current stage.

      • DeviceNames (list) --

        List of devices chosen to deploy.

        • (string) --

      • DeviceNameContains (string) --

        A filter to select devices with names containing this name.

    • DeploymentConfig (dict) --

      Configuration of the deployment details.

      • FailureHandlingPolicy (string) -- [REQUIRED]

        Toggle that determines whether to rollback to previous configuration if the current deployment fails. By default this is turned on. You may turn this off if you want to investigate the errors yourself.

returns:

None

ListEdgeDeploymentPlans (new) Link ¶

Lists all edge deployment plans.

See also: AWS API Documentation

Request Syntax

client.list_edge_deployment_plans(
    NextToken='string',
    MaxResults=123,
    CreationTimeAfter=datetime(2015, 1, 1),
    CreationTimeBefore=datetime(2015, 1, 1),
    LastModifiedTimeAfter=datetime(2015, 1, 1),
    LastModifiedTimeBefore=datetime(2015, 1, 1),
    NameContains='string',
    DeviceFleetNameContains='string',
    SortBy='NAME'|'DEVICE_FLEET_NAME'|'CREATION_TIME'|'LAST_MODIFIED_TIME',
    SortOrder='Ascending'|'Descending'
)
type NextToken:

string

param NextToken:

The response from the last list when returning a list large enough to need tokening.

type MaxResults:

integer

param MaxResults:

The maximum number of results to select (50 by default).

type CreationTimeAfter:

datetime

param CreationTimeAfter:

Selects edge deployment plans created after this time.

type CreationTimeBefore:

datetime

param CreationTimeBefore:

Selects edge deployment plans created before this time.

type LastModifiedTimeAfter:

datetime

param LastModifiedTimeAfter:

Selects edge deployment plans that were last updated after this time.

type LastModifiedTimeBefore:

datetime

param LastModifiedTimeBefore:

Selects edge deployment plans that were last updated before this time.

type NameContains:

string

param NameContains:

Selects edge deployment plans with names containing this name.

type DeviceFleetNameContains:

string

param DeviceFleetNameContains:

Selects edge deployment plans with a device fleet name containing this name.

type SortBy:

string

param SortBy:

The column by which to sort the edge deployment plans. Can be one of NAME, DEVICEFLEETNAME, CREATIONTIME, LASTMODIFIEDTIME.

type SortOrder:

string

param SortOrder:

The direction of the sorting (ascending or descending).

rtype:

dict

returns:

Response Syntax

{
    'EdgeDeploymentPlanSummaries': [
        {
            'EdgeDeploymentPlanArn': 'string',
            'EdgeDeploymentPlanName': 'string',
            'DeviceFleetName': 'string',
            'EdgeDeploymentSuccess': 123,
            'EdgeDeploymentPending': 123,
            'EdgeDeploymentFailed': 123,
            'CreationTime': datetime(2015, 1, 1),
            'LastModifiedTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • EdgeDeploymentPlanSummaries (list) --

      List of summaries of edge deployment plans.

      • (dict) --

        Contains information summarizing an edge deployment plan.

        • EdgeDeploymentPlanArn (string) --

          The ARN of the edge deployment plan.

        • EdgeDeploymentPlanName (string) --

          The name of the edge deployment plan.

        • DeviceFleetName (string) --

          The name of the device fleet used for the deployment.

        • EdgeDeploymentSuccess (integer) --

          The number of edge devices with the successful deployment.

        • EdgeDeploymentPending (integer) --

          The number of edge devices yet to pick up the deployment, or in progress.

        • EdgeDeploymentFailed (integer) --

          The number of edge devices that failed the deployment.

        • CreationTime (datetime) --

          The time when the edge deployment plan was created.

        • LastModifiedTime (datetime) --

          The time when the edge deployment plan was last updated.

    • NextToken (string) --

      The token to use when calling the next page of results.

StopEdgeDeploymentStage (new) Link ¶

Stops a stage in an edge deployment plan.

See also: AWS API Documentation

Request Syntax

client.stop_edge_deployment_stage(
    EdgeDeploymentPlanName='string',
    StageName='string'
)
type EdgeDeploymentPlanName:

string

param EdgeDeploymentPlanName:

[REQUIRED]

The name of the edge deployment plan to stop.

type StageName:

string

param StageName:

[REQUIRED]

The name of the stage to stop.

returns:

None

StartEdgeDeploymentStage (new) Link ¶

Starts a stage in an edge deployment plan.

See also: AWS API Documentation

Request Syntax

client.start_edge_deployment_stage(
    EdgeDeploymentPlanName='string',
    StageName='string'
)
type EdgeDeploymentPlanName:

string

param EdgeDeploymentPlanName:

[REQUIRED]

The name of the edge deployment plan to start.

type StageName:

string

param StageName:

[REQUIRED]

The name of the stage to start.

returns:

None

DescribeEdgeDeploymentPlan (new) Link ¶

Describes an edge deployment plan with deployment status per stage.

See also: AWS API Documentation

Request Syntax

client.describe_edge_deployment_plan(
    EdgeDeploymentPlanName='string',
    NextToken='string',
    MaxResults=123
)
type EdgeDeploymentPlanName:

string

param EdgeDeploymentPlanName:

[REQUIRED]

The name of the deployment plan to describe.

type NextToken:

string

param NextToken:

If the edge deployment plan has enough stages to require tokening, then this is the response from the last list of stages returned.

type MaxResults:

integer

param MaxResults:

The maximum number of results to select (50 by default).

rtype:

dict

returns:

Response Syntax

{
    'EdgeDeploymentPlanArn': 'string',
    'EdgeDeploymentPlanName': 'string',
    'ModelConfigs': [
        {
            'ModelHandle': 'string',
            'EdgePackagingJobName': 'string'
        },
    ],
    'DeviceFleetName': 'string',
    'EdgeDeploymentSuccess': 123,
    'EdgeDeploymentPending': 123,
    'EdgeDeploymentFailed': 123,
    'Stages': [
        {
            'StageName': 'string',
            'DeviceSelectionConfig': {
                'DeviceSubsetType': 'PERCENTAGE'|'SELECTION'|'NAMECONTAINS',
                'Percentage': 123,
                'DeviceNames': [
                    'string',
                ],
                'DeviceNameContains': 'string'
            },
            'DeploymentConfig': {
                'FailureHandlingPolicy': 'ROLLBACK_ON_FAILURE'|'DO_NOTHING'
            },
            'DeploymentStatus': {
                'StageStatus': 'CREATING'|'READYTODEPLOY'|'STARTING'|'INPROGRESS'|'DEPLOYED'|'FAILED'|'STOPPING'|'STOPPED',
                'EdgeDeploymentSuccessInStage': 123,
                'EdgeDeploymentPendingInStage': 123,
                'EdgeDeploymentFailedInStage': 123,
                'EdgeDeploymentStatusMessage': 'string',
                'EdgeDeploymentStageStartTime': datetime(2015, 1, 1)
            }
        },
    ],
    'NextToken': 'string',
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • EdgeDeploymentPlanArn (string) --

      The ARN of edge deployment plan.

    • EdgeDeploymentPlanName (string) --

      The name of the edge deployment plan.

    • ModelConfigs (list) --

      List of models associated with the edge deployment plan.

      • (dict) --

        Contains information about the configuration of a model in a deployment.

        • ModelHandle (string) --

          The name the device application uses to reference this model.

        • EdgePackagingJobName (string) --

          The edge packaging job associated with this deployment.

    • DeviceFleetName (string) --

      The device fleet used for this edge deployment plan.

    • EdgeDeploymentSuccess (integer) --

      The number of edge devices with the successful deployment.

    • EdgeDeploymentPending (integer) --

      The number of edge devices yet to pick up deployment, or in progress.

    • EdgeDeploymentFailed (integer) --

      The number of edge devices that failed the deployment.

    • Stages (list) --

      List of stages in the edge deployment plan.

      • (dict) --

        Contains information summarizing the deployment stage results.

        • StageName (string) --

          The name of the stage.

        • DeviceSelectionConfig (dict) --

          Configuration of the devices in the stage.

          • DeviceSubsetType (string) --

            Type of device subsets to deploy to the current stage.

          • Percentage (integer) --

            Percentage of devices in the fleet to deploy to the current stage.

          • DeviceNames (list) --

            List of devices chosen to deploy.

            • (string) --

          • DeviceNameContains (string) --

            A filter to select devices with names containing this name.

        • DeploymentConfig (dict) --

          Configuration of the deployment details.

          • FailureHandlingPolicy (string) --

            Toggle that determines whether to rollback to previous configuration if the current deployment fails. By default this is turned on. You may turn this off if you want to investigate the errors yourself.

        • DeploymentStatus (dict) --

          General status of the current state.

          • StageStatus (string) --

            The general status of the current stage.

          • EdgeDeploymentSuccessInStage (integer) --

            The number of edge devices with the successful deployment in the current stage.

          • EdgeDeploymentPendingInStage (integer) --

            The number of edge devices yet to pick up the deployment in current stage, or in progress.

          • EdgeDeploymentFailedInStage (integer) --

            The number of edge devices that failed the deployment in current stage.

          • EdgeDeploymentStatusMessage (string) --

            A detailed message about deployment status in current stage.

          • EdgeDeploymentStageStartTime (datetime) --

            The time when the deployment API started.

    • NextToken (string) --

      Token to use when calling the next set of stages in the edge deployment plan.

    • CreationTime (datetime) --

      The time when the edge deployment plan was created.

    • LastModifiedTime (datetime) --

      The time when the edge deployment plan was last updated.

DeleteEdgeDeploymentStage (new) Link ¶

Delete a stage in an edge deployment plan if (and only if) the stage is inactive.

See also: AWS API Documentation

Request Syntax

client.delete_edge_deployment_stage(
    EdgeDeploymentPlanName='string',
    StageName='string'
)
type EdgeDeploymentPlanName:

string

param EdgeDeploymentPlanName:

[REQUIRED]

The name of the edge deployment plan from which the stage will be deleted.

type StageName:

string

param StageName:

[REQUIRED]

The name of the stage.

returns:

None