SchemaDefinition Struct
Schema definition for tool input/output.
| Source | lib/gateway/targets/schema/tool-schema.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
declare const schemaDefinition_: bedrock_agentcore_alpha.SchemaDefinition;
const schemaDefinition: bedrock_agentcore_alpha.SchemaDefinition = {
type: bedrock_agentcore_alpha.SchemaDefinitionType.STRING,
// the properties below are optional
description: 'description',
items: schemaDefinition_,
properties: {
propertiesKey: schemaDefinition_,
},
required: ['required'],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha
# schema_definition_: bedrock_agentcore_alpha.SchemaDefinition
schema_definition = bedrock_agentcore_alpha.SchemaDefinition(
type=bedrock_agentcore_alpha.SchemaDefinitionType.STRING,
# the properties below are optional
description="description",
items=schema_definition_,
properties={
"properties_key": schema_definition_
},
required=["required"]
)
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.bedrock.agentcore.alpha.*;
SchemaDefinition schemaDefinition_;
SchemaDefinition schemaDefinition = SchemaDefinition.builder()
.type(SchemaDefinitionType.STRING)
// the properties below are optional
.description("description")
.items(schemaDefinition_)
.properties(Map.of(
"propertiesKey", schemaDefinition_))
.required(List.of("required"))
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;
SchemaDefinition schemaDefinition_;
var schemaDefinition = new SchemaDefinition {
Type = SchemaDefinitionType.STRING,
// the properties below are optional
Description = "description",
Items = schemaDefinition_,
Properties = new Dictionary<string, SchemaDefinition> {
{ "propertiesKey", schemaDefinition_ }
},
Required = new [] { "required" }
};
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import bedrock_agentcore_alpha "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"
var schemaDefinition_ SchemaDefinition
schemaDefinition := &SchemaDefinition{
Type: bedrock_agentcore_alpha.SchemaDefinitionType_STRING,
// the properties below are optional
Description: jsii.String("description"),
Items: schemaDefinition_,
Properties: map[string]SchemaDefinition{
"propertiesKey": schemaDefinition_,
},
Required: []*string{
jsii.String("required"),
},
}
Properties
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #The description of the schema definition.
Default: No description
This description provides information about the purpose and usage of the schema.
itemsoptionalSchemaDefinitionitemsoptionalSchemaDefinitionitemsoptionalSchemaDefinitionItemsoptionalSchemaDefinitionItemsoptionalSchemaDefinition #The items in the schema definition.
Default: No items definition
This field is used for array types to define the structure of the array elements.
propertiesoptional{ [key: string]: SchemaDefinition }propertiesoptionaltyping.Mapping[str, SchemaDefinition]propertiesoptionalMap<String, SchemaDefinition>PropertiesoptionalIDictionary<string, SchemaDefinition>Propertiesoptional*map[string]SchemaDefinition #The properties of the schema definition.
Default: No properties
These properties define the fields in the schema.
requiredoptionalstring[]requiredoptionaltyping.List[str]requiredoptionalList<String>Requiredoptionalstring[]Requiredoptional*[]*string #The required fields in the schema definition.
Default: No required fields
These fields must be provided when using the schema.
typeSchemaDefinitionTypetypeSchemaDefinitionTypetypeSchemaDefinitionTypeTypeSchemaDefinitionTypeTypeSchemaDefinitionType required #The type of the schema definition.
This field specifies the data type of the schema.