Skip to content

Commit

Permalink
feat(client-snowball): Adds support for EKS Anywhere on Snowball. AWS…
Browse files Browse the repository at this point in the history
… Snow Family customers can now install EKS Anywhere service on Snowball Edge Compute Optimized devices.
  • Loading branch information
awstools committed Feb 13, 2023
1 parent 820e2e2 commit 19042b5
Show file tree
Hide file tree
Showing 12 changed files with 1,210 additions and 1,298 deletions.
64 changes: 38 additions & 26 deletions clients/client-snowball/src/Snowball.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ import {
ListLongTermPricingCommandInput,
ListLongTermPricingCommandOutput,
} from "./commands/ListLongTermPricingCommand";
import {
ListServiceVersionsCommand,
ListServiceVersionsCommandInput,
ListServiceVersionsCommandOutput,
} from "./commands/ListServiceVersionsCommand";
import {
UpdateClusterCommand,
UpdateClusterCommandInput,
Expand Down Expand Up @@ -260,9 +265,7 @@ export class Snowball extends SnowballClient {
* <p>Availability of device types differ by Amazon Web Services Region. For more information
* about Region availability, see <a href="https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/?p=ngi&loc=4">Amazon Web Services Regional Services</a>.</p>
* </note>
*
* <p></p>
*
* <p class="title">
* <b>Snow Family devices and their capacities.</b>
* </p>
Expand All @@ -278,7 +281,6 @@ export class Snowball extends SnowballClient {
* <p>Description: Snowcone </p>
* </li>
* </ul>
*
* <p></p>
* </li>
* <li>
Expand All @@ -305,8 +307,6 @@ export class Snowball extends SnowballClient {
* <p>Description: Snowball Edge Storage Optimized for data transfer only </p>
* </li>
* </ul>
*
*
* <p></p>
* </li>
* <li>
Expand Down Expand Up @@ -349,19 +349,6 @@ export class Snowball extends SnowballClient {
* <p></p>
* </li>
* <li>
* <p>Device type: <b>V3_5C</b>
* </p>
* <ul>
* <li>
* <p>Capacity: T32</p>
* </li>
* <li>
* <p>Description: Snowball Edge Compute Optimized without GPU</p>
* </li>
* </ul>
* <p></p>
* </li>
* <li>
* <p>Device type: <b>STANDARD</b>
* </p>
* <ul>
Expand Down Expand Up @@ -649,21 +636,16 @@ export class Snowball extends SnowballClient {
* specified <code>JobId</code> value. You can access the manifest file for up to 60 minutes
* after this request has been made. To access the manifest file after 60 minutes have passed,
* you'll have to make another call to the <code>GetJobManifest</code> action.</p>
*
* <p>The manifest is an encrypted file that you can download after your job enters the
* <code>WithCustomer</code> status. This is the only valid status for calling this API as the
* manifest and <code>UnlockCode</code> code value are used for securing your device and should
* only be used when you have the device. The manifest is decrypted by using the
* <code>UnlockCode</code> code value, when you pass both values to the Snow device through the
* Snowball client when the client is started for the first time. </p>
*
*
* <p>As a best practice, we recommend that you don't save a copy of an
* <code>UnlockCode</code> value in the same location as the manifest file for that job. Saving
* these separately helps prevent unauthorized parties from gaining access to the Snow device
* associated with that job.</p>
*
*
* <p>The credentials of a given job, including its manifest file and unlock code, expire 360
* days after the job is created.</p>
*/
Expand Down Expand Up @@ -700,14 +682,12 @@ export class Snowball extends SnowballClient {
* <p>Returns the <code>UnlockCode</code> code value for the specified job. A particular
* <code>UnlockCode</code> value can be accessed for up to 360 days after the associated job
* has been created.</p>
*
* <p>The <code>UnlockCode</code> value is a 29-character code with 25 alphanumeric
* characters and 4 hyphens. This code is used to decrypt the manifest file when it is passed
* along with the manifest to the Snow device through the Snowball client when the client is
* started for the first time. The only valid status for calling this API is
* <code>WithCustomer</code> as the manifest and <code>Unlock</code> code values are used for
* securing your device and should only be used when you have the device.</p>
*
* <p>As a best practice, we recommend that you don't save a copy of the
* <code>UnlockCode</code> in the same location as the manifest file for that job. Saving these
* separately helps prevent unauthorized parties from gaining access to the Snow device
Expand Down Expand Up @@ -745,7 +725,6 @@ export class Snowball extends SnowballClient {
/**
* <p>Returns information about the Snow Family service limit for your account, and also the
* number of Snow devices your account has in use.</p>
*
* <p>The default service limit for the number of Snow devices that you can have at one time
* is 1. If you want to increase your service limit, contact Amazon Web Services Support.</p>
*/
Expand Down Expand Up @@ -974,6 +953,39 @@ export class Snowball extends SnowballClient {
}
}

/**
* <p>Lists all supported versions for Snow on-device services. Returns an
* array of <code>ServiceVersion</code> object containing the supported versions for a particular service.</p>
*/
public listServiceVersions(
args: ListServiceVersionsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListServiceVersionsCommandOutput>;
public listServiceVersions(
args: ListServiceVersionsCommandInput,
cb: (err: any, data?: ListServiceVersionsCommandOutput) => void
): void;
public listServiceVersions(
args: ListServiceVersionsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListServiceVersionsCommandOutput) => void
): void;
public listServiceVersions(
args: ListServiceVersionsCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListServiceVersionsCommandOutput) => void),
cb?: (err: any, data?: ListServiceVersionsCommandOutput) => void
): Promise<ListServiceVersionsCommandOutput> | void {
const command = new ListServiceVersionsCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>While a cluster's <code>ClusterState</code> value is in the <code>AwaitingQuorum</code>
* state, you can update some of the information associated with a cluster. Once the cluster
Expand Down
6 changes: 6 additions & 0 deletions clients/client-snowball/src/SnowballClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ import {
ListLongTermPricingCommandInput,
ListLongTermPricingCommandOutput,
} from "./commands/ListLongTermPricingCommand";
import {
ListServiceVersionsCommandInput,
ListServiceVersionsCommandOutput,
} from "./commands/ListServiceVersionsCommand";
import { UpdateClusterCommandInput, UpdateClusterCommandOutput } from "./commands/UpdateClusterCommand";
import { UpdateJobCommandInput, UpdateJobCommandOutput } from "./commands/UpdateJobCommand";
import {
Expand Down Expand Up @@ -125,6 +129,7 @@ export type ServiceInputTypes =
| ListCompatibleImagesCommandInput
| ListJobsCommandInput
| ListLongTermPricingCommandInput
| ListServiceVersionsCommandInput
| UpdateClusterCommandInput
| UpdateJobCommandInput
| UpdateJobShipmentStateCommandInput
Expand Down Expand Up @@ -152,6 +157,7 @@ export type ServiceOutputTypes =
| ListCompatibleImagesCommandOutput
| ListJobsCommandOutput
| ListLongTermPricingCommandOutput
| ListServiceVersionsCommandOutput
| UpdateClusterCommandOutput
| UpdateJobCommandOutput
| UpdateJobShipmentStateCommandOutput
Expand Down
18 changes: 0 additions & 18 deletions clients/client-snowball/src/commands/CreateJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ export interface CreateJobCommandOutput extends CreateJobResult, __MetadataBeare
* <p>Availability of device types differ by Amazon Web Services Region. For more information
* about Region availability, see <a href="https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/?p=ngi&loc=4">Amazon Web Services Regional Services</a>.</p>
* </note>
*
* <p></p>
*
* <p class="title">
* <b>Snow Family devices and their capacities.</b>
* </p>
Expand All @@ -55,7 +53,6 @@ export interface CreateJobCommandOutput extends CreateJobResult, __MetadataBeare
* <p>Description: Snowcone </p>
* </li>
* </ul>
*
* <p></p>
* </li>
* <li>
Expand All @@ -82,8 +79,6 @@ export interface CreateJobCommandOutput extends CreateJobResult, __MetadataBeare
* <p>Description: Snowball Edge Storage Optimized for data transfer only </p>
* </li>
* </ul>
*
*
* <p></p>
* </li>
* <li>
Expand Down Expand Up @@ -126,19 +121,6 @@ export interface CreateJobCommandOutput extends CreateJobResult, __MetadataBeare
* <p></p>
* </li>
* <li>
* <p>Device type: <b>V3_5C</b>
* </p>
* <ul>
* <li>
* <p>Capacity: T32</p>
* </li>
* <li>
* <p>Description: Snowball Edge Compute Optimized without GPU</p>
* </li>
* </ul>
* <p></p>
* </li>
* <li>
* <p>Device type: <b>STANDARD</b>
* </p>
* <ul>
Expand Down
5 changes: 0 additions & 5 deletions clients/client-snowball/src/commands/GetJobManifestCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,16 @@ export interface GetJobManifestCommandOutput extends GetJobManifestResult, __Met
* specified <code>JobId</code> value. You can access the manifest file for up to 60 minutes
* after this request has been made. To access the manifest file after 60 minutes have passed,
* you'll have to make another call to the <code>GetJobManifest</code> action.</p>
*
* <p>The manifest is an encrypted file that you can download after your job enters the
* <code>WithCustomer</code> status. This is the only valid status for calling this API as the
* manifest and <code>UnlockCode</code> code value are used for securing your device and should
* only be used when you have the device. The manifest is decrypted by using the
* <code>UnlockCode</code> code value, when you pass both values to the Snow device through the
* Snowball client when the client is started for the first time. </p>
*
*
* <p>As a best practice, we recommend that you don't save a copy of an
* <code>UnlockCode</code> value in the same location as the manifest file for that job. Saving
* these separately helps prevent unauthorized parties from gaining access to the Snow device
* associated with that job.</p>
*
*
* <p>The credentials of a given job, including its manifest file and unlock code, expire 360
* days after the job is created.</p>
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ export interface GetJobUnlockCodeCommandOutput extends GetJobUnlockCodeResult, _
* <p>Returns the <code>UnlockCode</code> code value for the specified job. A particular
* <code>UnlockCode</code> value can be accessed for up to 360 days after the associated job
* has been created.</p>
*
* <p>The <code>UnlockCode</code> value is a 29-character code with 25 alphanumeric
* characters and 4 hyphens. This code is used to decrypt the manifest file when it is passed
* along with the manifest to the Snow device through the Snowball client when the client is
* started for the first time. The only valid status for calling this API is
* <code>WithCustomer</code> as the manifest and <code>Unlock</code> code values are used for
* securing your device and should only be used when you have the device.</p>
*
* <p>As a best practice, we recommend that you don't save a copy of the
* <code>UnlockCode</code> in the same location as the manifest file for that job. Saving these
* separately helps prevent unauthorized parties from gaining access to the Snow device
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export interface GetSnowballUsageCommandOutput extends GetSnowballUsageResult, _
/**
* <p>Returns information about the Snow Family service limit for your account, and also the
* number of Snow devices your account has in use.</p>
*
* <p>The default service limit for the number of Snow devices that you can have at one time
* is 1. If you want to increase your service limit, contact Amazon Web Services Support.</p>
* @example
Expand Down
115 changes: 115 additions & 0 deletions clients/client-snowball/src/commands/ListServiceVersionsCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import {
ListServiceVersionsRequest,
ListServiceVersionsRequestFilterSensitiveLog,
ListServiceVersionsResult,
ListServiceVersionsResultFilterSensitiveLog,
} from "../models/models_0";
import {
deserializeAws_json1_1ListServiceVersionsCommand,
serializeAws_json1_1ListServiceVersionsCommand,
} from "../protocols/Aws_json1_1";
import { ServiceInputTypes, ServiceOutputTypes, SnowballClientResolvedConfig } from "../SnowballClient";

export interface ListServiceVersionsCommandInput extends ListServiceVersionsRequest {}
export interface ListServiceVersionsCommandOutput extends ListServiceVersionsResult, __MetadataBearer {}

/**
* <p>Lists all supported versions for Snow on-device services. Returns an
* array of <code>ServiceVersion</code> object containing the supported versions for a particular service.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { SnowballClient, ListServiceVersionsCommand } from "@aws-sdk/client-snowball"; // ES Modules import
* // const { SnowballClient, ListServiceVersionsCommand } = require("@aws-sdk/client-snowball"); // CommonJS import
* const client = new SnowballClient(config);
* const command = new ListServiceVersionsCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link ListServiceVersionsCommandInput} for command's `input` shape.
* @see {@link ListServiceVersionsCommandOutput} for command's `response` shape.
* @see {@link SnowballClientResolvedConfig | config} for SnowballClient's `config` shape.
*
*/
export class ListServiceVersionsCommand extends $Command<
ListServiceVersionsCommandInput,
ListServiceVersionsCommandOutput,
SnowballClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

constructor(readonly input: ListServiceVersionsCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: SnowballClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<ListServiceVersionsCommandInput, ListServiceVersionsCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, ListServiceVersionsCommand.getEndpointParameterInstructions())
);

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "SnowballClient";
const commandName = "ListServiceVersionsCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: ListServiceVersionsRequestFilterSensitiveLog,
outputFilterSensitiveLog: ListServiceVersionsResultFilterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: ListServiceVersionsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1ListServiceVersionsCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListServiceVersionsCommandOutput> {
return deserializeAws_json1_1ListServiceVersionsCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
1 change: 1 addition & 0 deletions clients/client-snowball/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export * from "./ListClustersCommand";
export * from "./ListCompatibleImagesCommand";
export * from "./ListJobsCommand";
export * from "./ListLongTermPricingCommand";
export * from "./ListServiceVersionsCommand";
export * from "./UpdateClusterCommand";
export * from "./UpdateJobCommand";
export * from "./UpdateJobShipmentStateCommand";
Expand Down
Loading

0 comments on commit 19042b5

Please sign in to comment.