[英]How can I export the AWS API Gateway Endpoints to file (or similar) after deploying?
I am using the AWS API Gateway to mock different APIs and I want to use those endpoints in my application (which is not a lambda).我正在使用 AWS API 网关模拟不同的 API,我想在我的应用程序(不是 lambda)中使用这些端点。
So my idea was to somehow reference those endpoints from a file like a json, but for that I need to get them exported every time I deploy.所以我的想法是以某种方式从 json 之类的文件中引用这些端点,但为此我需要在每次部署时导出它们。
Is there any way to archive this?有什么办法可以存档吗?
It depends on which stack you are using to deploy API gateway.这取决于您使用哪个堆栈来部署 API 网关。
For example,例如,
Outputs:
myapi:
Type: AWS::ApiGatewayV2::Api
Properties:
Name: MyAPI
ProtocolType: HTTP
APIEndpoint:
Description: endpoint of api
Value:
Fn::Join:
- ""
- - https://
- Ref: myapi
- .execute-api.ap-southeast-1.amazonaws.com/
Export:
Name: APIEndpoint
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.