Skip to content

Commit 81d94a2

Browse files
author
awstools
committed
feat(client-eks): This release adds support for DescribeClusterVersions API that provides important information about Kubernetes versions along with end of support dates
1 parent f8dab61 commit 81d94a2

File tree

10 files changed

+634
-7
lines changed

10 files changed

+634
-7
lines changed

clients/client-eks/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,14 @@ DescribeCluster
394394

395395
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/eks/command/DescribeClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-eks/Interface/DescribeClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-eks/Interface/DescribeClusterCommandOutput/)
396396

397+
</details>
398+
<details>
399+
<summary>
400+
DescribeClusterVersions
401+
</summary>
402+
403+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/eks/command/DescribeClusterVersionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-eks/Interface/DescribeClusterVersionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-eks/Interface/DescribeClusterVersionsCommandOutput/)
404+
397405
</details>
398406
<details>
399407
<summary>

clients/client-eks/src/EKS.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ import {
109109
DescribeClusterCommandInput,
110110
DescribeClusterCommandOutput,
111111
} from "./commands/DescribeClusterCommand";
112+
import {
113+
DescribeClusterVersionsCommand,
114+
DescribeClusterVersionsCommandInput,
115+
DescribeClusterVersionsCommandOutput,
116+
} from "./commands/DescribeClusterVersionsCommand";
112117
import {
113118
DescribeEksAnywhereSubscriptionCommand,
114119
DescribeEksAnywhereSubscriptionCommandInput,
@@ -284,6 +289,7 @@ const commands = {
284289
DescribeAddonConfigurationCommand,
285290
DescribeAddonVersionsCommand,
286291
DescribeClusterCommand,
292+
DescribeClusterVersionsCommand,
287293
DescribeEksAnywhereSubscriptionCommand,
288294
DescribeFargateProfileCommand,
289295
DescribeIdentityProviderConfigCommand,
@@ -673,6 +679,24 @@ export interface EKS {
673679
cb: (err: any, data?: DescribeClusterCommandOutput) => void
674680
): void;
675681

682+
/**
683+
* @see {@link DescribeClusterVersionsCommand}
684+
*/
685+
describeClusterVersions(): Promise<DescribeClusterVersionsCommandOutput>;
686+
describeClusterVersions(
687+
args: DescribeClusterVersionsCommandInput,
688+
options?: __HttpHandlerOptions
689+
): Promise<DescribeClusterVersionsCommandOutput>;
690+
describeClusterVersions(
691+
args: DescribeClusterVersionsCommandInput,
692+
cb: (err: any, data?: DescribeClusterVersionsCommandOutput) => void
693+
): void;
694+
describeClusterVersions(
695+
args: DescribeClusterVersionsCommandInput,
696+
options: __HttpHandlerOptions,
697+
cb: (err: any, data?: DescribeClusterVersionsCommandOutput) => void
698+
): void;
699+
676700
/**
677701
* @see {@link DescribeEksAnywhereSubscriptionCommand}
678702
*/

clients/client-eks/src/EKSClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ import {
112112
DescribeAddonVersionsCommandOutput,
113113
} from "./commands/DescribeAddonVersionsCommand";
114114
import { DescribeClusterCommandInput, DescribeClusterCommandOutput } from "./commands/DescribeClusterCommand";
115+
import {
116+
DescribeClusterVersionsCommandInput,
117+
DescribeClusterVersionsCommandOutput,
118+
} from "./commands/DescribeClusterVersionsCommand";
115119
import {
116120
DescribeEksAnywhereSubscriptionCommandInput,
117121
DescribeEksAnywhereSubscriptionCommandOutput,
@@ -237,6 +241,7 @@ export type ServiceInputTypes =
237241
| DescribeAddonConfigurationCommandInput
238242
| DescribeAddonVersionsCommandInput
239243
| DescribeClusterCommandInput
244+
| DescribeClusterVersionsCommandInput
240245
| DescribeEksAnywhereSubscriptionCommandInput
241246
| DescribeFargateProfileCommandInput
242247
| DescribeIdentityProviderConfigCommandInput
@@ -298,6 +303,7 @@ export type ServiceOutputTypes =
298303
| DescribeAddonConfigurationCommandOutput
299304
| DescribeAddonVersionsCommandOutput
300305
| DescribeClusterCommandOutput
306+
| DescribeClusterVersionsCommandOutput
301307
| DescribeEksAnywhereSubscriptionCommandOutput
302308
| DescribeFargateProfileCommandOutput
303309
| DescribeIdentityProviderConfigCommandOutput
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { EKSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EKSClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { DescribeClusterVersionsRequest, DescribeClusterVersionsResponse } from "../models/models_0";
10+
import { de_DescribeClusterVersionsCommand, se_DescribeClusterVersionsCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link DescribeClusterVersionsCommand}.
21+
*/
22+
export interface DescribeClusterVersionsCommandInput extends DescribeClusterVersionsRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link DescribeClusterVersionsCommand}.
27+
*/
28+
export interface DescribeClusterVersionsCommandOutput extends DescribeClusterVersionsResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>Lists available Kubernetes versions for Amazon EKS clusters.</p>
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { EKSClient, DescribeClusterVersionsCommand } from "@aws-sdk/client-eks"; // ES Modules import
36+
* // const { EKSClient, DescribeClusterVersionsCommand } = require("@aws-sdk/client-eks"); // CommonJS import
37+
* const client = new EKSClient(config);
38+
* const input = { // DescribeClusterVersionsRequest
39+
* clusterType: "STRING_VALUE",
40+
* maxResults: Number("int"),
41+
* nextToken: "STRING_VALUE",
42+
* defaultOnly: true || false,
43+
* includeAll: true || false,
44+
* clusterVersions: [ // StringList
45+
* "STRING_VALUE",
46+
* ],
47+
* status: "unsupported" || "standard-support" || "extended-support",
48+
* };
49+
* const command = new DescribeClusterVersionsCommand(input);
50+
* const response = await client.send(command);
51+
* // { // DescribeClusterVersionsResponse
52+
* // nextToken: "STRING_VALUE",
53+
* // clusterVersions: [ // ClusterVersionList
54+
* // { // ClusterVersionInformation
55+
* // clusterVersion: "STRING_VALUE",
56+
* // clusterType: "STRING_VALUE",
57+
* // defaultPlatformVersion: "STRING_VALUE",
58+
* // defaultVersion: true || false,
59+
* // releaseDate: new Date("TIMESTAMP"),
60+
* // endOfStandardSupportDate: new Date("TIMESTAMP"),
61+
* // endOfExtendedSupportDate: new Date("TIMESTAMP"),
62+
* // status: "unsupported" || "standard-support" || "extended-support",
63+
* // kubernetesPatchVersion: "STRING_VALUE",
64+
* // },
65+
* // ],
66+
* // };
67+
*
68+
* ```
69+
*
70+
* @param DescribeClusterVersionsCommandInput - {@link DescribeClusterVersionsCommandInput}
71+
* @returns {@link DescribeClusterVersionsCommandOutput}
72+
* @see {@link DescribeClusterVersionsCommandInput} for command's `input` shape.
73+
* @see {@link DescribeClusterVersionsCommandOutput} for command's `response` shape.
74+
* @see {@link EKSClientResolvedConfig | config} for EKSClient's `config` shape.
75+
*
76+
* @throws {@link InvalidParameterException} (client fault)
77+
* <p>The specified parameter is invalid. Review the available parameters for the API
78+
* request.</p>
79+
*
80+
* @throws {@link InvalidRequestException} (client fault)
81+
* <p>The request is invalid given the state of the cluster. Check the state of the cluster
82+
* and the associated operations.</p>
83+
*
84+
* @throws {@link ServerException} (server fault)
85+
* <p>These errors are usually caused by a server-side issue.</p>
86+
*
87+
* @throws {@link EKSServiceException}
88+
* <p>Base exception class for all service exceptions from EKS service.</p>
89+
*
90+
* @public
91+
*/
92+
export class DescribeClusterVersionsCommand extends $Command
93+
.classBuilder<
94+
DescribeClusterVersionsCommandInput,
95+
DescribeClusterVersionsCommandOutput,
96+
EKSClientResolvedConfig,
97+
ServiceInputTypes,
98+
ServiceOutputTypes
99+
>()
100+
.ep(commonParams)
101+
.m(function (this: any, Command: any, cs: any, config: EKSClientResolvedConfig, o: any) {
102+
return [
103+
getSerdePlugin(config, this.serialize, this.deserialize),
104+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
105+
];
106+
})
107+
.s("AWSWesleyFrontend", "DescribeClusterVersions", {})
108+
.n("EKSClient", "DescribeClusterVersionsCommand")
109+
.f(void 0, void 0)
110+
.ser(se_DescribeClusterVersionsCommand)
111+
.de(de_DescribeClusterVersionsCommand)
112+
.build() {
113+
/** @internal type navigation helper, not in runtime. */
114+
protected declare static __types: {
115+
api: {
116+
input: DescribeClusterVersionsRequest;
117+
output: DescribeClusterVersionsResponse;
118+
};
119+
sdk: {
120+
input: DescribeClusterVersionsCommandInput;
121+
output: DescribeClusterVersionsCommandOutput;
122+
};
123+
};
124+
}

clients/client-eks/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export * from "./DescribeAddonCommand";
2222
export * from "./DescribeAddonConfigurationCommand";
2323
export * from "./DescribeAddonVersionsCommand";
2424
export * from "./DescribeClusterCommand";
25+
export * from "./DescribeClusterVersionsCommand";
2526
export * from "./DescribeEksAnywhereSubscriptionCommand";
2627
export * from "./DescribeFargateProfileCommand";
2728
export * from "./DescribeIdentityProviderConfigCommand";

clients/client-eks/src/models/models_0.ts

Lines changed: 142 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,7 @@ export interface Addon {
397397
}
398398

399399
/**
400-
* <p>The summary information about the Amazon EKS add-on compatibility for the next Kubernetes
401-
* version for an insight check in the <code>UPGRADE_READINESS</code> category.</p>
400+
* <p>Contains compatibility information for an Amazon EKS add-on.</p>
402401
* @public
403402
*/
404403
export interface AddonCompatibilityDetail {
@@ -409,7 +408,7 @@ export interface AddonCompatibilityDetail {
409408
name?: string | undefined;
410409

411410
/**
412-
* <p>The list of compatible Amazon EKS add-on versions for the next Kubernetes version.</p>
411+
* <p>A list of compatible add-on versions.</p>
413412
* @public
414413
*/
415414
compatibleVersions?: string[] | undefined;
@@ -4980,6 +4979,145 @@ export interface DescribeClusterResponse {
49804979
cluster?: Cluster | undefined;
49814980
}
49824981

4982+
/**
4983+
* @public
4984+
* @enum
4985+
*/
4986+
export const ClusterVersionStatus = {
4987+
extended_support: "extended-support",
4988+
standard_support: "standard-support",
4989+
unsupported: "unsupported",
4990+
} as const;
4991+
4992+
/**
4993+
* @public
4994+
*/
4995+
export type ClusterVersionStatus = (typeof ClusterVersionStatus)[keyof typeof ClusterVersionStatus];
4996+
4997+
/**
4998+
* @public
4999+
*/
5000+
export interface DescribeClusterVersionsRequest {
5001+
/**
5002+
* <p>The type of cluster to filter versions by.</p>
5003+
* @public
5004+
*/
5005+
clusterType?: string | undefined;
5006+
5007+
/**
5008+
* <p>Maximum number of results to return.</p>
5009+
* @public
5010+
*/
5011+
maxResults?: number | undefined;
5012+
5013+
/**
5014+
* <p>Pagination token for the next set of results.</p>
5015+
* @public
5016+
*/
5017+
nextToken?: string | undefined;
5018+
5019+
/**
5020+
* <p>Filter to show only default versions.</p>
5021+
* @public
5022+
*/
5023+
defaultOnly?: boolean | undefined;
5024+
5025+
/**
5026+
* <p>Include all available versions in the response.</p>
5027+
* @public
5028+
*/
5029+
includeAll?: boolean | undefined;
5030+
5031+
/**
5032+
* <p>List of specific cluster versions to describe.</p>
5033+
* @public
5034+
*/
5035+
clusterVersions?: string[] | undefined;
5036+
5037+
/**
5038+
* <p>Filter versions by their current status.</p>
5039+
* @public
5040+
*/
5041+
status?: ClusterVersionStatus | undefined;
5042+
}
5043+
5044+
/**
5045+
* <p>Contains details about a specific EKS cluster version.</p>
5046+
* @public
5047+
*/
5048+
export interface ClusterVersionInformation {
5049+
/**
5050+
* <p>The Kubernetes version for the cluster.</p>
5051+
* @public
5052+
*/
5053+
clusterVersion?: string | undefined;
5054+
5055+
/**
5056+
* <p>The type of cluster this version is for.</p>
5057+
* @public
5058+
*/
5059+
clusterType?: string | undefined;
5060+
5061+
/**
5062+
* <p>Default platform version for this Kubernetes version.</p>
5063+
* @public
5064+
*/
5065+
defaultPlatformVersion?: string | undefined;
5066+
5067+
/**
5068+
* <p>Indicates if this is a default version.</p>
5069+
* @public
5070+
*/
5071+
defaultVersion?: boolean | undefined;
5072+
5073+
/**
5074+
* <p>The release date of this cluster version.</p>
5075+
* @public
5076+
*/
5077+
releaseDate?: Date | undefined;
5078+
5079+
/**
5080+
* <p>Date when standard support ends for this version.</p>
5081+
* @public
5082+
*/
5083+
endOfStandardSupportDate?: Date | undefined;
5084+
5085+
/**
5086+
* <p>Date when extended support ends for this version.</p>
5087+
* @public
5088+
*/
5089+
endOfExtendedSupportDate?: Date | undefined;
5090+
5091+
/**
5092+
* <p>Current status of this cluster version.</p>
5093+
* @public
5094+
*/
5095+
status?: ClusterVersionStatus | undefined;
5096+
5097+
/**
5098+
* <p>The patch version of Kubernetes for this cluster version.</p>
5099+
* @public
5100+
*/
5101+
kubernetesPatchVersion?: string | undefined;
5102+
}
5103+
5104+
/**
5105+
* @public
5106+
*/
5107+
export interface DescribeClusterVersionsResponse {
5108+
/**
5109+
* <p>Pagination token for the next set of results.</p>
5110+
* @public
5111+
*/
5112+
nextToken?: string | undefined;
5113+
5114+
/**
5115+
* <p>List of cluster version information objects.</p>
5116+
* @public
5117+
*/
5118+
clusterVersions?: ClusterVersionInformation[] | undefined;
5119+
}
5120+
49835121
/**
49845122
* @public
49855123
*/
@@ -5302,7 +5440,7 @@ export interface InsightCategorySpecificSummary {
53025440
deprecationDetails?: DeprecationDetail[] | undefined;
53035441

53045442
/**
5305-
* <p>A list of <code>AddonCompatibilityDetail</code> objects for Amazon EKS add-ons.</p>
5443+
* <p>A list of AddonCompatibilityDetail objects for Amazon EKS add-ons.</p>
53065444
* @public
53075445
*/
53085446
addonCompatibilityDetails?: AddonCompatibilityDetail[] | undefined;

0 commit comments

Comments
 (0)