Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

marketplace-entitlement: get_entitlements #3520

Closed
Alustrat opened this issue Dec 6, 2022 · 4 comments
Closed

marketplace-entitlement: get_entitlements #3520

Alustrat opened this issue Dec 6, 2022 · 4 comments
Assignees
Labels
documentation This is a problem with documentation. service-api This issue is caused by the service API, not the SDK implementation.

Comments

@Alustrat
Copy link

Alustrat commented Dec 6, 2022

Describe the issue

Client version: 1.26.19
Doc version: 1.26.23

Hi there !
While using the marketplace-entitlement client from boto3 I encountered an error which seems to go against what is said on the documentation page.

My code looks like this:

entitlement_client = boto3.client("marketplace-entitlement")

paginator = entitlement_client.get_paginator("get_entitlements")

response_iterable = paginator.paginate(
    ProductCode="my-product-code",
    Filter={
        "DIMENSION": [
            "one-of-my-dimensions",
        ]
    },
)

And the error I receive with this code is:

An error occurred (InvalidParameterException) when calling the GetEntitlements operation: Invalid filter combination provided. Please provide the CUSTOMER_IDENTIFIER along with DIMENSION.

However the boto3 documentation say "Filter is used to return entitlements for a specific customer or for a specific dimension.".


While I'm reporting this one, I want to add some other points that affect the same documentation (but let me know if you want that I create other issues for them):

  • The link "See also: AWS API Documentation" is broken
  • It may be a good idea to specify that filters should have the format CUSTOMER_ID and DIMENSION (it is mentioned on the AWS referenceAPI page but never on the boto3 documentation page)
  • It may also be a good idea to point out that pagination can no longer go above 25 or an error is thrown

Links

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/marketplace-entitlement.html#MarketplaceEntitlementService.Client.get_entitlements

@Alustrat Alustrat added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Dec 6, 2022
@tim-finnigan tim-finnigan self-assigned this Dec 6, 2022
@tim-finnigan
Copy link
Contributor

Thanks @Alustrat for reporting these issues. It looks like that AWS API Documentation link should point to here: https://docs.aws.amazon.com/marketplaceentitlement/latest/APIReference/API_GetEntitlements.html.

Boto3 and other SDK documentation is pulled upstream from service API teams, so those respective service teams must address their respective documentation issues. I created this issue in our cross-SDK repo to track the documentation problems going forward: aws/aws-sdk#432.

Regarding this point:

It may also be a good idea to point out that pagination can no longer go above 25 or an error is thrown

What error are you seeing? If you can provide your debug logs (with any sensitive info redacted) by adding boto3.set_stream_logger('') to your script then that could give more insight into the behavior.

@tim-finnigan tim-finnigan added service-api This issue is caused by the service API, not the SDK implementation. response-requested Waiting on additional information or feedback. and removed needs-triage This issue or PR still needs to be triaged. labels Dec 6, 2022
@Alustrat
Copy link
Author

Alustrat commented Dec 7, 2022

Hello @tim-finnigan, no problem 😃 Thanks for taking care of this !

For the pagination point, I will not be able to help you with the debug logs I will be far from my computer for the next days but I can show you the error we received:

An error occurred (ValidationException) when calling the GetEntitlements operation: 1 validation error detected: Value '100' at 'maxResults' failed to satisfy constraint: Member must have value less than or equal to 25

Following what this error said, I came to the conclusion that the pagination was in fact limited to 25. I finally completely removed the PaginationConfig from the paginator parameters and that fixed it.

@github-actions github-actions bot removed the response-requested Waiting on additional information or feedback. label Dec 7, 2022
@Alustrat
Copy link
Author

Alustrat commented Dec 8, 2022

Juste thought that if these errors are right, It could also be a good Idea to throw them when using the client stub (currently they are not).

@tim-finnigan
Copy link
Contributor

Hi @Alustrat thanks for following up. It sounds like you were able to resolve the issue. We'll continue to track the documentation problems in that other issue going forward. Since the documentation and error come from the service side, this is something that the Marketplace Entitlement service team would need to address rather than boto3 directly. Please refer to that issue for updates going forward, and if you have an AWS Support plan consider reaching out there for assistance or by using the Provide feedback links at the bottom of API documentation pages such as GetEntitlements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. service-api This issue is caused by the service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

2 participants