ApiDestinationAttributes

class aws_cdk.aws_events.ApiDestinationAttributes(*, api_destination_arn, connection)

Bases: object

The properties to import an existing Api Destination.

Parameters:
  • api_destination_arn (str) – The ARN of the Api Destination.

  • connection (IConnection) – The Connection to associate with the Api Destination.

ExampleMetadata:

infused

Example:

connection = events.Connection.from_event_bus_arn(self, "Connection", "arn:aws:events:us-east-1:123456789012:event-bus/EventBusName", "arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-f3gDy9")

api_destination_arn = "arn:aws:events:us-east-1:123456789012:api-destination/DestinationName"
destination = events.ApiDestination.from_api_destination_attributes(self, "Destination", api_destination_arn=api_destination_arn, connection=connection)

rule = events.Rule(self, "OtherRule",
    schedule=events.Schedule.rate(Duration.minutes(10)),
    targets=[targets.ApiDestination(destination)]
)

Attributes

api_destination_arn

The ARN of the Api Destination.

connection

The Connection to associate with the Api Destination.