Class: AWSCDK::BedrockAgentCore::GatewayAuthorizer
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::BedrockAgentCore::GatewayAuthorizer
- Defined in:
- bedrock_agent_core/gateway_authorizer.rb
Overview
Factory class for creating Gateway Authorizers.
Class Method Summary collapse
- .jsii_overridable_methods ⇒ Object
-
.using_aws_iam ⇒ AWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig
AWS IAM authorizer instance.
-
.using_cognito(props) ⇒ AWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig
Create a JWT authorizer from Cognito User Pool.
-
.using_custom_jwt(configuration) ⇒ AWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig
Create a custom JWT authorizer.
-
.with_no_auth ⇒ AWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig
No authorization — the gateway will not perform any inbound authorization.
Instance Method Summary collapse
-
#initialize ⇒ GatewayAuthorizer
constructor
A new instance of GatewayAuthorizer.
Constructor Details
#initialize ⇒ GatewayAuthorizer
Returns a new instance of GatewayAuthorizer.
8 9 10 |
# File 'bedrock_agent_core/gateway_authorizer.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.jsii_overridable_methods ⇒ Object
12 13 14 15 |
# File 'bedrock_agent_core/gateway_authorizer.rb', line 12 def self.jsii_overridable_methods { } end |
.using_aws_iam ⇒ AWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig
AWS IAM authorizer instance.
20 21 22 |
# File 'bedrock_agent_core/gateway_authorizer.rb', line 20 def self.using_aws_iam() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.GatewayAuthorizer", "usingAwsIam", []) end |
.using_cognito(props) ⇒ AWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig
Create a JWT authorizer from Cognito User Pool.
28 29 30 31 32 |
# File 'bedrock_agent_core/gateway_authorizer.rb', line 28 def self.using_cognito(props) props = props.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CognitoAuthorizerProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5Db2duaXRvQXV0aG9yaXplclByb3BzIn0=")), "props") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.GatewayAuthorizer", "usingCognito", [props]) end |
.using_custom_jwt(configuration) ⇒ AWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig
Create a custom JWT authorizer.
38 39 40 41 42 |
# File 'bedrock_agent_core/gateway_authorizer.rb', line 38 def self.using_custom_jwt(configuration) configuration = configuration.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CustomJwtConfiguration.new(**configuration.transform_keys(&:to_sym)) : configuration Jsii::Type.check_type(configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5DdXN0b21Kd3RDb25maWd1cmF0aW9uIn0=")), "configuration") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.GatewayAuthorizer", "usingCustomJwt", [configuration]) end |
.with_no_auth ⇒ AWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig
No authorization — the gateway will not perform any inbound authorization.
The gateway endpoint will be publicly accessible without credentials. Use this for testing/development, or for production gateways where you have implemented compensating controls such as Gateway Interceptors.
52 53 54 |
# File 'bedrock_agent_core/gateway_authorizer.rb', line 52 def self.with_no_auth() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.GatewayAuthorizer", "withNoAuth", []) end |