java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IChainable, INextable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-06T23:25:17.772Z") @Stability(Stable) public class HttpInvoke extends TaskStateBase
A Step Functions Task to call a public third-party API.

Example:

 import software.amazon.awscdk.services.events.*;
 Connection connection = Connection.Builder.create(this, "Connection")
         .authorization(Authorization.basic("username", SecretValue.unsafePlainText("password")))
         .build();
 HttpInvoke.Builder.create(this, "Invoke HTTP API")
         .apiRoot("https://api.example.com")
         .apiEndpoint(TaskInput.fromText("path/to/resource"))
         .body(TaskInput.fromObject(Map.of("foo", "bar")))
         .connection(connection)
         .headers(TaskInput.fromObject(Map.of("Content-Type", "application/json")))
         .method(TaskInput.fromText("POST"))
         .queryStringParameters(TaskInput.fromObject(Map.of("id", "123")))
         .urlEncodingFormat(URLEncodingFormat.BRACKETS)
         .build();
 
  • Constructor Details

    • HttpInvoke

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

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

      @Stability(Stable) public HttpInvoke(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HttpInvokeProps props)
      Parameters:
      scope - This parameter is required.
      id - Descriptive identifier for this chainable. This parameter is required.
      props - This parameter is required.
  • Method Details