-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yml
186 lines (172 loc) · 4.79 KB
/
template.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
AWSTemplateFormatVersion: 2010-09-09
Transform:
- AWS::Serverless-2016-10-31
- AWS::CodeStar
Globals:
Function:
Runtime: nodejs6.10
MemorySize: 128
Timeout: 15
Api:
EndpointConfiguration: EDGE
Cors:
# AllowMethods: "'GET'" # If you omit this property, then SAM will automatically allow all the methods configured for each API.
AllowHeaders: "'*'"
AllowOrigin: "'*'"
# StageName: prod
Parameters:
ProjectId:
Type: String
Description: AWS CodeStar projectID used to associate new resources to team members
Resources:
# APIGateway:
# Type: AWS::Serverless::Api
# Properties:
# StageName: prod
# DefinitionUri: swagger.yml
# COULD USE THIS TO DEFINE THE API GATEWAY IN A SWAGGER FILE
# https://github.com/awslabs/serverless-application-model/blob/master/examples/2016-10-31/api_swagger_cors/template.yaml
# DefinitionBody:
# 'Fn::Transform':
# Name: 'AWS::Include'
# Replace <bucket> with your bucket name
# Parameters:
# Location: s3://<bucket>/swagger.yaml
LF:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Role:
Fn::ImportValue:
!Join ['-', [!Ref 'ProjectId', !Ref 'AWS::Region', 'LambdaTrustRole']]
# Role: arn:aws:iam::921647828195:role/AWSLambdaBasicRole
# Policies: GORESTLambdaDefaultAccess
Environment:
Variables:
NODE_ENV: production
Events:
Proxy:
Type: Api
Properties:
Path: /{proxy+}
Method: any
# # this will create another event triggering the same lambda function
# GetModels:
# Type: Api
# Properties:
# Path: /models
# Method: get
# # this will create yet another event triggering the same lambda function
# GetModel:
# Type: Api
# Properties:
# Path: /models/{id}
# Method: get
# # this will create yet another event triggering the same lambda function
# GetModelGOs:
# Type: Api
# Properties:
# Path: /models/go
# Method: get
# GetModelGPs:
# Type: Api
# Properties:
# Path: /models/gp
# Method: get
# GetModelPMIDs:
# Type: Api
# Properties:
# Path: /models/pmid
# Method: get
# GetGroups:
# Type: Api
# Properties:
# Path: /groups
# Method: get
# GetGroup:
# Type: Api
# Properties:
# Path: /groups/{name}
# Method: get
# GetGroupDetails:
# Type: Api
# Properties:
# Path: /groups/details
# Method: get
# GetUsers:
# Type: Api
# Properties:
# Path: /users
# Method: get
# GetUser:
# Type: Api
# Properties:
# Path: /users/{orcid}
# Method: get
# GetUserModels:
# Type: Api
# Properties:
# Path: /users/{orcid}/models
# Method: get
# GetUserBPs:
# Type: Api
# Properties:
# Path: /users/{orcid}/bp
# Method: get
# GetUserGPs:
# Type: Api
# Properties:
# Path: /users/{orcid}/gp
# Method: get
# # Get Information on Biological Process
# GetGOs:
# Type: Api
# Properties:
# Path: /go
# Method: get
# GetGO:
# Type: Api
# Properties:
# Path: /go/{id}
# Method: get
# GetGOHierarchy:
# Type: Api
# Properties:
# Path: /go/{id}/hierarchy
# Method: get
# GetGOUsers:
# Type: Api
# Properties:
# Path: /go/{id}/users
# Method: get
# GetGOModels:
# Type: Api
# Properties:
# Path: /go/{id}/models
# Method: get
# # Get Information on Gene Products
# GetGPs:
# Type: Api
# Properties:
# Path: /gp
# Method: get
# GetGP:
# Type: Api
# Properties:
# Path: /gp/{id}
# Method: get
# GetGPModels:
# Type: Api
# Properties:
# Path: /gp/{id}/models
# Method: get
# GetPMIDModels:
# Type: Api
# Properties:
# Path: /pmid/{id}/models
# Method: get
# GetAssociation:
# Type: Api
# Properties:
# Path: /association/{subject}/{object}
# Method: get