SageMaker / Client / create_hub_content_presigned_urls
create_hub_content_presigned_urls¶
- SageMaker.Client.create_hub_content_presigned_urls(**kwargs)¶
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.
See also: AWS API Documentation
Request Syntax
response = client.create_hub_content_presigned_urls( HubName='string', HubContentType='Model'|'Notebook'|'ModelReference', HubContentName='string', HubContentVersion='string', AccessConfig={ 'AcceptEula': True|False, 'ExpectedS3Url': 'string' }, MaxResults=123, NextToken='string' )
- Parameters:
HubName (string) –
[REQUIRED]
The name or Amazon Resource Name (ARN) of the hub that contains the content. For public content, use
SageMakerPublicHub
.HubContentType (string) –
[REQUIRED]
The type of hub content to access. Valid values include
Model
,Notebook
, andModelReference
.HubContentName (string) –
[REQUIRED]
The name of the hub content for which to generate presigned URLs. This identifies the specific model or content within the hub.
HubContentVersion (string) – The version of the hub content. If not specified, the latest version is used.
AccessConfig (dict) –
Configuration settings for accessing the hub content, including end-user license agreement acceptance for gated models and expected S3 URL validation.
AcceptEula (boolean) –
Indicates acceptance of the End User License Agreement (EULA) for gated models. Set to true to acknowledge acceptance of the license terms required for accessing gated content.
ExpectedS3Url (string) –
The expected S3 URL prefix for validation purposes. This parameter helps ensure consistency between the resolved S3 URIs and the deployment configuration, reducing potential compatibility issues.
MaxResults (integer) – The maximum number of presigned URLs to return in the response. Default value is 100. Large models may contain hundreds of files, requiring pagination to retrieve all URLs.
NextToken (string) – A token for pagination. Use this token to retrieve the next set of presigned URLs when the response is truncated.
- Return type:
dict
- Returns:
Response Syntax
{ 'AuthorizedUrlConfigs': [ { 'Url': 'string', 'LocalPath': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) –
AuthorizedUrlConfigs (list) –
An array of authorized URL configurations, each containing a presigned URL and its corresponding local file path for proper file organization during download.
(dict) –
Contains a presigned URL and its associated local file path for downloading hub content artifacts.
Url (string) –
The presigned S3 URL that provides temporary, secure access to download the file. URLs expire within 15 minutes for security purposes.
LocalPath (string) –
The recommended local file path where the downloaded file should be stored to maintain proper directory structure and file organization.
NextToken (string) –
A token for pagination. If present, indicates that more presigned URLs are available. Use this token in a subsequent request to retrieve additional URLs.