Class ApiEventSource
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.lambda.eventsources.ApiEventSource
- All Implemented Interfaces:
IEventSource,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:40:08.928Z")
@Stability(Stable)
public class ApiEventSource
extends software.amazon.jsii.JsiiObject
implements IEventSource
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigateway.*;
import software.amazon.awscdk.services.lambda.eventsources.*;
Authorizer authorizer;
Model model;
RequestValidator requestValidator;
ApiEventSource apiEventSource = ApiEventSource.Builder.create("method", "path")
.apiKeyRequired(false)
.authorizationScopes(List.of("authorizationScopes"))
.authorizationType(AuthorizationType.NONE)
.authorizer(authorizer)
.methodResponses(List.of(MethodResponse.builder()
.statusCode("statusCode")
// the properties below are optional
.responseModels(Map.of(
"responseModelsKey", model))
.responseParameters(Map.of(
"responseParametersKey", false))
.build()))
.operationName("operationName")
.requestModels(Map.of(
"requestModelsKey", model))
.requestParameters(Map.of(
"requestParametersKey", false))
.requestValidator(requestValidator)
.requestValidatorOptions(RequestValidatorOptions.builder()
.requestValidatorName("requestValidatorName")
.validateRequestBody(false)
.validateRequestParameters(false)
.build())
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.lambda.IEventSource
IEventSource.Jsii$Default, IEventSource.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionApiEventSource(String method, String path) ApiEventSource(String method, String path, MethodOptions options) protectedApiEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedApiEventSource(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ApiEventSource
protected ApiEventSource(software.amazon.jsii.JsiiObjectRef objRef) -
ApiEventSource
protected ApiEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ApiEventSource
@Stability(Stable) public ApiEventSource(@NotNull String method, @NotNull String path, @Nullable MethodOptions options) - Parameters:
method- This parameter is required.path- This parameter is required.options-
-
ApiEventSource
- Parameters:
method- This parameter is required.path- This parameter is required.
-
-
Method Details
-
bind
Called bylambda.addEventSourceto allow the event source to bind to this function.- Specified by:
bindin interfaceIEventSource- Parameters:
target- This parameter is required.
-