Class: AWSCDK::BedrockAgentCore::GatewayTargetOpenAPIProps
- Inherits:
-
GatewayTargetCommonProps
- Object
- GatewayTargetCommonProps
- AWSCDK::BedrockAgentCore::GatewayTargetOpenAPIProps
- Defined in:
- bedrock_agent_core/gateway_target_open_api_props.rb
Overview
Properties for creating an OpenAPI-based Gateway Target.
Instance Attribute Summary collapse
-
#api_schema ⇒ AWSCDK::BedrockAgentCore::APISchema
readonly
The OpenAPI schema defining the API.
-
#credential_provider_configurations ⇒ Array<AWSCDK::BedrockAgentCore::ICredentialProviderConfig>?
readonly
Credential providers for authentication OpenAPI targets support API key and OAuth authentication (not IAM).
-
#description ⇒ String?
readonly
Optional description for the gateway target The description can have up to 200 characters.
-
#gateway ⇒ AWSCDK::BedrockAgentCore::IGateway
readonly
The gateway this target belongs to.
-
#gateway_target_name ⇒ String?
readonly
The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?)1,100$.
-
#validate_open_api_schema ⇒ Boolean?
readonly
Whether to validate the OpenAPI schema (only applies to inline schemas) Note: Validation is only performed for inline schemas during CDK synthesis.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(description: nil, gateway_target_name: nil, api_schema:, gateway:, credential_provider_configurations: nil, validate_open_api_schema: nil) ⇒ GatewayTargetOpenAPIProps
constructor
A new instance of GatewayTargetOpenAPIProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(description: nil, gateway_target_name: nil, api_schema:, gateway:, credential_provider_configurations: nil, validate_open_api_schema: nil) ⇒ GatewayTargetOpenAPIProps
Returns a new instance of GatewayTargetOpenAPIProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'bedrock_agent_core/gateway_target_open_api_props.rb', line 13 def initialize(description: nil, gateway_target_name: nil, api_schema:, gateway:, credential_provider_configurations: nil, validate_open_api_schema: nil) @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @gateway_target_name = gateway_target_name Jsii::Type.check_type(@gateway_target_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "gatewayTargetName") unless @gateway_target_name.nil? @api_schema = api_schema Jsii::Type.check_type(@api_schema, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BcGlTY2hlbWEifQ==")), "apiSchema") @gateway = gateway Jsii::Type.check_type(@gateway, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5JR2F0ZXdheSJ9")), "gateway") @credential_provider_configurations = credential_provider_configurations Jsii::Type.check_type(@credential_provider_configurations, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLklDcmVkZW50aWFsUHJvdmlkZXJDb25maWcifSwia2luZCI6ImFycmF5In19")), "credentialProviderConfigurations") unless @credential_provider_configurations.nil? @validate_open_api_schema = validate_open_api_schema Jsii::Type.check_type(@validate_open_api_schema, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "validateOpenApiSchema") unless @validate_open_api_schema.nil? end |
Instance Attribute Details
#api_schema ⇒ AWSCDK::BedrockAgentCore::APISchema (readonly)
The OpenAPI schema defining the API.
41 42 43 |
# File 'bedrock_agent_core/gateway_target_open_api_props.rb', line 41 def api_schema @api_schema end |
#credential_provider_configurations ⇒ Array<AWSCDK::BedrockAgentCore::ICredentialProviderConfig>? (readonly)
Default: - If not provided, defaults to IAM role which will fail at runtime
Credential providers for authentication OpenAPI targets support API key and OAuth authentication (not IAM).
50 51 52 |
# File 'bedrock_agent_core/gateway_target_open_api_props.rb', line 50 def credential_provider_configurations @credential_provider_configurations end |
#description ⇒ String? (readonly)
Default: - No description
Optional description for the gateway target The description can have up to 200 characters.
32 33 34 |
# File 'bedrock_agent_core/gateway_target_open_api_props.rb', line 32 def description @description end |
#gateway ⇒ AWSCDK::BedrockAgentCore::IGateway (readonly)
The gateway this target belongs to.
45 46 47 |
# File 'bedrock_agent_core/gateway_target_open_api_props.rb', line 45 def gateway @gateway end |
#gateway_target_name ⇒ String? (readonly)
Default: - auto generate
The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?)1,100$.
37 38 39 |
# File 'bedrock_agent_core/gateway_target_open_api_props.rb', line 37 def gateway_target_name @gateway_target_name end |
#validate_open_api_schema ⇒ Boolean? (readonly)
Default: true
Whether to validate the OpenAPI schema (only applies to inline schemas) Note: Validation is only performed for inline schemas during CDK synthesis.
S3 and asset-based schemas cannot be validated at synthesis time.
57 58 59 |
# File 'bedrock_agent_core/gateway_target_open_api_props.rb', line 57 def validate_open_api_schema @validate_open_api_schema end |
Class Method Details
.jsii_properties ⇒ Object
59 60 61 62 63 64 65 66 67 68 |
# File 'bedrock_agent_core/gateway_target_open_api_props.rb', line 59 def self.jsii_properties { :description => "description", :gateway_target_name => "gatewayTargetName", :api_schema => "apiSchema", :gateway => "gateway", :credential_provider_configurations => "credentialProviderConfigurations", :validate_open_api_schema => "validateOpenApiSchema", } end |
Instance Method Details
#to_jsii ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'bedrock_agent_core/gateway_target_open_api_props.rb', line 70 def to_jsii result = {} result.merge!(super) result.merge!({ "description" => @description, "gatewayTargetName" => @gateway_target_name, "apiSchema" => @api_schema, "gateway" => @gateway, "credentialProviderConfigurations" => @credential_provider_configurations, "validateOpenApiSchema" => @validate_open_api_schema, }) result.compact end |