HubContentReference class
Manages a SageMaker AI Hub Content Reference resource. A hub content reference copies a model from the SageMaker JumpStart public hub into a private hub so that it is accessible to users in that hub.
Example Usage
Basic usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.sagemaker.Hub("example", {
hubName: "example",
hubDescription: "example",
});
const exampleHubContentReference = new aws.sagemaker.HubContentReference("example", {
hubName: example.hubName,
hubContentName: "example-llama",
sagemakerPublicHubContentArn: "arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct",
});
import pulumi
import pulumi_aws as aws
example = aws.sagemaker.Hub("example",
hub_name="example",
hub_description="example")
example_hub_content_reference = aws.sagemaker.HubContentReference("example",
hub_name=example.hub_name,
hub_content_name="example-llama",
sagemaker_public_hub_content_arn="arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Sagemaker.Hub("example", new()
{
HubName = "example",
HubDescription = "example",
});
var exampleHubContentReference = new Aws.Sagemaker.HubContentReference("example", new()
{
HubName = example.HubName,
HubContentName = "example-llama",
SagemakerPublicHubContentArn = "arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct",
});
});
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 {
example, err := sagemaker.NewHub(ctx, "example", &sagemaker.HubArgs{
HubName: pulumi.String("example"),
HubDescription: pulumi.String("example"),
})
if err != nil {
return err
}
_, err = sagemaker.NewHubContentReference(ctx, "example", &sagemaker.HubContentReferenceArgs{
HubName: example.HubName,
HubContentName: pulumi.String("example-llama"),
SagemakerPublicHubContentArn: pulumi.String("arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_sagemaker_hub" "example" {
hub_name = "example"
hub_description = "example"
}
resource "aws_sagemaker_hubcontentreference" "example" {
hub_name = aws_sagemaker_hub.example.hub_name
hub_content_name = "example-llama"
sagemaker_public_hub_content_arn = "arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sagemaker.Hub;
import com.pulumi.aws.sagemaker.HubArgs;
import com.pulumi.aws.sagemaker.HubContentReference;
import com.pulumi.aws.sagemaker.HubContentReferenceArgs;
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) {
var example = new Hub("example", HubArgs.builder()
.hubName("example")
.hubDescription("example")
.build());
var exampleHubContentReference = new HubContentReference("exampleHubContentReference", HubContentReferenceArgs.builder()
.hubName(example.hubName())
.hubContentName("example-llama")
.sagemakerPublicHubContentArn("arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct")
.build());
}
}
resources:
example:
type: aws:sagemaker:Hub
properties:
hubName: example
hubDescription: example
exampleHubContentReference:
type: aws:sagemaker:HubContentReference
name: example
properties:
hubName: ${example.hubName}
hubContentName: example-llama
sagemakerPublicHubContentArn: arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct
With minimum version
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.sagemaker.HubContentReference("example", {
hubName: exampleAwsSagemakerHub.hubName,
hubContentName: "example-llama",
sagemakerPublicHubContentArn: "arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct",
minVersion: "1.0.0",
});
import pulumi
import pulumi_aws as aws
example = aws.sagemaker.HubContentReference("example",
hub_name=example_aws_sagemaker_hub["hubName"],
hub_content_name="example-llama",
sagemaker_public_hub_content_arn="arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct",
min_version="1.0.0")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Sagemaker.HubContentReference("example", new()
{
HubName = exampleAwsSagemakerHub.HubName,
HubContentName = "example-llama",
SagemakerPublicHubContentArn = "arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct",
MinVersion = "1.0.0",
});
});
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.NewHubContentReference(ctx, "example", &sagemaker.HubContentReferenceArgs{
HubName: pulumi.Any(exampleAwsSagemakerHub.HubName),
HubContentName: pulumi.String("example-llama"),
SagemakerPublicHubContentArn: pulumi.String("arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct"),
MinVersion: pulumi.String("1.0.0"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_sagemaker_hubcontentreference" "example" {
hub_name = exampleAwsSagemakerHub.hubName
hub_content_name = "example-llama"
sagemaker_public_hub_content_arn = "arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct"
min_version = "1.0.0"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sagemaker.HubContentReference;
import com.pulumi.aws.sagemaker.HubContentReferenceArgs;
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) {
var example = new HubContentReference("example", HubContentReferenceArgs.builder()
.hubName(exampleAwsSagemakerHub.hubName())
.hubContentName("example-llama")
.sagemakerPublicHubContentArn("arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct")
.minVersion("1.0.0")
.build());
}
}
resources:
example:
type: aws:sagemaker:HubContentReference
properties:
hubName: ${exampleAwsSagemakerHub.hubName}
hubContentName: example-llama
sagemakerPublicHubContentArn: arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/meta-textgeneration-llama-3-1-8b-instruct
minVersion: 1.0.0
Import
Identity Schema
Required
hubContentName- (String) Name of the hub content reference.hubName- (String) Name of the private SageMaker Hub.
Optional
accountId- (String) AWS account where this resource is managed.region- (String) Region where this resource is managed.
Using pulumi import, import SageMaker AI Hub Content References using hub_name,hub_content_name. For example:
$ pulumi import aws:sagemaker/hubContentReference:HubContentReference example my-hub,my-content-reference
Constructors
- HubContentReference(String name, {HubContentReferenceArgs? args, CustomResourceOptions? options})
-
Creates a new HubContentReference.
nameThe Pulumi resource name.argsArguments used to configure this HubContentReference. The set of arguments for HubContentReference.optionsResource options controlling this resource's behavior. - HubContentReference.reference(String urn)
- Creates a typed reference to an existing HubContentReference resource.
Properties
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hubArn
↔ Output<
String> -
ARN of the private SageMaker Hub that contains the content reference.
latefinal
-
hubContentArn
↔ Output<
String> -
ARN of the hub content reference (without version suffix). The minVersion is stripped off from the end of this ARN to make it usable to list tags.
latefinal
-
hubContentName
↔ Output<
String> -
Name of the hub content reference.
latefinal
-
hubContentStatus
↔ Output<
String> -
Status of the hub content reference. Valid values include
Available,Importing,Deleting,ImportFailed,DeleteFailed.latefinal -
hubContentVersion
↔ Output<
String> -
Version of the hub content reference.
latefinal
-
hubName
↔ Output<
String> -
Name of the private SageMaker Hub to add the content reference to.
latefinal
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
minVersion
↔ Output<
String?> -
Minimum version of the hub content to reference. Use
"1.0.0"to support all versions. Changing this value to an empty string forces replacement of the resource.latefinal -
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sagemakerPublicHubContentArn
↔ Output<
String> -
ARN of the public SageMaker JumpStart hub content to reference. The ARN must not include a version suffix.
latefinal
-
Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
timeouts
↔ Output<
HubContentReferenceTimeouts?> -
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {HubContentReferenceState? state, CustomResourceOptions? options}) → HubContentReference -
Gets an existing HubContentReference resource's state with the given
nameandid.