@Stability(value=Stable) public static final class MethodOptions.Builder extends Object implements software.amazon.jsii.Builder<MethodOptions>
MethodOptions| Constructor and Description |
|---|
Builder() |
@Stability(value=Stable) public MethodOptions.Builder apiKeyRequired(Boolean apiKeyRequired)
MethodOptions.getApiKeyRequired()apiKeyRequired - Indicates whether the method requires clients to submit a valid API key.this@Stability(value=Stable) public MethodOptions.Builder authorizationScopes(List<String> authorizationScopes)
MethodOptions.getAuthorizationScopes()authorizationScopes - A list of authorization scopes configured on the method.
The scopes are used with
a COGNITO_USER_POOLS authorizer to authorize the method invocation.this@Stability(value=Stable) public MethodOptions.Builder authorizationType(AuthorizationType authorizationType)
MethodOptions.getAuthorizationType()authorizationType - Method authorization. If the value is set of `Custom`, an `authorizer` must also be specified.
If you're using one of the authorizers that are available via the {@link Authorizer} class, such as {@link Authorizer#token()},
it is recommended that this option not be specified. The authorizer will take care of setting the correct authorization type.
However, specifying an authorization type using this property that conflicts with what is expected by the {@link Authorizer}
will result in an error.this@Stability(value=Stable) public MethodOptions.Builder authorizer(IAuthorizer authorizer)
MethodOptions.getAuthorizer()authorizer - If `authorizationType` is `Custom`, this specifies the ID of the method authorizer resource.
If specified, the value of authorizationType must be set to Customthis@Stability(value=Stable) public MethodOptions.Builder methodResponses(List<? extends MethodResponse> methodResponses)
MethodOptions.getMethodResponses()methodResponses - The responses that can be sent to the client who calls the method.this@Stability(value=Stable) public MethodOptions.Builder operationName(String operationName)
MethodOptions.getOperationName()operationName - A friendly operation name for the method.
For example, you can assign the
OperationName of ListPets for the GET /pets method.this@Stability(value=Stable) public MethodOptions.Builder requestModels(Map<String,? extends IModel> requestModels)
MethodOptions.getRequestModels()requestModels - The models which describe data structure of request payload.
When
combined with requestValidator or requestValidatorOptions, the service
will validate the API request payload before it reaches the API's Integration (including proxies).
Specify requestModels as key-value pairs, with a content type
(e.g. 'application/json') as the key and an API Gateway Model as the value.this@Stability(value=Stable) public MethodOptions.Builder requestParameters(Map<String,? extends Boolean> requestParameters)
MethodOptions.getRequestParameters()requestParameters - The request parameters that API Gateway accepts.
Specify request parameters
as key-value pairs (string-to-Boolean mapping), with a source as the key and
a Boolean as the value. The Boolean specifies whether a parameter is required.
A source must match the format method.request.location.name, where the location
is querystring, path, or header, and name is a valid, unique parameter name.this@Stability(value=Stable) public MethodOptions.Builder requestValidator(IRequestValidator requestValidator)
MethodOptions.getRequestValidator()requestValidator - The ID of the associated request validator.
Only one of requestValidator or requestValidatorOptions must be specified.
Works together with requestModels or requestParameters to validate
the request before it reaches integration like Lambda Proxy Integration.this@Stability(value=Stable) public MethodOptions.Builder requestValidatorOptions(RequestValidatorOptions requestValidatorOptions)
MethodOptions.getRequestValidatorOptions()requestValidatorOptions - Request validator options to create new validator Only one of `requestValidator` or `requestValidatorOptions` must be specified.
Works together with requestModels or requestParameters to validate
the request before it reaches integration like Lambda Proxy Integration.this@Stability(value=Stable) public MethodOptions build()
build in interface software.amazon.jsii.Builder<MethodOptions>MethodOptionsNullPointerException - if any required attribute was not providedCopyright © 2022. All rights reserved.