InferenceProfileArgs

data class InferenceProfileArgs(val description: Output<String>? = null, val modelSource: Output<InferenceProfileModelSourceArgs>? = null, val name: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val timeouts: Output<InferenceProfileTimeoutsArgs>? = null) : ConvertibleToJava<InferenceProfileArgs>

Resource for managing an AWS Bedrock Inference Profile.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = aws.getCallerIdentity({});
const example = new aws.bedrock.InferenceProfile("example", {
name: "Claude Sonnet for Project 123",
description: "Profile with tag for cost allocation tracking",
modelSource: {
copyFrom: "arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0",
},
tags: {
ProjectID: "123",
},
});
import pulumi
import pulumi_aws as aws
current = aws.get_caller_identity()
example = aws.bedrock.InferenceProfile("example",
name="Claude Sonnet for Project 123",
description="Profile with tag for cost allocation tracking",
model_source={
"copy_from": "arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0",
},
tags={
"ProjectID": "123",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var current = Aws.GetCallerIdentity.Invoke();
var example = new Aws.Bedrock.InferenceProfile("example", new()
{
Name = "Claude Sonnet for Project 123",
Description = "Profile with tag for cost allocation tracking",
ModelSource = new Aws.Bedrock.Inputs.InferenceProfileModelSourceArgs
{
CopyFrom = "arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0",
},
Tags =
{
{ "ProjectID", "123" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrock"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil)
if err != nil {
return err
}
_, err = bedrock.NewInferenceProfile(ctx, "example", &bedrock.InferenceProfileArgs{
Name: pulumi.String("Claude Sonnet for Project 123"),
Description: pulumi.String("Profile with tag for cost allocation tracking"),
ModelSource: &bedrock.InferenceProfileModelSourceArgs{
CopyFrom: pulumi.String("arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0"),
},
Tags: pulumi.StringMap{
"ProjectID": pulumi.String("123"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetCallerIdentityArgs;
import com.pulumi.aws.bedrock.InferenceProfile;
import com.pulumi.aws.bedrock.InferenceProfileArgs;
import com.pulumi.aws.bedrock.inputs.InferenceProfileModelSourceArgs;
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 current = AwsFunctions.getCallerIdentity(GetCallerIdentityArgs.builder()
.build());
var example = new InferenceProfile("example", InferenceProfileArgs.builder()
.name("Claude Sonnet for Project 123")
.description("Profile with tag for cost allocation tracking")
.modelSource(InferenceProfileModelSourceArgs.builder()
.copyFrom("arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0")
.build())
.tags(Map.of("ProjectID", "123"))
.build());
}
}
resources:
example:
type: aws:bedrock:InferenceProfile
properties:
name: Claude Sonnet for Project 123
description: Profile with tag for cost allocation tracking
modelSource:
copyFrom: arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0
tags:
ProjectID: '123'
variables:
current:
fn::invoke:
function: aws:getCallerIdentity
arguments: {}

Import

Using pulumi import, import Bedrock Inference Profile using the example_id_arg. For example:

$ pulumi import aws:bedrock/inferenceProfile:InferenceProfile example inference_profile-id-12345678

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, modelSource: Output<InferenceProfileModelSourceArgs>? = null, name: Output<String>? = null, tags: Output<Map<String, String>>? = null, timeouts: Output<InferenceProfileTimeoutsArgs>? = null)

Properties

Link copied to clipboard
val description: Output<String>? = null

The description of the inference profile.

Link copied to clipboard

The source of the model this inference profile will track metrics and cost for. See model_source. The following arguments are optional:

Link copied to clipboard
val name: Output<String>? = null

The name of the inference profile.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Key-value mapping of resource tags for the inference profile.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun toJava(): InferenceProfileArgs