published on Thursday, Aug 20, 2026 by Pulumi
published on Thursday, Aug 20, 2026 by Pulumi
Manages an AWS Bedrock Foundation Model Agreement.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.bedrockfoundation.getModelAgreementOffers({
modelId: "eu.anthropic.claude-opus-4-5-20251101-v1:0",
offerType: "PUBLIC",
});
const exampleModelAgreement = new aws.bedrockfoundation.ModelAgreement("example", {
modelId: example.then(example => example.modelId),
offerToken: example.then(example => example.offers?.[0]?.offerToken),
});
import pulumi
import pulumi_aws as aws
example = aws.bedrockfoundation.get_model_agreement_offers(model_id="eu.anthropic.claude-opus-4-5-20251101-v1:0",
offer_type="PUBLIC")
example_model_agreement = aws.bedrockfoundation.ModelAgreement("example",
model_id=example.model_id,
offer_token=example.offers[0].offer_token)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/bedrockfoundation"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := bedrockfoundation.GetModelAgreementOffers(ctx, &bedrockfoundation.GetModelAgreementOffersArgs{
ModelId: "eu.anthropic.claude-opus-4-5-20251101-v1:0",
OfferType: pulumi.StringRef("PUBLIC"),
}, nil)
if err != nil {
return err
}
_, err = bedrockfoundation.NewModelAgreement(ctx, "example", &bedrockfoundation.ModelAgreementArgs{
ModelId: pulumi.String(example.ModelId),
OfferToken: pulumi.String(example.Offers[0].OfferToken),
})
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.GetModelAgreementOffers.Invoke(new()
{
ModelId = "eu.anthropic.claude-opus-4-5-20251101-v1:0",
OfferType = "PUBLIC",
});
var exampleModelAgreement = new Aws.BedrockFoundation.ModelAgreement("example", new()
{
ModelId = example.Apply(getModelAgreementOffersResult => getModelAgreementOffersResult.ModelId),
OfferToken = example.Apply(getModelAgreementOffersResult => getModelAgreementOffersResult.Offers[0]?.OfferToken),
});
});
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.GetModelAgreementOffersArgs;
import com.pulumi.aws.bedrockfoundation.ModelAgreement;
import com.pulumi.aws.bedrockfoundation.ModelAgreementArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = BedrockfoundationFunctions.getModelAgreementOffers(GetModelAgreementOffersArgs.builder()
.modelId("eu.anthropic.claude-opus-4-5-20251101-v1:0")
.offerType("PUBLIC")
.build());
var exampleModelAgreement = new ModelAgreement("exampleModelAgreement", ModelAgreementArgs.builder()
.modelId(example.modelId())
.offerToken(example.offers()[0].offerToken())
.build());
}
}
resources:
exampleModelAgreement:
type: aws:bedrockfoundation:ModelAgreement
name: example
properties:
modelId: ${example.modelId}
offerToken: ${example.offers[0].offerToken}
variables:
example:
fn::invoke:
function: aws:bedrockfoundation:getModelAgreementOffers
arguments:
modelId: eu.anthropic.claude-opus-4-5-20251101-v1:0
offerType: PUBLIC
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_bedrockfoundation_getmodelagreementoffers" "example" {
model_id = "eu.anthropic.claude-opus-4-5-20251101-v1:0"
offer_type = "PUBLIC"
}
resource "aws_bedrockfoundation_modelagreement" "example" {
model_id = data.aws_bedrockfoundation_getmodelagreementoffers.example.model_id
offer_token = data.aws_bedrockfoundation_getmodelagreementoffers.example.offers[0].offer_token
}
Create ModelAgreement Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ModelAgreement(name: string, args: ModelAgreementArgs, opts?: CustomResourceOptions);@overload
def ModelAgreement(resource_name: str,
args: ModelAgreementArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ModelAgreement(resource_name: str,
opts: Optional[ResourceOptions] = None,
model_id: Optional[str] = None,
offer_token: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[ModelAgreementTimeoutsArgs] = None)func NewModelAgreement(ctx *Context, name string, args ModelAgreementArgs, opts ...ResourceOption) (*ModelAgreement, error)public ModelAgreement(string name, ModelAgreementArgs args, CustomResourceOptions? opts = null)
public ModelAgreement(String name, ModelAgreementArgs args)
public ModelAgreement(String name, ModelAgreementArgs args, CustomResourceOptions options)
type: aws:bedrockfoundation:ModelAgreement
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws_bedrockfoundation_model_agreement" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ModelAgreementArgs
- 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 ModelAgreementArgs
- 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 ModelAgreementArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ModelAgreementArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ModelAgreementArgs
- 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 modelAgreementResource = new Aws.BedrockFoundation.ModelAgreement("modelAgreementResource", new()
{
ModelId = "string",
OfferToken = "string",
Region = "string",
Timeouts = new Aws.BedrockFoundation.Inputs.ModelAgreementTimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := bedrockfoundation.NewModelAgreement(ctx, "modelAgreementResource", &bedrockfoundation.ModelAgreementArgs{
ModelId: pulumi.String("string"),
OfferToken: pulumi.String("string"),
Region: pulumi.String("string"),
Timeouts: &bedrockfoundation.ModelAgreementTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
resource "aws_bedrockfoundation_model_agreement" "modelAgreementResource" {
lifecycle {
create_before_destroy = true
}
model_id = "string"
offer_token = "string"
region = "string"
timeouts = {
create = "string"
delete = "string"
}
}
var modelAgreementResource = new ModelAgreement("modelAgreementResource", ModelAgreementArgs.builder()
.modelId("string")
.offerToken("string")
.region("string")
.timeouts(ModelAgreementTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
model_agreement_resource = aws.bedrockfoundation.ModelAgreement("modelAgreementResource",
model_id="string",
offer_token="string",
region="string",
timeouts={
"create": "string",
"delete": "string",
})
const modelAgreementResource = new aws.bedrockfoundation.ModelAgreement("modelAgreementResource", {
modelId: "string",
offerToken: "string",
region: "string",
timeouts: {
create: "string",
"delete": "string",
},
});
type: aws:bedrockfoundation:ModelAgreement
properties:
modelId: string
offerToken: string
region: string
timeouts:
create: string
delete: string
ModelAgreement 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 ModelAgreement resource accepts the following input properties:
- Model
Id string - Model ID for the access request.
- Offer
Token string Offer token encapsulates information for an offer.
The following arguments are optional:
- Region string
- Region where this action should be run. Defaults to the Region set in the provider configuration.
- Timeouts
Model
Agreement Timeouts
- Model
Id string - Model ID for the access request.
- Offer
Token string Offer token encapsulates information for an offer.
The following arguments are optional:
- Region string
- Region where this action should be run. Defaults to the Region set in the provider configuration.
- Timeouts
Model
Agreement Timeouts Args
- model
Id String - Model ID for the access request.
- offer
Token String Offer token encapsulates information for an offer.
The following arguments are optional:
- region String
- Region where this action should be run. Defaults to the Region set in the provider configuration.
- timeouts
Model
Agreement Timeouts
- model
Id string - Model ID for the access request.
- offer
Token string Offer token encapsulates information for an offer.
The following arguments are optional:
- region string
- Region where this action should be run. Defaults to the Region set in the provider configuration.
- timeouts
Model
Agreement Timeouts
- model_
id str - Model ID for the access request.
- offer_
token str Offer token encapsulates information for an offer.
The following arguments are optional:
- region str
- Region where this action should be run. Defaults to the Region set in the provider configuration.
- timeouts
Model
Agreement Timeouts Args
- model
Id String - Model ID for the access request.
- offer
Token String Offer token encapsulates information for an offer.
The following arguments are optional:
- region String
- Region where this action should be run. Defaults to the Region set in the provider configuration.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ModelAgreement resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ModelAgreement Resource
Get an existing ModelAgreement 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?: ModelAgreementState, opts?: CustomResourceOptions): ModelAgreement@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
model_id: Optional[str] = None,
offer_token: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[ModelAgreementTimeoutsArgs] = None) -> ModelAgreementfunc GetModelAgreement(ctx *Context, name string, id IDInput, state *ModelAgreementState, opts ...ResourceOption) (*ModelAgreement, error)public static ModelAgreement Get(string name, Input<string> id, ModelAgreementState? state, CustomResourceOptions? opts = null)public static ModelAgreement get(String name, Output<String> id, ModelAgreementState state, CustomResourceOptions options)resources: _: type: aws:bedrockfoundation:ModelAgreement get: id: ${id}import {
to = aws_bedrockfoundation_model_agreement.example
id = "${id}"
}
- 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.
- Model
Id string - Model ID for the access request.
- Offer
Token string Offer token encapsulates information for an offer.
The following arguments are optional:
- Region string
- Region where this action should be run. Defaults to the Region set in the provider configuration.
- Timeouts
Model
Agreement Timeouts
- Model
Id string - Model ID for the access request.
- Offer
Token string Offer token encapsulates information for an offer.
The following arguments are optional:
- Region string
- Region where this action should be run. Defaults to the Region set in the provider configuration.
- Timeouts
Model
Agreement Timeouts Args
- model
Id String - Model ID for the access request.
- offer
Token String Offer token encapsulates information for an offer.
The following arguments are optional:
- region String
- Region where this action should be run. Defaults to the Region set in the provider configuration.
- timeouts
Model
Agreement Timeouts
- model
Id string - Model ID for the access request.
- offer
Token string Offer token encapsulates information for an offer.
The following arguments are optional:
- region string
- Region where this action should be run. Defaults to the Region set in the provider configuration.
- timeouts
Model
Agreement Timeouts
- model_
id str - Model ID for the access request.
- offer_
token str Offer token encapsulates information for an offer.
The following arguments are optional:
- region str
- Region where this action should be run. Defaults to the Region set in the provider configuration.
- timeouts
Model
Agreement Timeouts Args
- model
Id String - Model ID for the access request.
- offer
Token String Offer token encapsulates information for an offer.
The following arguments are optional:
- region String
- Region where this action should be run. Defaults to the Region set in the provider configuration.
- timeouts Property Map
Supporting Types
ModelAgreementTimeouts, ModelAgreementTimeoutsArgs
- 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 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.
Import
Identity Schema
Required
modelId- Model ID argument of the Foundation Model Agreement.
Optional
accountId(String) AWS Account where this resource is managed.region(String) Region where this resource is managed.
Using pulumi import, import Bedrock Foundation Model Agreement using the modelId. For example:
$ pulumi import aws:bedrockfoundation/modelAgreement:ModelAgreement example eu.anthropic.claude-opus-4-5-20251101-v1:0
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
awsTerraform Provider.
published on Thursday, Aug 20, 2026 by Pulumi