@aws-sdk/client-sagemaker
TypeScript icon, indicating that this package has built-in type declarations

3.563.0 • Public • Published

@aws-sdk/client-sagemaker

Description

AWS SDK for JavaScript SageMaker Client for Node.js, Browser and React Native.

Provides APIs for creating and managing SageMaker resources.

Other Resources:

Installing

To install the this package, simply type add or install @aws-sdk/client-sagemaker using your favorite package manager:

  • npm install @aws-sdk/client-sagemaker
  • yarn add @aws-sdk/client-sagemaker
  • pnpm add @aws-sdk/client-sagemaker

Getting Started

Import

The AWS SDK is modulized by clients and commands. To send a request, you only need to import the SageMakerClient and the commands you need, for example ListActionsCommand:

// ES5 example
const { SageMakerClient, ListActionsCommand } = require("@aws-sdk/client-sagemaker");
// ES6+ example
import { SageMakerClient, ListActionsCommand } from "@aws-sdk/client-sagemaker";

Usage

To send a request, you:

  • Initiate client with configuration (e.g. credentials, region).
  • Initiate command with input parameters.
  • Call send operation on client with command object as input.
  • If you are using a custom http handler, you may call destroy() to close open connections.
// a client can be shared by different commands.
const client = new SageMakerClient({ region: "REGION" });

const params = {
  /** input parameters */
};
const command = new ListActionsCommand(params);

Async/await

We recommend using await operator to wait for the promise returned by send operation as follows:

// async/await.
try {
  const data = await client.send(command);
  // process data.
} catch (error) {
  // error handling.
} finally {
  // finally.
}

Async-await is clean, concise, intuitive, easy to debug and has better error handling as compared to using Promise chains or callbacks.

Promises

You can also use Promise chaining to execute send operation.

client.send(command).then(
  (data) => {
    // process data.
  },
  (error) => {
    // error handling.
  }
);

Promises can also be called using .catch() and .finally() as follows:

client
  .send(command)
  .then((data) => {
    // process data.
  })
  .catch((error) => {
    // error handling.
  })
  .finally(() => {
    // finally.
  });

Callbacks

We do not recommend using callbacks because of callback hell, but they are supported by the send operation.

// callbacks.
client.send(command, (err, data) => {
  // process err and data.
});

v2 compatible style

The client can also send requests using v2 compatible style. However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post on modular packages in AWS SDK for JavaScript

import * as AWS from "@aws-sdk/client-sagemaker";
const client = new AWS.SageMaker({ region: "REGION" });

// async/await.
try {
  const data = await client.listActions(params);
  // process data.
} catch (error) {
  // error handling.
}

// Promises.
client
  .listActions(params)
  .then((data) => {
    // process data.
  })
  .catch((error) => {
    // error handling.
  });

// callbacks.
client.listActions(params, (err, data) => {
  // process err and data.
});

Troubleshooting

When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).

try {
  const data = await client.send(command);
  // process data.
} catch (error) {
  const { requestId, cfId, extendedRequestId } = error.$metadata;
  console.log({ requestId, cfId, extendedRequestId });
  /**
   * The keys within exceptions are also parsed.
   * You can access them by specifying exception names:
   * if (error.name === 'SomeServiceException') {
   *     const value = error.specialKeyInException;
   * }
   */
}

Getting Help

Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.

To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.

Contributing

This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-sagemaker package is updated. To contribute to client you can check our generate clients scripts.

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.

Client Commands (Operations List)

AddAssociation

Command API Reference / Input / Output

AddTags

Command API Reference / Input / Output

AssociateTrialComponent

Command API Reference / Input / Output

BatchDescribeModelPackage

Command API Reference / Input / Output

CreateAction

Command API Reference / Input / Output

CreateAlgorithm

Command API Reference / Input / Output

CreateApp

Command API Reference / Input / Output

CreateAppImageConfig

Command API Reference / Input / Output

CreateArtifact

Command API Reference / Input / Output

CreateAutoMLJob

Command API Reference / Input / Output

CreateAutoMLJobV2

Command API Reference / Input / Output

CreateCluster

Command API Reference / Input / Output

CreateCodeRepository

Command API Reference / Input / Output

CreateCompilationJob

Command API Reference / Input / Output

CreateContext

Command API Reference / Input / Output

CreateDataQualityJobDefinition

Command API Reference / Input / Output

CreateDeviceFleet

Command API Reference / Input / Output

CreateDomain

Command API Reference / Input / Output

CreateEdgeDeploymentPlan

Command API Reference / Input / Output

CreateEdgeDeploymentStage

Command API Reference / Input / Output

CreateEdgePackagingJob

