Skip to content

Latest commit

 

History

History
108 lines (56 loc) · 1.86 KB

File metadata and controls

108 lines (56 loc) · 1.86 KB

@cdklabs/generative-ai-cdk-constructsDocs


@cdklabs/generative-ai-cdk-constructs / bedrock / ApiSchema

Class: abstract ApiSchema

Bedrock Agents Action Group API Schema definition.

Extended by

Constructors

new ApiSchema()

new ApiSchema(): ApiSchema

Returns

ApiSchema

Methods

bind()

abstract bind(scope): ApiSchemaConfig

Called when the action group is initialized to allow this object to bind to the stack, add resources and have fun.

Parameters

scope: Construct

The binding scope. Don't be smart about trying to down-cast or assume it's initialized. You may just use it as a construct scope.

Returns

ApiSchemaConfig


fromAsset()

static fromAsset(path): InlineApiSchema

Loads the API Schema from a local disk path.

Parameters

path: string

Path to the Open API schema file in yaml or JSON

Returns

InlineApiSchema

InlineApiSchema with the contents of path


fromBucket()

static fromBucket(bucket, key): S3ApiSchema

API Schema as an S3 object.

Parameters

bucket: IBucket

The S3 bucket

key: string

The object key

Returns

S3ApiSchema

S3ApiSchema with the S3 bucket and key.


fromInline()

static fromInline(schema): InlineApiSchema

Inline code for API Schema

Parameters

schema: string

The actual Open API schema

Returns

InlineApiSchema

InlineApiSchema with inline schema