interface ConnectionProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Events.ConnectionProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsevents#ConnectionProps |
Java | software.amazon.awscdk.services.events.ConnectionProps |
Python | aws_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
Name | Type | Description |
---|---|---|
authorization | Authorization | The authorization type for the connection. |
body | { [string]: Http } | Additional string parameters to add to the invocation bodies. |
connection | string | The name of the connection. |
description? | string | The name of the connection. |
header | { [string]: Http } | Additional string parameters to add to the invocation headers. |
query | { [string]: Http } | Additional string parameters to add to the invocation query strings. |
authorization
Type:
Authorization
The authorization type for the connection.
bodyParameters?
Type:
{ [string]:
Http
}
(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]:
Http
}
(optional, default: No additional parameters)
Additional string parameters to add to the invocation headers.
queryStringParameters?
Type:
{ [string]:
Http
}
(optional, default: No additional parameters)
Additional string parameters to add to the invocation query strings.