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.101.0 (build b95fe5d)", date="2024-07-12T19:34:02.166Z") @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

    • fromApiDestinationAttributes

      @Stability(Stable) @NotNull public static ApiDestination fromApiDestinationAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ApiDestinationAttributes attrs)
      Create an Api Destination construct from an existing Api Destination ARN.

      Parameters:
      scope - The scope creating construct (usually this). This parameter is required.
      id - The construct's id. This parameter is required.
      attrs - The Api Destination import attributes. This parameter is required.
    • 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.