Skip to content

Commit

Permalink
feat(client-eks): This release adds support for DescribeClusterVersio…
Browse files Browse the repository at this point in the history
…ns API that provides important information about Kubernetes versions along with end of support dates
  • Loading branch information
awstools committed Dec 23, 2024
1 parent f8dab61 commit 81d94a2
Show file tree
Hide file tree
Showing 10 changed files with 634 additions and 7 deletions.
8 changes: 8 additions & 0 deletions clients/client-eks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,14 @@ DescribeCluster

[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/)

</details>
<details>
<summary>
DescribeClusterVersions
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
24 changes: 24 additions & 0 deletions clients/client-eks/src/EKS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ import {
DescribeClusterCommandInput,
DescribeClusterCommandOutput,
} from "./commands/DescribeClusterCommand";
import {
DescribeClusterVersionsCommand,
DescribeClusterVersionsCommandInput,
DescribeClusterVersionsCommandOutput,
} from "./commands/DescribeClusterVersionsCommand";
import {
DescribeEksAnywhereSubscriptionCommand,
DescribeEksAnywhereSubscriptionCommandInput,
Expand Down Expand Up @@ -284,6 +289,7 @@ const commands = {
DescribeAddonConfigurationCommand,
DescribeAddonVersionsCommand,
DescribeClusterCommand,
DescribeClusterVersionsCommand,
DescribeEksAnywhereSubscriptionCommand,
DescribeFargateProfileCommand,
DescribeIdentityProviderConfigCommand,
Expand Down Expand Up @@ -673,6 +679,24 @@ export interface EKS {
cb: (err: any, data?: DescribeClusterCommandOutput) => void
): void;

/**
* @see {@link DescribeClusterVersionsCommand}
*/
describeClusterVersions(): Promise<DescribeClusterVersionsCommandOutput>;
describeClusterVersions(
args: DescribeClusterVersionsCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeClusterVersionsCommandOutput>;
describeClusterVersions(
args: DescribeClusterVersionsCommandInput,
cb: (err: any, data?: DescribeClusterVersionsCommandOutput) => void
): void;
describeClusterVersions(
args: DescribeClusterVersionsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeClusterVersionsCommandOutput) => void
): void;

/**
* @see {@link DescribeEksAnywhereSubscriptionCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-eks/src/EKSClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ import {
DescribeAddonVersionsCommandOutput,
} from "./commands/DescribeAddonVersionsCommand";
import { DescribeClusterCommandInput, DescribeClusterCommandOutput } from "./commands/DescribeClusterCommand";
import {
DescribeClusterVersionsCommandInput,
DescribeClusterVersionsCommandOutput,
} from "./commands/DescribeClusterVersionsCommand";
import {
DescribeEksAnywhereSubscriptionCommandInput,
DescribeEksAnywhereSubscriptionCommandOutput,
Expand Down Expand Up @@ -237,6 +241,7 @@ export type ServiceInputTypes =
| DescribeAddonConfigurationCommandInput
| DescribeAddonVersionsCommandInput
| DescribeClusterCommandInput
| DescribeClusterVersionsCommandInput
| DescribeEksAnywhereSubscriptionCommandInput
| DescribeFargateProfileCommandInput
| DescribeIdentityProviderConfigCommandInput
Expand Down Expand Up @@ -298,6 +303,7 @@ export type ServiceOutputTypes =
| DescribeAddonConfigurationCommandOutput
| DescribeAddonVersionsCommandOutput
| DescribeClusterCommandOutput
| DescribeClusterVersionsCommandOutput
| DescribeEksAnywhereSubscriptionCommandOutput
| DescribeFargateProfileCommandOutput
| DescribeIdentityProviderConfigCommandOutput
Expand Down
124 changes: 124 additions & 0 deletions clients/client-eks/src/commands/DescribeClusterVersionsCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EKSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EKSClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeClusterVersionsRequest, DescribeClusterVersionsResponse } from "../models/models_0";
import { de_DescribeClusterVersionsCommand, se_DescribeClusterVersionsCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link DescribeClusterVersionsCommand}.
*/
export interface DescribeClusterVersionsCommandInput extends DescribeClusterVersionsRequest {}
/**
* @public
*
* The output of {@link DescribeClusterVersionsCommand}.
*/
export interface DescribeClusterVersionsCommandOutput extends DescribeClusterVersionsResponse, __MetadataBearer {}

/**
* <p>Lists available Kubernetes versions for Amazon EKS clusters.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { EKSClient, DescribeClusterVersionsCommand } from "@aws-sdk/client-eks"; // ES Modules import
* // const { EKSClient, DescribeClusterVersionsCommand } = require("@aws-sdk/client-eks"); // CommonJS import
* const client = new EKSClient(config);
* const input = { // DescribeClusterVersionsRequest
* clusterType: "STRING_VALUE",
* maxResults: Number("int"),
* nextToken: "STRING_VALUE",
* defaultOnly: true || false,
* includeAll: true || false,
* clusterVersions: [ // StringList
* "STRING_VALUE",
* ],
* status: "unsupported" || "standard-support" || "extended-support",
* };
* const command = new DescribeClusterVersionsCommand(input);
* const response = await client.send(command);
* // { // DescribeClusterVersionsResponse
* // nextToken: "STRING_VALUE",
* // clusterVersions: [ // ClusterVersionList
* // { // ClusterVersionInformation
* // clusterVersion: "STRING_VALUE",
* // clusterType: "STRING_VALUE",
* // defaultPlatformVersion: "STRING_VALUE",
* // defaultVersion: true || false,
* // releaseDate: new Date("TIMESTAMP"),
* // endOfStandardSupportDate: new Date("TIMESTAMP"),
* // endOfExtendedSupportDate: new Date("TIMESTAMP"),
* // status: "unsupported" || "standard-support" || "extended-support",
* // kubernetesPatchVersion: "STRING_VALUE",
* // },
* // ],
* // };
*
* ```
*
* @param DescribeClusterVersionsCommandInput - {@link DescribeClusterVersionsCommandInput}
* @returns {@link DescribeClusterVersionsCommandOutput}
* @see {@link DescribeClusterVersionsCommandInput} for command's `input` shape.
* @see {@link DescribeClusterVersionsCommandOutput} for command's `response` shape.
* @see {@link EKSClientResolvedConfig | config} for EKSClient's `config` shape.
*
* @throws {@link InvalidParameterException} (client fault)
* <p>The specified parameter is invalid. Review the available parameters for the API
* request.</p>
*
* @throws {@link InvalidRequestException} (client fault)
* <p>The request is invalid given the state of the cluster. Check the state of the cluster
* and the associated operations.</p>
*
* @throws {@link ServerException} (server fault)
* <p>These errors are usually caused by a server-side issue.</p>
*
* @throws {@link EKSServiceException}
* <p>Base exception class for all service exceptions from EKS service.</p>
*
* @public
*/
export class DescribeClusterVersionsCommand extends $Command
.classBuilder<
DescribeClusterVersionsCommandInput,
DescribeClusterVersionsCommandOutput,
EKSClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: EKSClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AWSWesleyFrontend", "DescribeClusterVersions", {})
.n("EKSClient", "DescribeClusterVersionsCommand")
.f(void 0, void 0)
.ser(se_DescribeClusterVersionsCommand)
.de(de_DescribeClusterVersionsCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: DescribeClusterVersionsRequest;
output: DescribeClusterVersionsResponse;
};
sdk: {
input: DescribeClusterVersionsCommandInput;
output: DescribeClusterVersionsCommandOutput;
};
};
}
1 change: 1 addition & 0 deletions clients/client-eks/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export * from "./DescribeAddonCommand";
export * from "./DescribeAddonConfigurationCommand";
export * from "./DescribeAddonVersionsCommand";
export * from "./DescribeClusterCommand";
export * from "./DescribeClusterVersionsCommand";
export * from "./DescribeEksAnywhereSubscriptionCommand";
export * from "./DescribeFargateProfileCommand";
export * from "./DescribeIdentityProviderConfigCommand";
Expand Down
146 changes: 142 additions & 4 deletions clients/client-eks/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,7 @@ export interface Addon {
}

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

