aws / aws-sdk-js

AWS SDK for JavaScript in the browser and Node.js
https://aws.amazon.com/developer/language/javascript/
Apache License 2.0
7.59k stars 1.55k forks source link

Missing `ec2/paginateDescribeVpcEndpointServices` method #4614

Closed nmussy closed 5 months ago

nmussy commented 6 months ago

Describe the bug

Despite DescribeVpcEndpointServicesCommand having both in its MaxResults and NextToken in its Input, and NextToken in its Output, the corresponding paginate command is not being generated by the SDK:

image

Expected Behavior

The corresponding paginateDescribeVpcEndpointServices should be generated

Current Behavior

The method is not being generated:

'"aws-cdk-lib/aws-ec2"' has no exported member named 'paginateDescribeVpcEndpointServices'. Did you mean 'InterfaceVpcEndpointService'? ts(2724)

Reproduction Steps

import { paginateDescribeVpcEndpointServices } from "aws-cdk-lib/aws-ec2";

Possible Solution

No response

Additional Information/Context

No response

SDK version used

3.535.0

Environment details (OS name and version, etc.)

macOS 14.3.1

nmussy commented 5 months ago

Let me know if I can open a PR to fix this, but I'm assuming that this file is generated automatically and would be overwritten after the following SDK update?

diff --git a/apis/ec2-2016-11-15.paginators.json b/apis/ec2-2016-11-15.paginators.json
index ea572e61e..975003fc9 100644
--- a/apis/ec2-2016-11-15.paginators.json
+++ b/apis/ec2-2016-11-15.paginators.json
@@ -707,6 +707,12 @@
       "output_token": "NextToken",
       "result_key": "VpcEndpoints"
     },
+    "DescribeVpcEndpointsServices": {
+      "input_token": "NextToken",
+      "limit_key": "MaxResults",
+      "output_token": "NextToken",
+      "result_key": "ServiceNames"
+    },
     "DescribeVpcPeeringConnections": {
       "input_token": "NextToken",
       "limit_key": "MaxResults",
RanVaknin commented 5 months ago

Hi @nmussy ,

Thanks for reaching out. The reason this paginator is missing is because the API model of EC2 doesn't define this operation as a paginatable operation. In theory this should be a really easy fix, but this is not something the SDK team can directly address. That json model file you are trying to edit is generated from an upstream source and will get overwritten by the next release. Since the SDK is code generated from the various AWS services' API models, all of the model changes need to be fixed upstream with the service team itself. Also, by looking at the operation, the result_key for this case might be ServiceDetails since it contains a lot more data about the resource rather than ServiceNames which is just a list of strings.

At any rate, I have created an internal ticket on your behalf to address this P126629878.

Since this is not actionable by the JS SDK team I will close this issue, but I will update the thread once I hear back.

Thanks again! Ran~