Class: AWSCDK::BedrockAgentCore::S3APISchema

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

Overview

Class to define an API Schema from an S3 object.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location, bucket_owner_account_id = nil) ⇒ S3APISchema

Returns a new instance of S3APISchema.

Parameters:

  • location (AWSCDK::S3::Location)
  • bucket_owner_account_id (String, nil) (defaults to: nil)

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



10
11
12
13
14
15
# File 'bedrock_agent_core/s3_api_schema.rb', line 10

def initialize(location,  = nil)
  location = location.is_a?(Hash) ? ::AWSCDK::S3::Location.new(**location.transform_keys(&:to_sym)) : location
  Jsii::Type.check_type(location, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuTG9jYXRpb24ifQ==")), "location")
  Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketOwnerAccountId") unless .nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(location, )
end

Class Method Details

.jsii_overridable_methodsObject



17
18
19
20
21
22
23
24
25
# File 'bedrock_agent_core/s3_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/s3_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/s3_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/s3_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/s3_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/s3_api_schema.rb', line 48

def s3_file()
  jsii_get_property("s3File")
end