Experimental
@aws-cdk/aws-bedrock-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
FunctionProps Struct
Properties for a function in a function schema.
| Stability | Experimental |
|---|---|
| Source | bedrock/agents/function-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_alpha from '@aws-cdk/aws-bedrock-alpha';
const functionProps: bedrock_alpha.FunctionProps = {
description: 'description',
name: 'name',
// the properties below are optional
parameters: {
parametersKey: {
type: bedrock_alpha.ParameterType.STRING,
// the properties below are optional
description: 'description',
required: false,
},
},
requireConfirmation: bedrock_alpha.RequireConfirmation.ENABLED,
};
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_alpha as bedrock_alpha
function_props = bedrock_alpha.FunctionProps(
description="description",
name="name",
# the properties below are optional
parameters={
"parameters_key": bedrock_alpha.FunctionParameterProps(
type=bedrock_alpha.ParameterType.STRING,
# the properties below are optional
description="description",
required=False
)
},
require_confirmation=bedrock_alpha.RequireConfirmation.ENABLED
)
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.alpha.*;
FunctionProps functionProps = FunctionProps.builder()
.description("description")
.name("name")
// the properties below are optional
.parameters(Map.of(
"parametersKey", FunctionParameterProps.builder()
.type(ParameterType.STRING)
// the properties below are optional
.description("description")
.required(false)
.build()))
.requireConfirmation(RequireConfirmation.ENABLED)
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.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.Alpha;
var functionProps = new FunctionProps {
Description = "description",
Name = "name",
// the properties below are optional
Parameters = new Dictionary<string, FunctionParameterProps> {
{ "parametersKey", new FunctionParameterProps {
Type = ParameterType.STRING,
// the properties below are optional
Description = "description",
Required = false
} }
},
RequireConfirmation = RequireConfirmation.ENABLED
};
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awsbedrockalpha"
functionProps := &FunctionProps{
Description: jsii.String("description"),
Name: jsii.String("name"),
// the properties below are optional
Parameters: map[string]FunctionParameterProps{
"parametersKey": &FunctionParameterProps{
"type": bedrock_alpha.ParameterType_STRING,
// the properties below are optional
"description": jsii.String("description"),
"required": jsii.Boolean(false),
},
},
RequireConfirmation: bedrock_alpha.RequireConfirmation_ENABLED,
}
Properties
Description of the function.
The name of the function.
parametersoptional{ [key: string]: FunctionParameterProps }parametersoptionaltyping.Mapping[str, FunctionParameterProps]parametersoptionalMap<String, FunctionParameterProps>ParametersoptionalIDictionary<string, FunctionParameterProps>Parametersoptional*map[string]FunctionParameterProps = {} #Parameters for the function as a record of parameter name to parameter properties.
requireConfirmationoptionalRequireConfirmationrequire_confirmationoptionalRequireConfirmationrequireConfirmationoptionalRequireConfirmationRequireConfirmationoptionalRequireConfirmationRequireConfirmationoptionalRequireConfirmation = RequireConfirmation.DISABLED #Whether to require confirmation before executing the function.