/**
* <p>The list of compatible Amazon EKS add-on versions for the next Kubernetes version.</p>
* <p>A list of compatible add-on versions.</p>
* @public
*/
compatibleVersions?: string[] | undefined;
Expand Down Expand Up @@ -4980,6 +4979,145 @@ export interface DescribeClusterResponse {
cluster?: Cluster | undefined;
}

/**
* @public
* @enum
*/
export const ClusterVersionStatus = {
extended_support: "extended-support",
standard_support: "standard-support",
unsupported: "unsupported",
} as const;

/**
* @public
*/
export type ClusterVersionStatus = (typeof ClusterVersionStatus)[keyof typeof ClusterVersionStatus];

/**
* @public
*/
export interface DescribeClusterVersionsRequest {
/**
* <p>The type of cluster to filter versions by.</p>
* @public
*/
clusterType?: string | undefined;

/**
* <p>Maximum number of results to return.</p>
* @public
*/
maxResults?: number | undefined;

/**
* <p>Pagination token for the next set of results.</p>
* @public
*/
nextToken?: string | undefined;

/**
* <p>Filter to show only default versions.</p>
* @public
*/
defaultOnly?: boolean | undefined;

/**
* <p>Include all available versions in the response.</p>
* @public
*/
includeAll?: boolean | undefined;

/**
* <p>List of specific cluster versions to describe.</p>
* @public
*/
clusterVersions?: string[] | undefined;

/**
* <p>Filter versions by their current status.</p>
* @public
*/
status?: ClusterVersionStatus | undefined;
}

