aws-cdk-lib.aws_events.ConnectionProps

interface ConnectionProps

LanguageType name
.NETAmazon.CDK.AWS.Events.ConnectionProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsevents#ConnectionProps
Javasoftware.amazon.awscdk.services.events.ConnectionProps
Pythonaws_cdk.aws_events.ConnectionProps
TypeScript (source)aws-cdk-lib » aws_events » ConnectionProps

An API Destination Connection.

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

Example

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

NameTypeDescription
authorizationAuthorizationThe authorization type for the connection.
bodyParameters?{ [string]: HttpParameter }Additional string parameters to add to the invocation bodies.
connectionName?stringThe name of the connection.
description?stringThe name of the connection.
headerParameters?{ [string]: HttpParameter }Additional string parameters to add to the invocation headers.
queryStringParameters?{ [string]: HttpParameter }Additional string parameters to add to the invocation query strings.

authorization

Type: Authorization

The authorization type for the connection.


bodyParameters?

Type: { [string]: HttpParameter } (optional, default: No additional parameters)

Additional string parameters to add to the invocation bodies.


connectionName?

Type: string (optional, default: A name is automatically generated)

The name of the connection.


description?

Type: string (optional, default: none)

The name of the connection.


headerParameters?

Type: { [string]: HttpParameter } (optional, default: No additional parameters)

Additional string parameters to add to the invocation headers.


queryStringParameters?

Type: { [string]: HttpParameter } (optional, default: No additional parameters)

Additional string parameters to add to the invocation query strings.