Class: AWSCDK::BedrockAgentCore::InlineAPISchema

Inherits:
APISchema
  • Object
show all
Defined in:
bedrock_agent_core/inline_api_schema.rb

Overview

Class to define an API Schema from an inline string.

The schema can be provided directly as a string. Validation is performed at the target configuration level where the schema type is known.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(schema) ⇒ InlineAPISchema

Returns a new instance of InlineAPISchema.

Parameters:

  • schema (String)


12
13
14
15
# File 'bedrock_agent_core/inline_api_schema.rb', line 12

def initialize(schema)
  Jsii::Type.check_type(schema, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "schema")
  Jsii::Object.instance_method(:initialize).bind(self).call(schema)
end

Class Method Details

.jsii_overridable_methodsObject



17
18
19
20
21
22
23
24
25
# File 'bedrock_agent_core/inline_api_schema.rb', line 17

def self.jsii_overridable_methods
  {
    :bucket_owner_account_id => { kind: :property, name: "bucketOwnerAccountId", is_optional: true },
    :inline_schema => { kind: :property, name: "inlineSchema", is_optional: true },
    :s3_file => { kind: :property, name: "s3File", is_optional: true },
    :bind => { kind: :method, name: "bind", is_optional: false },
    :grant_permissions_to_role => { kind: :method, name: "grantPermissionsToRole", is_optional: false },
  }
end

Instance Method Details

#bind(scope) ⇒ void

This method returns an undefined value.

Bind the schema to a construct.

Parameters:

  • scope (Constructs::Construct)


56
57
58
59
# File 'bedrock_agent_core/inline_api_schema.rb', line 56

def bind(scope)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  jsii_call_method("bind", [scope])
end

#bucket_owner_account_idString?

The account ID of the S3 bucket owner for cross-account access.

Returns:

  • (String, nil)


30
31
32
# File 'bedrock_agent_core/inline_api_schema.rb', line 30

def ()
  jsii_get_property("bucketOwnerAccountId")
end

#grant_permissions_to_role(_role) ⇒ void

This method returns an undefined value.

Grant permissions to the role.

Parameters:



65
66
67
68
# File 'bedrock_agent_core/inline_api_schema.rb', line 65

def grant_permissions_to_role(_role)
  Jsii::Type.check_type(_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "_role")
  jsii_call_method("grantPermissionsToRole", [_role])
end

#inline_schemaString?

The inline OpenAPI schema definition as a string, if using an inline schema.

Can be in JSON or YAML format.

Returns:

  • (String, nil)


39
40
41
# File 'bedrock_agent_core/inline_api_schema.rb', line 39

def inline_schema()
  jsii_get_property("inlineSchema")
end

#s3_fileAWSCDK::S3::Location?

The S3 location of the API schema file, if using an S3-based schema.

Contains the bucket name and object key information.

Returns:



48
49
50
# File 'bedrock_agent_core/inline_api_schema.rb', line 48

def s3_file()
  jsii_get_property("s3File")
end