Command API Reference / Input / Output

CreateEndpoint

Command API Reference / Input / Output

CreateEndpointConfig

Command API Reference / Input / Output

CreateExperiment

Command API Reference / Input / Output

CreateFeatureGroup

Command API Reference / Input / Output

CreateFlowDefinition

Command API Reference / Input / Output

CreateHub

Command API Reference / Input / Output

CreateHumanTaskUi

Command API Reference / Input / Output

CreateHyperParameterTuningJob

Command API Reference / Input / Output

CreateImage

Command API Reference / Input / Output

CreateImageVersion

Command API Reference / Input / Output

CreateInferenceComponent

Command API Reference / Input / Output

CreateInferenceExperiment

Command API Reference / Input / Output

CreateInferenceRecommendationsJob

Command API Reference / Input / Output

CreateLabelingJob

Command API Reference / Input / Output

CreateModel

Command API Reference / Input / Output

CreateModelBiasJobDefinition

Command API Reference / Input / Output

CreateModelCard

Command API Reference / Input / Output

CreateModelCardExportJob

Command API Reference / Input / Output

CreateModelExplainabilityJobDefinition

Command API Reference / Input / Output

CreateModelPackage

Command API Reference / Input / Output

CreateModelPackageGroup

Command API Reference / Input / Output

CreateModelQualityJobDefinition

Command API Reference / Input / Output

CreateMonitoringSchedule

Command API Reference / Input / Output

CreateNotebookInstance

Command API Reference / Input / Output

CreateNotebookInstanceLifecycleConfig

Command API Reference / Input / Output

CreatePipeline

Command API Reference / Input / Output

CreatePresignedDomainUrl

Command API Reference / Input / Output

CreatePresignedNotebookInstanceUrl

Command API Reference / Input / Output

CreateProcessingJob

Command API Reference / Input / Output

CreateProject

Command API Reference / Input / Output

CreateSpace

Command API Reference / Input / Output

CreateStudioLifecycleConfig

Command API Reference / Input / Output

CreateTrainingJob

Command API Reference / Input / Output

CreateTransformJob

Command API Reference / Input / Output

CreateTrial

Command API Reference / Input / Output

CreateTrialComponent

Command API Reference / Input / Output

CreateUserProfile

Command API Reference / Input / Output

CreateWorkforce

Command API Reference / Input / Output

CreateWorkteam

Command API Reference / Input / Output

DeleteAction

Command API Reference / Input / Output

DeleteAlgorithm

Command API Reference / Input / Output

DeleteApp

Command API Reference / Input / Output

DeleteAppImageConfig

Command API Reference / Input / Output

DeleteArtifact

Command API Reference / Input / Output

DeleteAssociation

Command API Reference / Input / Output

DeleteCluster

Command API Reference / Input / Output

DeleteCodeRepository

Command API Reference / Input / Output

DeleteCompilationJob

Command API Reference / Input / Output

DeleteContext

Command API Reference / Input / Output

DeleteDataQualityJobDefinition

Command API Reference / Input / Output

DeleteDeviceFleet

Command API Reference / Input / Output

DeleteDomain

Command API Reference / Input / Output

DeleteEdgeDeploymentPlan

Command API Reference / Input / Output

DeleteEdgeDeploymentStage

Command API Reference / Input / Output

DeleteEndpoint

Command API Reference / Input / Output

DeleteEndpointConfig

Command API Reference / Input / Output

DeleteExperiment

Command API Reference / Input / Output

DeleteFeatureGroup

Command API Reference / Input / Output

DeleteFlowDefinition

Command API Reference / Input / Output

DeleteHub

Command API Reference / Input / Output

DeleteHubContent

Command API Reference / Input / Output

DeleteHumanTaskUi

Command API Reference / Input / Output

DeleteHyperParameterTuningJob

Command API Reference / Input / Output

DeleteImage

Command API Reference / Input / Output

DeleteImageVersion

Command API Reference / Input / Output

DeleteInferenceComponent

Command API Reference / Input / Output

DeleteInferenceExperiment

Command API Reference / Input / Output

DeleteModel

Command API Reference / Input / Output

DeleteModelBiasJobDefinition

Command API Reference / Input / Output

DeleteModelCard

Command API Reference / Input / Output

DeleteModelExplainabilityJobDefinition

Command API Reference / Input / Output

DeleteModelPackage

Command API Reference / Input / Output

DeleteModelPackageGroup

Command API Reference / Input / Output

DeleteModelPackageGroupPolicy

Command API Reference / Input / Output

DeleteModelQualityJobDefinition

Command API Reference / Input / Output

DeleteMonitoringSchedule

