Skip to main content

hub_contents

Creates, updates, deletes, gets or lists a hub_contents resource.

Overview

Namehub_contents
TypeResource
Idaws.sagemaker.hub_contents

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The date and time that hub content was created.
document_schema_versionstringThe document schema version for the hub content. (pattern: <code>\d{1,4}.\d{1,4}.\d{1,4}</code>)
failure_reasonstringThe failure reason if importing hub content failed.
hub_arnstringThe Amazon Resource Name (ARN) of the hub that contains the content. (pattern: <code>.*</code>)
hub_content_arnstringThe Amazon Resource Name (ARN) of the hub content. (pattern: <code>.*</code>)
hub_content_dependenciesarrayThe location of any dependencies that the hub content has, such as scripts, model artifacts, datasets, or notebooks.
hub_content_descriptionstringA description of the hub content. (pattern: <code>.*</code>)
hub_content_display_namestringThe display name of the hub content. (pattern: <code>.*</code>)
hub_content_documentstringThe hub content document that describes information about the hub content such as type, associated containers, scripts, and more. (pattern: <code>.*</code>)
hub_content_markdownstringA string that provides a description of the hub content. This string can include links, tables, and standard markdown formating.
hub_content_namestringThe name of the hub content. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
hub_content_search_keywordsarrayThe searchable keywords for the hub content.
hub_content_statusstringThe status of the hub content. (Available, Importing, Deleting, ImportFailed, DeleteFailed, PendingImport, PendingDelete)
hub_content_typestringThe type of hub content. (Model, Notebook, ModelReference, DataSet, JsonDoc)
hub_content_versionstringThe version of the hub content. (pattern: <code>\d{1,4}.\d{1,4}.\d{1,4}</code>)
hub_namestringThe name of the hub that contains the content. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
last_modified_timestring (date-time)The last modified time of the hub content.
reference_min_versionstringThe minimum version of the hub content. (pattern: <code>\d{1,4}.\d{1,4}.\d{1,4}</code>)
sage_maker_public_hub_content_arnstringThe ARN of the public hub content. (pattern: <code>arn:[a-z0-9-.]{1,63}:sagemaker:\w+(?:-\w+)+:aws:hub-content/[a-zA-Z0-9](-[a-zA-Z0-9]){0,62}/Model/[a-zA-Z0-9](-[a-zA-Z0-9]){0,63}</code>)
support_statusstringThe support status of the hub content. (Supported, Deprecated, Restricted)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_hub_contentselectregionDescribe the content of a hub.
list_hub_contentsselectregionList the contents of a hub.
create_hub_content_presigned_urlsinsertregion, HubName, HubContentType, HubContentNameCreates presigned URLs for accessing hub content artifacts. This operation generates time-limited, secure URLs that allow direct download of model artifacts and associated files from Amazon SageMaker hub content, including gated models that require end-user license agreement acceptance.
create_hub_content_referenceinsertregion, HubName, SageMakerPublicHubContentArnCreate a hub content reference in order to add a model in the JumpStart public hub to a private hub.
update_hub_contentupdateregion, HubName, HubContentName, HubContentType, HubContentVersionUpdates SageMaker hub content (either a Model or Notebook resource). You can update the metadata that describes the resource. In addition to the required request fields, specify at least one of the following fields to update: HubContentDescription HubContentDisplayName HubContentMarkdown HubContentSearchKeywords SupportStatus For more information about hubs, see Private curated hubs for foundation model access control in JumpStart. If you want to update a ModelReference resource in your hub, use the UpdateHubContentResource API instead.
update_hub_content_referenceupdateregion, HubName, HubContentName, HubContentTypeUpdates the contents of a SageMaker hub for a ModelReference resource. A ModelReference allows you to access public SageMaker JumpStart models from within your private hub. When using this API, you can update the MinVersion field for additional flexibility in the model version. You shouldn't update any additional fields when using this API, because the metadata in your private hub should match the public JumpStart model's metadata. If you want to update a Model or Notebook resource in your hub, use the UpdateHubContent API instead. For more information about adding model references to your hub, see Add models to a private hub.
delete_hub_contentdeleteregionDelete the contents of a hub.
delete_hub_content_referencedeleteregionDelete a hub content reference in order to remove a model from a private hub.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describe the content of a hub.

SELECT
creation_time,
document_schema_version,
failure_reason,
hub_arn,
hub_content_arn,
hub_content_dependencies,
hub_content_description,
hub_content_display_name,
hub_content_document,
hub_content_markdown,
hub_content_name,
hub_content_search_keywords,
hub_content_status,
hub_content_type,
hub_content_version,
hub_name,
last_modified_time,
reference_min_version,
sage_maker_public_hub_content_arn,
support_status
FROM aws.sagemaker.hub_contents
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates presigned URLs for accessing hub content artifacts. This operation generates time-limited, secure URLs that allow direct download of model artifacts and associated files from Amazon SageMaker hub content, including gated models that require end-user license agreement acceptance.

INSERT INTO aws.sagemaker.hub_contents (
HubName,
HubContentType,
HubContentName,
HubContentVersion,
AccessConfig,
MaxResults,
NextToken,
region
)
SELECT
'{{ HubName }}' /* required */,
'{{ HubContentType }}' /* required */,
'{{ HubContentName }}' /* required */,
'{{ HubContentVersion }}',
'{{ AccessConfig }}',
{{ MaxResults }},
'{{ NextToken }}',
'{{ region }}'
RETURNING
authorized_url_configs,
next_token
;

UPDATE examples

Updates SageMaker hub content (either a Model or Notebook resource). You can update the metadata that describes the resource. In addition to the required request fields, specify at least one of the following fields to update: HubContentDescription HubContentDisplayName HubContentMarkdown HubContentSearchKeywords SupportStatus For more information about hubs, see Private curated hubs for foundation model access control in JumpStart. If you want to update a ModelReference resource in your hub, use the UpdateHubContentResource API instead.

UPDATE aws.sagemaker.hub_contents
SET
HubName = '{{ HubName }}',
HubContentName = '{{ HubContentName }}',
HubContentType = '{{ HubContentType }}',
HubContentVersion = '{{ HubContentVersion }}',
HubContentDisplayName = '{{ HubContentDisplayName }}',
HubContentDescription = '{{ HubContentDescription }}',
HubContentMarkdown = '{{ HubContentMarkdown }}',
HubContentSearchKeywords = '{{ HubContentSearchKeywords }}',
SupportStatus = '{{ SupportStatus }}'
WHERE
region = '{{ region }}' --required
AND HubName = '{{ HubName }}' --required
AND HubContentName = '{{ HubContentName }}' --required
AND HubContentType = '{{ HubContentType }}' --required
AND HubContentVersion = '{{ HubContentVersion }}' --required
RETURNING
hub_arn,
hub_content_arn;

DELETE examples

Delete the contents of a hub.

DELETE FROM aws.sagemaker.hub_contents
WHERE region = '{{ region }}' --required
;