GatewayTargetSmithyProps Struct
Properties for creating a Smithy-based Gateway Target.
| Source | aws-bedrockagentcore/lib/gateway/targets/target.ts |
|---|---|
| Type last changed |
Example
ts
const gateway = new agentcore.Gateway(this, "MyGateway", {
gatewayName: "my-gateway",
});
const smithySchema = agentcore.ApiSchema.fromLocalAsset(
path.join(__dirname, "models", "smithy-model.json")
);
smithySchema.bind(this);
// Create a gateway target with Smithy Model and OAuth
const target = agentcore.GatewayTarget.forSmithy(this, "MySmithyTarget", {
gatewayTargetName: "my-smithy-target",
description: "Target for Smithy model integration",
gateway: gateway,
smithyModel: smithySchema,
});
python
gateway = agentcore.Gateway(self, "MyGateway",
gateway_name="my-gateway"
)
smithy_schema = agentcore.ApiSchema.from_local_asset(
path.join(__dirname, "models", "smithy-model.json"))
smithy_schema.bind(self)
# Create a gateway target with Smithy Model and OAuth
target = agentcore.GatewayTarget.for_smithy(self, "MySmithyTarget",
gateway_target_name="my-smithy-target",
description="Target for Smithy model integration",
gateway=gateway,
smithy_model=smithy_schema
)
java
Gateway gateway = Gateway.Builder.create(this, "MyGateway")
.gatewayName("my-gateway")
.build();
AssetApiSchema smithySchema = ApiSchema.fromLocalAsset(path.join(__dirname, "models", "smithy-model.json"));
smithySchema.bind(this);
// Create a gateway target with Smithy Model and OAuth
GatewayTarget target = GatewayTarget.forSmithy(this, "MySmithyTarget", GatewayTargetSmithyProps.builder()
.gatewayTargetName("my-smithy-target")
.description("Target for Smithy model integration")
.gateway(gateway)
.smithyModel(smithySchema)
.build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
var gateway = new Gateway(this, "MyGateway", new GatewayProps {
GatewayName = "my-gateway"
});
var smithySchema = ApiSchema.FromLocalAsset(path.Join(__dirname, "models", "smithy-model.json"));
smithySchema.Bind(this);
// Create a gateway target with Smithy Model and OAuth
var target = GatewayTarget.ForSmithy(this, "MySmithyTarget", new GatewayTargetSmithyProps {
GatewayTargetName = "my-smithy-target",
Description = "Target for Smithy model integration",
Gateway = gateway,
SmithyModel = smithySchema
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
gateway := agentcore.NewGateway(this, jsii.String("MyGateway"), &GatewayProps{
GatewayName: jsii.String("my-gateway"),
})
smithySchema := agentcore.ApiSchema_FromLocalAsset(path.join(__dirname, jsii.String("models"), jsii.String("smithy-model.json")))
smithySchema.Bind(this)
// Create a gateway target with Smithy Model and OAuth
target := agentcore.GatewayTarget_ForSmithy(this, jsii.String("MySmithyTarget"), &GatewayTargetSmithyProps{
GatewayTargetName: jsii.String("my-smithy-target"),
Description: jsii.String("Target for Smithy model integration"),
Gateway: gateway,
SmithyModel: smithySchema,
})
Properties
credentialProviderConfigurationsoptionalICredentialProviderConfig[]credential_provider_configurationsoptionaltyping.List[ICredentialProviderConfig]credentialProviderConfigurationsoptionalList<ICredentialProviderConfig>CredentialProviderConfigurationsoptionalICredentialProviderConfig[]CredentialProviderConfigurationsoptional*[]ICredentialProviderConfig #Credential providers for authentication Smithy targets only support IAM role authentication.
Default: [GatewayCredentialProvider.fromIamRole()]
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #Optional description for the gateway target The description can have up to 200 characters.
Default: No description
The gateway this target belongs to.
gatewayTargetNameoptionalstringgateway_target_nameoptionalstrgatewayTargetNameoptionalStringGatewayTargetNameoptionalstringGatewayTargetNameoptional*string #The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$.
Default: auto generate