888.sh
1.09 KB
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
#!/bin/bash
echo "=== 检查代理资源集成配置 ==="
API_ID="o7epe60qzf"
PROXY_RESOURCE_ID="cjql15"
VPC_LINK_ID="yw9qid"
echo "1. 检查 /{proxy+} ANY 方法的集成:"
aws apigateway get-integration \
--rest-api-id $API_ID \
--resource-id $PROXY_RESOURCE_ID \
--http-method ANY \
--query '{
Type:type,
Uri:uri,
ConnectionType:connectionType,
ConnectionId:connectionId,
IntegrationHttpMethod:httpMethod,
PassthroughBehavior:passthroughBehavior
}' \
--output table
echo ""
echo "2. 检查集成响应:"
aws apigateway get-integration-response \
--rest-api-id $API_ID \
--resource-id $PROXY_RESOURCE_ID \
--http-method ANY \
--status-code 200 \
--query '{StatusCode:statusCode, SelectionPattern:selectionPattern}' \
--output table
echo ""
echo "3. 检查方法响应:"
aws apigateway get-method-response \
--rest-api-id $API_ID \
--resource-id $PROXY_RESOURCE_ID \
--http-method ANY \
--status-code 200 \
--query '{StatusCode:statusCode, ResponseModels:responseModels}' \
--output table