Method: Jets::Resource::ApiGateway::Method#definition

Defined in:
lib/jets/resource/api_gateway/method.rb

#definitionObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/jets/resource/api_gateway/method.rb', line 13

def definition
  {
    method_logical_id => {
      type: "AWS::ApiGateway::Method",
      properties: {
        resource_id: "!Ref #{resource_id}",
        rest_api_id: "!Ref #{RestApi.logical_id}",
        http_method: @route.method,
        request_parameters: {},
        authorization_type: authorization_type,
        integration: {
          integration_http_method: "POST",
          type: "AWS_PROXY",
          uri: "!Sub arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${{namespace}LambdaFunction.Arn}/invocations"
        },
        method_responses: []
      }
    }
  }
end