Interface HttpInvokeProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,TaskStateBaseProps
- All Known Implementing Classes:
HttpInvokeProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:17.774Z")
@Stability(Stable)
public interface HttpInvokeProps
extends software.amazon.jsii.JsiiSerializable, TaskStateBaseProps
Properties for calling an external HTTP endpoint with HttpInvoke.
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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forHttpInvokeProps
static final class
An implementation forHttpInvokeProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpInvokeProps.Builder
builder()
The API endpoint to call, relative toapiRoot
.Permissions are granted to call all resources under this path.default TaskInput
getBody()
The body to send to the HTTP endpoint.The EventBridge Connection to use for authentication.default TaskInput
The headers to send to the HTTP endpoint.The HTTP method to use.default TaskInput
The query string parameters to send to the HTTP endpoint.default URLEncodingFormat
Determines whether to apply URL encoding to the request body, and which array encoding format to use.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.stepfunctions.TaskStateBaseProps
getComment, getCredentials, getHeartbeat, getHeartbeatTimeout, getInputPath, getIntegrationPattern, getOutputPath, getResultPath, getResultSelector, getStateName, getTaskTimeout, getTimeout
-
Method Details
-
getApiEndpoint
The API endpoint to call, relative toapiRoot
.Example:
TaskInput.fromText("path/to/resource");
-
getApiRoot
Permissions are granted to call all resources under this path.Example:
"https://api.example.com";
-
getConnection
The EventBridge Connection to use for authentication. -
getMethod
The HTTP method to use.Example:
TaskInput.fromText("GET");
-
getBody
The body to send to the HTTP endpoint.Default: - No body is sent with the request.
-
getHeaders
The headers to send to the HTTP endpoint.Default: - No additional headers are added to the request.
Example:
TaskInput.fromObject(Map.of("Content-Type", "application/json"));
-
getQueryStringParameters
The query string parameters to send to the HTTP endpoint.Default: - No query string parameters are sent in the request.
-
getUrlEncodingFormat
Determines whether to apply URL encoding to the request body, and which array encoding format to use.URLEncodingFormat.NONE
passes the JSON-serializedRequestBody
field as the HTTP request body. Otherwise, the HTTP request body is the URL-encoded form data of theRequestBody
field using the specified array encoding format, and theContent-Type
header is set toapplication/x-www-form-urlencoded
.Default: - URLEncodingFormat.NONE
-
builder
- Returns:
- a
HttpInvokeProps.Builder
ofHttpInvokeProps
-