1
+ {
2
+ "Resources" : {
3
+ "User00B015A1" : {
4
+ "Type" : " AWS::IAM::User"
5
+ },
6
+ "UserDefaultPolicy1F97781E" : {
7
+ "Type" : " AWS::IAM::Policy" ,
8
+ "Properties" : {
9
+ "PolicyDocument" : {
10
+ "Statement" : [
11
+ {
12
+ "Action" : " execute-api:Invoke" ,
13
+ "Effect" : " Allow" ,
14
+ "Resource" : {
15
+ "Fn::Join" : [
16
+ " " ,
17
+ [
18
+ " arn:aws:execute-api:" ,
19
+ {
20
+ "Ref" : " AWS::Region"
21
+ },
22
+ " :" ,
23
+ {
24
+ "Ref" : " AWS::AccountId"
25
+ },
26
+ " :" ,
27
+ {
28
+ "Ref" : " HttpApiF5A9A8A7"
29
+ },
30
+ " /*/*/foo"
31
+ ]
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ "Action" : " execute-api:Invoke" ,
37
+ "Effect" : " Allow" ,
38
+ "Resource" : {
39
+ "Fn::Join" : [
40
+ " " ,
41
+ [
42
+ " arn:aws:execute-api:" ,
43
+ {
44
+ "Ref" : " AWS::Region"
45
+ },
46
+ " :" ,
47
+ {
48
+ "Ref" : " AWS::AccountId"
49
+ },
50
+ " :" ,
51
+ {
52
+ "Ref" : " HttpApiF5A9A8A7"
53
+ },
54
+ " /*/*/books/*"
55
+ ]
56
+ ]
57
+ }
58
+ }
59
+ ],
60
+ "Version" : " 2012-10-17"
61
+ },
62
+ "PolicyName" : " UserDefaultPolicy1F97781E" ,
63
+ "Users" : [
64
+ {
65
+ "Ref" : " User00B015A1"
66
+ }
67
+ ]
68
+ }
69
+ },
70
+ "UserAccess" : {
71
+ "Type" : " AWS::IAM::AccessKey" ,
72
+ "Properties" : {
73
+ "UserName" : {
74
+ "Ref" : " User00B015A1"
75
+ }
76
+ }
77
+ },
78
+ "HttpApiF5A9A8A7" : {
79
+ "Type" : " AWS::ApiGatewayV2::Api" ,
80
+ "Properties" : {
81
+ "Name" : " HttpApi" ,
82
+ "ProtocolType" : " HTTP"
83
+ }
84
+ },
85
+ "HttpApiDefaultStage3EEB07D6" : {
86
+ "Type" : " AWS::ApiGatewayV2::Stage" ,
87
+ "Properties" : {
88
+ "ApiId" : {
89
+ "Ref" : " HttpApiF5A9A8A7"
90
+ },
91
+ "StageName" : " $default" ,
92
+ "AutoDeploy" : true
93
+ }
94
+ },
95
+ "HttpApiANYfooexamplecom903F7A9F" : {
96
+ "Type" : " AWS::ApiGatewayV2::Integration" ,
97
+ "Properties" : {
98
+ "ApiId" : {
99
+ "Ref" : " HttpApiF5A9A8A7"
100
+ },
101
+ "IntegrationType" : " HTTP_PROXY" ,
102
+ "IntegrationMethod" : " GET" ,
103
+ "IntegrationUri" : " https://www.example.com/" ,
104
+ "PayloadFormatVersion" : " 1.0"
105
+ }
106
+ },
107
+ "HttpApiANYfooD178456F" : {
108
+ "Type" : " AWS::ApiGatewayV2::Route" ,
109
+ "Properties" : {
110
+ "ApiId" : {
111
+ "Ref" : " HttpApiF5A9A8A7"
112
+ },
113
+ "RouteKey" : " ANY /foo" ,
114
+ "AuthorizationType" : " AWS_IAM" ,
115
+ "Target" : {
116
+ "Fn::Join" : [
117
+ " " ,
118
+ [
119
+ " integrations/" ,
120
+ {
121
+ "Ref" : " HttpApiANYfooexamplecom903F7A9F"
122
+ }
123
+ ]
124
+ ]
125
+ }
126
+ }
127
+ },
128
+ "HttpApiANYbooksbookexamplecom5C333C98" : {
129
+ "Type" : " AWS::ApiGatewayV2::Integration" ,
130
+ "Properties" : {
131
+ "ApiId" : {
132
+ "Ref" : " HttpApiF5A9A8A7"
133
+ },
134
+ "IntegrationType" : " HTTP_PROXY" ,
135
+ "IntegrationMethod" : " GET" ,
136
+ "IntegrationUri" : " https://www.example.com/" ,
137
+ "PayloadFormatVersion" : " 1.0"
138
+ }
139
+ },
140
+ "HttpApiANYbooksbook2F78361C" : {
141
+ "Type" : " AWS::ApiGatewayV2::Route" ,
142
+ "Properties" : {
143
+ "ApiId" : {
144
+ "Ref" : " HttpApiF5A9A8A7"
145
+ },
146
+ "RouteKey" : " ANY /books/{book}" ,
147
+ "AuthorizationType" : " AWS_IAM" ,
148
+ "Target" : {
149
+ "Fn::Join" : [
150
+ " " ,
151
+ [
152
+ " integrations/" ,
153
+ {
154
+ "Ref" : " HttpApiANYbooksbookexamplecom5C333C98"
155
+ }
156
+ ]
157
+ ]
158
+ }
159
+ }
160
+ }
161
+ },
162
+ "Outputs" : {
163
+ "API" : {
164
+ "Value" : {
165
+ "Fn::Join" : [
166
+ " " ,
167
+ [
168
+ " https://" ,
169
+ {
170
+ "Ref" : " HttpApiF5A9A8A7"
171
+ },
172
+ " .execute-api." ,
173
+ {
174
+ "Ref" : " AWS::Region"
175
+ },
176
+ " ." ,
177
+ {
178
+ "Ref" : " AWS::URLSuffix"
179
+ },
180
+ " /"
181
+ ]
182
+ ]
183
+ }
184
+ },
185
+ "TESTACCESSKEYID" : {
186
+ "Value" : {
187
+ "Ref" : " UserAccess"
188
+ }
189
+ },
190
+ "TESTSECRETACCESSKEY" : {
191
+ "Value" : {
192
+ "Fn::GetAtt" : [
193
+ " UserAccess" ,
194
+ " SecretAccessKey"
195
+ ]
196
+ }
197
+ },
198
+ "TESTREGION" : {
199
+ "Value" : {
200
+ "Ref" : " AWS::Region"
201
+ }
202
+ }
203
+ }
204
+ }
0 commit comments