Class FoundationModel
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrock.FoundationModel
- All Implemented Interfaces:
IModel
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2025-01-10T21:56:47.631Z")
@Stability(Stable)
public class FoundationModel
extends software.amazon.jsii.JsiiObject
implements IModel
A Bedrock base foundation model.
Example:
import software.amazon.awscdk.services.bedrock.*; FoundationModel model = FoundationModel.fromFoundationModelId(this, "Model", FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1); BedrockInvokeModel task = BedrockInvokeModel.Builder.create(this, "Prompt Model") .model(model) .input(BedrockInvokeModelInputProps.builder().s3InputUri(JsonPath.stringAt("$.prompt")).build()) .output(BedrockInvokeModelOutputProps.builder().s3OutputUri(JsonPath.stringAt("$.prompt")).build()) .build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.bedrock.IModel
IModel.Jsii$Default, IModel.Jsii$Proxy
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FoundationModel
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
FoundationModel
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic FoundationModel
fromFoundationModelId
(software.constructs.Construct scope, String _id, FoundationModelIdentifier foundationModelId) Construct a Bedrock base foundation model given the model identifier.The foundation model ARN.The foundation model ID.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
FoundationModel
protected FoundationModel(software.amazon.jsii.JsiiObjectRef objRef) -
FoundationModel
protected FoundationModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
fromFoundationModelId
@Stability(Stable) @NotNull public static FoundationModel fromFoundationModelId(@NotNull software.constructs.Construct scope, @NotNull String _id, @NotNull FoundationModelIdentifier foundationModelId) Construct a Bedrock base foundation model given the model identifier.- Parameters:
scope
- The parent construct. This parameter is required._id
- The name of the model construct. This parameter is required.foundationModelId
- The model identifier such as 'amazon.titan-text-express-v1'. This parameter is required.- Returns:
- A Bedrock base foundation model.
- See Also:
-
getModelArn
The foundation model ARN.- Specified by:
getModelArn
in interfaceIModel
- See Also:
-
getModelId
The foundation model ID.Example:
"amazon.titan-text-express-v1";
-