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.98.0 (build 00b106d)", date="2024-05-17T05:10:18.727Z") @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("https://api.example.com/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