1. Packages
  2. AWS
  3. API Docs
  4. bedrock
  5. ProvisionedModelThroughput
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.bedrock.ProvisionedModelThroughput

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Manages Provisioned Throughput for an Amazon Bedrock model.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.bedrock.ProvisionedModelThroughput("example", {
        provisionedModelName: "example-model",
        modelArn: "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-v2",
        commitmentDuration: "SixMonths",
        modelUnits: 1,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.bedrock.ProvisionedModelThroughput("example",
        provisioned_model_name="example-model",
        model_arn="arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-v2",
        commitment_duration="SixMonths",
        model_units=1)
    
    package main
    
    import (
    	"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 := bedrock.NewProvisionedModelThroughput(ctx, "example", &bedrock.ProvisionedModelThroughputArgs{
    			ProvisionedModelName: pulumi.String("example-model"),
    			ModelArn:             pulumi.String("arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-v2"),
    			CommitmentDuration:   pulumi.String("SixMonths"),
    			ModelUnits:           pulumi.Int(1),
    		})
    		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 = new Aws.Bedrock.ProvisionedModelThroughput("example", new()
        {
            ProvisionedModelName = "example-model",
            ModelArn = "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-v2",
            CommitmentDuration = "SixMonths",
            ModelUnits = 1,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.bedrock.ProvisionedModelThroughput;
    import com.pulumi.aws.bedrock.ProvisionedModelThroughputArgs;
    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) {
            var example = new ProvisionedModelThroughput("example", ProvisionedModelThroughputArgs.builder()
                .provisionedModelName("example-model")
                .modelArn("arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-v2")
                .commitmentDuration("SixMonths")
                .modelUnits(1)
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:bedrock:ProvisionedModelThroughput
        properties:
          provisionedModelName: example-model
          modelArn: arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-v2
          commitmentDuration: SixMonths
          modelUnits: 1
    

    Create ProvisionedModelThroughput Resource

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

    Constructor syntax

    new ProvisionedModelThroughput(name: string, args: ProvisionedModelThroughputArgs, opts?: CustomResourceOptions);
    @overload
    def ProvisionedModelThroughput(resource_name: str,
                                   args: ProvisionedModelThroughputArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProvisionedModelThroughput(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   model_arn: Optional[str] = None,
                                   model_units: Optional[int] = None,
                                   provisioned_model_name: Optional[str] = None,
                                   commitment_duration: Optional[str] = None,
                                   tags: Optional[Mapping[str, str]] = None,
                                   timeouts: Optional[ProvisionedModelThroughputTimeoutsArgs] = None)
    func NewProvisionedModelThroughput(ctx *Context, name string, args ProvisionedModelThroughputArgs, opts ...ResourceOption) (*ProvisionedModelThroughput, error)
    public ProvisionedModelThroughput(string name, ProvisionedModelThroughputArgs args, CustomResourceOptions? opts = null)
    public ProvisionedModelThroughput(String name, ProvisionedModelThroughputArgs args)
    public ProvisionedModelThroughput(String name, ProvisionedModelThroughputArgs args, CustomResourceOptions options)
    
    type: aws:bedrock:ProvisionedModelThroughput
    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 ProvisionedModelThroughputArgs
    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 ProvisionedModelThroughputArgs
    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 ProvisionedModelThroughputArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProvisionedModelThroughputArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProvisionedModelThroughputArgs
    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 provisionedModelThroughputResource = new Aws.Bedrock.ProvisionedModelThroughput("provisionedModelThroughputResource", new()
    {
        ModelArn = "string",
        ModelUnits = 0,
        ProvisionedModelName = "string",
        CommitmentDuration = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Aws.Bedrock.Inputs.ProvisionedModelThroughputTimeoutsArgs
        {
            Create = "string",
        },
    });
    
    example, err := bedrock.NewProvisionedModelThroughput(ctx, "provisionedModelThroughputResource", &bedrock.ProvisionedModelThroughputArgs{
    	ModelArn:             pulumi.String("string"),
    	ModelUnits:           pulumi.Int(0),
    	ProvisionedModelName: pulumi.String("string"),
    	CommitmentDuration:   pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &bedrock.ProvisionedModelThroughputTimeoutsArgs{
    		Create: pulumi.String("string"),
    	},
    })
    
    var provisionedModelThroughputResource = new ProvisionedModelThroughput("provisionedModelThroughputResource", ProvisionedModelThroughputArgs.builder()
        .modelArn("string")
        .modelUnits(0)
        .provisionedModelName("string")
        .commitmentDuration("string")
        .tags(Map.of("string", "string"))
        .timeouts(ProvisionedModelThroughputTimeoutsArgs.builder()
            .create("string")
            .build())
        .build());
    
    provisioned_model_throughput_resource = aws.bedrock.ProvisionedModelThroughput("provisionedModelThroughputResource",
        model_arn="string",
        model_units=0,
        provisioned_model_name="string",
        commitment_duration="string",
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
        })
    
    const provisionedModelThroughputResource = new aws.bedrock.ProvisionedModelThroughput("provisionedModelThroughputResource", {
        modelArn: "string",
        modelUnits: 0,
        provisionedModelName: "string",
        commitmentDuration: "string",
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
        },
    });
    
    type: aws:bedrock:ProvisionedModelThroughput
    properties:
        commitmentDuration: string
        modelArn: string
        modelUnits: 0
        provisionedModelName: string
        tags:
            string: string
        timeouts:
            create: string
    

    ProvisionedModelThroughput Resource Properties

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

    Inputs

    The ProvisionedModelThroughput resource accepts the following input properties:

    ModelArn string
    ARN of the model to associate with this Provisioned Throughput.
    ModelUnits int
    Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
    ProvisionedModelName string
    Unique name for this Provisioned Throughput.
    CommitmentDuration string
    Commitment duration requested for the Provisioned Throughput. For custom models, you can purchase on-demand Provisioned Throughput by omitting this argument. Valid values: OneMonth, SixMonths.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts ProvisionedModelThroughputTimeouts
    ModelArn string
    ARN of the model to associate with this Provisioned Throughput.
    ModelUnits int
    Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
    ProvisionedModelName string
    Unique name for this Provisioned Throughput.
    CommitmentDuration string
    Commitment duration requested for the Provisioned Throughput. For custom models, you can purchase on-demand Provisioned Throughput by omitting this argument. Valid values: OneMonth, SixMonths.
    Tags map[string]string
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts ProvisionedModelThroughputTimeoutsArgs
    modelArn String
    ARN of the model to associate with this Provisioned Throughput.
    modelUnits Integer
    Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
    provisionedModelName String
    Unique name for this Provisioned Throughput.
    commitmentDuration String
    Commitment duration requested for the Provisioned Throughput. For custom models, you can purchase on-demand Provisioned Throughput by omitting this argument. Valid values: OneMonth, SixMonths.
    tags Map<String,String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ProvisionedModelThroughputTimeouts
    modelArn string
    ARN of the model to associate with this Provisioned Throughput.
    modelUnits number
    Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
    provisionedModelName string
    Unique name for this Provisioned Throughput.
    commitmentDuration string
    Commitment duration requested for the Provisioned Throughput. For custom models, you can purchase on-demand Provisioned Throughput by omitting this argument. Valid values: OneMonth, SixMonths.
    tags {[key: string]: string}
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ProvisionedModelThroughputTimeouts
    model_arn str
    ARN of the model to associate with this Provisioned Throughput.
    model_units int
    Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
    provisioned_model_name str
    Unique name for this Provisioned Throughput.
    commitment_duration str
    Commitment duration requested for the Provisioned Throughput. For custom models, you can purchase on-demand Provisioned Throughput by omitting this argument. Valid values: OneMonth, SixMonths.
    tags Mapping[str, str]
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ProvisionedModelThroughputTimeoutsArgs
    modelArn String
    ARN of the model to associate with this Provisioned Throughput.
    modelUnits Number
    Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
    provisionedModelName String
    Unique name for this Provisioned Throughput.
    commitmentDuration String
    Commitment duration requested for the Provisioned Throughput. For custom models, you can purchase on-demand Provisioned Throughput by omitting this argument. Valid values: OneMonth, SixMonths.
    tags Map<String>
    A map of tags to assign to the resource. 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

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    ProvisionedModelArn string
    The ARN of the Provisioned Throughput.
    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.

    Id string
    The provider-assigned unique ID for this managed resource.
    ProvisionedModelArn string
    The ARN of the Provisioned Throughput.
    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.

    id String
    The provider-assigned unique ID for this managed resource.
    provisionedModelArn String
    The ARN of the Provisioned Throughput.
    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.

    id string
    The provider-assigned unique ID for this managed resource.
    provisionedModelArn string
    The ARN of the Provisioned Throughput.
    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.

    id str
    The provider-assigned unique ID for this managed resource.
    provisioned_model_arn str
    The ARN of the Provisioned Throughput.
    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.

    id String
    The provider-assigned unique ID for this managed resource.
    provisionedModelArn String
    The ARN of the Provisioned Throughput.
    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.

    Look up Existing ProvisionedModelThroughput Resource

    Get an existing ProvisionedModelThroughput 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?: ProvisionedModelThroughputState, opts?: CustomResourceOptions): ProvisionedModelThroughput
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            commitment_duration: Optional[str] = None,
            model_arn: Optional[str] = None,
            model_units: Optional[int] = None,
            provisioned_model_arn: Optional[str] = None,
            provisioned_model_name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            timeouts: Optional[ProvisionedModelThroughputTimeoutsArgs] = None) -> ProvisionedModelThroughput
    func GetProvisionedModelThroughput(ctx *Context, name string, id IDInput, state *ProvisionedModelThroughputState, opts ...ResourceOption) (*ProvisionedModelThroughput, error)
    public static ProvisionedModelThroughput Get(string name, Input<string> id, ProvisionedModelThroughputState? state, CustomResourceOptions? opts = null)
    public static ProvisionedModelThroughput get(String name, Output<String> id, ProvisionedModelThroughputState 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:
    CommitmentDuration string
    Commitment duration requested for the Provisioned Throughput. For custom models, you can purchase on-demand Provisioned Throughput by omitting this argument. Valid values: OneMonth, SixMonths.
    ModelArn string
    ARN of the model to associate with this Provisioned Throughput.
    ModelUnits int
    Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
    ProvisionedModelArn string
    The ARN of the Provisioned Throughput.
    ProvisionedModelName string
    Unique name for this Provisioned Throughput.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. 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 ProvisionedModelThroughputTimeouts
    CommitmentDuration string
    Commitment duration requested for the Provisioned Throughput. For custom models, you can purchase on-demand Provisioned Throughput by omitting this argument. Valid values: OneMonth, SixMonths.
    ModelArn string
    ARN of the model to associate with this Provisioned Throughput.
    ModelUnits int
    Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
    ProvisionedModelArn string
    The ARN of the Provisioned Throughput.
    ProvisionedModelName string
    Unique name for this Provisioned Throughput.
    Tags map[string]string
    A map of tags to assign to the resource. 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 ProvisionedModelThroughputTimeoutsArgs
    commitmentDuration String
    Commitment duration requested for the Provisioned Throughput. For custom models, you can purchase on-demand Provisioned Throughput by omitting this argument. Valid values: OneMonth, SixMonths.
    modelArn String
    ARN of the model to associate with this Provisioned Throughput.
    modelUnits Integer
    Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
    provisionedModelArn String
    The ARN of the Provisioned Throughput.
    provisionedModelName String
    Unique name for this Provisioned Throughput.
    tags Map<String,String>
    A map of tags to assign to the resource. 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 ProvisionedModelThroughputTimeouts
    commitmentDuration string
    Commitment duration requested for the Provisioned Throughput. For custom models, you can purchase on-demand Provisioned Throughput by omitting this argument. Valid values: OneMonth, SixMonths.
    modelArn string
    ARN of the model to associate with this Provisioned Throughput.
    modelUnits number
    Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
    provisionedModelArn string
    The ARN of the Provisioned Throughput.
    provisionedModelName string
    Unique name for this Provisioned Throughput.
    tags {[key: string]: string}
    A map of tags to assign to the resource. 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 ProvisionedModelThroughputTimeouts
    commitment_duration str
    Commitment duration requested for the Provisioned Throughput. For custom models, you can purchase on-demand Provisioned Throughput by omitting this argument. Valid values: OneMonth, SixMonths.
    model_arn str
    ARN of the model to associate with this Provisioned Throughput.
    model_units int
    Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
    provisioned_model_arn str
    The ARN of the Provisioned Throughput.
    provisioned_model_name str
    Unique name for this Provisioned Throughput.
    tags Mapping[str, str]
    A map of tags to assign to the resource. 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 ProvisionedModelThroughputTimeoutsArgs
    commitmentDuration String
    Commitment duration requested for the Provisioned Throughput. For custom models, you can purchase on-demand Provisioned Throughput by omitting this argument. Valid values: OneMonth, SixMonths.
    modelArn String
    ARN of the model to associate with this Provisioned Throughput.
    modelUnits Number
    Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
    provisionedModelArn String
    The ARN of the Provisioned Throughput.
    provisionedModelName String
    Unique name for this Provisioned Throughput.
    tags Map<String>
    A map of tags to assign to the resource. 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

    Supporting Types

    ProvisionedModelThroughputTimeouts, ProvisionedModelThroughputTimeoutsArgs

    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).
    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).
    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).
    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).
    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).
    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).

    Import

    Using pulumi import, import Provisioned Throughput using the provisioned_model_arn. For example:

    $ pulumi import aws:bedrock/provisionedModelThroughput:ProvisionedModelThroughput example arn:aws:bedrock:us-west-2:123456789012:provisioned-model/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.54.0 published on Friday, Sep 27, 2024 by Pulumi