ListHubContents - Amazon SageMaker

ListHubContents

List the contents of a hub.

Request Syntax

{ "CreationTimeAfter": number, "CreationTimeBefore": number, "HubContentType": "string", "HubName": "string", "MaxResults": number, "MaxSchemaVersion": "string", "NameContains": "string", "NextToken": "string", "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.

CreationTimeAfter

Only list hub content that was created after the time specified.

Type: Timestamp

Required: No

CreationTimeBefore

Only list hub content that was created before the time specified.

Type: Timestamp

Required: No

HubContentType

The type of hub content to list.

Type: String

Valid Values: Model | Notebook | ModelReference

Required: Yes

HubName

The name of the hub to list the contents of.

Type: String

Pattern: ^(arn:[a-z0-9-\.]{1,63}:sagemaker:\w+(?:-\w+)+:(\d{12}|aws):hub\/)?[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}$

Required: Yes

MaxResults

The maximum amount of hub content to list.

Type: Integer

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

Required: No

MaxSchemaVersion

The upper bound of the hub content schema verion.

Type: String

Length Constraints: Minimum length of 5. Maximum length of 14.

Pattern: ^\d{1,4}.\d{1,4}.\d{1,4}$

Required: No

NameContains

Only list hub content if the name contains the specified string.

Type: String

Length Constraints: Maximum length of 63.

Pattern: [a-zA-Z0-9\-]+

Required: No

NextToken

If the response to a previous ListHubContents request was truncated, the response includes a NextToken. To retrieve the next set of hub content, use the token in the next request.

Type: String

Length Constraints: Maximum length of 8192.

Pattern: .*

Required: No

SortBy

Sort hub content versions by either name or creation time.

Type: String

Valid Values: HubContentName | CreationTime | HubContentStatus

Required: No

SortOrder

Sort hubs by ascending or descending order.

Type: String

Valid Values: Ascending | Descending

Required: No

Response Syntax

{ "HubContentSummaries": [ { "CreationTime": number, "DocumentSchemaVersion": "string", "HubContentArn": "string", "HubContentDescription": "string", "HubContentDisplayName": "string", "HubContentName": "string", "HubContentSearchKeywords": [ "string" ], "HubContentStatus": "string", "HubContentType": "string", "HubContentVersion": "string", "OriginalCreationTime": number, "SageMakerPublicHubContentArn": "string", "SupportStatus": "string" } ], "NextToken": "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.

HubContentSummaries

The summaries of the listed hub content.

Type: Array of HubContentInfo objects

NextToken

If the response is truncated, SageMaker returns this token. To retrieve the next set of hub content, use it in the subsequent request.

Type: String

Length Constraints: Maximum length of 8192.

Pattern: .*

Errors

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

ResourceNotFound

Resource being access is not found.

HTTP Status Code: 400

See Also

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