Module: AWSCDK::BedrockAgentCore::IGateway

Includes:
IResource, Interfaces::AWSBedrockagentcore::IGatewayRef
Included in:
GatewayBase
Defined in:
bedrock_agent_core/i_gateway.rb

Overview

Interface for Gateway resources.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
# File 'bedrock_agent_core/i_gateway.rb', line 333

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :gateway_ref => { kind: :property, name: "gatewayRef", 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 },
    :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 },
    :with => { kind: :method, name: "with", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", 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 },
  }
end

Instance Method Details

#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).

Parameters:



169
170
171
172
# File 'bedrock_agent_core/i_gateway.rb', line 169

def apply_removal_policy(policy)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy")
  jsii_call_method("applyRemovalPolicy", [policy])
end

#authorizer_configurationAWSCDK::BedrockAgentCore::IGatewayAuthorizerConfig

The authorizer configuration for the gateway.



48
49
50
# File 'bedrock_agent_core/i_gateway.rb', line 48

def authorizer_configuration()
  jsii_get_property("authorizerConfiguration")
end

#created_atString?

Timestamp when the gateway was created.

Returns:

  • (String, nil)


90
91
92
# File 'bedrock_agent_core/i_gateway.rb', line 90

def created_at()
  jsii_get_property("createdAt")
end

#descriptionString?

The description of the gateway.

Returns:

  • (String, nil)


97
98
99
# File 'bedrock_agent_core/i_gateway.rb', line 97

def description()
  jsii_get_property("description")
end

#envAWSCDK::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.



27
28
29
# File 'bedrock_agent_core/i_gateway.rb', line 27

def env()
  jsii_get_property("env")
end

#exception_levelAWSCDK::BedrockAgentCore::GatewayExceptionLevel?

The exception level for the gateway.



104
105
106
# File 'bedrock_agent_core/i_gateway.rb', line 104

def exception_level()
  jsii_get_property("exceptionLevel")
end

#gateway_arnString

The ARN of the gateway resource.

Returns:

  • (String)


55
56
57
# File 'bedrock_agent_core/i_gateway.rb', line 55

def gateway_arn()
  jsii_get_property("gatewayArn")
end

#gateway_idString

The id of the gateway.

Returns:

  • (String)


62
63
64
# File 'bedrock_agent_core/i_gateway.rb', line 62

def gateway_id()
  jsii_get_property("gatewayId")
end

#gateway_nameString

The name of the gateway.

Returns:

  • (String)


69
70
71
# File 'bedrock_agent_core/i_gateway.rb', line 69

def gateway_name()
  jsii_get_property("gatewayName")
end

#gateway_refAWSCDK::Interfaces::AWSBedrockagentcore::GatewayReference

A reference to a Gateway resource.



41
42
43
# File 'bedrock_agent_core/i_gateway.rb', line 41

def gateway_ref()
  jsii_get_property("gatewayRef")
end

#gateway_urlString?

The URL endpoint for the gateway.

Returns:

  • (String, nil)


111
112
113
# File 'bedrock_agent_core/i_gateway.rb', line 111

def gateway_url()
  jsii_get_property("gatewayUrl")
end

#grant(grantee, *actions) ⇒ AWSCDK::IAM::Grant

Grants IAM actions to the IAM Principal.

Parameters:

Returns:



179
180
181
182
183
184
185
# File 'bedrock_agent_core/i_gateway.rb', line 179

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.

Parameters:

Returns:



191
192
193
194
# File 'bedrock_agent_core/i_gateway.rb', line 191

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.

Parameters:

Returns:



200
201
202
203
# File 'bedrock_agent_core/i_gateway.rb', line 200

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.

Parameters:

Returns:



209
210
211
212
# File 'bedrock_agent_core/i_gateway.rb', line 209

def grant_read(grantee)
  Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee")
  jsii_call_method("grantRead", [grantee])
end

#kms_keyAWSCDK::KMS::IKey?

The KMS key used for encryption.

Returns:



118
119
120
# File 'bedrock_agent_core/i_gateway.rb', line 118

