
software.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpUrlIntegration Maven / Gradle / Ivy
package software.amazon.awscdk.services.apigatewayv2.integrations.alpha;
/**
* (deprecated) The HTTP Proxy integration resource for HTTP API.
*
* Example:
*
*
* import software.amazon.awscdk.services.apigatewayv2.authorizers.alpha.HttpLambdaAuthorizer;
* import software.amazon.awscdk.services.apigatewayv2.authorizers.alpha.HttpLambdaResponseType;
* import software.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpUrlIntegration;
* // This function handles your auth logic
* Function authHandler;
* HttpLambdaAuthorizer authorizer = HttpLambdaAuthorizer.Builder.create("BooksAuthorizer", authHandler)
* .responseTypes(List.of(HttpLambdaResponseType.SIMPLE))
* .build();
* HttpApi api = new HttpApi(this, "HttpApi");
* api.addRoutes(AddRoutesOptions.builder()
* .integration(new HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.example.com"))
* .path("/books")
* .authorizer(authorizer)
* .build());
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.92.0 (build db7f27d)", date = "2023-12-06T04:49:47.294Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.apigatewayv2.integrations.alpha.$Module.class, fqn = "@aws-cdk/aws-apigatewayv2-integrations-alpha.HttpUrlIntegration")
public class HttpUrlIntegration extends software.amazon.awscdk.services.apigatewayv2.alpha.HttpRouteIntegration {
protected HttpUrlIntegration(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected HttpUrlIntegration(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param id id of the underlying integration construct. This parameter is required.
* @param url the URL to proxy to. This parameter is required.
* @param props properties to configure the integration.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public HttpUrlIntegration(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.String url, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpUrlIntegrationProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(url, "url is required"), props });
}
/**
* @param id id of the underlying integration construct. This parameter is required.
* @param url the URL to proxy to. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public HttpUrlIntegration(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.String url) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(url, "url is required") });
}
/**
* (deprecated) Bind this integration to the route.
*
* @param _options This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apigatewayv2.alpha.HttpRouteIntegrationConfig bind(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apigatewayv2.alpha.HttpRouteIntegrationBindOptions _options) {
return software.amazon.jsii.Kernel.call(this, "bind", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apigatewayv2.alpha.HttpRouteIntegrationConfig.class), new Object[] { java.util.Objects.requireNonNull(_options, "_options is required") });
}
/**
* (deprecated) A fluent builder for {@link software.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpUrlIntegration}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param id id of the underlying integration construct. This parameter is required.
* @param url the URL to proxy to. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public static Builder create(final java.lang.String id, final java.lang.String url) {
return new Builder(id, url);
}
private final java.lang.String id;
private final java.lang.String url;
private software.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpUrlIntegrationProps.Builder props;
private Builder(final java.lang.String id, final java.lang.String url) {
this.id = id;
this.url = url;
}
/**
* (deprecated) The HTTP method that must be used to invoke the underlying HTTP proxy.
*
* Default: HttpMethod.ANY
*
* @return {@code this}
* @param method The HTTP method that must be used to invoke the underlying HTTP proxy. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder method(final software.amazon.awscdk.services.apigatewayv2.alpha.HttpMethod method) {
this.props().method(method);
return this;
}
/**
* (deprecated) Specifies how to transform HTTP requests before sending them to the backend.
*
* Default: undefined requests are sent to the backend unmodified
*
* @return {@code this}
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
* @param parameterMapping Specifies how to transform HTTP requests before sending them to the backend. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder parameterMapping(final software.amazon.awscdk.services.apigatewayv2.alpha.ParameterMapping parameterMapping) {
this.props().parameterMapping(parameterMapping);
return this;
}
/**
* @return a newly built instance of {@link software.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpUrlIntegration}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
@Override
public software.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpUrlIntegration build() {
return new software.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpUrlIntegration(
this.id,
this.url,
this.props != null ? this.props.build() : null
);
}
private software.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpUrlIntegrationProps.Builder props() {
if (this.props == null) {
this.props = new software.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpUrlIntegrationProps.Builder();
}
return this.props;
}
}
}