# SchemaDefinition

Schema definition for tool input/output.

- Source: [`lib/gateway/targets/schema/tool-schema.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-bedrock-agentcore-alpha/lib/gateway/targets/schema/tool-schema.ts#L55)

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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" }
};
```

Golang:

```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

- `description`: string — The description of the schema definition.

  **Default:** No description

  This description provides information about the purpose and usage of the schema.

- `items`: [SchemaDefinition](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.SchemaDefinition.html) — 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.

- `properties`: { [key: string]: [SchemaDefinition](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.SchemaDefinition.html) } — The properties of the schema definition.

  **Default:** No properties

  These properties define the fields in the schema.

- `required`: string[] — The required fields in the schema definition.

  **Default:** No required fields

  These fields must be provided when using the schema.

- `type`: [SchemaDefinitionType](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.SchemaDefinitionType.html) (required) — The type of the schema definition.

  This field specifies the data type of the schema.
