:doc:`SageMaker <../../sagemaker>` / Client / create_hub_content_presigned_urls

*********************************
create_hub_content_presigned_urls
*********************************



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateHubContentPresignedUrls>`_  


  **Request Syntax**
  ::

    response = client.create_hub_content_presigned_urls(
        HubName='string',
        HubContentType='Model'|'Notebook'|'ModelReference'|'DataSet'|'JsonDoc',
        HubContentName='string',
        HubContentVersion='string',
        AccessConfig={
            'AcceptEula': True|False,
            'ExpectedS3Url': 'string'
        },
        MaxResults=123,
        NextToken='string'
    )
    
  :type HubName: string
  :param HubName: **[REQUIRED]** 

    The name or Amazon Resource Name (ARN) of the hub that contains the content. For public content, use ``SageMakerPublicHub``.

    

  
  :type HubContentType: string
  :param HubContentType: **[REQUIRED]** 

    The type of hub content to access. Valid values include ``Model``, ``Notebook``, and ``ModelReference``.

    

  
  :type HubContentName: string
  :param HubContentName: **[REQUIRED]** 

    The name of the hub content for which to generate presigned URLs. This identifies the specific model or content within the hub.

    

  
  :type HubContentVersion: string
  :param HubContentVersion: 

    The version of the hub content. If not specified, the latest version is used.

    

  
  :type AccessConfig: dict
  :param AccessConfig: 

    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.

      

    
  
  :type MaxResults: integer
  :param MaxResults: 

    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.

    

  
  :type NextToken: string
  :param NextToken: 

    A token for pagination. Use this token to retrieve the next set of presigned URLs when the response is truncated.

    

  
  
  :rtype: 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.

        
  