/**
* <p>Contains details about a specific EKS cluster version.</p>
* @public
*/
export interface ClusterVersionInformation {
/**
* <p>The Kubernetes version for the cluster.</p>
* @public
*/
clusterVersion?: string | undefined;

/**
* <p>The type of cluster this version is for.</p>
* @public
*/
clusterType?: string | undefined;

/**
* <p>Default platform version for this Kubernetes version.</p>
* @public
*/
defaultPlatformVersion?: string | undefined;

/**
* <p>Indicates if this is a default version.</p>
* @public
*/
defaultVersion?: boolean | undefined;

/**
* <p>The release date of this cluster version.</p>
* @public
*/
releaseDate?: Date | undefined;

/**
* <p>Date when standard support ends for this version.</p>
* @public
*/
endOfStandardSupportDate?: Date | undefined;

/**
* <p>Date when extended support ends for this version.</p>
* @public
*/
endOfExtendedSupportDate?: Date | undefined;

/**
* <p>Current status of this cluster version.</p>
* @public
*/
status?: ClusterVersionStatus | undefined;

/**
* <p>The patch version of Kubernetes for this cluster version.</p>
* @public
*/
kubernetesPatchVersion?: string | undefined;
}

/**
* @public
*/
export interface DescribeClusterVersionsResponse {
/**
* <p>Pagination token for the next set of results.</p>
* @public
*/
nextToken?: string | undefined;

/**
* <p>List of cluster version information objects.</p>
* @public
*/
clusterVersions?: ClusterVersionInformation[] | undefined;
}

/**
* @public
*/
Expand Down Expand Up @@ -5302,7 +5440,7 @@ export interface InsightCategorySpecificSummary {
deprecationDetails?: DeprecationDetail[] | undefined;

/**
* <p>A list of <code>AddonCompatibilityDetail</code> objects for Amazon EKS add-ons.</p>
* <p>A list of AddonCompatibilityDetail objects for Amazon EKS add-ons.</p>
* @public
*/
addonCompatibilityDetails?: AddonCompatibilityDetail[] | undefined;
Expand Down
Loading

0 comments on commit 81d94a2

Please sign in to comment.