Class CfnMethodProps.Builder

java.lang.Object
software.amazon.awscdk.services.apigateway.CfnMethodProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnMethodProps>
Enclosing interface:
CfnMethodProps

@Stability(Stable) public static final class CfnMethodProps.Builder extends Object implements software.amazon.jsii.Builder<CfnMethodProps>
A builder for CfnMethodProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • httpMethod

      @Stability(Stable) public CfnMethodProps.Builder httpMethod(String httpMethod)
      Parameters:
      httpMethod - The method's HTTP verb. This parameter is required.
      Returns:
      this
    • resourceId

      @Stability(Stable) public CfnMethodProps.Builder resourceId(String resourceId)
      Parameters:
      resourceId - The Resource identifier for the MethodResponse resource. This parameter is required.
      Returns:
      this
    • restApiId

      @Stability(Stable) public CfnMethodProps.Builder restApiId(String restApiId)
      Parameters:
      restApiId - The string identifier of the associated RestApi. This parameter is required.
      Returns:
      this
    • apiKeyRequired

      @Stability(Stable) public CfnMethodProps.Builder apiKeyRequired(Boolean apiKeyRequired)
      Parameters:
      apiKeyRequired - A boolean flag specifying whether a valid ApiKey is required to invoke this method.
      Returns:
      this
    • apiKeyRequired

      @Stability(Stable) public CfnMethodProps.Builder apiKeyRequired(IResolvable apiKeyRequired)
      Parameters:
      apiKeyRequired - A boolean flag specifying whether a valid ApiKey is required to invoke this method.
      Returns:
      this
    • authorizationScopes

      @Stability(Stable) public CfnMethodProps.Builder authorizationScopes(List<String> authorizationScopes)
      Parameters:
      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. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
      Returns:
      this
    • authorizationType

      @Stability(Stable) public CfnMethodProps.Builder authorizationType(String authorizationType)
      Parameters:
      authorizationType - The method's authorization type. This parameter is required. For valid values, see Method in the API Gateway API Reference .

      If you specify the AuthorizerId property, specify CUSTOM or COGNITO_USER_POOLS for this property.

      Returns:
      this
    • authorizerId

      @Stability(Stable) public CfnMethodProps.Builder authorizerId(String authorizerId)
      Parameters:
      authorizerId - The identifier of an authorizer to use on this method. The method's authorization type must be CUSTOM or COGNITO_USER_POOLS .
      Returns:
      this
    • integration

      @Stability(Stable) public CfnMethodProps.Builder integration(IResolvable integration)
      Parameters:
      integration - Represents an HTTP , HTTP_PROXY , AWS , AWS_PROXY , or Mock integration.
      Returns:
      this
    • integration

      @Stability(Stable) public CfnMethodProps.Builder integration(CfnMethod.IntegrationProperty integration)
      Parameters:
      integration - Represents an HTTP , HTTP_PROXY , AWS , AWS_PROXY , or Mock integration.
      Returns:
      this
    • methodResponses

      @Stability(Stable) public CfnMethodProps.Builder methodResponses(IResolvable methodResponses)
      Parameters:
      methodResponses - Gets a method response associated with a given HTTP status code.
      Returns:
      this
    • methodResponses

      @Stability(Stable) public CfnMethodProps.Builder methodResponses(List<? extends Object> methodResponses)
      Parameters:
      methodResponses - Gets a method response associated with a given HTTP status code.
      Returns:
      this
    • operationName

      @Stability(Stable) public CfnMethodProps.Builder operationName(String operationName)
      Parameters:
      operationName - A human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in the PetStore example.
      Returns:
      this
    • requestModels

      @Stability(Stable) public CfnMethodProps.Builder requestModels(IResolvable requestModels)
      Parameters:
      requestModels - A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).
      Returns:
      this
    • requestModels

      @Stability(Stable) public CfnMethodProps.Builder requestModels(Map<String,String> requestModels)
      Parameters:
      requestModels - A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).
      Returns:
      this
    • requestParameters

      @Stability(Stable) public CfnMethodProps.Builder requestParameters(IResolvable requestParameters)
      Parameters:
      requestParameters - A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name} , where location is querystring , path , or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required ( true ) or optional ( false ). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.
      Returns:
      this
    • requestParameters

      @Stability(Stable) public CfnMethodProps.Builder requestParameters(Map<String,? extends Object> requestParameters)
      Parameters:
      requestParameters - A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name} , where location is querystring , path , or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required ( true ) or optional ( false ). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.
      Returns:
      this
    • requestValidatorId

      @Stability(Stable) public CfnMethodProps.Builder requestValidatorId(String requestValidatorId)
      Parameters:
      requestValidatorId - The identifier of a RequestValidator for request validation.
      Returns:
      this
    • build

      @Stability(Stable) public CfnMethodProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnMethodProps>
      Returns:
      a new instance of CfnMethodProps
      Throws:
      NullPointerException - if any required attribute was not provided