选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

CreateInferenceRecommendationsJob - Amazon SageMaker
此页面尚未翻译为您的语言。 请求翻译

CreateInferenceRecommendationsJob

Starts a recommendation job. You can create either an instance recommendation or load test job.

Request Syntax

{ "InputConfig": { "ContainerConfig": { "DataInputConfig": "string", "Domain": "string", "Framework": "string", "FrameworkVersion": "string", "NearestModelName": "string", "PayloadConfig": { "SamplePayloadUrl": "string", "SupportedContentTypes": [ "string" ] }, "SupportedEndpointType": "string", "SupportedInstanceTypes": [ "string" ], "SupportedResponseMIMETypes": [ "string" ], "Task": "string" }, "EndpointConfigurations": [ { "EnvironmentParameterRanges": { "CategoricalParameterRanges": [ { "Name": "string", "Value": [ "string" ] } ] }, "InferenceSpecificationName": "string", "InstanceType": "string", "ServerlessConfig": { "MaxConcurrency": number, "MemorySizeInMB": number, "ProvisionedConcurrency": number } } ], "Endpoints": [ { "EndpointName": "string" } ], "JobDurationInSeconds": number, "ModelName": "string", "ModelPackageVersionArn": "string", "ResourceLimit": { "MaxNumberOfTests": number, "MaxParallelOfTests": number }, "TrafficPattern": { "Phases": [ { "DurationInSeconds": number, "InitialNumberOfUsers": number, "SpawnRate": number } ], "Stairs": { "DurationInSeconds": number, "NumberOfSteps": number, "UsersPerStep": number }, "TrafficType": "string" }, "VolumeKmsKeyId": "string", "VpcConfig": { "SecurityGroupIds": [ "string" ], "Subnets": [ "string" ] } }, "JobDescription": "string", "JobName": "string", "JobType": "string", "OutputConfig": { "CompiledOutputConfig": { "S3OutputUri": "string" }, "KmsKeyId": "string" }, "RoleArn": "string", "StoppingConditions": { "FlatInvocations": "string", "MaxInvocations": number, "ModelLatencyThresholds": [ { "Percentile": "string", "ValueInMilliseconds": number } ] }, "Tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

InputConfig

Provides information about the versioned model package Amazon Resource Name (ARN), the traffic pattern, and endpoint configurations.

Type: RecommendationJobInputConfig object

Required: Yes

JobDescription

Description of the recommendation job.

Type: String

Length Constraints: Maximum length of 128.

Required: No

JobName

A name for the recommendation job. The name must be unique within the AWS Region and within your AWS account. The job name is passed down to the resources created by the recommendation job. The names of resources (such as the model, endpoint configuration, endpoint, and compilation) that are prefixed with the job name are truncated at 40 characters.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,63}

Required: Yes

JobType

Defines the type of recommendation job. Specify Default to initiate an instance recommendation and Advanced to initiate a load test. If left unspecified, Amazon SageMaker Inference Recommender will run an instance recommendation (DEFAULT) job.

Type: String

Valid Values: Default | Advanced

Required: Yes

OutputConfig

Provides information about the output artifacts and the KMS key to use for Amazon S3 server-side encryption.

Type: RecommendationJobOutputConfig object

Required: No

RoleArn

The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: ^arn:aws[a-z\-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$

Required: Yes

StoppingConditions

A set of conditions for stopping a recommendation job. If any of the conditions are met, the job is automatically stopped.

Type: RecommendationJobStoppingConditions object

Required: No

Tags

The metadata that you apply to AWS resources to help you categorize and organize them. Each tag consists of a key and a value, both of which you define. For more information, see Tagging AWS Resources in the AWS General Reference.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 50 items.

Required: No

Response Syntax

{ "JobArn": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

JobArn

The Amazon Resource Name (ARN) of the recommendation job.

Type: String

Length Constraints: Maximum length of 256.

Pattern: arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:inference-recommendations-job/.*

Errors

For information about the errors that are common to all actions, see Common Errors.

ResourceInUse

Resource being accessed is in use.

HTTP Status Code: 400

ResourceLimitExceeded

You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。