Interface ConnectionProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ConnectionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:02.225Z") @Stability(Stable) public interface ConnectionProps extends software.amazon.jsii.JsiiSerializable
An API Destination Connection.

A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.

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();
 
  • Method Details

    • getAuthorization

      @Stability(Stable) @NotNull Authorization getAuthorization()
      The authorization type for the connection.
    • getBodyParameters

      @Stability(Stable) @Nullable default Map<String,HttpParameter> getBodyParameters()
      Additional string parameters to add to the invocation bodies.

      Default: - No additional parameters

    • getConnectionName

      @Stability(Stable) @Nullable default String getConnectionName()
      The name of the connection.

      Default: - A name is automatically generated

    • getDescription

      @Stability(Stable) @Nullable default String getDescription()
      The name of the connection.

      Default: - none

    • getHeaderParameters

      @Stability(Stable) @Nullable default Map<String,HttpParameter> getHeaderParameters()
      Additional string parameters to add to the invocation headers.

      Default: - No additional parameters

    • getQueryStringParameters

      @Stability(Stable) @Nullable default Map<String,HttpParameter> getQueryStringParameters()
      Additional string parameters to add to the invocation query strings.

      Default: - No additional parameters

    • builder

      @Stability(Stable) static ConnectionProps.Builder builder()
      Returns:
      a ConnectionProps.Builder of ConnectionProps