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"]]