> **Experimental**
>
> `@aws-cdk/aws-bedrock-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# Function

Represents a function in a function schema.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`bedrock/agents/function-schema.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-bedrock-alpha/bedrock/agents/function-schema.ts#L172)

## 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_alpha from '@aws-cdk/aws-bedrock-alpha';
const function_ = new bedrock_alpha.Function({
  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:

```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_ = bedrock_alpha.Function(
    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:

```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.*;

Function function_ = Function.Builder.create()
        .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();
```

C# / .NET:

```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 function_ = new Function(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
});
```

Golang:

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

function_ := bedrock_alpha.NewFunction(&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,
})
```

## Initializer

TypeScript:

```ts
new Function(props: FunctionProps)
```

Python:

```python
Function(props: FunctionProps)
```

Java:

```java
new Function(FunctionProps props)
```

C# / .NET:

```csharp
new Function(FunctionProps props)
```

Golang:

```go
NewFunction(Props FunctionProps)
```

## Properties

- `description`: string — Description of the function.

- `name`: string — The name of the function.

- `parameters`: { [key: string]: [FunctionParameter](/cdk/api/v2/docs/@aws-cdk_aws-bedrock-alpha.FunctionParameter.html) } — Parameters for the function.

- `requireConfirmation`: [RequireConfirmation](/cdk/api/v2/docs/@aws-cdk_aws-bedrock-alpha.RequireConfirmation.html) — Whether to require confirmation before executing the function.
