Class: AWSCDK::BedrockAgentCore::GatewayTargetMcpServerProps

Inherits:
GatewayTargetCommonProps
  • Object
show all
Defined in:
bedrock_agent_core/gateway_target_mcp_server_props.rb

Overview

Properties for creating an MCP Server-based Gateway Target.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description: nil, gateway_target_name: nil, credential_provider_configurations:, endpoint:, gateway:) ⇒ GatewayTargetMcpServerProps

Returns a new instance of GatewayTargetMcpServerProps.

Parameters:

  • description (String, nil) (defaults to: nil)

    Optional description for the gateway target The description can have up to 200 characters.

  • gateway_target_name (String, nil) (defaults to: nil)

    The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?)1,100$.

  • credential_provider_configurations (Array<AWSCDK::BedrockAgentCore::ICredentialProviderConfig>)

    Credential providers for authentication.

  • endpoint (String)

    The HTTPS endpoint URL of the MCP server.

  • gateway (AWSCDK::BedrockAgentCore::IGateway)

    The gateway this target belongs to.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'bedrock_agent_core/gateway_target_mcp_server_props.rb', line 12

def initialize(description: nil, gateway_target_name: nil, credential_provider_configurations:, endpoint:, gateway:)
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @gateway_target_name = gateway_target_name
  Jsii::Type.check_type(@gateway_target_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "gatewayTargetName") unless @gateway_target_name.nil?
  @credential_provider_configurations = credential_provider_configurations
  Jsii::Type.check_type(@credential_provider_configurations, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLklDcmVkZW50aWFsUHJvdmlkZXJDb25maWcifSwia2luZCI6ImFycmF5In19")), "credentialProviderConfigurations")
  @endpoint = endpoint
  Jsii::Type.check_type(@endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endpoint")
  @gateway = gateway
  Jsii::Type.check_type(@gateway, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5JR2F0ZXdheSJ9")), "gateway")
end

Instance Attribute Details

#credential_provider_configurationsArray<AWSCDK::BedrockAgentCore::ICredentialProviderConfig> (readonly)

Credential providers for authentication.



38
39
40
# File 'bedrock_agent_core/gateway_target_mcp_server_props.rb', line 38

def credential_provider_configurations
  @credential_provider_configurations
end

#descriptionString? (readonly)

Note:

Default: - No description

Optional description for the gateway target The description can have up to 200 characters.

Returns:

  • (String, nil)


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

def description
  @description
end

#endpointString (readonly)

The HTTPS endpoint URL of the MCP server.

The endpoint must:

  • Use HTTPS protocol
  • Be properly URL-encoded
  • Point to an MCP server that implements tool capabilities

Returns:

  • (String)


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

def endpoint
  @endpoint
end

#gatewayAWSCDK::BedrockAgentCore::IGateway (readonly)

The gateway this target belongs to.



52
53
54
# File 'bedrock_agent_core/gateway_target_mcp_server_props.rb', line 52

def gateway
  @gateway
end

#gateway_target_nameString? (readonly)

Note:

Default: - auto generate

The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?)1,100$.

Returns:

  • (String, nil)


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

def gateway_target_name
  @gateway_target_name
end

Class Method Details

.jsii_propertiesObject



54
55
56
57
58
59
60
61
62
# File 'bedrock_agent_core/gateway_target_mcp_server_props.rb', line 54

def self.jsii_properties
  {
    :description => "description",
    :gateway_target_name => "gatewayTargetName",
    :credential_provider_configurations => "credentialProviderConfigurations",
    :endpoint => "endpoint",
    :gateway => "gateway",
  }
end

Instance Method Details

#to_jsiiObject



64
65
66
67
68
69
70
71
72
73
74
75
# File 'bedrock_agent_core/gateway_target_mcp_server_props.rb', line 64

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "description" => @description,
    "gatewayTargetName" => @gateway_target_name,
    "credentialProviderConfigurations" => @credential_provider_configurations,
    "endpoint" => @endpoint,
    "gateway" => @gateway,
  })
  result.compact
end