SmithyTargetConfiguration Class
Configuration for Smithy-based MCP targets.
This configuration exposes a Smithy-modeled API as MCP tools, allowing the gateway to transform Smithy operations into tool calls.
| Source | aws-bedrockagentcore/lib/gateway/targets/target-configuration.ts |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
declare const apiSchema: bedrockagentcore.ApiSchema;
const smithyTargetConfiguration = new bedrockagentcore.SmithyTargetConfiguration(apiSchema);
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrockagentcore as bedrockagentcore
# api_schema: bedrockagentcore.ApiSchema
smithy_target_configuration = bedrockagentcore.SmithyTargetConfiguration(api_schema)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrockagentcore.*;
ApiSchema apiSchema;
SmithyTargetConfiguration smithyTargetConfiguration = new SmithyTargetConfiguration(apiSchema);
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.BedrockAgentCore;
ApiSchema apiSchema;
var smithyTargetConfiguration = new SmithyTargetConfiguration(apiSchema);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var apiSchema ApiSchema
smithyTargetConfiguration := awscdk.Aws_bedrockagentcore.NewSmithyTargetConfiguration(apiSchema)
Initializer
Properties
smithyModelApiSchemasmithy_modelApiSchemasmithyModelApiSchemaSmithyModelApiSchemaSmithyModelApiSchema #The Smithy model that defines the API.
targetTypeMcpTargetTypetarget_typeMcpTargetTypetargetTypeMcpTargetTypeTargetTypeMcpTargetTypeTargetTypeMcpTargetType #The target type.
Methods
bind(scope: Construct, gateway: IGateway): TargetConfigurationConfigdef bind(self, scope: Construct, gateway: IGateway) -> TargetConfigurationConfigpublic TargetConfigurationConfig bind(Construct scope, IGateway gateway)public TargetConfigurationConfig Bind(Construct scope, IGateway gateway)func Bind(Scope Construct, Gateway IGateway) TargetConfigurationConfig #Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the Smithy model.
2 parameters
Parameters
scopescopescopescopeScope— The construct scope.gatewaygatewaygatewaygatewayGateway— The gateway that will use this target.
create(smithyModel: ApiSchema): SmithyTargetConfiguration // chainable@staticmethod def create(smithy_model: ApiSchema) -> SmithyTargetConfigurationpublic static SmithyTargetConfiguration create(ApiSchema smithyModel)public static SmithyTargetConfiguration Create(ApiSchema smithyModel)func Create(SmithyModel ApiSchema) SmithyTargetConfiguration static #Create a Smithy target configuration.
1 parameter · returns
Parameters
smithyModelsmithy_modelsmithyModelsmithyModelSmithyModel— The Smithy model schema.
Returns: A new SmithyTargetConfiguration instance