Package com.pulumi.aws.bedrockfoundation
Class ModelAgreement
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.bedrockfoundation.ModelAgreement
-
public class ModelAgreement extends com.pulumi.resources.CustomResourceManages an AWS Bedrock Foundation Model Agreement. ## Example Usage ### Basic Usage
## Import ### Identity Schema #### Required * `modelId` (String) Model ID of the foundation model. #### 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: ```sh $ pulumi import aws:bedrockfoundation/modelAgreement:ModelAgreement example eu.anthropic.claude-opus-4-5-20251101-v1:0 ```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 com.pulumi.resources.CustomResourceOptions; 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(), CustomResourceOptions.builder() .ignoreChanges("offerToken") .build()); } }
-
-
Constructor Summary
Constructors Constructor Description ModelAgreement(java.lang.String name)ModelAgreement(java.lang.String name, ModelAgreementArgs args)ModelAgreement(java.lang.String name, ModelAgreementArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ModelAgreementget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ModelAgreementState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>modelId()com.pulumi.core.Output<java.lang.String>offerToken()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<ModelAgreementTimeouts>>timeouts()
-
-
-
Constructor Detail
-
ModelAgreement
public ModelAgreement(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
ModelAgreement
public ModelAgreement(java.lang.String name, ModelAgreementArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
ModelAgreement
public ModelAgreement(java.lang.String name, ModelAgreementArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
modelId
public com.pulumi.core.Output<java.lang.String> modelId()
- Returns:
- Model ID for the access request.
-
offerToken
public com.pulumi.core.Output<java.lang.String> offerToken()
- Returns:
- Offer token encapsulates information for an offer. The following arguments are optional:
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
timeouts
public com.pulumi.core.Output<java.util.Optional<ModelAgreementTimeouts>> timeouts()
-
get
public static ModelAgreement get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ModelAgreementState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-