Command API Reference / Input / Output

DeleteNotebookInstance

Command API Reference / Input / Output

DeleteNotebookInstanceLifecycleConfig

Command API Reference / Input / Output

DeletePipeline

Command API Reference / Input / Output

DeleteProject

Command API Reference / Input / Output

DeleteSpace

Command API Reference / Input / Output

DeleteStudioLifecycleConfig

Command API Reference / Input / Output

DeleteTags

Command API Reference / Input / Output

DeleteTrial

Command API Reference / Input / Output

DeleteTrialComponent

Command API Reference / Input / Output

DeleteUserProfile

Command API Reference / Input / Output

DeleteWorkforce

Command API Reference / Input / Output

DeleteWorkteam

Command API Reference / Input / Output

DeregisterDevices

Command API Reference / Input / Output

DescribeAction

Command API Reference / Input / Output

DescribeAlgorithm

Command API Reference / Input / Output

DescribeApp

Command API Reference / Input / Output

DescribeAppImageConfig

Command API Reference / Input / Output

DescribeArtifact

Command API Reference / Input / Output

DescribeAutoMLJob

Command API Reference / Input / Output

DescribeAutoMLJobV2

Command API Reference / Input / Output

DescribeCluster

Command API Reference / Input / Output

DescribeClusterNode

Command API Reference / Input / Output

DescribeCodeRepository

Command API Reference / Input / Output

DescribeCompilationJob

Command API Reference / Input / Output

DescribeContext

Command API Reference / Input / Output

DescribeDataQualityJobDefinition

Command API Reference / Input / Output

DescribeDevice

Command API Reference / Input / Output

DescribeDeviceFleet

Command API Reference / Input / Output

DescribeDomain

Command API Reference / Input / Output

DescribeEdgeDeploymentPlan

Command API Reference / Input / Output

DescribeEdgePackagingJob

Command API Reference / Input / Output

DescribeEndpoint

Command API Reference / Input / Output

DescribeEndpointConfig

Command API Reference / Input / Output

DescribeExperiment

Command API Reference / Input / Output

DescribeFeatureGroup

Command API Reference / Input / Output

DescribeFeatureMetadata

Command API Reference / Input / Output

DescribeFlowDefinition

Command API Reference / Input / Output

DescribeHub

Command API Reference / Input / Output

DescribeHubContent

Command API Reference / Input / Output

DescribeHumanTaskUi

Command API Reference / Input / Output

DescribeHyperParameterTuningJob

Command API Reference / Input / Output

DescribeImage

Command API Reference / Input / Output

DescribeImageVersion

Command API Reference / Input / Output

DescribeInferenceComponent

Command API Reference / Input / Output

DescribeInferenceExperiment

Command API Reference / Input / Output

DescribeInferenceRecommendationsJob

Command API Reference / Input / Output

DescribeLabelingJob

Command API Reference / Input / Output

DescribeLineageGroup

Command API Reference / Input / Output

DescribeModel

Command API Reference / Input / Output

DescribeModelBiasJobDefinition

Command API Reference / Input / Output

DescribeModelCard

Command API Reference / Input / Output

DescribeModelCardExportJob

Command API Reference / Input / Output

DescribeModelExplainabilityJobDefinition

Command API Reference / Input / Output

DescribeModelPackage

Command API Reference / Input / Output

DescribeModelPackageGroup

Command API Reference / Input / Output

DescribeModelQualityJobDefinition

Command API Reference / Input / Output

DescribeMonitoringSchedule

Command API Reference / Input / Output

DescribeNotebookInstance

Command API Reference / Input / Output

DescribeNotebookInstanceLifecycleConfig

Command API Reference / Input / Output

DescribePipeline

Command API Reference / Input / Output

DescribePipelineDefinitionForExecution

Command API Reference / Input / Output

DescribePipelineExecution

Command API Reference / Input / Output

DescribeProcessingJob

Command API Reference / Input / Output

DescribeProject

Command API Reference / Input / Output

DescribeSpace

Command API Reference / Input / Output

DescribeStudioLifecycleConfig

Command API Reference / Input / Output

DescribeSubscribedWorkteam

Command API Reference / Input / Output

DescribeTrainingJob

Command API Reference / Input / Output

DescribeTransformJob

Command API Reference / Input / Output

DescribeTrial

Command API Reference / Input / Output

DescribeTrialComponent

Command API Reference / Input / Output

DescribeUserProfile

Command API Reference / Input / Output

DescribeWorkforce

Command API Reference / Input / Output

DescribeWorkteam

Command API Reference / Input / Output

DisableSagemakerServicecatalogPortfolio

Command API Reference / Input / Output

