@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.185Z") @Stability(value=Stable) public interface MethodProps extends software.amazon.jsii.JsiiSerializable
// 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.*;
Authorizer authorizer;
Integration integration;
Model model;
RequestValidator requestValidator;
Resource resource;
MethodProps methodProps = MethodProps.builder()
.httpMethod("httpMethod")
.resource(resource)
// the properties below are optional
.integration(integration)
.options(MethodOptions.builder()
.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())
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
MethodProps.Builder
A builder for
MethodProps |
static class |
MethodProps.Jsii$Proxy
An implementation for
MethodProps |
| Modifier and Type | Method and Description |
|---|---|
static MethodProps.Builder |
builder() |
String |
getHttpMethod()
The HTTP method ("GET", "POST", "PUT", ...) that clients use to call this method.
|
default Integration |
getIntegration()
The backend system that the method calls when it receives a request.
|
default MethodOptions |
getOptions()
Method options.
|
IResource |
getResource()
The resource this method is associated with.
|
@Stability(value=Stable) @NotNull String getHttpMethod()
@Stability(value=Stable) @NotNull IResource getResource()
For root resource methods,
specify the RestApi object.
@Stability(value=Stable) @Nullable default Integration getIntegration()
Default: - a new `MockIntegration`.
@Stability(value=Stable) @Nullable default MethodOptions getOptions()
Default: - No options.
@Stability(value=Stable) static MethodProps.Builder builder()
MethodProps.Builder of MethodPropsCopyright © 2022. All rights reserved.