Skip to content

Commit 292ce40

Browse files
author
awstools
committed
feat(client-elastic-load-balancing-v2): Add paginators for the ELBv2 DescribeListenerCertificates and DescribeRules APIs. Fix broken waiter for the ELBv2 DescribeLoadBalancers API.
1 parent f8773ce commit 292ce40

File tree

7 files changed

+70
-9
lines changed

7 files changed

+70
-9
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// smithy-typescript generated code
2+
import { createPaginator } from "@smithy/core";
3+
import { Paginator } from "@smithy/types";
4+
5+
import {
6+
DescribeListenerCertificatesCommand,
7+
DescribeListenerCertificatesCommandInput,
8+
DescribeListenerCertificatesCommandOutput,
9+
} from "../commands/DescribeListenerCertificatesCommand";
10+
import { ElasticLoadBalancingV2Client } from "../ElasticLoadBalancingV2Client";
11+
import { ElasticLoadBalancingV2PaginationConfiguration } from "./Interfaces";
12+
13+
/**
14+
* @public
15+
*/
16+
export const paginateDescribeListenerCertificates: (
17+
config: ElasticLoadBalancingV2PaginationConfiguration,
18+
input: DescribeListenerCertificatesCommandInput,
19+
...rest: any[]
20+
) => Paginator<DescribeListenerCertificatesCommandOutput> = createPaginator<
21+
ElasticLoadBalancingV2PaginationConfiguration,
22+
DescribeListenerCertificatesCommandInput,
23+
DescribeListenerCertificatesCommandOutput
24+
>(ElasticLoadBalancingV2Client, DescribeListenerCertificatesCommand, "Marker", "NextMarker", "");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// smithy-typescript generated code
2+
import { createPaginator } from "@smithy/core";
3+
import { Paginator } from "@smithy/types";
4+
5+
import {
6+
DescribeRulesCommand,
7+
DescribeRulesCommandInput,
8+
DescribeRulesCommandOutput,
9+
} from "../commands/DescribeRulesCommand";
10+
import { ElasticLoadBalancingV2Client } from "../ElasticLoadBalancingV2Client";
11+
import { ElasticLoadBalancingV2PaginationConfiguration } from "./Interfaces";
12+
13+
/**
14+
* @public
15+
*/
16+
export const paginateDescribeRules: (
17+
config: ElasticLoadBalancingV2PaginationConfiguration,
18+
input: DescribeRulesCommandInput,
19+
...rest: any[]
20+
) => Paginator<DescribeRulesCommandOutput> = createPaginator<
21+
ElasticLoadBalancingV2PaginationConfiguration,
22+
DescribeRulesCommandInput,
23+
DescribeRulesCommandOutput
24+
>(ElasticLoadBalancingV2Client, DescribeRulesCommand, "Marker", "NextMarker", "");

Diff for: clients/client-elastic-load-balancing-v2/src/pagination/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
export * from "./DescribeListenerCertificatesPaginator";
2+
13
export * from "./DescribeListenersPaginator";
24

35
export * from "./DescribeLoadBalancersPaginator";
46

7+
export * from "./DescribeRulesPaginator";
8+
59
export * from "./DescribeTargetGroupsPaginator";
610

711
export * from "./DescribeTrustStoreAssociationsPaginator";

Diff for: clients/client-elastic-load-balancing-v2/src/waiters/waitForLoadBalancerAvailable.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const checkState = async (
4747
} catch (e) {}
4848
} catch (exception) {
4949
reason = exception;
50-
if (exception.name && exception.name == "LoadBalancerNotFound") {
50+
if (exception.name && exception.name == "LoadBalancerNotFoundException") {
5151
return { state: WaiterState.RETRY, reason };
5252
}
5353
}

Diff for: clients/client-elastic-load-balancing-v2/src/waiters/waitForLoadBalancerExists.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const checkState = async (
1818
return { state: WaiterState.SUCCESS, reason };
1919
} catch (exception) {
2020
reason = exception;
21-
if (exception.name && exception.name == "LoadBalancerNotFound") {
21+
if (exception.name && exception.name == "LoadBalancerNotFoundException") {
2222
return { state: WaiterState.RETRY, reason };
2323
}
2424
}

Diff for: clients/client-elastic-load-balancing-v2/src/waiters/waitForLoadBalancersDeleted.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const checkState = async (
3333
} catch (e) {}
3434
} catch (exception) {
3535
reason = exception;
36-
if (exception.name && exception.name == "LoadBalancerNotFound") {
36+
if (exception.name && exception.name == "LoadBalancerNotFoundException") {
3737
return { state: WaiterState.SUCCESS, reason };
3838
}
3939
}

Diff for: codegen/sdk-codegen/aws-models/elastic-load-balancing-v2.json

+15-6
Original file line numberDiff line numberDiff line change
@@ -2281,7 +2281,12 @@
22812281
}
22822282
],
22832283
"traits": {
2284-
"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>"
2284+
"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>",
2285+
"smithy.api#paginated": {
2286+
"inputToken": "Marker",
2287+
"outputToken": "NextMarker",
2288+
"items": "Certificates"
2289+
}
22852290
}
22862291
},
22872292
"com.amazonaws.elasticloadbalancingv2#DescribeListenerCertificatesInput": {
@@ -2578,7 +2583,6 @@
25782583
"outputToken": "NextMarker",
25792584
"items": "LoadBalancers"
25802585
},
2581-
"smithy.api#suppress": ["WaitableTraitInvalidErrorType"],
25822586
"smithy.waiters#waitable": {
25832587
"LoadBalancerAvailable": {
25842588
"acceptors": [
@@ -2605,7 +2609,7 @@
26052609
{
26062610
"state": "retry",
26072611
"matcher": {
2608-
"errorType": "LoadBalancerNotFound"
2612+
"errorType": "LoadBalancerNotFoundException"
26092613
}
26102614
}
26112615
],
@@ -2622,7 +2626,7 @@
26222626
{
26232627
"state": "retry",
26242628
"matcher": {
2625-
"errorType": "LoadBalancerNotFound"
2629+
"errorType": "LoadBalancerNotFoundException"
26262630
}
26272631
}
26282632
],
@@ -2643,7 +2647,7 @@
26432647
{
26442648
"state": "success",
26452649
"matcher": {
2646-
"errorType": "LoadBalancerNotFound"
2650+
"errorType": "LoadBalancerNotFoundException"
26472651
}
26482652
}
26492653
],
@@ -2756,7 +2760,12 @@
27562760
]
27572761
}
27582762
}
2759-
]
2763+
],
2764+
"smithy.api#paginated": {
2765+
"inputToken": "Marker",
2766+
"outputToken": "NextMarker",
2767+
"items": "Rules"
2768+
}
27602769
}
27612770
},
27622771
"com.amazonaws.elasticloadbalancingv2#DescribeRulesInput": {

0 commit comments

Comments
 (0)