Class MethodOptions.Jsii$Proxy

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigateway.MethodOptions.Jsii$Proxy
All Implemented Interfaces:
MethodOptions, software.amazon.jsii.JsiiSerializable
Enclosing interface:
MethodOptions

@Stability(Stable) @Internal public static final class MethodOptions.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements MethodOptions
An implementation for MethodOptions
  • Constructor Details

    • Jsii$Proxy

      protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
      Constructor that initializes the object based on values retrieved from the JsiiObject.
      Parameters:
      objRef - Reference to the JSII managed object.
    • Jsii$Proxy

      protected Jsii$Proxy(MethodOptions.Builder builder)
      Constructor that initializes the object based on literal property values passed by the MethodOptions.Builder.
  • Method Details

    • getApiKeyRequired

      public final Boolean getApiKeyRequired()
      Description copied from interface: MethodOptions
      Indicates whether the method requires clients to submit a valid API key.

      Default: false

      Specified by:
      getApiKeyRequired in interface MethodOptions
    • getAuthorizationScopes

      public final List<String> getAuthorizationScopes()
      Description copied from interface: MethodOptions
      A list of authorization scopes configured on the method.

      The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation.

      Default: - no authorization scopes

      Specified by:
      getAuthorizationScopes in interface MethodOptions
      See Also:
    • getAuthorizationType

      public final AuthorizationType getAuthorizationType()
      Description copied from interface: MethodOptions
      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 Authorizer class, such as

      invalid @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 Authorizer will result in an error.

      Default: - open access unless `authorizer` is specified

      Specified by:
      getAuthorizationType in interface MethodOptions
    • getAuthorizer

      public final IAuthorizer getAuthorizer()
      Description copied from interface: MethodOptions
      If authorizationType is Custom, this specifies the ID of the method authorizer resource.

      If specified, the value of authorizationType must be set to Custom

      Specified by:
      getAuthorizer in interface MethodOptions
    • getMethodResponses

      public final List<MethodResponse> getMethodResponses()
      Description copied from interface: MethodOptions
      The responses that can be sent to the client who calls the method.

      Default: 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.

      Specified by:
      getMethodResponses in interface MethodOptions
      See Also:
    • getOperationName

      public final String getOperationName()
      Description copied from interface: MethodOptions
      A friendly operation name for the method.

      For example, you can assign the OperationName of ListPets for the GET /pets method.

      Specified by:
      getOperationName in interface MethodOptions
    • getRequestModels

      public final Map<String,IModel> getRequestModels()
      Description copied from interface: MethodOptions
      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.

      Example:

       RestApi api;
       Function userLambda;
       Model userModel = api.addModel("UserModel", ModelOptions.builder()
               .schema(JsonSchema.builder()
                       .type(JsonSchemaType.OBJECT)
                       .properties(Map.of(
                               "userId", JsonSchema.builder()
                                       .type(JsonSchemaType.STRING)
                                       .build(),
                               "name", JsonSchema.builder()
                                       .type(JsonSchemaType.STRING)
                                       .build()))
                       .required(List.of("userId"))
                       .build())
               .build());
       api.root.addResource("user").addMethod("POST",
       new LambdaIntegration(userLambda), MethodOptions.builder()
               .requestModels(Map.of(
                       "application/json", userModel))
               .build());
       

      Specified by:
      getRequestModels in interface MethodOptions
      See Also:
    • getRequestParameters

      public final Map<String,Boolean> getRequestParameters()
      Description copied from interface: MethodOptions
      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.

      Default: None

      Specified by:
      getRequestParameters in interface MethodOptions
    • getRequestValidator

      public final IRequestValidator getRequestValidator()
      Description copied from interface: MethodOptions
      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.

      Default: - No default validator

      Specified by:
      getRequestValidator in interface MethodOptions
    • getRequestValidatorOptions

      public final RequestValidatorOptions getRequestValidatorOptions()
      Description copied from interface: MethodOptions
      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.

      Default: - No default validator

      Specified by:
      getRequestValidatorOptions in interface MethodOptions
    • $jsii$toJson

      @Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
      Specified by:
      $jsii$toJson in interface software.amazon.jsii.JsiiSerializable
    • equals

      public final boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object