-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions:.yml
65 lines (65 loc) · 2.5 KB
/
functions:.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
functions:
create:
handler: todos/create.handler
events:
- http:
method: post
path: /todos
private: true
authorizer:
type: COGNITO_USER_POOLS
authorizerId:
Ref: ApiGatewayAuthorizer
request:
parameters:
headers:
x-amazon-apigateway-api-key-source: HEADER
x-amazon-apigateway-api-key-required: true
schema:
application/json: ${file(models/create-todo.json)}
get:
handler: todos/get.handler
events:
- http:
method: get
path: /todos/{id}
private: true
authorizer:
type: COGNITO_USER_POOLS
authorizerId:
Ref: ApiGatewayAuthorizer
request:
parameters:
headers:
x-amazon-apigateway-api-key-source: HEADER
x-amazon-apigateway-api-key-required: true
schema:
application/json: ${file(models/get-todo.json)}
list:
handler: todos/list.handler
events:
- http:
method: get
path: /todos
private: true
authorizer:
type: COGNITO_USER_POOLS
authorizerId:
Ref: ApiGatewayAuthorizer
request:
parameters:
headers:
x-amazon-apigateway-api-key-source: HEADER
x-amazon-apigateway-api-key-required: true
schema:
application/json: ${file(models/list-todos.json)}
update:
handler: todos/update.handler
events:
- http:
method: put
path: /todos/{id}
private: true
authorizer:
type:
COGNITOUSERPOOLS authorizerId: Ref: ApiGatewayAuthorizer request: parameters: headers: x-amazon-apigateway-api-key-source: HEADER x-amazon-apigateway-api-key-required: true schema: application/json: ${file(models/update-todo.json)} delete: handler: todos/delete.handler events: - http: method: delete path: /todos/{id} private: true authorizer: type: COGNITOUSERPOOLS authorizerId: Ref: ApiGatewayAuthorizer request: parameters: headers: x-amazon-apigateway-api-key-source: HEADER x-amazon-apigateway-api-key-required: true schema: application/json: ${file(models/delete-todo.json)} signup: handler: auth/signup.handler events: - http: method: post path: /auth/signup cors: true login: handler: auth/login.handler events: - http: method: post path: /auth/login cors: true