DisassociateTrialComponent

Command API Reference / Input / Output

EnableSagemakerServicecatalogPortfolio

Command API Reference / Input / Output

GetDeviceFleetReport

Command API Reference / Input / Output

GetLineageGroupPolicy

Command API Reference / Input / Output

GetModelPackageGroupPolicy

Command API Reference / Input / Output

GetSagemakerServicecatalogPortfolioStatus

Command API Reference / Input / Output

GetScalingConfigurationRecommendation

Command API Reference / Input / Output

GetSearchSuggestions

Command API Reference / Input / Output

ImportHubContent

Command API Reference / Input / Output

ListActions

Command API Reference / Input / Output

ListAlgorithms

Command API Reference / Input / Output

ListAliases

Command API Reference / Input / Output

ListAppImageConfigs

Command API Reference / Input / Output

ListApps

Command API Reference / Input / Output

ListArtifacts

Command API Reference / Input / Output

ListAssociations

Command API Reference / Input / Output

ListAutoMLJobs

Command API Reference / Input / Output

ListCandidatesForAutoMLJob

Command API Reference / Input / Output

ListClusterNodes

Command API Reference / Input / Output

ListClusters

Command API Reference / Input / Output

ListCodeRepositories

Command API Reference / Input / Output

ListCompilationJobs

Command API Reference / Input / Output

ListContexts

Command API Reference / Input / Output

ListDataQualityJobDefinitions

Command API Reference / Input / Output

ListDeviceFleets

Command API Reference / Input / Output

ListDevices

Command API Reference / Input / Output

ListDomains

Command API Reference / Input / Output

ListEdgeDeploymentPlans

Command API Reference / Input / Output

ListEdgePackagingJobs

Command API Reference / Input / Output

ListEndpointConfigs

Command API Reference / Input / Output

ListEndpoints

Command API Reference / Input / Output

ListExperiments

Command API Reference / Input / Output

ListFeatureGroups

Command API Reference / Input / Output

ListFlowDefinitions

Command API Reference / Input / Output

ListHubContents

Command API Reference / Input / Output

ListHubContentVersions

Command API Reference / Input / Output

ListHubs

Command API Reference / Input / Output

ListHumanTaskUis

Command API Reference / Input / Output

ListHyperParameterTuningJobs

Command API Reference / Input / Output

ListImages

Command API Reference / Input / Output

ListImageVersions

Command API Reference / Input / Output

ListInferenceComponents

Command API Reference / Input / Output

ListInferenceExperiments

Command API Reference / Input / Output

ListInferenceRecommendationsJobs

Command API Reference / Input / Output

ListInferenceRecommendationsJobSteps

Command API Reference / Input / Output

ListLabelingJobs

Command API Reference / Input / Output

ListLabelingJobsForWorkteam

Command API Reference / Input / Output

ListLineageGroups

Command API Reference / Input / Output

ListModelBiasJobDefinitions

Command API Reference / Input / Output

ListModelCardExportJobs

Command API Reference / Input / Output

ListModelCards

Command API Reference / Input / Output

ListModelCardVersions

Command API Reference / Input / Output

ListModelExplainabilityJobDefinitions

Command API Reference / Input / Output

ListModelMetadata

Command API Reference / Input / Output

ListModelPackageGroups

Command API Reference / Input / Output

ListModelPackages

Command API Reference / Input / Output

ListModelQualityJobDefinitions

Command API Reference / Input / Output

ListModels

Command API Reference / Input / Output

ListMonitoringAlertHistory

Command API Reference / Input / Output

ListMonitoringAlerts

Command API Reference / Input / Output

ListMonitoringExecutions

Command API Reference / Input / Output

ListMonitoringSchedules

Command API Reference / Input / Output

ListNotebookInstanceLifecycleConfigs

Command API Reference / Input / Output

ListNotebookInstances

Command API Reference / Input / Output

ListPipelineExecutions

Command API Reference / Input / Output

ListPipelineExecutionSteps

Command API Reference / Input / Output

ListPipelineParametersForExecution

Command API Reference / Input / Output

ListPipelines

Command API Reference / Input / Output

ListProcessingJobs

Command API Reference / Input / Output

ListProjects

Command API Reference / Input / Output

ListResourceCatalogs

Command API Reference / Input / Output

ListSpaces

Command API Reference / Input / Output

ListStageDevices

Command API Reference / Input / Output

ListStudioLifecycleConfigs

Command API Reference / Input / Output

ListSubscribedWorkteams

Command API Reference / Input / Output

ListTags

Command API Reference / Input / Output

ListTrainingJobs

Command API Reference / Input / Output