def kms_key()
  jsii_get_property("kmsKey")
end

#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric

Return the given named metric for this gateway.

Parameters:

Returns:



219
220
221
222
223
224
# File 'bedrock_agent_core/i_gateway.rb', line 219

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

Note:

Default: - Average statistic over 5 minutes

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.

Parameters:

Returns:



234
235
236
237
238
# File 'bedrock_agent_core/i_gateway.rb', line 234

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

Note:

Default: - Sum statistic over 5 minutes

Return a metric containing the total number of invocations for this gateway.

This metric tracks all successful invocations of the gateway.

Parameters:

Returns:



247
248
249
250
251
# File 'bedrock_agent_core/i_gateway.rb', line 247

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

Note:

Default: - Average statistic over 5 minutes

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.

Parameters:

Returns:



261
262
263
264
265
# File 'bedrock_agent_core/i_gateway.rb', line 261

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

Note:

Default: - Sum statistic over 5 minutes

Return a metric containing the number of system errors (5xx status code) for this gateway.

This metric tracks internal server errors and system failures.

Parameters:

Returns:



274
275
276
277
278
# File 'bedrock_agent_core/i_gateway.rb', line 274

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

Note:

Default: - Average statistic over 5 minutes

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.

Parameters:

Returns:



288
289
290
291
292
# File 'bedrock_agent_core/i_gateway.rb', line 288

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

Note:

Default: - Sum statistic over 5 minutes

Return a metric containing the number of requests served by each target type for this gateway.

Parameters:

  • target_type (String)

    The type of target (e.g., 'Lambda', 'OpenAPI', 'Smithy').

  • props (AWSCDK::CloudWatch::MetricOptions, nil) (defaults to: nil)

    Optional metric configuration.

Returns:



300
301
302
303
304
305
# File 'bedrock_agent_core/i_gateway.rb', line 300

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

Note:

Default: - Sum statistic over 5 minutes

Return a metric containing the number of throttled requests (429 status code) for this gateway.

This metric helps identify when the gateway is rate limiting requests.

Parameters:

Returns:



314
315
316
317
318
# File 'bedrock_agent_core/i_gateway.rb', line 314

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

Note:

Default: - Sum statistic over 5 minutes

Return a metric containing the number of user errors (4xx status code, excluding 429) for this gateway.

This metric tracks client errors like bad requests, unauthorized access, etc.

Parameters:

Returns:



327
328
329
330
331
# File 'bedrock_agent_core/i_gateway.rb', line 327

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

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


12
13
14
# File 'bedrock_agent_core/i_gateway.rb', line 12

def node()
  jsii_get_property("node")
end

#protocol_configurationAWSCDK::BedrockAgentCore::IGatewayProtocolConfig

The protocol configuration for the gateway.



76
77
78
# File 'bedrock_agent_core/i_gateway.rb', line 76

def protocol_configuration()
  jsii_get_property("protocolConfiguration")
end

#roleAWSCDK::IAM::IRole

The IAM role that provides permissions for the gateway to access AWS services.

Returns:



83
84
85
# File 'bedrock_agent_core/i_gateway.rb', line 83

def role()
  jsii_get_property("role")
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



34
35
36
# File 'bedrock_agent_core/i_gateway.rb', line 34

def stack()
  jsii_get_property("stack")
end

#statusString?

The status of the gateway.

Returns:

  • (String, nil)


125
126
127
# File 'bedrock_agent_core/i_gateway.rb', line 125

def status()
  jsii_get_property("status")
end

#status_reasonArray<String>?

The status reasons for the gateway.

Returns:

  • (Array<String>, nil)


132
133
134
# File 'bedrock_agent_core/i_gateway.rb', line 132

def status_reason()
  jsii_get_property("statusReason")
end

#updated_atString?

Timestamp when the gateway was last updated.

Returns:

  • (String, nil)


139
140
141
# File 'bedrock_agent_core/i_gateway.rb', line 139

def updated_at()
  jsii_get_property("updatedAt")
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.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



150
151
152
153
154
155
# File 'bedrock_agent_core/i_gateway.rb', line 150

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