gpt4 book ai didi

rest - 如何在 REST API 的 cloudformation 模板中指定 TLS 版本?

转载 作者:行者123 更新时间:2023-12-03 07:23:12 24 4
gpt4 key购买 nike

使用 API 网关和其他资源创建堆栈、REST API。我可以在哪里指定 API 方法是仅支持 HTTP 还是 HTTPS,还是模板中任何特定版本的 TLS?

AWSTemplateFormatVersion: 2010-09-09
Description: API Gateway

Parameters:
apiGatewayHTTPMethod:
Type: String
Default: POST

Resources:
apiGateway:
Type: AWS::ApiGateway::RestApi
Properties:
EndpointConfiguration:
Types:
- REGIONAL
Name: fooAPI
apiGatewayRootMethod:
Type: AWS::ApiGateway::Method
Properties:
AuthorizationType: NONE
HttpMethod: !Ref apiGatewayHTTPMethod
Integration:
IntegrationHttpMethod: POST
Type: AWS_PROXY
Uri: !Sub
- arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${lambdaArn}/invocations
- lambdaArn: !GetAtt lambdaFunction.Arn
ResourceId: !GetAtt apiGateway.RootResourceId
RestApiId: !Ref apiGateway

apiGatewayDeployment:
Type: AWS::ApiGateway::Deployment
DependsOn:
- apiGatewayRootMethod
Properties:
RestApiId: !Ref apiGateway
StageName: BETA

最佳答案

你不能这样做。 REST API 仅限 HTTPS,您无法将其更改为 HTTP。

关于rest - 如何在 REST API 的 cloudformation 模板中指定 TLS 版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68849596/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com