# ConnectionProps

An API Destination Connection.

A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.

Extends: ConnectionProps
Used as props by: Connection

- Source: [`aws-events/lib/connection.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-events/lib/connection.ts#L16)
- Type last changed: v2.13.0 · 19 Feb 2022

## Example

```ts
const connection = new events.Connection(this, 'Connection', {
  authorization: events.Authorization.apiKey('x-api-key', SecretValue.secretsManager('ApiSecretName')),
  description: 'Connection with API Key x-api-key',
});

const destination = new events.ApiDestination(this, 'Destination', {
  connection,
  endpoint: 'https://example.com',
  description: 'Calling example.com with API key x-api-key',
});

const rule = new events.Rule(this, 'Rule', {
  schedule: events.Schedule.rate(Duration.minutes(1)),
  targets: [new targets.ApiDestination(destination)],
});
```

## Properties

- `authorization`: [Authorization](/cdk/api/v2/docs/aws-cdk-lib.aws_events.Authorization.html) (required) — The authorization type for the connection.

- `bodyParameters`: { [key: string]: [HttpParameter](/cdk/api/v2/docs/aws-cdk-lib.aws_events.HttpParameter.html) } — Additional string parameters to add to the invocation bodies.

  **Default:** No additional parameters

- `connectionName`: string — The name of the connection.

  **Default:** A name is automatically generated

- `description`: string = none — The name of the connection.

- `headerParameters`: { [key: string]: [HttpParameter](/cdk/api/v2/docs/aws-cdk-lib.aws_events.HttpParameter.html) } — Additional string parameters to add to the invocation headers.

  **Default:** No additional parameters

- `queryStringParameters`: { [key: string]: [HttpParameter](/cdk/api/v2/docs/aws-cdk-lib.aws_events.HttpParameter.html) } — Additional string parameters to add to the invocation query strings.

  **Default:** No additional parameters
