generative-ai-cdk-constructs

@cdklabs/generative-ai-cdk-constructs


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

Class: S3ApiSchema

API Schema in an S3 object.

Extends

Constructors

new S3ApiSchema()

new S3ApiSchema(bucket, key): S3ApiSchema

Parameters

bucket

IBucket

key

string

Returns

S3ApiSchema

Overrides

ApiSchema.constructor

Methods

bind()

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

Returns

ApiSchemaConfig

Overrides

ApiSchema.bind


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

Inherited from

ApiSchema.fromAsset


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.

Inherited from

ApiSchema.fromBucket


fromInline()

static fromInline(schema): InlineApiSchema

Inline code for API Schema

Parameters

schema

string

The actual Open API schema

Returns

InlineApiSchema

InlineApiSchema with inline schema

Inherited from

ApiSchema.fromInline