ToolSchema
- class aws_cdk.aws_bedrock_agentcore_alpha.ToolSchema(s3_file=None, bucket_owner_account_id=None, inline_schema=None)
Bases:
object(deprecated) Defines the schema for tools available to a gateway target.
- Deprecated:
Use the equivalent construct from
aws-cdk-lib/aws-bedrockagentcoreinstead.- Stability:
deprecated
- ExampleMetadata:
fixture=_generated
Example:
# 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 tool_schema = bedrock_agentcore_alpha.ToolSchema.from_local_asset("path")
- Parameters:
s3_file (
Union[Location,Dict[str,Any],None])bucket_owner_account_id (
Optional[str])inline_schema (
Optional[Sequence[Union[ToolDefinition,Dict[str,Any]]]])
- Stability:
deprecated
Methods
- abstractmethod bind(scope)
(deprecated) Bind the schema to a construct.
- Parameters:
scope (
Construct)- Stability:
deprecated
- Return type:
None
- abstractmethod grant_permissions_to_role(role)
(deprecated) Grant permissions to the role.
- Parameters:
role (
IRole)- Stability:
deprecated
- Return type:
None
Attributes
- bucket_owner_account_id
(deprecated) The account ID of the S3 bucket owner for cross-account access.
- Stability:
deprecated
- inline_schema
(deprecated) The inline tool schema definition as a string, if using an inline schema.
Can be in JSON or YAML format.
- Stability:
deprecated
- s3_file
(deprecated) The S3 location of the tool schema file, if using an S3-based schema.
Contains the bucket name and object key information.
- Stability:
deprecated
Static Methods
- classmethod from_inline(schema)
(deprecated) Creates a Tool Schema from an inline string.
- Parameters:
schema (
Sequence[Union[ToolDefinition,Dict[str,Any]]]) –the JSON or YAML payload defining the OpenAPI schema for the action group.
- Stability:
deprecated
- Return type:
- classmethod from_local_asset(path)
(deprecated) Creates a tool Schema from a local file.
- Parameters:
path (
str) –the path to the local file containing the function schema for the tool.
- Stability:
deprecated
- Return type:
- classmethod from_s3_file(bucket, object_key, bucket_owner_account_id=None)
(deprecated) Creates a Tool Schema from an S3 File.
- Parameters:
bucket (
IBucket) –the bucket containing the local file containing the OpenAPI schema for the action group.
object_key (
str) –object key in the bucket.
bucket_owner_account_id (
Optional[str]) –optional The account ID of the Amazon S3 bucket owner. This ID is used for cross-account access to the bucket.
- Stability:
deprecated
- Return type: