Class: AWSCDK::BedrockAgentCore::S3APISchema
- Inherits:
-
APISchema
- Object
- APISchema
- AWSCDK::BedrockAgentCore::S3APISchema
- 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
-
#bind(scope) ⇒ void
Bind the schema to a construct.
-
#bucket_owner_account_id ⇒ String?
The account ID of the S3 bucket owner for cross-account access.
-
#grant_permissions_to_role(role) ⇒ void
Grant permissions to the role.
-
#initialize(location, bucket_owner_account_id = nil) ⇒ S3APISchema
constructor
A new instance of S3APISchema.
-
#inline_schema ⇒ String?
The inline OpenAPI schema definition as a string, if using an inline schema.
-
#s3_file ⇒ AWSCDK::S3::Location?
The S3 location of the API schema file, if using an S3-based schema.
Constructor Details
#initialize(location, bucket_owner_account_id = nil) ⇒ S3APISchema
Returns a new instance of S3APISchema.
10 11 12 13 14 15 |
# File 'bedrock_agent_core/s3_api_schema.rb', line 10 def initialize(location, bucket_owner_account_id = 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(bucket_owner_account_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketOwnerAccountId") unless bucket_owner_account_id.nil? Jsii::Object.instance_method(:initialize).bind(self).call(location, bucket_owner_account_id) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
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.
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_id ⇒ String?
The account ID of the S3 bucket owner for cross-account access.
30 31 32 |
# File 'bedrock_agent_core/s3_api_schema.rb', line 30 def bucket_owner_account_id() jsii_get_property("bucketOwnerAccountId") end |
#grant_permissions_to_role(role) ⇒ void
This method returns an undefined value.
Grant permissions to the role.
65 66 67 68 |
# File 'bedrock_agent_core/s3_api_schema.rb', line 65 def (role) Jsii::Type.check_type(role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") jsii_call_method("grantPermissionsToRole", [role]) end |
#inline_schema ⇒ String?
The inline OpenAPI schema definition as a string, if using an inline schema.
Can be in JSON or YAML format.
39 40 41 |
# File 'bedrock_agent_core/s3_api_schema.rb', line 39 def inline_schema() jsii_get_property("inlineSchema") end |
#s3_file ⇒ AWSCDK::S3::Location?
The S3 location of the API schema file, if using an S3-based schema.
Contains the bucket name and object key information.
48 49 50 |
# File 'bedrock_agent_core/s3_api_schema.rb', line 48 def s3_file() jsii_get_property("s3File") end |