1. Registry
  2. Packages
  3. AWS
  4. API Docs
  5. sagemaker
  6. getHubContent
Viewing docs for AWS v7.55.0
published on Friday, Nov 13, 2026 by Pulumi
aws logo aws logo
Viewing docs for AWS v7.55.0
published on Friday, Nov 13, 2026 by Pulumi

    Provides details about an AWS SageMaker AI Hub Content, such as a model in the SageMaker JumpStart public hub or a model reference in a private hub.

    Example Usage

    Public Hub Model

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as std from "@pulumi/std";
    
    const example = aws.sagemaker.getHubContent({
        hubName: "SageMakerPublicHub",
        hubContentName: "meta-textgeneration-llama-2-13b-f",
        hubContentType: "Model",
    });
    const hostingArtifactUri = example.then(example => std.jsondecode({
        input: example.hubContentDocument,
    })).then(invoke => invoke.result?.HostingArtifactUri);
    
    import pulumi
    import pulumi_aws as aws
    import pulumi_std as std
    
    example = aws.sagemaker.get_hub_content(hub_name="SageMakerPublicHub",
        hub_content_name="meta-textgeneration-llama-2-13b-f",
        hub_content_type="Model")
    hosting_artifact_uri = std.jsondecode(input=example.hub_content_document).result["HostingArtifactUri"]
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/sagemaker"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := sagemaker.GetHubContent(ctx, &sagemaker.GetHubContentArgs{
    			HubName:        "SageMakerPublicHub",
    			HubContentName: "meta-textgeneration-llama-2-13b-f",
    			HubContentType: "Model",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_ := std.Jsondecode(ctx, &std.JsondecodeArgs{
    			Input: example.HubContentDocument,
    		}, nil).Result.HostingArtifactUri
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Sagemaker.GetHubContent.Invoke(new()
        {
            HubName = "SageMakerPublicHub",
            HubContentName = "meta-textgeneration-llama-2-13b-f",
            HubContentType = "Model",
        });
    
        var hostingArtifactUri = Std.Jsondecode.Invoke(new()
        {
            Input = example.Apply(getHubContentResult => getHubContentResult.HubContentDocument),
        }).Apply(invoke => invoke.Result?.HostingArtifactUri);
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sagemaker.SagemakerFunctions;
    import com.pulumi.aws.sagemaker.inputs.GetHubContentArgs;
    import com.pulumi.std.StdFunctions;
    import com.pulumi.std.inputs.JsondecodeArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = SagemakerFunctions.getHubContent(GetHubContentArgs.builder()
                .hubName("SageMakerPublicHub")
                .hubContentName("meta-textgeneration-llama-2-13b-f")
                .hubContentType("Model")
                .build());
    
            final var hostingArtifactUri = StdFunctions.jsondecode(JsondecodeArgs.builder()
                .input(example.hubContentDocument())
                .build()).result().HostingArtifactUri();
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:sagemaker:getHubContent
          arguments:
            hubName: SageMakerPublicHub
            hubContentName: meta-textgeneration-llama-2-13b-f
            hubContentType: Model
      hostingArtifactUri:
        fn::invoke:
          function: std:jsondecode
          arguments:
            input: ${example.hubContentDocument}
          return: result.HostingArtifactUri
    
    terraform {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
        std = {
          source = "pulumi/std"
        }
      }
    }
    
    data "aws_sagemaker_hub_content" "example" {
      hub_name         = "SageMakerPublicHub"
      hub_content_name = "meta-textgeneration-llama-2-13b-f"
      hub_content_type = "Model"
    }
    
    locals {
      hostingArtifactUri = jsondecode(data.aws_sagemaker_hub_content.example.hub_content_document).hosting_artifact_uri
    }
    

    Private Hub Model Reference

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.sagemaker.getHubContent({
        hubName: exampleAwsSagemakerHubContentReference.hubName,
        hubContentName: exampleAwsSagemakerHubContentReference.hubContentName,
        hubContentType: "ModelReference",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.sagemaker.get_hub_content(hub_name=example_aws_sagemaker_hub_content_reference["hubName"],
        hub_content_name=example_aws_sagemaker_hub_content_reference["hubContentName"],
        hub_content_type="ModelReference")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/sagemaker"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sagemaker.GetHubContent(ctx, &sagemaker.GetHubContentArgs{
    			HubName:        exampleAwsSagemakerHubContentReference.HubName,
    			HubContentName: exampleAwsSagemakerHubContentReference.HubContentName,
    			HubContentType: "ModelReference",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Sagemaker.GetHubContent.Invoke(new()
        {
            HubName = exampleAwsSagemakerHubContentReference.HubName,
            HubContentName = exampleAwsSagemakerHubContentReference.HubContentName,
            HubContentType = "ModelReference",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sagemaker.SagemakerFunctions;
    import com.pulumi.aws.sagemaker.inputs.GetHubContentArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = SagemakerFunctions.getHubContent(GetHubContentArgs.builder()
                .hubName(exampleAwsSagemakerHubContentReference.get("hubName"))
                .hubContentName(exampleAwsSagemakerHubContentReference.get("hubContentName"))
                .hubContentType("ModelReference")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:sagemaker:getHubContent
          arguments:
            hubName: ${exampleAwsSagemakerHubContentReference.hubName}
            hubContentName: ${exampleAwsSagemakerHubContentReference.hubContentName}
            hubContentType: ModelReference
    
    terraform {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    data "aws_sagemaker_hub_content" "example" {
      hub_name         = exampleAwsSagemakerHubContentReference.hubName
      hub_content_name = exampleAwsSagemakerHubContentReference.hubContentName
      hub_content_type = "ModelReference"
    }
    

    Using getHubContent

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getHubContent(args: GetHubContentArgs, opts?: InvokeOptions): Promise<GetHubContentResult>
    function getHubContentOutput(args: GetHubContentOutputArgs, opts?: InvokeOutputOptions): Output<GetHubContentResult>
    def get_hub_content(hub_content_name: Optional[str] = None,
                        hub_content_type: Optional[str] = None,
                        hub_content_version: Optional[str] = None,
                        hub_name: Optional[str] = None,
                        region: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetHubContentResult
    def get_hub_content_output(hub_content_name: pulumi.Input[Optional[str]] = None,
                        hub_content_type: pulumi.Input[Optional[str]] = None,
                        hub_content_version: pulumi.Input[Optional[str]] = None,
                        hub_name: pulumi.Input[Optional[str]] = None,
                        region: pulumi.Input[Optional[str]] = None,
                        opts: Optional[InvokeOutputOptions] = None) -> Output[GetHubContentResult]
    func GetHubContent(ctx *Context, args *GetHubContentArgs, opts ...InvokeOption) (*GetHubContentResult, error)
    func GetHubContentOutput(ctx *Context, args *GetHubContentOutputArgs, opts ...InvokeOption) GetHubContentResultOutput

    > Note: This function is named GetHubContent in the Go SDK.

    public static class GetHubContent 
    {
        public static Task<GetHubContentResult> InvokeAsync(GetHubContentArgs args, InvokeOptions? opts = null)
        public static Output<GetHubContentResult> Invoke(GetHubContentInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetHubContentResult> Invoke(GetHubContentInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetHubContentResult> getHubContent(GetHubContentArgs args, InvokeOptions options)
    public static Output<GetHubContentResult> getHubContent(GetHubContentArgs args, InvokeOptions options)
    public static Output<GetHubContentResult> getHubContent(GetHubContentArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: aws:sagemaker/getHubContent:getHubContent
      arguments:
        # arguments dictionary
    data "aws_sagemaker_get_hub_content" "name" {
        # arguments
    }

    The following arguments are supported:

    HubContentName string
    Name of the hub content.
    HubContentType string
    Type of the hub content. Valid values: Model, Notebook, ModelReference, DataSet, JsonDoc.
    HubName string

    Name of the hub that contains the content.

    The following arguments are optional:

    HubContentVersion string
    Version of the hub content. Defaults to the latest version.
    Region string
    Region where this data source will be managed. Defaults to the Region set in the provider configuration.
    HubContentName string
    Name of the hub content.
    HubContentType string
    Type of the hub content. Valid values: Model, Notebook, ModelReference, DataSet, JsonDoc.
    HubName string

    Name of the hub that contains the content.

    The following arguments are optional:

    HubContentVersion string
    Version of the hub content. Defaults to the latest version.
    Region string
    Region where this data source will be managed. Defaults to the Region set in the provider configuration.
    hub_content_name string
    Name of the hub content.
    hub_content_type string
    Type of the hub content. Valid values: Model, Notebook, ModelReference, DataSet, JsonDoc.
    hub_name string

    Name of the hub that contains the content.

    The following arguments are optional:

    hub_content_version string
    Version of the hub content. Defaults to the latest version.
    region string
    Region where this data source will be managed. Defaults to the Region set in the provider configuration.
    hubContentName String
    Name of the hub content.
    hubContentType String
    Type of the hub content. Valid values: Model, Notebook, ModelReference, DataSet, JsonDoc.
    hubName String

    Name of the hub that contains the content.

    The following arguments are optional:

    hubContentVersion String
    Version of the hub content. Defaults to the latest version.
    region String
    Region where this data source will be managed. Defaults to the Region set in the provider configuration.
    hubContentName string
    Name of the hub content.
    hubContentType string
    Type of the hub content. Valid values: Model, Notebook, ModelReference, DataSet, JsonDoc.
    hubName string

    Name of the hub that contains the content.

    The following arguments are optional:

    hubContentVersion string
    Version of the hub content. Defaults to the latest version.
    region string
    Region where this data source will be managed. Defaults to the Region set in the provider configuration.
    hub_content_name str
    Name of the hub content.
    hub_content_type str
    Type of the hub content. Valid values: Model, Notebook, ModelReference, DataSet, JsonDoc.
    hub_name str

    Name of the hub that contains the content.

    The following arguments are optional:

    hub_content_version str
    Version of the hub content. Defaults to the latest version.
    region str
    Region where this data source will be managed. Defaults to the Region set in the provider configuration.
    hubContentName String
    Name of the hub content.
    hubContentType String
    Type of the hub content. Valid values: Model, Notebook, ModelReference, DataSet, JsonDoc.
    hubName String

    Name of the hub that contains the content.

    The following arguments are optional:

    hubContentVersion String
    Version of the hub content. Defaults to the latest version.
    region String
    Region where this data source will be managed. Defaults to the Region set in the provider configuration.

    getHubContent Result

    The following output properties are available:

    CreationTime string
    Date and time the hub content was created.
    DocumentSchemaVersion string
    Version of the hub content document schema.
    FailureReason string
    Failure reason if importing the hub content failed.
    HubArn string
    ARN of the hub that contains the content.
    HubContentArn string
    ARN of the hub content, without the version suffix.
    HubContentDependencies List<GetHubContentHubContentDependency>
    List of hub content dependencies. See hubContentDependency.
    HubContentDescription string
    Description of the hub content.
    HubContentDisplayName string
    Display name of the hub content.
    HubContentDocument string
    JSON hub content document, including details such as the hosting image and artifact URIs.
    HubContentMarkdown string
    Markdown content of the hub content.
    HubContentName string
    HubContentSearchKeywords List<string>
    List of searchable keywords for the hub content.
    HubContentStatus string
    Status of the hub content.
    HubContentType string
    HubContentVersion string
    HubName string
    LastModifiedTime string
    Date and time the hub content was last modified.
    ReferenceMinVersion string
    Minimum version of the referenced public hub content, for ModelReference hub content.
    Region string
    SagemakerPublicHubContentArn string
    ARN of the referenced public hub content, without the version suffix, for ModelReference hub content.
    SupportStatus string
    Support status of the hub content.
    VersionedHubContentArn string
    ARN of the hub content, including the version suffix.
    CreationTime string
    Date and time the hub content was created.
    DocumentSchemaVersion string
    Version of the hub content document schema.
    FailureReason string
    Failure reason if importing the hub content failed.
    HubArn string
    ARN of the hub that contains the content.
    HubContentArn string
    ARN of the hub content, without the version suffix.
    HubContentDependencies []GetHubContentHubContentDependency
    List of hub content dependencies. See hubContentDependency.
    HubContentDescription string
    Description of the hub content.
    HubContentDisplayName string
    Display name of the hub content.
    HubContentDocument string
    JSON hub content document, including details such as the hosting image and artifact URIs.
    HubContentMarkdown string
    Markdown content of the hub content.
    HubContentName string
    HubContentSearchKeywords []string
    List of searchable keywords for the hub content.
    HubContentStatus string
    Status of the hub content.
    HubContentType string
    HubContentVersion string
    HubName string
    LastModifiedTime string
    Date and time the hub content was last modified.
    ReferenceMinVersion string
    Minimum version of the referenced public hub content, for ModelReference hub content.
    Region string
    SagemakerPublicHubContentArn string
    ARN of the referenced public hub content, without the version suffix, for ModelReference hub content.
    SupportStatus string
    Support status of the hub content.
    VersionedHubContentArn string
    ARN of the hub content, including the version suffix.
    creation_time string
    Date and time the hub content was created.
    document_schema_version string
    Version of the hub content document schema.
    failure_reason string
    Failure reason if importing the hub content failed.
    hub_arn string
    ARN of the hub that contains the content.
    hub_content_arn string
    ARN of the hub content, without the version suffix.
    hub_content_dependencies list(object)
    List of hub content dependencies. See hubContentDependency.
    hub_content_description string
    Description of the hub content.
    hub_content_display_name string
    Display name of the hub content.
    hub_content_document string
    JSON hub content document, including details such as the hosting image and artifact URIs.
    hub_content_markdown string
    Markdown content of the hub content.
    hub_content_name string
    hub_content_search_keywords list(string)
    List of searchable keywords for the hub content.
    hub_content_status string
    Status of the hub content.
    hub_content_type string
    hub_content_version string
    hub_name string
    last_modified_time string
    Date and time the hub content was last modified.
    reference_min_version string
    Minimum version of the referenced public hub content, for ModelReference hub content.
    region string
    sagemaker_public_hub_content_arn string
    ARN of the referenced public hub content, without the version suffix, for ModelReference hub content.
    support_status string
    Support status of the hub content.
    versioned_hub_content_arn string
    ARN of the hub content, including the version suffix.
    creationTime String
    Date and time the hub content was created.
    documentSchemaVersion String
    Version of the hub content document schema.
    failureReason String
    Failure reason if importing the hub content failed.
    hubArn String
    ARN of the hub that contains the content.
    hubContentArn String
    ARN of the hub content, without the version suffix.
    hubContentDependencies List<GetHubContentHubContentDependency>
    List of hub content dependencies. See hubContentDependency.
    hubContentDescription String
    Description of the hub content.
    hubContentDisplayName String
    Display name of the hub content.
    hubContentDocument String
    JSON hub content document, including details such as the hosting image and artifact URIs.
    hubContentMarkdown String
    Markdown content of the hub content.
    hubContentName String
    hubContentSearchKeywords List<String>
    List of searchable keywords for the hub content.
    hubContentStatus String
    Status of the hub content.
    hubContentType String
    hubContentVersion String
    hubName String
    lastModifiedTime String
    Date and time the hub content was last modified.
    referenceMinVersion String
    Minimum version of the referenced public hub content, for ModelReference hub content.
    region String
    sagemakerPublicHubContentArn String
    ARN of the referenced public hub content, without the version suffix, for ModelReference hub content.
    supportStatus String
    Support status of the hub content.
    versionedHubContentArn String
    ARN of the hub content, including the version suffix.
    creationTime string
    Date and time the hub content was created.
    documentSchemaVersion string
    Version of the hub content document schema.
    failureReason string
    Failure reason if importing the hub content failed.
    hubArn string
    ARN of the hub that contains the content.
    hubContentArn string
    ARN of the hub content, without the version suffix.
    hubContentDependencies GetHubContentHubContentDependency[]
    List of hub content dependencies. See hubContentDependency.
    hubContentDescription string
    Description of the hub content.
    hubContentDisplayName string
    Display name of the hub content.
    hubContentDocument string
    JSON hub content document, including details such as the hosting image and artifact URIs.
    hubContentMarkdown string
    Markdown content of the hub content.
    hubContentName string
    hubContentSearchKeywords string[]
    List of searchable keywords for the hub content.
    hubContentStatus string
    Status of the hub content.
    hubContentType string
    hubContentVersion string
    hubName string
    lastModifiedTime string
    Date and time the hub content was last modified.
    referenceMinVersion string
    Minimum version of the referenced public hub content, for ModelReference hub content.
    region string
    sagemakerPublicHubContentArn string
    ARN of the referenced public hub content, without the version suffix, for ModelReference hub content.
    supportStatus string
    Support status of the hub content.
    versionedHubContentArn string
    ARN of the hub content, including the version suffix.
    creation_time str
    Date and time the hub content was created.
    document_schema_version str
    Version of the hub content document schema.
    failure_reason str
    Failure reason if importing the hub content failed.
    hub_arn str
    ARN of the hub that contains the content.
    hub_content_arn str
    ARN of the hub content, without the version suffix.
    hub_content_dependencies Sequence[GetHubContentHubContentDependency]
    List of hub content dependencies. See hubContentDependency.
    hub_content_description str
    Description of the hub content.
    hub_content_display_name str
    Display name of the hub content.
    hub_content_document str
    JSON hub content document, including details such as the hosting image and artifact URIs.
    hub_content_markdown str
    Markdown content of the hub content.
    hub_content_name str
    hub_content_search_keywords Sequence[str]
    List of searchable keywords for the hub content.
    hub_content_status str
    Status of the hub content.
    hub_content_type str
    hub_content_version str
    hub_name str
    last_modified_time str
    Date and time the hub content was last modified.
    reference_min_version str
    Minimum version of the referenced public hub content, for ModelReference hub content.
    region str
    sagemaker_public_hub_content_arn str
    ARN of the referenced public hub content, without the version suffix, for ModelReference hub content.
    support_status str
    Support status of the hub content.
    versioned_hub_content_arn str
    ARN of the hub content, including the version suffix.
    creationTime String
    Date and time the hub content was created.
    documentSchemaVersion String
    Version of the hub content document schema.
    failureReason String
    Failure reason if importing the hub content failed.
    hubArn String
    ARN of the hub that contains the content.
    hubContentArn String
    ARN of the hub content, without the version suffix.
    hubContentDependencies List<Property Map>
    List of hub content dependencies. See hubContentDependency.
    hubContentDescription String
    Description of the hub content.
    hubContentDisplayName String
    Display name of the hub content.
    hubContentDocument String
    JSON hub content document, including details such as the hosting image and artifact URIs.
    hubContentMarkdown String
    Markdown content of the hub content.
    hubContentName String
    hubContentSearchKeywords List<String>
    List of searchable keywords for the hub content.
    hubContentStatus String
    Status of the hub content.
    hubContentType String
    hubContentVersion String
    hubName String
    lastModifiedTime String
    Date and time the hub content was last modified.
    referenceMinVersion String
    Minimum version of the referenced public hub content, for ModelReference hub content.
    region String
    sagemakerPublicHubContentArn String
    ARN of the referenced public hub content, without the version suffix, for ModelReference hub content.
    supportStatus String
    Support status of the hub content.
    versionedHubContentArn String
    ARN of the hub content, including the version suffix.

    Supporting Types

    GetHubContentHubContentDependency

    DependencyCopyPath string
    Hub content dependency copy path.
    DependencyOriginPath string
    Hub content dependency origin path.
    DependencyCopyPath string
    Hub content dependency copy path.
    DependencyOriginPath string
    Hub content dependency origin path.
    dependency_copy_path string
    Hub content dependency copy path.
    dependency_origin_path string
    Hub content dependency origin path.
    dependencyCopyPath String
    Hub content dependency copy path.
    dependencyOriginPath String
    Hub content dependency origin path.
    dependencyCopyPath string
    Hub content dependency copy path.
    dependencyOriginPath string
    Hub content dependency origin path.
    dependency_copy_path str
    Hub content dependency copy path.
    dependency_origin_path str
    Hub content dependency origin path.
    dependencyCopyPath String
    Hub content dependency copy path.
    dependencyOriginPath String
    Hub content dependency origin path.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo aws logo
    Viewing docs for AWS v7.55.0
    published on Friday, Nov 13, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial