0
這裏是我如何設置我的堆棧的示例。我只發佈這一點,放心,堆棧工作正常。在APIGateway中設置查詢字符串和標題的名稱
問題我想問一下,我怎麼能具體queryString
名稱在url級別。現在在AWS控制檯(Web UI)上,它顯示{orderId}
,但我希望它顯示其他內容。我如何修改它?
此外,它在AWS UI上顯示{orderId}
爲HEADERS
框。我也想改變這一點。
OrdersPathResource:
Type: "AWS::ApiGateway::Resource"
Properties:
RestApiId:
Ref: "XYZApi"
ParentId: !GetAtt [XYZApi, RootResourceId]
PathPart: "orders"
OrdersIdPathResource:
Type: AWS::ApiGateway::Resource
Properties:
RestApiId:
Ref: "XYZApi"
ParentId:
Ref: "OrdersPathResource"
PathPart: "{ordersId}"
StatusPathResource:
Type: AWS::ApiGateway::Resource
Properties:
RestApiId:
Ref: "XYZApi"
ParentId:
Ref: "OrdersIdPathResource"
PathPart: "status"
GetOrdersShipmentStatusMethod:
Type: "AWS::ApiGateway::Method"
Properties:
ApiKeyRequired: true
AuthorizationType: "AWS_IAM"
HttpMethod: "GET"
ResourceId:
Ref: "StatusPathResource"
RestApiId:
Ref: "XYZApi"
Integration:
Type: "AWS_PROXY"
IntegrationHttpMethod: "POST"
Uri: !Join ["", ["arn:aws:apigateway:", !Ref "AWS::Region", ":lambda:path/2015-03-31/functions/",!GetAtt GetOrdersShipmentStatusLambdaFunction.Arn, "/invocations"]]