boto / botocore

The low-level, core functionality of boto3 and the AWS CLI.
Apache License 2.0
1.51k stars 1.09k forks source link

route53resolver endpoints have incorrect required argument: CreatorRequestId #3094

Closed edbmiller closed 8 months ago

edbmiller commented 11 months ago

Describe the bug

For the CreateResolverQueryLogConfig API method: the service model in data/route53resolver/service-2,json and the API reference both incorrectly say CreatorRequestId is a required argument.

This creates a bug in the type-stubs library for this service: https://pypi.org/project/mypy-boto3-route53resolver/ (that's how I noticed it).

Note: the boto3 documentation also marks it as "required" but points out the field is auto-populated if not provided

Expected Behavior

The documentation and service definition in botocore should match the following error message from the AWS CLI (version 2.7.9, on Ubuntu):

$ aws route53resolver create-resolver-query-log-config
usage: ...
...

aws: error: the following arguments are required: --name, --destination-arn

Note the absence of --creator-request-id

SDK version used

latest

Environment details (OS name and version, etc.)

N/A

edbmiller commented 11 months ago

Have noticed this isn't the only such endpoint:

AssociateFirewallRuleGroup

CreateFirewallDomainList

CreateFirewallRuleGroup

CreateFirewallRule

The other endpoints which are documented as requiring CreatorRequestId appear to behave as documented: CreateResolverRule and CreateResolverEndpoint

RyanFitzSimmonsAK commented 9 months ago

Hi @ed-dot-miller, thanks for reaching out. The model file and documentation correctly mark this field as required, as requests cannot succeed without this parameter. The CLI and Boto3 automatically populate this field for you, but because we cannot assume all consumers of the API will have this done for them, it still needs to marked as required in the model file. AWS CLI and the SDKs generate their documentation from those model files, so the documentation still must say it is required.

github-actions[bot] commented 8 months ago

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

edbmiller commented 8 months ago

Hi @RyanFitzSimmonsAK, I would have thought these model files only constitute the boto3 spec, not the spec of the REST API itself? But thanks for the response!

RyanFitzSimmonsAK commented 8 months ago

Boto3 (and other AWS SDKs) basically map one-to-one with the operations of a service. In order to maintain cross-SDK consistency and for scale reasons, service changes come from service teams changing the shared model file they're providing the SDKs.

github-actions[bot] commented 8 months ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.