aws-cloudformation / aws-cloudformation/cloudformation-cli
ApiGatewayV2 ResponseParameters inconsistency
- Dominant language
- Python
- Stars
- 336
- Forks
- 172
- Avg merge
- 3d 5m
- Merged PRs (30d)
- 3
Description
Hello,
The following fails to deploy with error: _Properties validation failed for resource CoolIntegration with message: [#/ResponseParameters/200: extraneous key [remove:header.x-powered-by] is not permitted]_
However, creating the ResponseParameters from AWS Console works. Note that the RequestParameters can be created using CloudFormation just fine.
**JSON of successful ResponseParameter when created in the AWS Console**
```
$ aws apigatewayv2 get-integration --api-id xxxxx --integration-id xxxxx --region eu-central-1 --output json --profile xxxx
{
"ConnectionId": "xxxxx",
"ConnectionType": "VPC_LINK",
"Description": "API Gateway Integration",
"IntegrationId": "xxxxx",
"IntegrationMethod": "ANY",
"IntegrationType": "HTTP_PROXY",
"IntegrationUri": "xxxxx",
"PayloadFormatVersion": "1.0",
"RequestParameters": {
"append:header.X-Service": "CoolService"
},
"ResponseParameters": {
"200": {
"remove:header.x-powered-by": "''"
}
},
"TimeoutInMillis": 30000
}
```
**Failing YAML**
```
CoolIntegration:
Type: AWS::ApiGatewayV2::Integration
Properties:
Description: API Gateway Integration
ApiId: !ImportValue x:y
ConnectionType: VPC_LINK
ConnectionId: !ImportValue x:y
IntegrationType: HTTP_PROXY
IntegrationMethod: ANY
IntegrationUri: !ImportValue x:y
PayloadFormatVersion: "1.0"
RequestParameters:
"append:header.X-Service": "CoolService"
ResponseParameters:
"200":
remove:header.x-powered-by: "''"
```
Contributor guide
Assessment
This issue has not been assessed yet.