Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rest 如何在不指定所有资源的情况下设置API网关_Rest_Amazon Web Services_Routes_Aws Api Gateway - Fatal编程技术网

Rest 如何在不指定所有资源的情况下设置API网关

Rest 如何在不指定所有资源的情况下设置API网关,rest,amazon-web-services,routes,aws-api-gateway,Rest,Amazon Web Services,Routes,Aws Api Gateway,我有一些EC2应用程序(在node.js中)有许多REST路径,由于仍在开发过程中,路径不断变化 如何在api网关中设置映射到多个路径,而不是指定每个路径 e.g. my ec2 end points have: my.ec2.com/api/test my.ec2.com/api/test1 my.ec2.com/api/test2 my.ec2.com/api/user/time my.ec2.com/api/user/time1 my.ec2.com/api/user/time2 而不

我有一些EC2应用程序(在node.js中)有许多REST路径,由于仍在开发过程中,路径不断变化

如何在api网关中设置映射到多个路径,而不是指定每个路径

e.g. 
my ec2 end points have:
my.ec2.com/api/test
my.ec2.com/api/test1
my.ec2.com/api/test2
my.ec2.com/api/user/time
my.ec2.com/api/user/time1
my.ec2.com/api/user/time2
而不是设置api网关中的所有资源, 我可以做一些类似于: api-gateway.amazon.com/api,指向my.ec2.com/api/


并且它将解决任何自动指向的调用等问题。

从今天起,在API网关控制台中仍然不可能实现

解决办法是大摇大摆。然后我可以使用一些脚本生成Swagger文件并导入到API网关。事实上,这是一个很好的解决方案,因为我可以对Swagger进行源代码控制