1. Packages
  2. AWS
  3. API Docs
  4. bedrock
  5. CustomModel
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.bedrock.CustomModel

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.bedrockfoundation.getModel({
        modelId: "amazon.titan-text-express-v1",
    });
    const exampleCustomModel = new aws.bedrock.CustomModel("example", {
        customModelName: "example-model",
        jobName: "example-job-1",
        baseModelIdentifier: example.then(example => example.modelArn),
        roleArn: exampleAwsIamRole.arn,
        hyperparameters: {
            epochCount: "1",
            batchSize: "1",
            learningRate: "0.005",
            learningRateWarmupSteps: "0",
        },
        outputDataConfig: {
            s3Uri: `s3://${output.id}/data/`,
        },
        trainingDataConfig: {
            s3Uri: `s3://${training.id}/data/train.jsonl`,
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.bedrockfoundation.get_model(model_id="amazon.titan-text-express-v1")
    example_custom_model = aws.bedrock.CustomModel("example",
        custom_model_name="example-model",
        job_name="example-job-1",
        base_model_identifier=example.model_arn,
        role_arn=example_aws_iam_role["arn"],
        hyperparameters={
            "epochCount": "1",
            "batchSize": "1",
            "learningRate": "0.005",
            "learningRateWarmupSteps": "0",
        },
        output_data_config={
            "s3_uri": f"s3://{output['id']}/data/",
        },
        training_data_config={
            "s3_uri": f"s3://{training['id']}/data/train.jsonl",
        })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrock"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrockfoundation"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := bedrockfoundation.GetModel(ctx, &bedrockfoundation.GetModelArgs{
    			ModelId: "amazon.titan-text-express-v1",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = bedrock.NewCustomModel(ctx, "example", &bedrock.CustomModelArgs{
    			CustomModelName:     pulumi.String("example-model"),
    			JobName:             pulumi.String("example-job-1"),
    			BaseModelIdentifier: pulumi.String(example.ModelArn),
    			RoleArn:             pulumi.Any(exampleAwsIamRole.Arn),
    			Hyperparameters: pulumi.StringMap{
    				"epochCount":              pulumi.String("1"),
    				"batchSize":               pulumi.String("1"),
    				"learningRate":            pulumi.String("0.005"),
    				"learningRateWarmupSteps": pulumi.String("0"),
    			},
    			OutputDataConfig: &bedrock.CustomModelOutputDataConfigArgs{
    				S3Uri: pulumi.Sprintf("s3://%v/data/", output.Id),
    			},
    			TrainingDataConfig: &bedrock.CustomModelTrainingDataConfigArgs{
    				S3Uri: pulumi.Sprintf("s3://%v/data/train.jsonl", training.Id),
    			},
    		})
    		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.BedrockFoundation.GetModel.Invoke(new()
        {
            ModelId = "amazon.titan-text-express-v1",
        });
    
        var exampleCustomModel = new Aws.Bedrock.CustomModel("example", new()
        {
            CustomModelName = "example-model",
            JobName = "example-job-1",
            BaseModelIdentifier = example.Apply(getModelResult => getModelResult.ModelArn),
            RoleArn = exampleAwsIamRole.Arn,
            Hyperparameters = 
            {
                { "epochCount", "1" },
                { "batchSize", "1" },
                { "learningRate", "0.005" },
                { "learningRateWarmupSteps", "0" },
            },
            OutputDataConfig = new Aws.Bedrock.Inputs.CustomModelOutputDataConfigArgs
            {
                S3Uri = $"s3://{output.Id}/data/",
            },
            TrainingDataConfig = new Aws.Bedrock.Inputs.CustomModelTrainingDataConfigArgs
            {
                S3Uri = $"s3://{training.Id}/data/train.jsonl",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.bedrockfoundation.BedrockfoundationFunctions;
    import com.pulumi.aws.bedrockfoundation.inputs.GetModelArgs;
    import com.pulumi.aws.bedrock.CustomModel;
    import com.pulumi.aws.bedrock.CustomModelArgs;
    import com.pulumi.aws.bedrock.inputs.CustomModelOutputDataConfigArgs;
    import com.pulumi.aws.bedrock.inputs.CustomModelTrainingDataConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 = BedrockfoundationFunctions.getModel(GetModelArgs.builder()
                .modelId("amazon.titan-text-express-v1")
                .build());
    
            var exampleCustomModel = new CustomModel("exampleCustomModel", CustomModelArgs.builder()
                .customModelName("example-model")
                .jobName("example-job-1")
                .baseModelIdentifier(example.applyValue(getModelResult -> getModelResult.modelArn()))
                .roleArn(exampleAwsIamRole.arn())
                .hyperparameters(Map.ofEntries(
                    Map.entry("epochCount", "1"),
                    Map.entry("batchSize", "1"),
                    Map.entry("learningRate", "0.005"),
                    Map.entry("learningRateWarmupSteps", "0")
                ))
                .outputDataConfig(CustomModelOutputDataConfigArgs.builder()
                    .s3Uri(String.format("s3://%s/data/", output.id()))
                    .build())
                .trainingDataConfig(CustomModelTrainingDataConfigArgs.builder()
                    .s3Uri(String.format("s3://%s/data/train.jsonl", training.id()))
                    .build())
                .build());
    
        }
    }
    
    resources:
      exampleCustomModel:
        type: aws:bedrock:CustomModel
        name: example
        properties:
          customModelName: example-model
          jobName: example-job-1
          baseModelIdentifier: ${example.modelArn}
          roleArn: ${exampleAwsIamRole.arn}
          hyperparameters:
            epochCount: '1'
            batchSize: '1'
            learningRate: '0.005'
            learningRateWarmupSteps: '0'
          outputDataConfig:
            s3Uri: s3://${output.id}/data/
          trainingDataConfig:
            s3Uri: s3://${training.id}/data/train.jsonl
    variables:
      example:
        fn::invoke:
          Function: aws:bedrockfoundation:getModel
          Arguments:
            modelId: amazon.titan-text-express-v1
    

    Create CustomModel Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CustomModel(name: string, args: CustomModelArgs, opts?: CustomResourceOptions);
    @overload
    def CustomModel(resource_name: str,
                    args: CustomModelArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def CustomModel(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    job_name: Optional[str] = None,
                    role_arn: Optional[str] = None,
                    custom_model_name: Optional[str] = None,
                    base_model_identifier: Optional[str] = None,
                    hyperparameters: Optional[Mapping[str, str]] = None,
                    output_data_config: Optional[CustomModelOutputDataConfigArgs] = None,
                    customization_type: Optional[str] = None,
                    custom_model_kms_key_id: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    timeouts: Optional[CustomModelTimeoutsArgs] = None,
                    training_data_config: Optional[CustomModelTrainingDataConfigArgs] = None,
                    validation_data_config: Optional[CustomModelValidationDataConfigArgs] = None,
                    vpc_config: Optional[CustomModelVpcConfigArgs] = None)
    func NewCustomModel(ctx *Context, name string, args CustomModelArgs, opts ...ResourceOption) (*CustomModel, error)
    public CustomModel(string name, CustomModelArgs args, CustomResourceOptions? opts = null)
    public CustomModel(String name, CustomModelArgs args)
    public CustomModel(String name, CustomModelArgs args, CustomResourceOptions options)
    
    type: aws:bedrock:CustomModel
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CustomModelArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CustomModelArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CustomModelArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CustomModelArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CustomModelArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var customModelResource = new Aws.Bedrock.CustomModel("customModelResource", new()
    {
        JobName = "string",
        RoleArn = "string",
        CustomModelName = "string",
        BaseModelIdentifier = "string",
        Hyperparameters = 
        {
            { "string", "string" },
        },
        OutputDataConfig = new Aws.Bedrock.Inputs.CustomModelOutputDataConfigArgs
        {
            S3Uri = "string",
        },
        CustomizationType = "string",
        CustomModelKmsKeyId = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Aws.Bedrock.Inputs.CustomModelTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        TrainingDataConfig = new Aws.Bedrock.Inputs.CustomModelTrainingDataConfigArgs
        {
            S3Uri = "string",
        },
        ValidationDataConfig = new Aws.Bedrock.Inputs.CustomModelValidationDataConfigArgs
        {
            Validators = new[]
            {
                new Aws.Bedrock.Inputs.CustomModelValidationDataConfigValidatorArgs
                {
                    S3Uri = "string",
                },
            },
        },
        VpcConfig = new Aws.Bedrock.Inputs.CustomModelVpcConfigArgs
        {
            SecurityGroupIds = new[]
            {
                "string",
            },
            SubnetIds = new[]
            {
                "string",
            },
        },
    });
    
    example, err := bedrock.NewCustomModel(ctx, "customModelResource", &bedrock.CustomModelArgs{
    	JobName:             pulumi.String("string"),
    	RoleArn:             pulumi.String("string"),
    	CustomModelName:     pulumi.String("string"),
    	BaseModelIdentifier: pulumi.String("string"),
    	Hyperparameters: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	OutputDataConfig: &bedrock.CustomModelOutputDataConfigArgs{
    		S3Uri: pulumi.String("string"),
    	},
    	CustomizationType:   pulumi.String("string"),
    	CustomModelKmsKeyId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &bedrock.CustomModelTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	TrainingDataConfig: &bedrock.CustomModelTrainingDataConfigArgs{
    		S3Uri: pulumi.String("string"),
    	},
    	ValidationDataConfig: &bedrock.CustomModelValidationDataConfigArgs{
    		Validators: bedrock.CustomModelValidationDataConfigValidatorArray{
    			&bedrock.CustomModelValidationDataConfigValidatorArgs{
    				S3Uri: pulumi.String("string"),
    			},
    		},
    	},
    	VpcConfig: &bedrock.CustomModelVpcConfigArgs{
    		SecurityGroupIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		SubnetIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    })
    
    var customModelResource = new CustomModel("customModelResource", CustomModelArgs.builder()
        .jobName("string")
        .roleArn("string")
        .customModelName("string")
        .baseModelIdentifier("string")
        .hyperparameters(Map.of("string", "string"))
        .outputDataConfig(CustomModelOutputDataConfigArgs.builder()
            .s3Uri("string")
            .build())
        .customizationType("string")
        .customModelKmsKeyId("string")
        .tags(Map.of("string", "string"))
        .timeouts(CustomModelTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .trainingDataConfig(CustomModelTrainingDataConfigArgs.builder()
            .s3Uri("string")
            .build())
        .validationDataConfig(CustomModelValidationDataConfigArgs.builder()
            .validators(CustomModelValidationDataConfigValidatorArgs.builder()
                .s3Uri("string")
                .build())
            .build())
        .vpcConfig(CustomModelVpcConfigArgs.builder()
            .securityGroupIds("string")
            .subnetIds("string")
            .build())
        .build());
    
    custom_model_resource = aws.bedrock.CustomModel("customModelResource",
        job_name="string",
        role_arn="string",
        custom_model_name="string",
        base_model_identifier="string",
        hyperparameters={
            "string": "string",
        },
        output_data_config={
            "s3_uri": "string",
        },
        customization_type="string",
        custom_model_kms_key_id="string",
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
            "delete": "string",
        },
        training_data_config={
            "s3_uri": "string",
        },
        validation_data_config={
            "validators": [{
                "s3_uri": "string",
            }],
        },
        vpc_config={
            "security_group_ids": ["string"],
            "subnet_ids": ["string"],
        })
    
    const customModelResource = new aws.bedrock.CustomModel("customModelResource", {
        jobName: "string",
        roleArn: "string",
        customModelName: "string",
        baseModelIdentifier: "string",
        hyperparameters: {
            string: "string",
        },
        outputDataConfig: {
            s3Uri: "string",
        },
        customizationType: "string",
        customModelKmsKeyId: "string",
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
        },
        trainingDataConfig: {
            s3Uri: "string",
        },
        validationDataConfig: {
            validators: [{
                s3Uri: "string",
            }],
        },
        vpcConfig: {
            securityGroupIds: ["string"],
            subnetIds: ["string"],
        },
    });
    
    type: aws:bedrock:CustomModel
    properties:
        baseModelIdentifier: string
        customModelKmsKeyId: string
        customModelName: string
        customizationType: string
        hyperparameters:
            string: string
        jobName: string
        outputDataConfig:
            s3Uri: string
        roleArn: string
        tags:
            string: string
        timeouts:
            create: string
            delete: string
        trainingDataConfig:
            s3Uri: string
        validationDataConfig:
            validators:
                - s3Uri: string
        vpcConfig:
            securityGroupIds:
                - string
            subnetIds:
                - string
    

    CustomModel Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CustomModel resource accepts the following input properties:

    BaseModelIdentifier string
    The Amazon Resource Name (ARN) of the base model.
    CustomModelName string
    Name for the custom model.
    Hyperparameters Dictionary<string, string>
    Parameters related to tuning the model.
    JobName string
    A name for the customization job.
    RoleArn string
    The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
    CustomModelKmsKeyId string
    The custom model is encrypted at rest using this key. Specify the key ARN.
    CustomizationType string
    The customization type. Valid values: FINE_TUNING, CONTINUED_PRE_TRAINING.
    OutputDataConfig CustomModelOutputDataConfig
    S3 location for the output data.
    Tags Dictionary<string, string>
    A map of tags to assign to the customization job and custom model. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts CustomModelTimeouts
    TrainingDataConfig CustomModelTrainingDataConfig
    Information about the training dataset.
    ValidationDataConfig CustomModelValidationDataConfig
    Information about the validation dataset.
    VpcConfig CustomModelVpcConfig
    Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
    BaseModelIdentifier string
    The Amazon Resource Name (ARN) of the base model.
    CustomModelName string
    Name for the custom model.
    Hyperparameters map[string]string
    Parameters related to tuning the model.
    JobName string
    A name for the customization job.
    RoleArn string
    The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
    CustomModelKmsKeyId string
    The custom model is encrypted at rest using this key. Specify the key ARN.
    CustomizationType string
    The customization type. Valid values: FINE_TUNING, CONTINUED_PRE_TRAINING.
    OutputDataConfig CustomModelOutputDataConfigArgs
    S3 location for the output data.
    Tags map[string]string
    A map of tags to assign to the customization job and custom model. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts CustomModelTimeoutsArgs
    TrainingDataConfig CustomModelTrainingDataConfigArgs
    Information about the training dataset.
    ValidationDataConfig CustomModelValidationDataConfigArgs
    Information about the validation dataset.
    VpcConfig CustomModelVpcConfigArgs
    Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
    baseModelIdentifier String
    The Amazon Resource Name (ARN) of the base model.
    customModelName String
    Name for the custom model.
    hyperparameters Map<String,String>
    Parameters related to tuning the model.
    jobName String
    A name for the customization job.
    roleArn String
    The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
    customModelKmsKeyId String
    The custom model is encrypted at rest using this key. Specify the key ARN.
    customizationType String
    The customization type. Valid values: FINE_TUNING, CONTINUED_PRE_TRAINING.
    outputDataConfig CustomModelOutputDataConfig
    S3 location for the output data.
    tags Map<String,String>
    A map of tags to assign to the customization job and custom model. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts CustomModelTimeouts
    trainingDataConfig CustomModelTrainingDataConfig
    Information about the training dataset.
    validationDataConfig CustomModelValidationDataConfig
    Information about the validation dataset.
    vpcConfig CustomModelVpcConfig
    Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
    baseModelIdentifier string
    The Amazon Resource Name (ARN) of the base model.
    customModelName string
    Name for the custom model.
    hyperparameters {[key: string]: string}
    Parameters related to tuning the model.
    jobName string
    A name for the customization job.
    roleArn string
    The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
    customModelKmsKeyId string
    The custom model is encrypted at rest using this key. Specify the key ARN.
    customizationType string
    The customization type. Valid values: FINE_TUNING, CONTINUED_PRE_TRAINING.
    outputDataConfig CustomModelOutputDataConfig
    S3 location for the output data.
    tags {[key: string]: string}
    A map of tags to assign to the customization job and custom model. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts CustomModelTimeouts
    trainingDataConfig CustomModelTrainingDataConfig
    Information about the training dataset.
    validationDataConfig CustomModelValidationDataConfig
    Information about the validation dataset.
    vpcConfig CustomModelVpcConfig
    Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
    base_model_identifier str
    The Amazon Resource Name (ARN) of the base model.
    custom_model_name str
    Name for the custom model.
    hyperparameters Mapping[str, str]
    Parameters related to tuning the model.
    job_name str
    A name for the customization job.
    role_arn str
    The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
    custom_model_kms_key_id str
    The custom model is encrypted at rest using this key. Specify the key ARN.
    customization_type str
    The customization type. Valid values: FINE_TUNING, CONTINUED_PRE_TRAINING.
    output_data_config CustomModelOutputDataConfigArgs
    S3 location for the output data.
    tags Mapping[str, str]
    A map of tags to assign to the customization job and custom model. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts CustomModelTimeoutsArgs
    training_data_config CustomModelTrainingDataConfigArgs
    Information about the training dataset.
    validation_data_config CustomModelValidationDataConfigArgs
    Information about the validation dataset.
    vpc_config CustomModelVpcConfigArgs
    Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
    baseModelIdentifier String
    The Amazon Resource Name (ARN) of the base model.
    customModelName String
    Name for the custom model.
    hyperparameters Map<String>
    Parameters related to tuning the model.
    jobName String
    A name for the customization job.
    roleArn String
    The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
    customModelKmsKeyId String
    The custom model is encrypted at rest using this key. Specify the key ARN.
    customizationType String
    The customization type. Valid values: FINE_TUNING, CONTINUED_PRE_TRAINING.
    outputDataConfig Property Map
    S3 location for the output data.
    tags Map<String>
    A map of tags to assign to the customization job and custom model. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts Property Map
    trainingDataConfig Property Map
    Information about the training dataset.
    validationDataConfig Property Map
    Information about the validation dataset.
    vpcConfig Property Map
    Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CustomModel resource produces the following output properties:

    CustomModelArn string
    The ARN of the output model.
    Id string
    The provider-assigned unique ID for this managed resource.
    JobArn string
    The ARN of the customization job.
    JobStatus string
    The status of the customization job. A successful job transitions from InProgress to Completed when the output model is ready to use.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    TrainingMetrics List<CustomModelTrainingMetric>
    Metrics associated with the customization job.
    ValidationMetrics List<CustomModelValidationMetric>
    The loss metric for each validator that you provided.
    CustomModelArn string
    The ARN of the output model.
    Id string
    The provider-assigned unique ID for this managed resource.
    JobArn string
    The ARN of the customization job.
    JobStatus string
    The status of the customization job. A successful job transitions from InProgress to Completed when the output model is ready to use.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    TrainingMetrics []CustomModelTrainingMetric
    Metrics associated with the customization job.
    ValidationMetrics []CustomModelValidationMetric
    The loss metric for each validator that you provided.
    customModelArn String
    The ARN of the output model.
    id String
    The provider-assigned unique ID for this managed resource.
    jobArn String
    The ARN of the customization job.
    jobStatus String
    The status of the customization job. A successful job transitions from InProgress to Completed when the output model is ready to use.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    trainingMetrics List<CustomModelTrainingMetric>
    Metrics associated with the customization job.
    validationMetrics List<CustomModelValidationMetric>
    The loss metric for each validator that you provided.
    customModelArn string
    The ARN of the output model.
    id string
    The provider-assigned unique ID for this managed resource.
    jobArn string
    The ARN of the customization job.
    jobStatus string
    The status of the customization job. A successful job transitions from InProgress to Completed when the output model is ready to use.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    trainingMetrics CustomModelTrainingMetric[]
    Metrics associated with the customization job.
    validationMetrics CustomModelValidationMetric[]
    The loss metric for each validator that you provided.
    custom_model_arn str
    The ARN of the output model.
    id str
    The provider-assigned unique ID for this managed resource.
    job_arn str
    The ARN of the customization job.
    job_status str
    The status of the customization job. A successful job transitions from InProgress to Completed when the output model is ready to use.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    training_metrics Sequence[CustomModelTrainingMetric]
    Metrics associated with the customization job.
    validation_metrics Sequence[CustomModelValidationMetric]
    The loss metric for each validator that you provided.
    customModelArn String
    The ARN of the output model.
    id String
    The provider-assigned unique ID for this managed resource.
    jobArn String
    The ARN of the customization job.
    jobStatus String
    The status of the customization job. A successful job transitions from InProgress to Completed when the output model is ready to use.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    trainingMetrics List<Property Map>
    Metrics associated with the customization job.
    validationMetrics List<Property Map>
    The loss metric for each validator that you provided.

    Look up Existing CustomModel Resource

    Get an existing CustomModel resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CustomModelState, opts?: CustomResourceOptions): CustomModel
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            base_model_identifier: Optional[str] = None,
            custom_model_arn: Optional[str] = None,
            custom_model_kms_key_id: Optional[str] = None,
            custom_model_name: Optional[str] = None,
            customization_type: Optional[str] = None,
            hyperparameters: Optional[Mapping[str, str]] = None,
            job_arn: Optional[str] = None,
            job_name: Optional[str] = None,
            job_status: Optional[str] = None,
            output_data_config: Optional[CustomModelOutputDataConfigArgs] = None,
            role_arn: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            timeouts: Optional[CustomModelTimeoutsArgs] = None,
            training_data_config: Optional[CustomModelTrainingDataConfigArgs] = None,
            training_metrics: Optional[Sequence[CustomModelTrainingMetricArgs]] = None,
            validation_data_config: Optional[CustomModelValidationDataConfigArgs] = None,
            validation_metrics: Optional[Sequence[CustomModelValidationMetricArgs]] = None,
            vpc_config: Optional[CustomModelVpcConfigArgs] = None) -> CustomModel
    func GetCustomModel(ctx *Context, name string, id IDInput, state *CustomModelState, opts ...ResourceOption) (*CustomModel, error)
    public static CustomModel Get(string name, Input<string> id, CustomModelState? state, CustomResourceOptions? opts = null)
    public static CustomModel get(String name, Output<String> id, CustomModelState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BaseModelIdentifier string
    The Amazon Resource Name (ARN) of the base model.
    CustomModelArn string
    The ARN of the output model.
    CustomModelKmsKeyId string
    The custom model is encrypted at rest using this key. Specify the key ARN.
    CustomModelName string
    Name for the custom model.
    CustomizationType string
    The customization type. Valid values: FINE_TUNING, CONTINUED_PRE_TRAINING.
    Hyperparameters Dictionary<string, string>
    Parameters related to tuning the model.
    JobArn string
    The ARN of the customization job.
    JobName string
    A name for the customization job.
    JobStatus string
    The status of the customization job. A successful job transitions from InProgress to Completed when the output model is ready to use.
    OutputDataConfig CustomModelOutputDataConfig
    S3 location for the output data.
    RoleArn string
    The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
    Tags Dictionary<string, string>
    A map of tags to assign to the customization job and custom model. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Timeouts CustomModelTimeouts
    TrainingDataConfig CustomModelTrainingDataConfig
    Information about the training dataset.
    TrainingMetrics List<CustomModelTrainingMetric>
    Metrics associated with the customization job.
    ValidationDataConfig CustomModelValidationDataConfig
    Information about the validation dataset.
    ValidationMetrics List<CustomModelValidationMetric>
    The loss metric for each validator that you provided.
    VpcConfig CustomModelVpcConfig
    Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
    BaseModelIdentifier string
    The Amazon Resource Name (ARN) of the base model.
    CustomModelArn string
    The ARN of the output model.
    CustomModelKmsKeyId string
    The custom model is encrypted at rest using this key. Specify the key ARN.
    CustomModelName string
    Name for the custom model.
    CustomizationType string
    The customization type. Valid values: FINE_TUNING, CONTINUED_PRE_TRAINING.
    Hyperparameters map[string]string
    Parameters related to tuning the model.
    JobArn string
    The ARN of the customization job.
    JobName string
    A name for the customization job.
    JobStatus string
    The status of the customization job. A successful job transitions from InProgress to Completed when the output model is ready to use.
    OutputDataConfig CustomModelOutputDataConfigArgs
    S3 location for the output data.
    RoleArn string
    The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
    Tags map[string]string
    A map of tags to assign to the customization job and custom model. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Timeouts CustomModelTimeoutsArgs
    TrainingDataConfig CustomModelTrainingDataConfigArgs
    Information about the training dataset.
    TrainingMetrics []CustomModelTrainingMetricArgs
    Metrics associated with the customization job.
    ValidationDataConfig CustomModelValidationDataConfigArgs
    Information about the validation dataset.
    ValidationMetrics []CustomModelValidationMetricArgs
    The loss metric for each validator that you provided.
    VpcConfig CustomModelVpcConfigArgs
    Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
    baseModelIdentifier String
    The Amazon Resource Name (ARN) of the base model.
    customModelArn String
    The ARN of the output model.
    customModelKmsKeyId String
    The custom model is encrypted at rest using this key. Specify the key ARN.
    customModelName String
    Name for the custom model.
    customizationType String
    The customization type. Valid values: FINE_TUNING, CONTINUED_PRE_TRAINING.
    hyperparameters Map<String,String>
    Parameters related to tuning the model.
    jobArn String
    The ARN of the customization job.
    jobName String
    A name for the customization job.
    jobStatus String
    The status of the customization job. A successful job transitions from InProgress to Completed when the output model is ready to use.
    outputDataConfig CustomModelOutputDataConfig
    S3 location for the output data.
    roleArn String
    The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
    tags Map<String,String>
    A map of tags to assign to the customization job and custom model. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    timeouts CustomModelTimeouts
    trainingDataConfig CustomModelTrainingDataConfig
    Information about the training dataset.
    trainingMetrics List<CustomModelTrainingMetric>
    Metrics associated with the customization job.
    validationDataConfig CustomModelValidationDataConfig
    Information about the validation dataset.
    validationMetrics List<CustomModelValidationMetric>
    The loss metric for each validator that you provided.
    vpcConfig CustomModelVpcConfig
    Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
    baseModelIdentifier string
    The Amazon Resource Name (ARN) of the base model.
    customModelArn string
    The ARN of the output model.
    customModelKmsKeyId string
    The custom model is encrypted at rest using this key. Specify the key ARN.
    customModelName string
    Name for the custom model.
    customizationType string
    The customization type. Valid values: FINE_TUNING, CONTINUED_PRE_TRAINING.
    hyperparameters {[key: string]: string}
    Parameters related to tuning the model.
    jobArn string
    The ARN of the customization job.
    jobName string
    A name for the customization job.
    jobStatus string
    The status of the customization job. A successful job transitions from InProgress to Completed when the output model is ready to use.
    outputDataConfig CustomModelOutputDataConfig
    S3 location for the output data.
    roleArn string
    The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
    tags {[key: string]: string}
    A map of tags to assign to the customization job and custom model. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    timeouts CustomModelTimeouts
    trainingDataConfig CustomModelTrainingDataConfig
    Information about the training dataset.
    trainingMetrics CustomModelTrainingMetric[]
    Metrics associated with the customization job.
    validationDataConfig CustomModelValidationDataConfig
    Information about the validation dataset.
    validationMetrics CustomModelValidationMetric[]
    The loss metric for each validator that you provided.
    vpcConfig CustomModelVpcConfig
    Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
    base_model_identifier str
    The Amazon Resource Name (ARN) of the base model.
    custom_model_arn str
    The ARN of the output model.
    custom_model_kms_key_id str
    The custom model is encrypted at rest using this key. Specify the key ARN.
    custom_model_name str
    Name for the custom model.
    customization_type str
    The customization type. Valid values: FINE_TUNING, CONTINUED_PRE_TRAINING.
    hyperparameters Mapping[str, str]
    Parameters related to tuning the model.
    job_arn str
    The ARN of the customization job.
    job_name str
    A name for the customization job.
    job_status str
    The status of the customization job. A successful job transitions from InProgress to Completed when the output model is ready to use.
    output_data_config CustomModelOutputDataConfigArgs
    S3 location for the output data.
    role_arn str
    The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
    tags Mapping[str, str]
    A map of tags to assign to the customization job and custom model. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    timeouts CustomModelTimeoutsArgs
    training_data_config CustomModelTrainingDataConfigArgs
    Information about the training dataset.
    training_metrics Sequence[CustomModelTrainingMetricArgs]
    Metrics associated with the customization job.
    validation_data_config CustomModelValidationDataConfigArgs
    Information about the validation dataset.
    validation_metrics Sequence[CustomModelValidationMetricArgs]
    The loss metric for each validator that you provided.
    vpc_config CustomModelVpcConfigArgs
    Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
    baseModelIdentifier String
    The Amazon Resource Name (ARN) of the base model.
    customModelArn String
    The ARN of the output model.
    customModelKmsKeyId String
    The custom model is encrypted at rest using this key. Specify the key ARN.
    customModelName String
    Name for the custom model.
    customizationType String
    The customization type. Valid values: FINE_TUNING, CONTINUED_PRE_TRAINING.
    hyperparameters Map<String>
    Parameters related to tuning the model.
    jobArn String
    The ARN of the customization job.
    jobName String
    A name for the customization job.
    jobStatus String
    The status of the customization job. A successful job transitions from InProgress to Completed when the output model is ready to use.
    outputDataConfig Property Map
    S3 location for the output data.
    roleArn String
    The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
    tags Map<String>
    A map of tags to assign to the customization job and custom model. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    timeouts Property Map
    trainingDataConfig Property Map
    Information about the training dataset.
    trainingMetrics List<Property Map>
    Metrics associated with the customization job.
    validationDataConfig Property Map
    Information about the validation dataset.
    validationMetrics List<Property Map>
    The loss metric for each validator that you provided.
    vpcConfig Property Map
    Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.

    Supporting Types

    CustomModelOutputDataConfig, CustomModelOutputDataConfigArgs

    S3Uri string
    The S3 URI where the output data is stored.
    S3Uri string
    The S3 URI where the output data is stored.
    s3Uri String
    The S3 URI where the output data is stored.
    s3Uri string
    The S3 URI where the output data is stored.
    s3_uri str
    The S3 URI where the output data is stored.
    s3Uri String
    The S3 URI where the output data is stored.

    CustomModelTimeouts, CustomModelTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.

    CustomModelTrainingDataConfig, CustomModelTrainingDataConfigArgs

    S3Uri string
    The S3 URI where the training data is stored.
    S3Uri string
    The S3 URI where the training data is stored.
    s3Uri String
    The S3 URI where the training data is stored.
    s3Uri string
    The S3 URI where the training data is stored.
    s3_uri str
    The S3 URI where the training data is stored.
    s3Uri String
    The S3 URI where the training data is stored.

    CustomModelTrainingMetric, CustomModelTrainingMetricArgs

    TrainingLoss double
    Loss metric associated with the customization job.
    TrainingLoss float64
    Loss metric associated with the customization job.
    trainingLoss Double
    Loss metric associated with the customization job.
    trainingLoss number
    Loss metric associated with the customization job.
    training_loss float
    Loss metric associated with the customization job.
    trainingLoss Number
    Loss metric associated with the customization job.

    CustomModelValidationDataConfig, CustomModelValidationDataConfigArgs

    validators List<Property Map>
    Information about the validators.

    CustomModelValidationDataConfigValidator, CustomModelValidationDataConfigValidatorArgs

    S3Uri string
    The S3 URI where the validation data is stored.
    S3Uri string
    The S3 URI where the validation data is stored.
    s3Uri String
    The S3 URI where the validation data is stored.
    s3Uri string
    The S3 URI where the validation data is stored.
    s3_uri str
    The S3 URI where the validation data is stored.
    s3Uri String
    The S3 URI where the validation data is stored.

    CustomModelValidationMetric, CustomModelValidationMetricArgs

    ValidationLoss double
    The validation loss associated with the validator.
    ValidationLoss float64
    The validation loss associated with the validator.
    validationLoss Double
    The validation loss associated with the validator.
    validationLoss number
    The validation loss associated with the validator.
    validation_loss float
    The validation loss associated with the validator.
    validationLoss Number
    The validation loss associated with the validator.

    CustomModelVpcConfig, CustomModelVpcConfigArgs

    SecurityGroupIds List<string>
    VPC configuration security group IDs.
    SubnetIds List<string>
    VPC configuration subnets.
    SecurityGroupIds []string
    VPC configuration security group IDs.
    SubnetIds []string
    VPC configuration subnets.
    securityGroupIds List<String>
    VPC configuration security group IDs.
    subnetIds List<String>
    VPC configuration subnets.
    securityGroupIds string[]
    VPC configuration security group IDs.
    subnetIds string[]
    VPC configuration subnets.
    security_group_ids Sequence[str]
    VPC configuration security group IDs.
    subnet_ids Sequence[str]
    VPC configuration subnets.
    securityGroupIds List<String>
    VPC configuration security group IDs.
    subnetIds List<String>
    VPC configuration subnets.

    Import

    Using pulumi import, import Bedrock custom model using the job_arn. For example:

    $ pulumi import aws:bedrock/customModel:CustomModel example arn:aws:bedrock:us-west-2:123456789012:model-customization-job/amazon.titan-text-express-v1:0:8k/1y5n57gh5y2e
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi