AWS api网关的无效修补程序路径

时间:2018-07-17 14:28:33

标签: aws-api-gateway

当我执行以下代码时,出现如下错误。有人可以帮忙吗?

代码段:

rest_api_id=$($aws_cmd cloudformation describe-stacks --stack-name $stack_name --query 'Stacks[*].Outputs[?OutputKey==`restApiId`]' | jq -r '.[0][0].OutputValue')
resource_devices=$($aws_cmd cloudformation describe-stacks --stack-name $stack_name --query 'Stacks[*].Outputs[?OutputKey==`resourceDevices`]' | jq -r '.[0][0].OutputValue')
existing_request_validator=$($aws_cmd apigateway get-request-validators --rest-api-id $rest_api_id | jq -r '.items[0].id')

$aws_cmd apigateway update-method --rest-api-id $rest_api_id --resource-id $resource_devices --http-method POST --patch-operations op="replace",path="/requestValidatorId",value=""
$aws_cmd apigateway delete-request-validator --request-validator-id $existing_request_validator --rest-api-id $rest_api_id
new_validator=$($aws_cmd apigateway create-request-validator --name "Validate body" --rest-api-id $rest_api_id --validate-request-body | jq -r '.id')
$aws_cmd apigateway update-method --rest-api-id $rest_api_id --resource-id $resource_devices --http-method POST --patch-operations op="replace",path="/requestValidatorId",value="$new_validator"

Lambda函数存储桶已经存在 堆栈已存在,将更新......)剩余1个文件 {    “ StackId”:“ arn:aws:cloudformation:eu-west-1:060725138335:stack / a200345-convene-pushlambda / f617a220-7480-11e8-99db-500c3cb898d2” } 堆栈操作完成 添加请求验证器

调用UpdateMethod操作时发生错误(BadRequestException):无效的修补程序路径C:/ Program Files / Git / requestValidatorId

调用DeleteRequestValidator操作时发生错误(ConflictException):无法删除方法:POST // PushNotification / api / v3 / {context} / {environment} / devices

中引用的请求验证器“ Validate body”

调用CreateRequestValidator操作时发生错误(BadRequestException):请求验证程序名称必须唯一

调用UpdateMethod操作时发生错误(BadRequestException):无效的修补程序路径C:/ Program Files / Git / requestValidatorId

0 个答案:

没有答案