Module: AWSCDK::BedrockAgentCore::ICodeInterpreterCustom
- Includes:
- EC2::IConnectable, IAM::IGrantable, IResource, Interfaces::AWSBedrockagentcore::ICodeInterpreterCustomRef
- Included in:
- CodeInterpreterCustomBase
- Defined in:
- bedrock_agent_core/i_code_interpreter_custom.rb
Overview
Interface for CodeInterpreterCustom resources.
Class Method Summary collapse
Instance Method Summary collapse
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#code_interpreter_arn ⇒ String
The ARN of the code interpreter resource.
-
#code_interpreter_custom_ref ⇒ AWSCDK::Interfaces::AWSBedrockagentcore::CodeInterpreterCustomReference
A reference to a CodeInterpreterCustom resource.
-
#code_interpreter_id ⇒ String
The id of the code interpreter.
-
#connections ⇒ AWSCDK::EC2::Connections
The network connections associated with this resource.
-
#created_at ⇒ String?
Timestamp when the code interpreter was created.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#execution_role ⇒ AWSCDK::IAM::IRole
The IAM role that provides permissions for the code interpreter to access AWS services.
-
#grant(grantee, *actions) ⇒ AWSCDK::IAM::Grant
Grants IAM actions to the IAM Principal.
-
#grant_principal ⇒ AWSCDK::IAM::IPrincipal
The principal to grant permissions to.
-
#grant_read(grantee) ⇒ AWSCDK::IAM::Grant
Grants
GetandListactions on the Code Interpreter. -
#grant_use(grantee) ⇒ AWSCDK::IAM::Grant
Grants
Invoke,Start, andStopactions on the Code Interpreter. -
#last_updated_at ⇒ String?
Timestamp when the code interpreter was last updated.
-
#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return the given named metric for this code interpreter.
-
#metric_errors_for_api_operation(operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of errors for a specific API operation performed on this code interpreter.
-
#metric_for_api_operation(metric_name, operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return the given named metric related to the API operation performed on this code interpreter.
-
#metric_invocations_for_api_operation(operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the total number of API requests made for a specific code interpreter operation.
-
#metric_latency_for_api_operation(operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric measuring the latency of a specific API operation performed on this code interpreter.
-
#metric_session_duration(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric measuring the duration of code interpreter sessions.
-
#metric_system_errors_for_api_operation(operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of system errors for a specific API operation performed on this code interpreter.
-
#metric_throttles_for_api_operation(operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of throttled requests for a specific API operation performed on this code interpreter.
-
#metric_user_errors_for_api_operation(operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of user errors for a specific API operation performed on this code interpreter.
-
#node ⇒ Constructs::Node
The tree node.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#status ⇒ String?
The status of the code interpreter.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Class Method Details
.jsii_overridable_methods ⇒ Object
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 273 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 }, :grant_principal => { kind: :property, name: "grantPrincipal", is_optional: false }, :connections => { kind: :property, name: "connections", is_optional: false }, :code_interpreter_custom_ref => { kind: :property, name: "codeInterpreterCustomRef", is_optional: false }, :code_interpreter_arn => { kind: :property, name: "codeInterpreterArn", is_optional: false }, :code_interpreter_id => { kind: :property, name: "codeInterpreterId", is_optional: false }, :execution_role => { kind: :property, name: "executionRole", is_optional: false }, :created_at => { kind: :property, name: "createdAt", is_optional: true }, :last_updated_at => { kind: :property, name: "lastUpdatedAt", is_optional: true }, :status => { kind: :property, name: "status", 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_read => { kind: :method, name: "grantRead", is_optional: false }, :grant_use => { kind: :method, name: "grantUse", is_optional: false }, :metric => { kind: :method, name: "metric", is_optional: false }, :metric_errors_for_api_operation => { kind: :method, name: "metricErrorsForApiOperation", is_optional: false }, :metric_for_api_operation => { kind: :method, name: "metricForApiOperation", is_optional: false }, :metric_invocations_for_api_operation => { kind: :method, name: "metricInvocationsForApiOperation", is_optional: false }, :metric_latency_for_api_operation => { kind: :method, name: "metricLatencyForApiOperation", is_optional: false }, :metric_session_duration => { kind: :method, name: "metricSessionDuration", is_optional: false }, :metric_system_errors_for_api_operation => { kind: :method, name: "metricSystemErrorsForApiOperation", is_optional: false }, :metric_throttles_for_api_operation => { kind: :method, name: "metricThrottlesForApiOperation", is_optional: false }, :metric_user_errors_for_api_operation => { kind: :method, name: "metricUserErrorsForApiOperation", 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).
129 130 131 132 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 129 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#code_interpreter_arn ⇒ String
The ARN of the code interpreter resource.
64 65 66 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 64 def code_interpreter_arn() jsii_get_property("codeInterpreterArn") end |
#code_interpreter_custom_ref ⇒ AWSCDK::Interfaces::AWSBedrockagentcore::CodeInterpreterCustomReference
A reference to a CodeInterpreterCustom resource.
57 58 59 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 57 def code_interpreter_custom_ref() jsii_get_property("codeInterpreterCustomRef") end |
#code_interpreter_id ⇒ String
The id of the code interpreter.
71 72 73 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 71 def code_interpreter_id() jsii_get_property("codeInterpreterId") end |
#connections ⇒ AWSCDK::EC2::Connections
The network connections associated with this resource.
50 51 52 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 50 def connections() jsii_get_property("connections") end |
#created_at ⇒ String?
Timestamp when the code interpreter was created.
85 86 87 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 85 def created_at() jsii_get_property("createdAt") 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.
29 30 31 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 29 def env() jsii_get_property("env") end |
#execution_role ⇒ AWSCDK::IAM::IRole
The IAM role that provides permissions for the code interpreter to access AWS services.
78 79 80 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 78 def execution_role() jsii_get_property("executionRole") end |
#grant(grantee, *actions) ⇒ AWSCDK::IAM::Grant
Grants IAM actions to the IAM Principal.
139 140 141 142 143 144 145 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 139 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_principal ⇒ AWSCDK::IAM::IPrincipal
The principal to grant permissions to.
43 44 45 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 43 def grant_principal() jsii_get_property("grantPrincipal") end |
#grant_read(grantee) ⇒ AWSCDK::IAM::Grant
Grants Get and List actions on the Code Interpreter.
151 152 153 154 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 151 def grant_read(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantRead", [grantee]) end |
#grant_use(grantee) ⇒ AWSCDK::IAM::Grant
Grants Invoke, Start, and Stop actions on the Code Interpreter.
160 161 162 163 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 160 def grant_use(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantUse", [grantee]) end |
#last_updated_at ⇒ String?
Timestamp when the code interpreter was last updated.
92 93 94 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 92 def last_updated_at() jsii_get_property("lastUpdatedAt") end |
#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return the given named metric for this code interpreter.
170 171 172 173 174 175 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 170 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_errors_for_api_operation(operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of errors for a specific API operation performed on this code interpreter.
182 183 184 185 186 187 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 182 def metric_errors_for_api_operation(operation, props = nil) Jsii::Type.check_type(operation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operation") 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("metricErrorsForApiOperation", [operation, props]) end |
#metric_for_api_operation(metric_name, operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return the given named metric related to the API operation performed on this code interpreter.
195 196 197 198 199 200 201 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 195 def metric_for_api_operation(metric_name, operation, props = nil) Jsii::Type.check_type(metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") Jsii::Type.check_type(operation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operation") 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("metricForApiOperation", [metric_name, operation, props]) end |
#metric_invocations_for_api_operation(operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the total number of API requests made for a specific code interpreter operation.
208 209 210 211 212 213 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 208 def metric_invocations_for_api_operation(operation, props = nil) Jsii::Type.check_type(operation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operation") 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("metricInvocationsForApiOperation", [operation, props]) end |
#metric_latency_for_api_operation(operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric measuring the latency of a specific API operation performed on this code interpreter.
220 221 222 223 224 225 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 220 def metric_latency_for_api_operation(operation, props = nil) Jsii::Type.check_type(operation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operation") 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("metricLatencyForApiOperation", [operation, props]) end |
#metric_session_duration(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric measuring the duration of code interpreter sessions.
231 232 233 234 235 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 231 def metric_session_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("metricSessionDuration", [props]) end |
#metric_system_errors_for_api_operation(operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of system errors for a specific API operation performed on this code interpreter.
242 243 244 245 246 247 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 242 def metric_system_errors_for_api_operation(operation, props = nil) Jsii::Type.check_type(operation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operation") 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("metricSystemErrorsForApiOperation", [operation, props]) end |
#metric_throttles_for_api_operation(operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of throttled requests for a specific API operation performed on this code interpreter.
254 255 256 257 258 259 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 254 def metric_throttles_for_api_operation(operation, props = nil) Jsii::Type.check_type(operation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operation") 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("metricThrottlesForApiOperation", [operation, props]) end |
#metric_user_errors_for_api_operation(operation, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return a metric containing the number of user errors for a specific API operation performed on this code interpreter.
266 267 268 269 270 271 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 266 def metric_user_errors_for_api_operation(operation, props = nil) Jsii::Type.check_type(operation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operation") 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("metricUserErrorsForApiOperation", [operation, props]) end |
#node ⇒ Constructs::Node
The tree node.
14 15 16 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 14 def node() jsii_get_property("node") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
36 37 38 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 36 def stack() jsii_get_property("stack") end |
#status ⇒ String?
The status of the code interpreter.
99 100 101 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 99 def status() jsii_get_property("status") 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.
110 111 112 113 114 115 |
# File 'bedrock_agent_core/i_code_interpreter_custom.rb', line 110 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 |