Skip to content

Commit

Permalink
feat(client-elastic-load-balancing-v2): Add paginators for the ELBv2 …
Browse files Browse the repository at this point in the history
…DescribeListenerCertificates and DescribeRules APIs. Fix broken waiter for the ELBv2 DescribeLoadBalancers API.
  • Loading branch information
awstools committed Sep 9, 2024
1 parent f8773ce commit 292ce40
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// smithy-typescript generated code
import { createPaginator } from "@smithy/core";
import { Paginator } from "@smithy/types";

import {
DescribeListenerCertificatesCommand,
DescribeListenerCertificatesCommandInput,
DescribeListenerCertificatesCommandOutput,
} from "../commands/DescribeListenerCertificatesCommand";
import { ElasticLoadBalancingV2Client } from "../ElasticLoadBalancingV2Client";
import { ElasticLoadBalancingV2PaginationConfiguration } from "./Interfaces";

/**
* @public
*/
export const paginateDescribeListenerCertificates: (
config: ElasticLoadBalancingV2PaginationConfiguration,
input: DescribeListenerCertificatesCommandInput,
...rest: any[]
) => Paginator<DescribeListenerCertificatesCommandOutput> = createPaginator<
ElasticLoadBalancingV2PaginationConfiguration,
DescribeListenerCertificatesCommandInput,
DescribeListenerCertificatesCommandOutput
>(ElasticLoadBalancingV2Client, DescribeListenerCertificatesCommand, "Marker", "NextMarker", "");
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// smithy-typescript generated code
import { createPaginator } from "@smithy/core";
import { Paginator } from "@smithy/types";

import {
DescribeRulesCommand,
DescribeRulesCommandInput,
DescribeRulesCommandOutput,
} from "../commands/DescribeRulesCommand";
import { ElasticLoadBalancingV2Client } from "../ElasticLoadBalancingV2Client";
import { ElasticLoadBalancingV2PaginationConfiguration } from "./Interfaces";

/**
* @public
*/
export const paginateDescribeRules: (
config: ElasticLoadBalancingV2PaginationConfiguration,
input: DescribeRulesCommandInput,
...rest: any[]
) => Paginator<DescribeRulesCommandOutput> = createPaginator<
ElasticLoadBalancingV2PaginationConfiguration,
DescribeRulesCommandInput,
DescribeRulesCommandOutput
>(ElasticLoadBalancingV2Client, DescribeRulesCommand, "Marker", "NextMarker", "");
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
export * from "./DescribeListenerCertificatesPaginator";

export * from "./DescribeListenersPaginator";

export * from "./DescribeLoadBalancersPaginator";

export * from "./DescribeRulesPaginator";

export * from "./DescribeTargetGroupsPaginator";

export * from "./DescribeTrustStoreAssociationsPaginator";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const checkState = async (
} catch (e) {}
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "LoadBalancerNotFound") {
if (exception.name && exception.name == "LoadBalancerNotFoundException") {
return { state: WaiterState.RETRY, reason };
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const checkState = async (
return { state: WaiterState.SUCCESS, reason };
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "LoadBalancerNotFound") {
if (exception.name && exception.name == "LoadBalancerNotFoundException") {
return { state: WaiterState.RETRY, reason };
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const checkState = async (
} catch (e) {}
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "LoadBalancerNotFound") {
if (exception.name && exception.name == "LoadBalancerNotFoundException") {
return { state: WaiterState.SUCCESS, reason };
}
}
Expand Down
21 changes: 15 additions & 6 deletions codegen/sdk-codegen/aws-models/elastic-load-balancing-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2281,7 +2281,12 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Describes the default certificate and the certificate list for the specified HTTPS or TLS\n listener.</p>\n <p>If the default certificate is also in the certificate list, it appears twice in the\n results (once with <code>IsDefault</code> set to true and once with <code>IsDefault</code> set\n to false).</p>\n <p>For more information, see <a href=\"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#https-listener-certificates\">SSL certificates</a> in the <i>Application Load Balancers Guide</i> or\n <a href=\"https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#tls-listener-certificate\">Server certificates</a> in the <i>Network Load Balancers\n Guide</i>.</p>"
"smithy.api#documentation": "<p>Describes the default certificate and the certificate list for the specified HTTPS or TLS\n listener.</p>\n <p>If the default certificate is also in the certificate list, it appears twice in the\n results (once with <code>IsDefault</code> set to true and once with <code>IsDefault</code> set\n to false).</p>\n <p>For more information, see <a href=\"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#https-listener-certificates\">SSL certificates</a> in the <i>Application Load Balancers Guide</i> or\n <a href=\"https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#tls-listener-certificate\">Server certificates</a> in the <i>Network Load Balancers\n Guide</i>.</p>",
"smithy.api#paginated": {
"inputToken": "Marker",
"outputToken": "NextMarker",
"items": "Certificates"
}
}
},
"com.amazonaws.elasticloadbalancingv2#DescribeListenerCertificatesInput": {
Expand Down Expand Up @@ -2578,7 +2583,6 @@
"outputToken": "NextMarker",
"items": "LoadBalancers"
},
"smithy.api#suppress": ["WaitableTraitInvalidErrorType"],
"smithy.waiters#waitable": {
"LoadBalancerAvailable": {
"acceptors": [
Expand All @@ -2605,7 +2609,7 @@
{
"state": "retry",
"matcher": {
"errorType": "LoadBalancerNotFound"
"errorType": "LoadBalancerNotFoundException"
}
}
],
Expand All @@ -2622,7 +2626,7 @@
{
"state": "retry",
"matcher": {
"errorType": "LoadBalancerNotFound"
"errorType": "LoadBalancerNotFoundException"
}
}
],
Expand All @@ -2643,7 +2647,7 @@
{
"state": "success",
"matcher": {
"errorType": "LoadBalancerNotFound"
"errorType": "LoadBalancerNotFoundException"
}
}
],
Expand Down Expand Up @@ -2756,7 +2760,12 @@
]
}
}
]
],
"smithy.api#paginated": {
"inputToken": "Marker",
"outputToken": "NextMarker",
"items": "Rules"
}
}
},
"com.amazonaws.elasticloadbalancingv2#DescribeRulesInput": {
Expand Down

0 comments on commit 292ce40

Please sign in to comment.