aws.bedrock.ProvisionedModelThroughput
Explore with Pulumi AI
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ProvisionedModelThroughput resource accepts the following input properties:
- Model
Arn string - 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 stringName - Unique name for this Provisioned Throughput.
- Commitment
Duration 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
. - 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
Provisioned
Model Throughput Timeouts
- Model
Arn string - 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 stringName - Unique name for this Provisioned Throughput.
- Commitment
Duration 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
. - 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
Provisioned
Model Throughput Timeouts Args
- model
Arn String - ARN of the model to associate with this Provisioned Throughput.
- model
Units Integer - Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
- provisioned
Model StringName - Unique name for this Provisioned Throughput.
- commitment
Duration 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
. - 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
Provisioned
Model Throughput Timeouts
- model
Arn string - ARN of the model to associate with this Provisioned Throughput.
- model
Units number - Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
- provisioned
Model stringName - Unique name for this Provisioned Throughput.
- commitment
Duration 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
. - {[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
Provisioned
Model Throughput Timeouts
- 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_ strname - 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
. - 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
Provisioned
Model Throughput Timeouts Args
- model
Arn String - ARN of the model to associate with this Provisioned Throughput.
- model
Units Number - Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
- provisioned
Model StringName - Unique name for this Provisioned Throughput.
- commitment
Duration 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
. - 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.
- Provisioned
Model stringArn - The ARN of the Provisioned Throughput.
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioned
Model stringArn - The ARN of the Provisioned Throughput.
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioned
Model StringArn - The ARN of the Provisioned Throughput.
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id string
- The provider-assigned unique ID for this managed resource.
- provisioned
Model stringArn - The ARN of the Provisioned Throughput.
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id str
- The provider-assigned unique ID for this managed resource.
- provisioned_
model_ strarn - The ARN of the Provisioned Throughput.
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioned
Model StringArn - The ARN of the Provisioned Throughput.
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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.
- Commitment
Duration 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
. - Model
Arn string - 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 stringArn - The ARN of the Provisioned Throughput.
- Provisioned
Model stringName - Unique name for this Provisioned Throughput.
- 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. - Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Timeouts
Provisioned
Model Throughput Timeouts
- Commitment
Duration 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
. - Model
Arn string - 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 stringArn - The ARN of the Provisioned Throughput.
- Provisioned
Model stringName - Unique name for this Provisioned Throughput.
- 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. - map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Timeouts
Provisioned
Model Throughput Timeouts Args
- commitment
Duration 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
. - model
Arn String - ARN of the model to associate with this Provisioned Throughput.
- model
Units Integer - Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
- provisioned
Model StringArn - The ARN of the Provisioned Throughput.
- provisioned
Model StringName - Unique name for this Provisioned Throughput.
- 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. - Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - timeouts
Provisioned
Model Throughput Timeouts
- commitment
Duration 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
. - model
Arn string - ARN of the model to associate with this Provisioned Throughput.
- model
Units number - Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
- provisioned
Model stringArn - The ARN of the Provisioned Throughput.
- provisioned
Model stringName - Unique name for this Provisioned Throughput.
- {[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. - {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - timeouts
Provisioned
Model Throughput Timeouts
- 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_ strarn - The ARN of the Provisioned Throughput.
- provisioned_
model_ strname - Unique name for this Provisioned Throughput.
- 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. - Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - timeouts
Provisioned
Model Throughput Timeouts Args
- commitment
Duration 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
. - model
Arn String - ARN of the model to associate with this Provisioned Throughput.
- model
Units Number - Number of model units to allocate. A model unit delivers a specific throughput level for the specified model.
- provisioned
Model StringArn - The ARN of the Provisioned Throughput.
- provisioned
Model StringName - Unique name for this Provisioned Throughput.
- 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. - Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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.