- 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.
UpdateInferenceComponentCommand
Updates an inference component.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SageMakerClient, UpdateInferenceComponentCommand } from "@aws-sdk/client-sagemaker"; // ES Modules import
// const { SageMakerClient, UpdateInferenceComponentCommand } = require("@aws-sdk/client-sagemaker"); // CommonJS import
const client = new SageMakerClient(config);
const input = { // UpdateInferenceComponentInput
InferenceComponentName: "STRING_VALUE", // required
Specification: { // InferenceComponentSpecification
ModelName: "STRING_VALUE",
Container: { // InferenceComponentContainerSpecification
Image: "STRING_VALUE",
ArtifactUrl: "STRING_VALUE",
Environment: { // EnvironmentMap
"<keys>": "STRING_VALUE",
},
},
StartupParameters: { // InferenceComponentStartupParameters
ModelDataDownloadTimeoutInSeconds: Number("int"),
ContainerStartupHealthCheckTimeoutInSeconds: Number("int"),
},
ComputeResourceRequirements: { // InferenceComponentComputeResourceRequirements
NumberOfCpuCoresRequired: Number("float"),
NumberOfAcceleratorDevicesRequired: Number("float"),
MinMemoryRequiredInMb: Number("int"), // required
MaxMemoryRequiredInMb: Number("int"),
},
BaseInferenceComponentName: "STRING_VALUE",
},
RuntimeConfig: { // InferenceComponentRuntimeConfig
CopyCount: Number("int"), // required
},
};
const command = new UpdateInferenceComponentCommand(input);
const response = await client.send(command);
// { // UpdateInferenceComponentOutput
// InferenceComponentArn: "STRING_VALUE", // required
// };
UpdateInferenceComponentCommand Input
See UpdateInferenceComponentCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
InferenceComponentName Required | string | undefined | The name of the inference component. |
RuntimeConfig | InferenceComponentRuntimeConfig | undefined | Runtime settings for a model that is deployed with an inference component. |
Specification | InferenceComponentSpecification | undefined | Details about the resources to deploy with this inference component, including the model, container, and compute resources. |
UpdateInferenceComponentCommand Output
See UpdateInferenceComponentCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
InferenceComponentArn Required | string | undefined | The Amazon Resource Name (ARN) of the inference component. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ResourceLimitExceeded | client | You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. |
SageMakerServiceException | Base exception class for all service exceptions from SageMaker service. |