-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-snowball): Adds support for V3_5C. This is a refreshed AW…
…S Snowball Edge Compute Optimized device type with 28TB SSD, 104 vCPU and 416GB memory (customer usable).
- Loading branch information
awstools
committed
Oct 3, 2022
1 parent
b7db053
commit 22500bf
Showing
11 changed files
with
739 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
clients/client-snowball/src/pagination/ListClusterJobsPaginator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// smithy-typescript generated code | ||
import { Paginator } from "@aws-sdk/types"; | ||
|
||
import { | ||
ListClusterJobsCommand, | ||
ListClusterJobsCommandInput, | ||
ListClusterJobsCommandOutput, | ||
} from "../commands/ListClusterJobsCommand"; | ||
import { Snowball } from "../Snowball"; | ||
import { SnowballClient } from "../SnowballClient"; | ||
import { SnowballPaginationConfiguration } from "./Interfaces"; | ||
|
||
/** | ||
* @private | ||
*/ | ||
const makePagedClientRequest = async ( | ||
client: SnowballClient, | ||
input: ListClusterJobsCommandInput, | ||
...args: any | ||
): Promise<ListClusterJobsCommandOutput> => { | ||
// @ts-ignore | ||
return await client.send(new ListClusterJobsCommand(input), ...args); | ||
}; | ||
/** | ||
* @private | ||
*/ | ||
const makePagedRequest = async ( | ||
client: Snowball, | ||
input: ListClusterJobsCommandInput, | ||
...args: any | ||
): Promise<ListClusterJobsCommandOutput> => { | ||
// @ts-ignore | ||
return await client.listClusterJobs(input, ...args); | ||
}; | ||
export async function* paginateListClusterJobs( | ||
config: SnowballPaginationConfiguration, | ||
input: ListClusterJobsCommandInput, | ||
...additionalArguments: any | ||
): Paginator<ListClusterJobsCommandOutput> { | ||
// ToDo: replace with actual type instead of typeof input.NextToken | ||
let token: typeof input.NextToken | undefined = config.startingToken || undefined; | ||
let hasNext = true; | ||
let page: ListClusterJobsCommandOutput; | ||
while (hasNext) { | ||
input.NextToken = token; | ||
input["MaxResults"] = config.pageSize; | ||
if (config.client instanceof Snowball) { | ||
page = await makePagedRequest(config.client, input, ...additionalArguments); | ||
} else if (config.client instanceof SnowballClient) { | ||
page = await makePagedClientRequest(config.client, input, ...additionalArguments); | ||
} else { | ||
throw new Error("Invalid client, expected Snowball | SnowballClient"); | ||
} | ||
yield page; | ||
const prevToken = token; | ||
token = page.NextToken; | ||
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); | ||
} | ||
// @ts-ignore | ||
return undefined; | ||
} |
61 changes: 61 additions & 0 deletions
61
clients/client-snowball/src/pagination/ListClustersPaginator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// smithy-typescript generated code | ||
import { Paginator } from "@aws-sdk/types"; | ||
|
||
import { | ||
ListClustersCommand, | ||
ListClustersCommandInput, | ||
ListClustersCommandOutput, | ||
} from "../commands/ListClustersCommand"; | ||
import { Snowball } from "../Snowball"; | ||
import { SnowballClient } from "../SnowballClient"; | ||
import { SnowballPaginationConfiguration } from "./Interfaces"; | ||
|
||
/** | ||
* @private | ||
*/ | ||
const makePagedClientRequest = async ( | ||
client: SnowballClient, | ||
input: ListClustersCommandInput, | ||
...args: any | ||
): Promise<ListClustersCommandOutput> => { | ||
// @ts-ignore | ||
return await client.send(new ListClustersCommand(input), ...args); | ||
}; | ||
/** | ||
* @private | ||
*/ | ||
const makePagedRequest = async ( | ||
client: Snowball, | ||
input: ListClustersCommandInput, | ||
...args: any | ||
): Promise<ListClustersCommandOutput> => { | ||
// @ts-ignore | ||
return await client.listClusters(input, ...args); | ||
}; | ||
export async function* paginateListClusters( | ||
config: SnowballPaginationConfiguration, | ||
input: ListClustersCommandInput, | ||
...additionalArguments: any | ||
): Paginator<ListClustersCommandOutput> { | ||
// ToDo: replace with actual type instead of typeof input.NextToken | ||
let token: typeof input.NextToken | undefined = config.startingToken || undefined; | ||
let hasNext = true; | ||
let page: ListClustersCommandOutput; | ||
while (hasNext) { | ||
input.NextToken = token; | ||
input["MaxResults"] = config.pageSize; | ||
if (config.client instanceof Snowball) { | ||
page = await makePagedRequest(config.client, input, ...additionalArguments); | ||
} else if (config.client instanceof SnowballClient) { | ||
page = await makePagedClientRequest(config.client, input, ...additionalArguments); | ||
} else { | ||
throw new Error("Invalid client, expected Snowball | SnowballClient"); | ||
} | ||
yield page; | ||
const prevToken = token; | ||
token = page.NextToken; | ||
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); | ||
} | ||
// @ts-ignore | ||
return undefined; | ||
} |
61 changes: 61 additions & 0 deletions
61
clients/client-snowball/src/pagination/ListCompatibleImagesPaginator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// smithy-typescript generated code | ||
import { Paginator } from "@aws-sdk/types"; | ||
|
||
import { | ||
ListCompatibleImagesCommand, | ||
ListCompatibleImagesCommandInput, | ||
ListCompatibleImagesCommandOutput, | ||
} from "../commands/ListCompatibleImagesCommand"; | ||
import { Snowball } from "../Snowball"; | ||
import { SnowballClient } from "../SnowballClient"; | ||
import { SnowballPaginationConfiguration } from "./Interfaces"; | ||
|
||
/** | ||
* @private | ||
*/ | ||
const makePagedClientRequest = async ( | ||
client: SnowballClient, | ||
input: ListCompatibleImagesCommandInput, | ||
...args: any | ||
): Promise<ListCompatibleImagesCommandOutput> => { | ||
// @ts-ignore | ||
return await client.send(new ListCompatibleImagesCommand(input), ...args); | ||
}; | ||
/** | ||
* @private | ||
*/ | ||
const makePagedRequest = async ( | ||
client: Snowball, | ||
input: ListCompatibleImagesCommandInput, | ||
...args: any | ||
): Promise<ListCompatibleImagesCommandOutput> => { | ||
// @ts-ignore | ||
return await client.listCompatibleImages(input, ...args); | ||
}; | ||
export async function* paginateListCompatibleImages( | ||
config: SnowballPaginationConfiguration, | ||
input: ListCompatibleImagesCommandInput, | ||
...additionalArguments: any | ||
): Paginator<ListCompatibleImagesCommandOutput> { | ||
// ToDo: replace with actual type instead of typeof input.NextToken | ||
let token: typeof input.NextToken | undefined = config.startingToken || undefined; | ||
let hasNext = true; | ||
let page: ListCompatibleImagesCommandOutput; | ||
while (hasNext) { | ||
input.NextToken = token; | ||
input["MaxResults"] = config.pageSize; | ||
if (config.client instanceof Snowball) { | ||
page = await makePagedRequest(config.client, input, ...additionalArguments); | ||
} else if (config.client instanceof SnowballClient) { | ||
page = await makePagedClientRequest(config.client, input, ...additionalArguments); | ||
} else { | ||
throw new Error("Invalid client, expected Snowball | SnowballClient"); | ||
} | ||
yield page; | ||
const prevToken = token; | ||
token = page.NextToken; | ||
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); | ||
} | ||
// @ts-ignore | ||
return undefined; | ||
} |
Oops, something went wrong.