Package com.pulumi.aws.sagemaker
Class HubContentReference
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.sagemaker.HubContentReference
-
public class HubContentReference extends com.pulumi.resources.CustomResourceManages 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
### With minimum versionpackage 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()); } }
## 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: ```sh $ pulumi import aws:sagemaker/hubContentReference:HubContentReference example my-hub,my-content-reference ```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()); } }
-
-
Constructor Summary
Constructors Constructor Description HubContentReference(java.lang.String name)HubContentReference(java.lang.String name, HubContentReferenceArgs args)HubContentReference(java.lang.String name, HubContentReferenceArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HubContentReferenceget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, HubContentReferenceState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>hubArn()com.pulumi.core.Output<java.lang.String>hubContentArn()com.pulumi.core.Output<java.lang.String>hubContentName()com.pulumi.core.Output<java.lang.String>hubContentStatus()com.pulumi.core.Output<java.lang.String>hubContentVersion()com.pulumi.core.Output<java.lang.String>hubName()com.pulumi.core.Output<java.util.Optional<java.lang.String>>minVersion()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>sagemakerPublicHubContentArn()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.util.Optional<HubContentReferenceTimeouts>>timeouts()
-
-
-
Constructor Detail
-
HubContentReference
public HubContentReference(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
HubContentReference
public HubContentReference(java.lang.String name, HubContentReferenceArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
HubContentReference
public HubContentReference(java.lang.String name, HubContentReferenceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
hubArn
public com.pulumi.core.Output<java.lang.String> hubArn()
- Returns:
- ARN of the private SageMaker Hub that contains the content reference.
-
hubContentArn
public com.pulumi.core.Output<java.lang.String> hubContentArn()
- Returns:
- 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.
-
hubContentName
public com.pulumi.core.Output<java.lang.String> hubContentName()
- Returns:
- Name of the hub content reference.
-
hubContentStatus
public com.pulumi.core.Output<java.lang.String> hubContentStatus()
- Returns:
- Status of the hub content reference. Valid values include `Available`, `Importing`, `Deleting`, `ImportFailed`, `DeleteFailed`.
-
hubContentVersion
public com.pulumi.core.Output<java.lang.String> hubContentVersion()
- Returns:
- Version of the hub content reference.
-
hubName
public com.pulumi.core.Output<java.lang.String> hubName()
- Returns:
- Name of the private SageMaker Hub to add the content reference to.
-
minVersion
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> minVersion()
- Returns:
- 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.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
sagemakerPublicHubContentArn
public com.pulumi.core.Output<java.lang.String> sagemakerPublicHubContentArn()
- Returns:
- ARN of the public SageMaker JumpStart hub content to reference. The ARN must not include a version suffix.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
timeouts
public com.pulumi.core.Output<java.util.Optional<HubContentReferenceTimeouts>> timeouts()
-
get
public static HubContentReference get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable HubContentReferenceState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-