Class: AWSCDK::BedrockAgentCore::Gateway
- Inherits:
-
GatewayBase
- Object
- GatewayBase
- AWSCDK::BedrockAgentCore::Gateway
- Defined in:
- bedrock_agent_core/gateway.rb
Overview
Gateway resource for AWS Bedrock Agent Core.
Serves as an integration point between your agent and external services.
Class Method Summary collapse
-
.from_gateway_attributes(scope, id, attrs) ⇒ AWSCDK::BedrockAgentCore::IGateway
Import an existing Gateway using its attributes.
- .jsii_overridable_methods ⇒ Object
-
.PROPERTY_INJECTION_ID ⇒ String
Uniquely identifies this class.
Instance Method Summary collapse
-
#add_api_gateway_target(id, props) ⇒ AWSCDK::BedrockAgentCore::GatewayTarget
Add an API Gateway target to this gateway This is a convenience method that creates a GatewayTarget associated with this gateway.
-
#add_interceptor(interceptor) ⇒ void
Add an interceptor to this gateway.
-
#add_lambda_target(id, props) ⇒ AWSCDK::BedrockAgentCore::GatewayTarget
Add a Lambda target to this gateway This is a convenience method that creates a GatewayTarget associated with this gateway.
-
#add_mcp_server_target(id, props) ⇒ AWSCDK::BedrockAgentCore::GatewayTarget
Add an MCP server target to this gateway This is a convenience method that creates a GatewayTarget associated with this gateway.
-
#add_open_api_target(id, props) ⇒ AWSCDK::BedrockAgentCore::GatewayTarget
Add an OpenAPI target to this gateway This is a convenience method that creates a GatewayTarget associated with this gateway.
-
#add_smithy_target(id, props) ⇒ AWSCDK::BedrockAgentCore::GatewayTarget
Add a Smithy target to this gateway This is a convenience method that creates a GatewayTarget associated with this gateway.
-
#apply_cross_stack_reference_strength(strength) ⇒ void
Override the cross-stack reference strength for this resource.
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#authorizer_configuration ⇒ AWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig
The authorizer configuration for the gateway.
-
#created_at ⇒ String?
Timestamp when the gateway was created.
-
#description ⇒ String?
The description of the gateway.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#exception_level ⇒ AWSCDK::BedrockAgentCore::GatewayExceptionLevel?
The exception level for the gateway.
-
#gateway_arn ⇒ String
The ARN of the gateway.
-
#gateway_id ⇒ String
The unique identifier of the gateway.
-
#gateway_name ⇒ String
The name of the gateway.
-
#gateway_ref ⇒ AWSCDK::Interfaces::AWSBedrockagentcore::GatewayReference
A reference to a Gateway resource.
-
#gateway_url ⇒ String?
The URL endpoint for the gateway.
- #generate_physical_name ⇒ String
-
#get_resource_arn_attribute(arn_attr, arn_components) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g.
bucket.bucketArn). -
#get_resource_name_attribute(name_attr) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g.
bucket.bucketName). -
#grant(grantee, *actions) ⇒ AWSCDK::IAM::Grant
Grants IAM actions to the IAM Principal.
-
#grant_invoke(grantee) ⇒ AWSCDK::IAM::Grant
Grants permission to invoke this Gateway.
-
#grant_manage(grantee) ⇒ AWSCDK::IAM::Grant
Grants
Create,Update, andDeleteactions on the Gateway. -
#grant_read(grantee) ⇒ AWSCDK::IAM::Grant
Grants
GetandListactions on the Gateway. -
#initialize(scope, id, props = nil) ⇒ Gateway
constructor
A new instance of Gateway.
-
#kms_key ⇒ AWSCDK::KMS::IKey?
The KMS key used for encryption.
-
#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return the given named metric for this gateway.
-
#metric_duration(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric measuring the duration of requests for this gateway.
-
#metric_invocations(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the total number of invocations for this gateway.
-
#metric_latency(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric measuring the latency of requests for this gateway.
-
#metric_system_errors(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of system errors (5xx status code) for this gateway.
-
#metric_target_execution_time(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric measuring the target execution time for this gateway.
-
#metric_target_type(target_type, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of requests served by each target type for this gateway.
-
#metric_throttles(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of throttled requests (429 status code) for this gateway.
-
#metric_user_errors(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of user errors (4xx status code, excluding 429) for this gateway.
-
#node ⇒ Constructs::Node
The tree node.
-
#oauth_scopes ⇒ Array<String>?
The OAuth2 scope strings for client credentials flow.
-
#physical_name ⇒ String
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
-
#protocol_configuration ⇒ AWSCDK::BedrockAgentCore::IGatewayProtocolConfig
The protocol configuration for the gateway.
-
#resource_server ⇒ AWSCDK::Cognito::IUserPoolResourceServer?
The Cognito Resource Server created for the gateway (if using default Cognito authorizer).
- #resource_server=(value) ⇒ Object
-
#role ⇒ AWSCDK::IAM::IRole
The IAM role for the gateway.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#status ⇒ String?
The status of the gateway.
-
#status_reason ⇒ Array<String>?
The status reasons for the gateway.
-
#tags ⇒ Hash{String => String}?
Tags applied to the gateway.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#token_endpoint_url ⇒ String?
The OAuth2 token endpoint URL for client credentials flow.
-
#updated_at ⇒ String?
Timestamp when the gateway was last updated.
-
#user_pool ⇒ AWSCDK::Cognito::IUserPool?
The Cognito User Pool created for the gateway (if using default Cognito authorizer).
- #user_pool=(value) ⇒ Object
-
#user_pool_client ⇒ AWSCDK::Cognito::IUserPoolClient?
The Cognito User Pool Client created for the gateway (if using default Cognito authorizer).
- #user_pool_client=(value) ⇒ Object
-
#user_pool_domain ⇒ AWSCDK::Cognito::IUserPoolDomain?
The Cognito User Pool Domain created for the gateway (if using default Cognito authorizer).
- #user_pool_domain=(value) ⇒ Object
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props = nil) ⇒ Gateway
Returns a new instance of Gateway.
15 16 17 18 19 20 21 |
# File 'bedrock_agent_core/gateway.rb', line 15 def initialize(scope, id, props = nil) props = props.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::GatewayProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5HYXRld2F5UHJvcHMifQ==")), "props") unless props.nil? Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.from_gateway_attributes(scope, id, attrs) ⇒ AWSCDK::BedrockAgentCore::IGateway
Import an existing Gateway using its attributes.
86 87 88 89 90 91 92 |
# File 'bedrock_agent_core/gateway.rb', line 86 def self.from_gateway_attributes(scope, id, attrs) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") attrs = attrs.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::GatewayAttributes.new(**attrs.transform_keys(&:to_sym)) : attrs Jsii::Type.check_type(attrs, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5HYXRld2F5QXR0cmlidXRlcyJ9")), "attrs") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.Gateway", "fromGatewayAttributes", [scope, id, attrs]) end |
.jsii_overridable_methods ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'bedrock_agent_core/gateway.rb', line 23 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :physical_name => { kind: :property, name: "physicalName", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :authorizer_configuration => { kind: :property, name: "authorizerConfiguration", is_optional: false }, :gateway_arn => { kind: :property, name: "gatewayArn", is_optional: false }, :gateway_id => { kind: :property, name: "gatewayId", is_optional: false }, :gateway_name => { kind: :property, name: "gatewayName", is_optional: false }, :gateway_ref => { kind: :property, name: "gatewayRef", is_optional: false }, :protocol_configuration => { kind: :property, name: "protocolConfiguration", is_optional: false }, :role => { kind: :property, name: "role", is_optional: false }, :created_at => { kind: :property, name: "createdAt", is_optional: true }, :description => { kind: :property, name: "description", is_optional: true }, :exception_level => { kind: :property, name: "exceptionLevel", is_optional: true }, :gateway_url => { kind: :property, name: "gatewayUrl", is_optional: true }, :kms_key => { kind: :property, name: "kmsKey", is_optional: true }, :status => { kind: :property, name: "status", is_optional: true }, :status_reason => { kind: :property, name: "statusReason", is_optional: true }, :updated_at => { kind: :property, name: "updatedAt", is_optional: true }, :oauth_scopes => { kind: :property, name: "oauthScopes", is_optional: true }, :tags => { kind: :property, name: "tags", is_optional: true }, :token_endpoint_url => { kind: :property, name: "tokenEndpointUrl", is_optional: true }, :resource_server => { kind: :property, name: "resourceServer", is_optional: true }, :user_pool => { kind: :property, name: "userPool", is_optional: true }, :user_pool_client => { kind: :property, name: "userPoolClient", is_optional: true }, :user_pool_domain => { kind: :property, name: "userPoolDomain", is_optional: true }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :apply_cross_stack_reference_strength => { kind: :method, name: "applyCrossStackReferenceStrength", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, :generate_physical_name => { kind: :method, name: "generatePhysicalName", is_optional: false }, :get_resource_arn_attribute => { kind: :method, name: "getResourceArnAttribute", is_optional: false }, :get_resource_name_attribute => { kind: :method, name: "getResourceNameAttribute", is_optional: false }, :grant => { kind: :method, name: "grant", is_optional: false }, :grant_invoke => { kind: :method, name: "grantInvoke", is_optional: false }, :grant_manage => { kind: :method, name: "grantManage", is_optional: false }, :grant_read => { kind: :method, name: "grantRead", is_optional: false }, :metric => { kind: :method, name: "metric", is_optional: false }, :metric_duration => { kind: :method, name: "metricDuration", is_optional: false }, :metric_invocations => { kind: :method, name: "metricInvocations", is_optional: false }, :metric_latency => { kind: :method, name: "metricLatency", is_optional: false }, :metric_system_errors => { kind: :method, name: "metricSystemErrors", is_optional: false }, :metric_target_execution_time => { kind: :method, name: "metricTargetExecutionTime", is_optional: false }, :metric_target_type => { kind: :method, name: "metricTargetType", is_optional: false }, :metric_throttles => { kind: :method, name: "metricThrottles", is_optional: false }, :metric_user_errors => { kind: :method, name: "metricUserErrors", is_optional: false }, :add_api_gateway_target => { kind: :method, name: "addApiGatewayTarget", is_optional: false }, :add_interceptor => { kind: :method, name: "addInterceptor", is_optional: false }, :add_lambda_target => { kind: :method, name: "addLambdaTarget", is_optional: false }, :add_mcp_server_target => { kind: :method, name: "addMcpServerTarget", is_optional: false }, :add_open_api_target => { kind: :method, name: "addOpenApiTarget", is_optional: false }, :add_smithy_target => { kind: :method, name: "addSmithyTarget", is_optional: false }, } end |
.PROPERTY_INJECTION_ID ⇒ String
Uniquely identifies this class.
245 246 247 |
# File 'bedrock_agent_core/gateway.rb', line 245 def self.PROPERTY_INJECTION_ID() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_bedrockagentcore.Gateway", "PROPERTY_INJECTION_ID") end |
Instance Method Details
#add_api_gateway_target(id, props) ⇒ AWSCDK::BedrockAgentCore::GatewayTarget
Add an API Gateway target to this gateway This is a convenience method that creates a GatewayTarget associated with this gateway.
572 573 574 575 576 577 |
# File 'bedrock_agent_core/gateway.rb', line 572 def add_api_gateway_target(id, props) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") props = props.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::AddAPIGatewayTargetOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BZGRBcGlHYXRld2F5VGFyZ2V0T3B0aW9ucyJ9")), "props") jsii_call_method("addApiGatewayTarget", [id, props]) end |
#add_interceptor(interceptor) ⇒ void
This method returns an undefined value.
Add an interceptor to this gateway.
Interceptors allow you to run custom code at specific points in the gateway request/response flow:
- REQUEST interceptors execute before the gateway calls the target
- RESPONSE interceptors execute after the target responds
A gateway can have at most one REQUEST interceptor and one RESPONSE interceptor.
590 591 592 593 |
# File 'bedrock_agent_core/gateway.rb', line 590 def add_interceptor(interceptor) Jsii::Type.check_type(interceptor, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5JSW50ZXJjZXB0b3IifQ==")), "interceptor") jsii_call_method("addInterceptor", [interceptor]) end |
#add_lambda_target(id, props) ⇒ AWSCDK::BedrockAgentCore::GatewayTarget
Add a Lambda target to this gateway This is a convenience method that creates a GatewayTarget associated with this gateway.
600 601 602 603 604 605 |
# File 'bedrock_agent_core/gateway.rb', line 600 def add_lambda_target(id, props) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") props = props.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::AddLambdaTargetOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BZGRMYW1iZGFUYXJnZXRPcHRpb25zIn0=")), "props") jsii_call_method("addLambdaTarget", [id, props]) end |
#add_mcp_server_target(id, props) ⇒ AWSCDK::BedrockAgentCore::GatewayTarget
Add an MCP server target to this gateway This is a convenience method that creates a GatewayTarget associated with this gateway.
613 614 615 616 617 618 |
# File 'bedrock_agent_core/gateway.rb', line 613 def add_mcp_server_target(id, props) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") props = props.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::AddMcpServerTargetOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BZGRNY3BTZXJ2ZXJUYXJnZXRPcHRpb25zIn0=")), "props") jsii_call_method("addMcpServerTarget", [id, props]) end |
#add_open_api_target(id, props) ⇒ AWSCDK::BedrockAgentCore::GatewayTarget
Add an OpenAPI target to this gateway This is a convenience method that creates a GatewayTarget associated with this gateway.
625 626 627 628 629 630 |
# File 'bedrock_agent_core/gateway.rb', line 625 def add_open_api_target(id, props) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") props = props.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::AddOpenAPITargetOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BZGRPcGVuQXBpVGFyZ2V0T3B0aW9ucyJ9")), "props") jsii_call_method("addOpenApiTarget", [id, props]) end |
#add_smithy_target(id, props) ⇒ AWSCDK::BedrockAgentCore::GatewayTarget
Add a Smithy target to this gateway This is a convenience method that creates a GatewayTarget associated with this gateway.
637 638 639 640 641 642 |
# File 'bedrock_agent_core/gateway.rb', line 637 def add_smithy_target(id, props) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") props = props.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::AddSmithyTargetOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BZGRTbWl0aHlUYXJnZXRPcHRpb25zIn0=")), "props") jsii_call_method("addSmithyTarget", [id, props]) end |
#apply_cross_stack_reference_strength(strength) ⇒ void
This method returns an undefined value.
Override the cross-stack reference strength for this resource.
When set, any cross-stack reference to this resource will use the specified
mechanism instead of the global default determined by the
@aws-cdk/core:defaultCrossStackReferences context key. This is useful for
selectively weakening specific references to avoid the "deadly embrace" problem
without changing the app-wide default.
355 356 357 358 |
# File 'bedrock_agent_core/gateway.rb', line 355 def apply_cross_stack_reference_strength(strength) Jsii::Type.check_type(strength, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZWZlcmVuY2VTdHJlbmd0aCJ9")), "strength") jsii_call_method("applyCrossStackReferenceStrength", [strength]) end |
#apply_removal_policy(policy) ⇒ void
This method returns an undefined value.
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
372 373 374 375 |
# File 'bedrock_agent_core/gateway.rb', line 372 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#authorizer_configuration ⇒ AWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig
The authorizer configuration for the gateway.
140 141 142 |
# File 'bedrock_agent_core/gateway.rb', line 140 def () jsii_get_property("authorizerConfiguration") end |
#created_at ⇒ String?
Timestamp when the gateway was created.
189 190 191 |
# File 'bedrock_agent_core/gateway.rb', line 189 def created_at() jsii_get_property("createdAt") end |
#description ⇒ String?
The description of the gateway.
196 197 198 |
# File 'bedrock_agent_core/gateway.rb', line 196 def description() jsii_get_property("description") end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
112 113 114 |
# File 'bedrock_agent_core/gateway.rb', line 112 def env() jsii_get_property("env") end |
#exception_level ⇒ AWSCDK::BedrockAgentCore::GatewayExceptionLevel?
The exception level for the gateway.
203 204 205 |
# File 'bedrock_agent_core/gateway.rb', line 203 def exception_level() jsii_get_property("exceptionLevel") end |
#gateway_arn ⇒ String
The ARN of the gateway.
147 148 149 |
# File 'bedrock_agent_core/gateway.rb', line 147 def gateway_arn() jsii_get_property("gatewayArn") end |
#gateway_id ⇒ String
The unique identifier of the gateway.
154 155 156 |
# File 'bedrock_agent_core/gateway.rb', line 154 def gateway_id() jsii_get_property("gatewayId") end |
#gateway_name ⇒ String
The name of the gateway.
161 162 163 |
# File 'bedrock_agent_core/gateway.rb', line 161 def gateway_name() jsii_get_property("gatewayName") end |
#gateway_ref ⇒ AWSCDK::Interfaces::AWSBedrockagentcore::GatewayReference
A reference to a Gateway resource.
168 169 170 |
# File 'bedrock_agent_core/gateway.rb', line 168 def gateway_ref() jsii_get_property("gatewayRef") end |
#gateway_url ⇒ String?
The URL endpoint for the gateway.
210 211 212 |
# File 'bedrock_agent_core/gateway.rb', line 210 def gateway_url() jsii_get_property("gatewayUrl") end |
#generate_physical_name ⇒ String
378 379 380 |
# File 'bedrock_agent_core/gateway.rb', line 378 def generate_physical_name() jsii_call_method("generatePhysicalName", []) end |
#get_resource_arn_attribute(arn_attr, arn_components) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. bucket.bucketArn).
Normally, this token will resolve to arn_attr, but if the resource is
referenced across environments, arn_components will be used to synthesize
a concrete ARN with the resource's physical name. Make sure to reference
this.physicalName in arn_components.
392 393 394 395 396 397 |
# File 'bedrock_agent_core/gateway.rb', line 392 def get_resource_arn_attribute(arn_attr, arn_components) Jsii::Type.check_type(arn_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arnAttr") arn_components = arn_components.is_a?(Hash) ? ::AWSCDK::ARNComponents.new(**arn_components.transform_keys(&:to_sym)) : arn_components Jsii::Type.check_type(arn_components, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Bcm5Db21wb25lbnRzIn0=")), "arnComponents") jsii_call_method("getResourceArnAttribute", [arn_attr, arn_components]) end |
#get_resource_name_attribute(name_attr) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. bucket.bucketName).
Normally, this token will resolve to name_attr, but if the resource is
referenced across environments, it will be resolved to this.physicalName,
which will be a concrete name.
407 408 409 410 |
# File 'bedrock_agent_core/gateway.rb', line 407 def get_resource_name_attribute(name_attr) Jsii::Type.check_type(name_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nameAttr") jsii_call_method("getResourceNameAttribute", [name_attr]) end |
#grant(grantee, *actions) ⇒ AWSCDK::IAM::Grant
Grants IAM actions to the IAM Principal.
[disable-awslint:no-grants]
419 420 421 422 423 424 425 |
# File 'bedrock_agent_core/gateway.rb', line 419 def grant(grantee, *actions) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") actions.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actions[#{index}]") end jsii_call_method("grant", [grantee, *actions]) end |
#grant_invoke(grantee) ⇒ AWSCDK::IAM::Grant
Grants permission to invoke this Gateway.
[disable-awslint:no-grants]
433 434 435 436 |
# File 'bedrock_agent_core/gateway.rb', line 433 def grant_invoke(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantInvoke", [grantee]) end |
#grant_manage(grantee) ⇒ AWSCDK::IAM::Grant
Grants Create, Update, and Delete actions on the Gateway.
[disable-awslint:no-grants]
444 445 446 447 |
# File 'bedrock_agent_core/gateway.rb', line 444 def grant_manage(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantManage", [grantee]) end |
#grant_read(grantee) ⇒ AWSCDK::IAM::Grant
Grants Get and List actions on the Gateway.
[disable-awslint:no-grants]
455 456 457 458 |
# File 'bedrock_agent_core/gateway.rb', line 455 def grant_read(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantRead", [grantee]) end |
#kms_key ⇒ AWSCDK::KMS::IKey?
The KMS key used for encryption.
217 218 219 |
# File 'bedrock_agent_core/gateway.rb', line 217 def kms_key() jsii_get_property("kmsKey") end |
#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return the given named metric for this gateway.
By default, the metric will be calculated as a sum over a period of 5 minutes.
You can customize this by using the statistic and period properties.
468 469 470 471 472 473 |
# File 'bedrock_agent_core/gateway.rb', line 468 def metric(metric_name, props = nil) Jsii::Type.check_type(metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metric", [metric_name, props]) end |
#metric_duration(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric measuring the duration of requests for this gateway.
The duration metric represents the total time elapsed between receiving the request and sending the final response token, representing complete end-to-end processing time.
482 483 484 485 486 |
# File 'bedrock_agent_core/gateway.rb', line 482 def metric_duration(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricDuration", [props]) end |
#metric_invocations(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the total number of invocations for this gateway.
492 493 494 495 496 |
# File 'bedrock_agent_core/gateway.rb', line 492 def metric_invocations(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricInvocations", [props]) end |
#metric_latency(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric measuring the latency of requests for this gateway.
The latency metric represents the time elapsed between when the service receives the request and when it begins sending the first response token.
505 506 507 508 509 |
# File 'bedrock_agent_core/gateway.rb', line 505 def metric_latency(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricLatency", [props]) end |
#metric_system_errors(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of system errors (5xx status code) for this gateway.
515 516 517 518 519 |
# File 'bedrock_agent_core/gateway.rb', line 515 def metric_system_errors(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricSystemErrors", [props]) end |
#metric_target_execution_time(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric measuring the target execution time for this gateway.
This metric helps determine the contribution of the target (Lambda, OpenAPI, etc.) to the total latency.
528 529 530 531 532 |
# File 'bedrock_agent_core/gateway.rb', line 528 def metric_target_execution_time(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricTargetExecutionTime", [props]) end |
#metric_target_type(target_type, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of requests served by each target type for this gateway.
539 540 541 542 543 544 |
# File 'bedrock_agent_core/gateway.rb', line 539 def metric_target_type(target_type, props = nil) Jsii::Type.check_type(target_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetType") props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricTargetType", [target_type, props]) end |
#metric_throttles(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of throttled requests (429 status code) for this gateway.
550 551 552 553 554 |
# File 'bedrock_agent_core/gateway.rb', line 550 def metric_throttles(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricThrottles", [props]) end |
#metric_user_errors(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of user errors (4xx status code, excluding 429) for this gateway.
560 561 562 563 564 |
# File 'bedrock_agent_core/gateway.rb', line 560 def metric_user_errors(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricUserErrors", [props]) end |
#node ⇒ Constructs::Node
The tree node.
97 98 99 |
# File 'bedrock_agent_core/gateway.rb', line 97 def node() jsii_get_property("node") end |
#oauth_scopes ⇒ Array<String>?
The OAuth2 scope strings for client credentials flow.
Only available when using the default Cognito authorizer.
254 255 256 |
# File 'bedrock_agent_core/gateway.rb', line 254 def oauth_scopes() jsii_get_property("oauthScopes") end |
#physical_name ⇒ String
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
This value will resolve to one of the following:
- a concrete value (e.g.
"my-awesome-bucket") undefined, when a name should be generated by CloudFormation- a concrete name generated automatically during synthesis, in cross-environment scenarios.
126 127 128 |
# File 'bedrock_agent_core/gateway.rb', line 126 def physical_name() jsii_get_property("physicalName") end |
#protocol_configuration ⇒ AWSCDK::BedrockAgentCore::IGatewayProtocolConfig
The protocol configuration for the gateway.
175 176 177 |
# File 'bedrock_agent_core/gateway.rb', line 175 def protocol_configuration() jsii_get_property("protocolConfiguration") end |
#resource_server ⇒ AWSCDK::Cognito::IUserPoolResourceServer?
The Cognito Resource Server created for the gateway (if using default Cognito authorizer).
277 278 279 |
# File 'bedrock_agent_core/gateway.rb', line 277 def resource_server() jsii_get_property("resourceServer") end |
#resource_server=(value) ⇒ Object
281 282 283 284 |
# File 'bedrock_agent_core/gateway.rb', line 281 def resource_server=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5JVXNlclBvb2xSZXNvdXJjZVNlcnZlciJ9")), "resourceServer") unless value.nil? jsii_set_property("resourceServer", value) end |
#role ⇒ AWSCDK::IAM::IRole
The IAM role for the gateway.
182 183 184 |
# File 'bedrock_agent_core/gateway.rb', line 182 def role() jsii_get_property("role") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
133 134 135 |
# File 'bedrock_agent_core/gateway.rb', line 133 def stack() jsii_get_property("stack") end |
#status ⇒ String?
The status of the gateway.
224 225 226 |
# File 'bedrock_agent_core/gateway.rb', line 224 def status() jsii_get_property("status") end |
#status_reason ⇒ Array<String>?
The status reasons for the gateway.
231 232 233 |
# File 'bedrock_agent_core/gateway.rb', line 231 def status_reason() jsii_get_property("statusReason") end |
#tags ⇒ Hash{String => String}?
Tags applied to the gateway.
261 262 263 |
# File 'bedrock_agent_core/gateway.rb', line 261 def () jsii_get_property("tags") end |
#to_string ⇒ String
Returns a string representation of this construct.
325 326 327 |
# File 'bedrock_agent_core/gateway.rb', line 325 def to_string() jsii_call_method("toString", []) end |
#token_endpoint_url ⇒ String?
The OAuth2 token endpoint URL for client credentials flow.
Only available when using the default Cognito authorizer.
270 271 272 |
# File 'bedrock_agent_core/gateway.rb', line 270 def token_endpoint_url() jsii_get_property("tokenEndpointUrl") end |
#updated_at ⇒ String?
Timestamp when the gateway was last updated.
238 239 240 |
# File 'bedrock_agent_core/gateway.rb', line 238 def updated_at() jsii_get_property("updatedAt") end |
#user_pool ⇒ AWSCDK::Cognito::IUserPool?
The Cognito User Pool created for the gateway (if using default Cognito authorizer).
289 290 291 |
# File 'bedrock_agent_core/gateway.rb', line 289 def user_pool() jsii_get_property("userPool") end |
#user_pool=(value) ⇒ Object
293 294 295 296 |
# File 'bedrock_agent_core/gateway.rb', line 293 def user_pool=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5JVXNlclBvb2wifQ==")), "userPool") unless value.nil? jsii_set_property("userPool", value) end |
#user_pool_client ⇒ AWSCDK::Cognito::IUserPoolClient?
The Cognito User Pool Client created for the gateway (if using default Cognito authorizer).
301 302 303 |
# File 'bedrock_agent_core/gateway.rb', line 301 def user_pool_client() jsii_get_property("userPoolClient") end |
#user_pool_client=(value) ⇒ Object
305 306 307 308 |
# File 'bedrock_agent_core/gateway.rb', line 305 def user_pool_client=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5JVXNlclBvb2xDbGllbnQifQ==")), "userPoolClient") unless value.nil? jsii_set_property("userPoolClient", value) end |
#user_pool_domain ⇒ AWSCDK::Cognito::IUserPoolDomain?
The Cognito User Pool Domain created for the gateway (if using default Cognito authorizer).
313 314 315 |
# File 'bedrock_agent_core/gateway.rb', line 313 def user_pool_domain() jsii_get_property("userPoolDomain") end |
#user_pool_domain=(value) ⇒ Object
317 318 319 320 |
# File 'bedrock_agent_core/gateway.rb', line 317 def user_pool_domain=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5JVXNlclBvb2xEb21haW4ifQ==")), "userPoolDomain") unless value.nil? jsii_set_property("userPoolDomain", value) end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
338 339 340 341 342 343 |
# File 'bedrock_agent_core/gateway.rb', line 338 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |