ConnectionProps
- class aws_cdk.aws_events.ConnectionProps(*, authorization, body_parameters=None, connection_name=None, description=None, header_parameters=None, query_string_parameters=None)
Bases:
object
An API Destination Connection.
A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.
- Parameters:
authorization (
Authorization
) – The authorization type for the connection.body_parameters (
Optional
[Mapping
[str
,HttpParameter
]]) – Additional string parameters to add to the invocation bodies. Default: - No additional parametersconnection_name (
Optional
[str
]) – The name of the connection. Default: - A name is automatically generateddescription (
Optional
[str
]) – The name of the connection. Default: - noneheader_parameters (
Optional
[Mapping
[str
,HttpParameter
]]) – Additional string parameters to add to the invocation headers. Default: - No additional parametersquery_string_parameters (
Optional
[Mapping
[str
,HttpParameter
]]) – Additional string parameters to add to the invocation query strings. Default: - No additional parameters
- ExampleMetadata:
infused
Example:
connection = events.Connection(self, "Connection", authorization=events.Authorization.api_key("x-api-key", SecretValue.secrets_manager("ApiSecretName")), description="Connection with API Key x-api-key" ) destination = events.ApiDestination(self, "Destination", connection=connection, endpoint="https://example.com", description="Calling example.com with API key x-api-key" ) rule = events.Rule(self, "Rule", schedule=events.Schedule.rate(Duration.minutes(1)), targets=[targets.ApiDestination(destination)] )
Attributes
- authorization
The authorization type for the connection.
- body_parameters
Additional string parameters to add to the invocation bodies.
- Default:
No additional parameters
- connection_name
The name of the connection.
- Default:
A name is automatically generated
- description
The name of the connection.
- Default:
none
- header_parameters
Additional string parameters to add to the invocation headers.
- Default:
No additional parameters
- query_string_parameters
Additional string parameters to add to the invocation query strings.
- Default:
No additional parameters