Class HttpIntegration
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigateway.Integration
software.amazon.awscdk.services.apigateway.HttpIntegration
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-25T14:21:09.348Z")
@Stability(Stable)
public class HttpIntegration
extends Integration
You can integrate an API method with an HTTP endpoint using the HTTP proxy integration or the HTTP custom integration,.
With the proxy integration, the setup is simple. You only need to set the HTTP method and the HTTP endpoint URI, according to the backend requirements, if you are not concerned with content encoding or caching.
With the custom integration, the setup is more involved. In addition to the proxy integration setup steps, you need to specify how the incoming request data is mapped to the integration request and how the resulting integration response data is mapped to the method response.
Example:
Function authFn; Resource books; RequestAuthorizer auth = RequestAuthorizer.Builder.create(this, "booksAuthorizer") .handler(authFn) .identitySources(List.of(IdentitySource.header("Authorization"))) .build(); books.addMethod("GET", new HttpIntegration("http://amazon.com"), MethodOptions.builder() .authorizer(auth) .build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionHttpIntegration
(String url) HttpIntegration
(String url, HttpIntegrationProps props) protected
HttpIntegration
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
HttpIntegration
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Methods inherited from class software.amazon.awscdk.services.apigateway.Integration
bind
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
HttpIntegration
protected HttpIntegration(software.amazon.jsii.JsiiObjectRef objRef) -
HttpIntegration
protected HttpIntegration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
HttpIntegration
@Stability(Stable) public HttpIntegration(@NotNull String url, @Nullable HttpIntegrationProps props) - Parameters:
url
- This parameter is required.props
-
-
HttpIntegration
- Parameters:
url
- This parameter is required.
-