@Stability(value=Experimental) @Internal public static final class MethodOptions.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements MethodOptions
MethodOptionssoftware.amazon.jsii.JsiiObject.InitializationModeMethodOptions.Builder, MethodOptions.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
Jsii$Proxy(Boolean apiKeyRequired,
List<String> authorizationScopes,
AuthorizationType authorizationType,
IAuthorizer authorizer,
List<? extends MethodResponse> methodResponses,
String operationName,
Map<String,? extends IModel> requestModels,
Map<String,? extends Boolean> requestParameters,
IRequestValidator requestValidator,
RequestValidatorOptions requestValidatorOptions)
Constructor that initializes the object based on literal property values passed by the
MethodOptions.Builder. |
protected |
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.
|
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.databind.JsonNode |
$jsii$toJson() |
boolean |
equals(Object o) |
Boolean |
getApiKeyRequired()
(experimental) Indicates whether the method requires clients to submit a valid API key.
|
List<String> |
getAuthorizationScopes()
(experimental) A list of authorization scopes configured on the method.
|
AuthorizationType |
getAuthorizationType()
(experimental) Method authorization.
|
IAuthorizer |
getAuthorizer()
(experimental) If `authorizationType` is `Custom`, this specifies the ID of the method authorizer resource.
|
List<MethodResponse> |
getMethodResponses()
(experimental) The responses that can be sent to the client who calls the method.
|
String |
getOperationName()
(experimental) A friendly operation name for the method.
|
Map<String,IModel> |
getRequestModels()
(experimental) The models which describe data structure of request payload.
|
Map<String,Boolean> |
getRequestParameters()
(experimental) The request parameters that API Gateway accepts.
|
IRequestValidator |
getRequestValidator()
(experimental) The ID of the associated request validator.
|
RequestValidatorOptions |
getRequestValidatorOptions()
(experimental) Request validator options to create new validator Only one of `requestValidator` or `requestValidatorOptions` must be specified.
|
int |
hashCode() |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitbuilderprotected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
objRef - Reference to the JSII managed object.protected Jsii$Proxy(Boolean apiKeyRequired, List<String> authorizationScopes, AuthorizationType authorizationType, IAuthorizer authorizer, List<? extends MethodResponse> methodResponses, String operationName, Map<String,? extends IModel> requestModels, Map<String,? extends Boolean> requestParameters, IRequestValidator requestValidator, RequestValidatorOptions requestValidatorOptions)
MethodOptions.Builder.public final Boolean getApiKeyRequired()
MethodOptionsDefault: false
getApiKeyRequired in interface MethodOptionspublic final List<String> getAuthorizationScopes()
MethodOptionsThe scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation.
Default: - no authorization scopes
getAuthorizationScopes in interface MethodOptionshttps://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-authorizationscopespublic final AuthorizationType getAuthorizationType()
MethodOptionsIf 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.
Default: - open access unless `authorizer` is specified
getAuthorizationType in interface MethodOptionspublic final IAuthorizer getAuthorizer()
MethodOptions
If specified, the value of authorizationType must be set to Custom
getAuthorizer in interface MethodOptionspublic final List<MethodResponse> getMethodResponses()
MethodOptionsDefault: None This property is not required, but if these are not supplied for a Lambda proxy integration, the Lambda function must return a value of the correct format, for the integration response to be correctly mapped to a response to the client.
getMethodResponses in interface MethodOptionshttps://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-settings-method-response.htmlpublic final String getOperationName()
MethodOptionsFor example, you can assign the OperationName of ListPets for the GET /pets method.
getOperationName in interface MethodOptionspublic final Map<String,IModel> getRequestModels()
MethodOptions
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.
Example:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 Object userModel = api.addModel("UserModel", Map.of( "schema", Map.of( "type", apigateway.JsonSchemaType.getOBJECT(), "properties", Map.of( "userId", Map.of( "type", apigateway.JsonSchema.getSTRING()), "name", Map.of( "type", apigateway.JsonSchema.getSTRING())), "required", asList("userId")))); api.root.addResource('user').addMethod("POST", new LambdaIntegration(userLambda), Map.of( "requestModels", Map.of( "application/json", userModel)));
getRequestModels in interface MethodOptionshttps://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-settings-method-request.html#setup-method-request-modelpublic final Map<String,Boolean> getRequestParameters()
MethodOptionsSpecify 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.
Default: None
getRequestParameters in interface MethodOptionspublic final IRequestValidator getRequestValidator()
MethodOptions
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.
Default: - No default validator
getRequestValidator in interface MethodOptionspublic final RequestValidatorOptions getRequestValidatorOptions()
MethodOptions
Works together with requestModels or requestParameters to validate
the request before it reaches integration like Lambda Proxy Integration.
Default: - No default validator
getRequestValidatorOptions in interface MethodOptions@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
$jsii$toJson in interface software.amazon.jsii.JsiiSerializableCopyright © 2021. All rights reserved.