Class S3ApiSchema
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrock.alpha.ApiSchema
software.amazon.awscdk.services.bedrock.alpha.S3ApiSchema
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:49.533Z")
@Stability(Experimental)
public class S3ApiSchema
extends ApiSchema
(experimental) Class to define an API Schema from an S3 object.
Example:
IBucket bucket = Bucket.fromBucketName(this, "ExistingBucket", "my-schema-bucket");
S3ApiSchema s3Schema = ApiSchema.fromS3File(bucket, "schemas/action-group.yaml");
Function actionGroupFunction = Function.Builder.create(this, "ActionGroupFunction")
.runtime(Runtime.PYTHON_3_12)
.handler("index.handler")
.code(Code.fromAsset(join(__dirname, "../lambda/action-group")))
.build();
AgentActionGroup actionGroup = AgentActionGroup.Builder.create()
.name("query-library")
.description("Use these functions to get information about the books in the library.")
.executor(ActionGroupExecutor.fromLambda(actionGroupFunction))
.enabled(true)
.apiSchema(s3Schema)
.build();
Agent agent = Agent.Builder.create(this, "Agent")
.foundationModel(BedrockFoundationModel.ANTHROPIC_CLAUDE_HAIKU_V1_0)
.instruction("You are a helpful and friendly agent that answers questions about literature.")
.build();
agent.addActionGroup(actionGroup);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionS3ApiSchema(Location location) protectedS3ApiSchema(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedS3ApiSchema(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Methods inherited from class software.amazon.awscdk.services.bedrock.alpha.ApiSchema
fromInline, fromLocalAsset, fromS3File, getInlineSchema, getS3FileMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
S3ApiSchema
protected S3ApiSchema(software.amazon.jsii.JsiiObjectRef objRef) -
S3ApiSchema
protected S3ApiSchema(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
S3ApiSchema
- Parameters:
location- This parameter is required.
-