gpt4 book ai didi

java - 无效资源异常 : property RestApiID not defined for resource of type Api

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

我收到错误错误:

[InvalidResourceException('APIFunctionpersonapi', 'property RestApiID not defined for resource of type Api')] ('APIFunctionpersonapi', 'property RestApiID not defined for resource of type Api')
Resources:
APIFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: APIFunction
Handler: com.java.Handler::handleRequest
Policies:
- arn:aws:iam::aws:policy/SecretsManagerReadWrite
- arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole
- arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
Runtime: java11
MemorySize: 1024
Environment:
Variables:
PARAM1: VALUE
Events:
personapi:
Type: Api
Properties:
Path: /myapi/person
Method: post
RestApiID: !Ref SamTestPrivateApi
VpcConfig:
SecurityGroupIds:
SubnetIds:
SamTestPrivateApi:
Type: AWS::Serverless::Api
Properties:
OpenApiVersion: 3.0.3
StageName: !Ref Environment

最佳答案

InvalidResourceException : property RestApiID not defined for resource of type Api

检查SAM cli发行说明并更新到最新版本。然后再试一次。

关于java - 无效资源异常 : property RestApiID not defined for resource of type Api,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75377482/

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