Show / Hide Table of Contents

Class AssetToolSchema

(experimental) Tool Schema from a local asset.

Inheritance
object
ToolSchema
AssetToolSchema
Inherited Members
ToolSchema.FromInline(IToolDefinition[])
ToolSchema.FromLocalAsset(string)
ToolSchema.FromS3File(IBucket, string, string)
ToolSchema.BucketOwnerAccountId
ToolSchema.InlineSchema
ToolSchema.S3File
Namespace: Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
Assembly: Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.dll
Syntax (csharp)
public class AssetToolSchema : ToolSchema
Syntax (vb)
Public Class AssetToolSchema Inherits ToolSchema
Remarks

The asset is uploaded to an S3 staging bucket, then moved to its final location by CloudFormation during deployment.

Stability: Experimental

ExampleMetadata: fixture=_generated

Examples
// 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;
             using Amazon.CDK;
             using Amazon.CDK.AWS.IAM;
             using Amazon.CDK.Interfaces.KMS;

             DockerImage dockerImage;
             IGrantable grantable;
             IKeyRef keyRef;
             ILocalBundling localBundling;

             var assetToolSchema = new AssetToolSchema("path", new AssetOptions {
                 AssetHash = "assetHash",
                 AssetHashType = AssetHashType.SOURCE,
                 Bundling = new BundlingOptions {
                     Image = dockerImage,

                     // the properties below are optional
                     BundlingFileAccess = BundlingFileAccess.VOLUME_COPY,
                     Command = new [] { "command" },
                     Entrypoint = new [] { "entrypoint" },
                     Environment = new Dictionary<string, string> {
                         { "environmentKey", "environment" }
                     },
                     Local = localBundling,
                     Network = "network",
                     OutputType = BundlingOutput.ARCHIVED,
                     Platform = "platform",
                     SecurityOpt = "securityOpt",
                     User = "user",
                     Volumes = new [] { new DockerVolume {
                         ContainerPath = "containerPath",
                         HostPath = "hostPath",

                         // the properties below are optional
                         Consistency = DockerVolumeConsistency.CONSISTENT
                     } },
                     VolumesFrom = new [] { "volumesFrom" },
                     WorkingDirectory = "workingDirectory"
                 },
                 DeployTime = false,
                 DisplayName = "displayName",
                 Exclude = new [] { "exclude" },
                 FollowSymlinks = SymlinkFollowMode.NEVER,
                 IgnoreMode = IgnoreMode.GLOB,
                 Readers = new [] { grantable },
                 SourceKMSKey = keyRef
             });

Synopsis

Constructors

AssetToolSchema(string, IAssetOptions?)

(experimental) Tool Schema from a local asset.

Methods

Bind(Construct)

(experimental) Binds this tool schema to a construct scope.

GrantPermissionsToRole(IRole)

(experimental) Grant permissions to the role.

Constructors

AssetToolSchema(string, IAssetOptions?)

(experimental) Tool Schema from a local asset.

public AssetToolSchema(string path, IAssetOptions? options = null)
Parameters
path string
options IAssetOptions
Remarks

Stability: Experimental

Methods

Bind(Construct)

(experimental) Binds this tool schema to a construct scope.

public override void Bind(Construct scope)
Parameters
scope Construct
  • The construct scope to bind to.
Overrides
ToolSchema.Bind(Construct)
Remarks

This method initializes the S3 asset if it hasn't been initialized yet. Must be called before rendering the schema as CFN properties.

Stability: Experimental

GrantPermissionsToRole(IRole)

(experimental) Grant permissions to the role.

public override void GrantPermissionsToRole(IRole role)
Parameters
role IRole
Overrides
ToolSchema.GrantPermissionsToRole(IRole)
Remarks

Stability: Experimental

Back to top Generated by DocFX