Service definition(cognito-idp): Should `UserPoolAddOnsType.AdvancedSecurityMode` be optional?
See original GitHub issueI am a maintainer of Amazonka, an unofficial Haskell SDK for AWS. We use botocore definitions to generate the bulk of the Haskell code. In https://github.com/brendanhay/amazonka/issues/473 , a user reported that calling CreateUserPool
with no UserPoolAddOns
field set (as permitted by API spec) resulted in a deserialisation failure. This was because the response appeared to contain "UserPoolAddOns": {}
.
We have worked around this by making the AdvancedSecurityMode
setting optional, so that {}
can be parsed as a UserPoolAddOnsType
, but it is not clear what the correct upstream fix is. All the remedies i can think of either duplicate definitions, admit malformed requests, or risk breaking clients who rely on the response from CreateUserPool
to always include the UserPoolAddOns
key in its UserPool
structure.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top GitHub Comments
I created a user pool with a body of
{"PoolName":"test-pool"}
in the request and get noUserPoolAddOns
in the response. If I try{"PoolName": "test-pool", "UserPoolAddOns": {}}
in the request, it is correctly rejected by AWS.Based off our bug report, the request was reported to have no
UserPoolAddOns
and the responseUserPoolAddOns: {}
, but I cannot replicate this in either us-east-1 or ap-southeast-2. If Cognito was ever returning a response that disagreed with its own service definition, it has long since been fixed. Thanks very much for your time.Closing - not a bug?
No problem! Glad we were able to help.