Class ApiDestination

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.events.ApiDestination
All Implemented Interfaces:
IResource, IApiDestination, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:30.106Z") @Stability(Stable) public class ApiDestination extends Resource implements IApiDestination
Define an EventBridge Api Destination.

Example:

 Connection connection = Connection.Builder.create(this, "Connection")
         .authorization(Authorization.apiKey("x-api-key", SecretValue.secretsManager("ApiSecretName")))
         .description("Connection with API Key x-api-key")
         .build();
 ApiDestination destination = ApiDestination.Builder.create(this, "Destination")
         .connection(connection)
         .endpoint("https://example.com")
         .description("Calling example.com with API key x-api-key")
         .build();
 Rule rule = Rule.Builder.create(this, "Rule")
         .schedule(Schedule.rate(Duration.minutes(1)))
         .targets(List.of(new ApiDestination(destination)))
         .build();
 
  • Constructor Details

    • ApiDestination

      protected ApiDestination(software.amazon.jsii.JsiiObjectRef objRef)
    • ApiDestination

      protected ApiDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ApiDestination

      @Stability(Stable) public ApiDestination(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ApiDestinationProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • getApiDestinationArn

      @Stability(Stable) @NotNull public String getApiDestinationArn()
      The ARN of the Api Destination created.
      Specified by:
      getApiDestinationArn in interface IApiDestination
    • getApiDestinationName

      @Stability(Stable) @NotNull public String getApiDestinationName()
      The Name of the Api Destination created.
      Specified by:
      getApiDestinationName in interface IApiDestination
    • getConnection

      @Stability(Stable) @NotNull public IConnection getConnection()
      The Connection to associate with Api Destination.