Amazon SageMaker
Developer Guide

Search

Finds Amazon SageMaker resources that match a search query. Matching resource objects are returned as a list of SearchResult objects in the response. You can sort the search results by any resource property in a ascending or descending order.

You can query against the following value types: numerical, text, Booleans, and timestamps.

Request Syntax

{ "MaxResults": number, "NextToken": "string", "Resource": "string", "SearchExpression": { "Filters": [ { "Name": "string", "Operator": "string", "Value": "string" } ], "NestedFilters": [ { "Filters": [ { "Name": "string", "Operator": "string", "Value": "string" } ], "NestedPropertyName": "string" } ], "Operator": "string", "SubExpressions": [ "SearchExpression" ] }, "SortBy": "string", "SortOrder": "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.

MaxResults

The maximum number of results to return in a SearchResponse.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No

NextToken

If more than MaxResults resource objects match the specified SearchExpression, the SearchResponse includes a NextToken. The NextToken can be passed to the next SearchRequest to continue retrieving results for the specified SearchExpression and Sort parameters.

Type: String

Length Constraints: Maximum length of 8192.

Pattern: .*

Required: No

Resource

The name of the Amazon SageMaker resource to search for. Currently, the only valid Resource value is TrainingJob.

Type: String

Valid Values: TrainingJob

Required: Yes

SearchExpression

A Boolean conditional statement. Resource objects must satisfy this condition to be included in search results. You must provide at least one subexpression, filter, or nested filter. The maximum number of recursive SubExpressions, NestedFilters, and Filters that can be included in a SearchExpression object is 50.

Type: SearchExpression object

Required: No

SortBy

The name of the resource property used to sort the SearchResults. The default is LastModifiedTime.

Type: String

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

Pattern: .+

Required: No

SortOrder

How SearchResults are ordered. Valid values are Ascending or Descending. The default is Descending.

Type: String

Valid Values: Ascending | Descending

Required: No

Response Syntax

{ "NextToken": "string", "Results": [ { "TrainingJob": { "AlgorithmSpecification": { "AlgorithmName": "string", "MetricDefinitions": [ { "Name": "string", "Regex": "string" } ], "TrainingImage": "string", "TrainingInputMode": "string" }, "CreationTime": number, "EnableInterContainerTrafficEncryption": boolean, "EnableNetworkIsolation": boolean, "FailureReason": "string", "FinalMetricDataList": [ { "MetricName": "string", "Timestamp": number, "Value": number } ], "HyperParameters": { "string" : "string" }, "InputDataConfig": [ { "ChannelName": "string", "CompressionType": "string", "ContentType": "string", "DataSource": { "S3DataSource": { "AttributeNames": [ "string" ], "S3DataDistributionType": "string", "S3DataType": "string", "S3Uri": "string" } }, "InputMode": "string", "RecordWrapperType": "string", "ShuffleConfig": { "Seed": number } } ], "LabelingJobArn": "string", "LastModifiedTime": number, "ModelArtifacts": { "S3ModelArtifacts": "string" }, "OutputDataConfig": { "KmsKeyId": "string", "S3OutputPath": "string" }, "ResourceConfig": { "InstanceCount": number, "InstanceType": "string", "VolumeKmsKeyId": "string", "VolumeSizeInGB": number }, "RoleArn": "string", "SecondaryStatus": "string", "SecondaryStatusTransitions": [ { "EndTime": number, "StartTime": number, "Status": "string", "StatusMessage": "string" } ], "StoppingCondition": { "MaxRuntimeInSeconds": number }, "Tags": [ { "Key": "string", "Value": "string" } ], "TrainingEndTime": number, "TrainingJobArn": "string", "TrainingJobName": "string", "TrainingJobStatus": "string", "TrainingStartTime": number, "TuningJobArn": "string", "VpcConfig": { "SecurityGroupIds": [ "string" ], "Subnets": [ "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.

NextToken

If the result of the previous Search request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request.

Type: String

Length Constraints: Maximum length of 8192.

Pattern: .*

Results

A list of SearchResult objects.

Type: Array of SearchRecord objects

Errors

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

See Also

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