1 個回答
- 最新
- 最多得票
- 最多評論
0
After Searching for while I found the Answer from https://repost.aws/knowledge-center/api-gateway-vpc-link-integration
- To retrieve the integration ID, run the AWS CLI command get-integrations similar to the following:
aws apigatewayv2 get-integrations --api-id <api-id>
- Create and save a JSON file named integration.json in the following format:
{ "ApiId": "<api-id>", "IntegrationId": "<integration id retrieved from previous step>", "RequestParameters": { "integration.request.header.ConnectionId": "context.connectionId", //passing context variable connectionId as ConnectionId header to backend "integration.request.header.any-header-key": "''static value'", //passing static value as querystring to backend "integration.request.querystring.any-querystring-key": "'static value'" } }
- To update the integration, run the AWS CLI command update-integration similar to the following:
aws apigatewayv2 update-integration --cli-input-json file://integration.json
- Deploy your API
已回答 5 個月前
相關內容
- AWS 官方已更新 2 年前