Module: AWSCDK::BedrockAgentCore::IMcpGatewayTarget

Includes:
IGatewayTarget
Included in:
GatewayTarget
Defined in:
bedrock_agent_core/i_mcp_gateway_target.rb

Overview

Interface for MCP gateway targets.

Extends the base gateway target interface with MCP-specific properties. MCP targets expose tools using the Model Context Protocol.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 193

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_target_ref => { kind: :property, name: "gatewayTargetRef", is_optional: false },
    :gateway => { kind: :property, name: "gateway", is_optional: false },
    :gateway_target_name => { kind: :property, name: "gatewayTargetName", is_optional: false },
    :target_arn => { kind: :property, name: "targetArn", is_optional: false },
    :target_id => { kind: :property, name: "targetId", is_optional: false },
    :target_protocol_type => { kind: :property, name: "targetProtocolType", is_optional: false },
    :created_at => { kind: :property, name: "createdAt", is_optional: true },
    :credential_provider_configurations => { kind: :property, name: "credentialProviderConfigurations", is_optional: true },
    :description => { kind: :property, name: "description", is_optional: true },
    :status => { kind: :property, name: "status", is_optional: true },
    :status_reasons => { kind: :property, name: "statusReasons", is_optional: true },
    :updated_at => { kind: :property, name: "updatedAt", is_optional: true },
    :target_type => { kind: :property, name: "targetType", is_optional: false },
    :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_manage => { kind: :method, name: "grantManage", is_optional: false },
    :grant_read => { kind: :method, name: "grantRead", 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:



157
158
159
160
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 157

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

#created_atString?

Timestamp when the gateway target was created.

Returns:

  • (String, nil)


85
86
87
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 85

def created_at()
  jsii_get_property("createdAt")
end

#credential_provider_configurationsArray<AWSCDK::BedrockAgentCore::ICredentialProviderConfig>?

The credential provider configuration for the target.



92
93
94
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 92

def credential_provider_configurations()
  jsii_get_property("credentialProviderConfigurations")
end

#descriptionString?

The description of the gateway target.

Returns:

  • (String, nil)


99
100
101
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 99

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.



29
30
31
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 29

def env()
  jsii_get_property("env")
end

#gatewayAWSCDK::BedrockAgentCore::IGateway

The gateway that this target belongs to.



50
51
52
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 50

def gateway()
  jsii_get_property("gateway")
end

#gateway_target_nameString

The name of the gateway target.

Returns:

  • (String)


57
58
59
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 57

def gateway_target_name()
  jsii_get_property("gatewayTargetName")
end

#gateway_target_refAWSCDK::Interfaces::AWSBedrockagentcore::GatewayTargetReference

A reference to a GatewayTarget resource.



43
44
45
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 43

def gateway_target_ref()
  jsii_get_property("gatewayTargetRef")
end

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

Grants IAM actions to the IAM Principal.

Parameters:

Returns:



167
168
169
170
171
172
173
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 167

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_manage(grantee) ⇒ AWSCDK::IAM::Grant

Grants Create, Update, and Delete actions on the Gateway Target.

Parameters:

Returns:



179
180
181
182
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 179

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 Target.

Parameters:

Returns:



188
189
190
191
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 188

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

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


14
15
16
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 14

def node()
  jsii_get_property("node")
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



36
37
38
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 36

def stack()
  jsii_get_property("stack")
end

#statusString?

The status of the gateway target.

Returns:

  • (String, nil)


106
107
108
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 106

def status()
  jsii_get_property("status")
end

#status_reasonsArray<String>?

The status reasons for the gateway target.

Returns:

  • (Array<String>, nil)


113
114
115
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 113

def status_reasons()
  jsii_get_property("statusReasons")
end

#target_arnString

The ARN of the gateway target resource.

Returns:

  • (String)


64
65
66
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 64

def target_arn()
  jsii_get_property("targetArn")
end

#target_idString

The id of the gateway target.

Returns:

  • (String)


71
72
73
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 71

def target_id()
  jsii_get_property("targetId")
end

#target_protocol_typeAWSCDK::BedrockAgentCore::GatewayTargetProtocolType

The target protocol.



78
79
80
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 78

def target_protocol_type()
  jsii_get_property("targetProtocolType")
end

#target_typeAWSCDK::BedrockAgentCore::McpTargetType

The type of target (Lambda, OpenAPI, or Smithy).



127
128
129
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 127

def target_type()
  jsii_get_property("targetType")
end

#updated_atString?

Timestamp when the gateway target was last updated.

Returns:

  • (String, nil)


120
121
122
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 120

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



138
139
140
141
142
143
# File 'bedrock_agent_core/i_mcp_gateway_target.rb', line 138

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