ListTrainingJobsForHyperParameterTuningJob

Command API Reference / Input / Output

ListTransformJobs

Command API Reference / Input / Output

ListTrialComponents

Command API Reference / Input / Output

ListTrials

Command API Reference / Input / Output

ListUserProfiles

Command API Reference / Input / Output

ListWorkforces

Command API Reference / Input / Output

ListWorkteams

Command API Reference / Input / Output

PutModelPackageGroupPolicy

Command API Reference / Input / Output

QueryLineage

Command API Reference / Input / Output

RegisterDevices

Command API Reference / Input / Output

RenderUiTemplate

Command API Reference / Input / Output

RetryPipelineExecution

Command API Reference / Input / Output

Search

Command API Reference / Input / Output

SendPipelineExecutionStepFailure

Command API Reference / Input / Output

SendPipelineExecutionStepSuccess

Command API Reference / Input / Output

StartEdgeDeploymentStage

Command API Reference / Input / Output

StartInferenceExperiment

Command API Reference / Input / Output

StartMonitoringSchedule

Command API Reference / Input / Output

StartNotebookInstance

Command API Reference / Input / Output

StartPipelineExecution

Command API Reference / Input / Output

StopAutoMLJob

Command API Reference / Input / Output

StopCompilationJob

Command API Reference / Input / Output

StopEdgeDeploymentStage

Command API Reference / Input / Output

StopEdgePackagingJob

Command API Reference / Input / Output

StopHyperParameterTuningJob

Command API Reference / Input / Output

StopInferenceExperiment

Command API Reference / Input / Output

StopInferenceRecommendationsJob

Command API Reference / Input / Output

StopLabelingJob

Command API Reference / Input / Output

StopMonitoringSchedule

Command API Reference / Input / Output

StopNotebookInstance

Command API Reference / Input / Output

StopPipelineExecution

Command API Reference / Input / Output

StopProcessingJob

Command API Reference / Input / Output

StopTrainingJob

Command API Reference / Input / Output

StopTransformJob

Command API Reference / Input / Output

UpdateAction

Command API Reference / Input / Output

UpdateAppImageConfig

Command API Reference / Input / Output

UpdateArtifact

Command API Reference / Input / Output

UpdateCluster

Command API Reference / Input / Output

UpdateClusterSoftware

Command API Reference / Input / Output

UpdateCodeRepository

Command API Reference / Input / Output

UpdateContext

Command API Reference / Input / Output

UpdateDeviceFleet

Command API Reference / Input / Output

UpdateDevices

Command API Reference / Input / Output

UpdateDomain

Command API Reference / Input / Output

UpdateEndpoint

Command API Reference / Input / Output

UpdateEndpointWeightsAndCapacities

Command API Reference / Input / Output

UpdateExperiment

Command API Reference / Input / Output

UpdateFeatureGroup

Command API Reference / Input / Output

UpdateFeatureMetadata

Command API Reference / Input / Output

UpdateHub

Command API Reference / Input / Output

UpdateImage

Command API Reference / Input / Output

UpdateImageVersion

Command API Reference / Input / Output

UpdateInferenceComponent

Command API Reference / Input / Output

UpdateInferenceComponentRuntimeConfig

Command API Reference / Input / Output

UpdateInferenceExperiment

Command API Reference / Input / Output

UpdateModelCard

Command API Reference / Input / Output

UpdateModelPackage

Command API Reference / Input / Output

UpdateMonitoringAlert

Command API Reference / Input / Output

UpdateMonitoringSchedule

Command API Reference / Input / Output

UpdateNotebookInstance

Command API Reference / Input / Output

UpdateNotebookInstanceLifecycleConfig

Command API Reference / Input / Output

UpdatePipeline

Command API Reference / Input / Output

UpdatePipelineExecution

Command API Reference / Input / Output

UpdateProject

Command API Reference / Input / Output

UpdateSpace

Command API Reference / Input / Output

UpdateTrainingJob

Command API Reference / Input / Output

UpdateTrial

Command API Reference / Input / Output

UpdateTrialComponent

Command API Reference / Input / Output

UpdateUserProfile

Command API Reference / Input / Output

UpdateWorkforce

Command API Reference / Input / Output

UpdateWorkteam

Command API Reference / Input / Output

Readme

Keywords

none

Package Sidebar

Install

npm i @aws-sdk/client-sagemaker

Weekly Downloads

95,385

Version

3.563.0

License

Apache-2.0

Unpacked Size

7.79 MB

Total Files

1304

Last publish

Collaborators

  • mattsb42-aws
  • kuhe
  • amzn-oss
  • aws-sdk-bot
  • trivikr-aws