-
Notifications
You must be signed in to change notification settings - Fork 576
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-auto-scaling): This release updates validation for instan…
…ce types used in the AllowedInstanceTypes and ExcludedInstanceTypes parameters of the InstanceRequirements property of a MixedInstancesPolicy.
- Loading branch information
awstools
committed
Jul 27, 2023
1 parent
d6e75cf
commit 4137d54
Showing
11 changed files
with
124 additions
and
35 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
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
50 changes: 50 additions & 0 deletions
50
clients/client-auto-scaling/src/pagination/DescribeWarmPoolPaginator.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,50 @@ | ||
// smithy-typescript generated code | ||
import { Paginator } from "@smithy/types"; | ||
|
||
import { AutoScalingClient } from "../AutoScalingClient"; | ||
import { | ||
DescribeWarmPoolCommand, | ||
DescribeWarmPoolCommandInput, | ||
DescribeWarmPoolCommandOutput, | ||
} from "../commands/DescribeWarmPoolCommand"; | ||
import { AutoScalingPaginationConfiguration } from "./Interfaces"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
const makePagedClientRequest = async ( | ||
client: AutoScalingClient, | ||
input: DescribeWarmPoolCommandInput, | ||
...args: any | ||
): Promise<DescribeWarmPoolCommandOutput> => { | ||
// @ts-ignore | ||
return await client.send(new DescribeWarmPoolCommand(input), ...args); | ||
}; | ||
/** | ||
* @public | ||
*/ | ||
export async function* paginateDescribeWarmPool( | ||
config: AutoScalingPaginationConfiguration, | ||
input: DescribeWarmPoolCommandInput, | ||
...additionalArguments: any | ||
): Paginator<DescribeWarmPoolCommandOutput> { | ||
// ToDo: replace with actual type instead of typeof input.NextToken | ||
let token: typeof input.NextToken | undefined = config.startingToken || undefined; | ||
let hasNext = true; | ||
let page: DescribeWarmPoolCommandOutput; | ||
while (hasNext) { | ||
input.NextToken = token; | ||
input["MaxRecords"] = config.pageSize; | ||
if (config.client instanceof AutoScalingClient) { | ||
page = await makePagedClientRequest(config.client, input, ...additionalArguments); | ||
} else { | ||
throw new Error("Invalid client, expected AutoScaling | AutoScalingClient"); | ||
} | ||
yield page; | ||
const prevToken = token; | ||
token = page.NextToken; | ||
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); | ||
} | ||
// @ts-ignore | ||
return undefined; | ||
} |
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
Oops, something went wrong.