@aws-sdk/client-ec2 3.438.0 → 3.441.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist-cjs/EC2.js +4 -0
- package/dist-cjs/commands/DescribeCapacityBlockOfferingsCommand.js +51 -0
- package/dist-cjs/commands/PurchaseCapacityBlockCommand.js +51 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +8 -1
- package/dist-cjs/models/models_1.js +2 -0
- package/dist-cjs/models/models_3.js +2 -6
- package/dist-cjs/models/models_4.js +8 -2
- package/dist-cjs/pagination/DescribeCapacityBlockOfferingsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +2 -1
- package/dist-cjs/protocols/Aws_ec2.js +213 -20
- package/dist-es/EC2.js +4 -0
- package/dist-es/commands/DescribeCapacityBlockOfferingsCommand.js +47 -0
- package/dist-es/commands/PurchaseCapacityBlockCommand.js +47 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +7 -0
- package/dist-es/models/models_1.js +2 -0
- package/dist-es/models/models_3.js +0 -4
- package/dist-es/models/models_4.js +6 -0
- package/dist-es/pagination/DescribeCapacityBlockOfferingsPaginator.js +25 -0
- package/dist-es/pagination/index.js +2 -1
- package/dist-es/protocols/Aws_ec2.js +188 -0
- package/dist-types/EC2.d.ts +14 -0
- package/dist-types/EC2Client.d.ts +4 -2
- package/dist-types/commands/CreateCapacityReservationCommand.d.ts +2 -1
- package/dist-types/commands/CreateFleetCommand.d.ts +1 -1
- package/dist-types/commands/CreateLaunchTemplateCommand.d.ts +1 -1
- package/dist-types/commands/CreateLaunchTemplateVersionCommand.d.ts +2 -2
- package/dist-types/commands/DeletePublicIpv4PoolCommand.d.ts +1 -2
- package/dist-types/commands/DescribeCapacityBlockOfferingsCommand.d.ts +94 -0
- package/dist-types/commands/DescribeCapacityReservationsCommand.d.ts +2 -1
- package/dist-types/commands/DescribeFleetsCommand.d.ts +1 -1
- package/dist-types/commands/DescribeInstanceTypesCommand.d.ts +1 -1
- package/dist-types/commands/DescribeInstancesCommand.d.ts +2 -3
- package/dist-types/commands/DescribeLaunchTemplateVersionsCommand.d.ts +1 -1
- package/dist-types/commands/DescribeTrunkInterfaceAssociationsCommand.d.ts +1 -1
- package/dist-types/commands/DescribeVerifiedAccessEndpointsCommand.d.ts +1 -1
- package/dist-types/commands/GetCapacityReservationUsageCommand.d.ts +1 -1
- package/dist-types/commands/GetLaunchTemplateDataCommand.d.ts +1 -1
- package/dist-types/commands/GetTransitGatewayPolicyTableEntriesCommand.d.ts +2 -1
- package/dist-types/commands/GetTransitGatewayPrefixListReferencesCommand.d.ts +1 -1
- package/dist-types/commands/GetTransitGatewayRouteTableAssociationsCommand.d.ts +1 -2
- package/dist-types/commands/ModifyFleetCommand.d.ts +1 -1
- package/dist-types/commands/PurchaseCapacityBlockCommand.d.ts +122 -0
- package/dist-types/commands/RestoreSnapshotTierCommand.d.ts +2 -1
- package/dist-types/commands/RevokeClientVpnIngressCommand.d.ts +1 -1
- package/dist-types/commands/RevokeSecurityGroupEgressCommand.d.ts +1 -1
- package/dist-types/commands/RevokeSecurityGroupIngressCommand.d.ts +1 -2
- package/dist-types/commands/RunInstancesCommand.d.ts +2 -2
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +20 -16
- package/dist-types/models/models_1.d.ts +22 -51
- package/dist-types/models/models_2.d.ts +49 -18
- package/dist-types/models/models_3.d.ts +135 -788
- package/dist-types/models/models_4.d.ts +792 -120
- package/dist-types/models/models_5.d.ts +118 -141
- package/dist-types/models/models_6.d.ts +176 -217
- package/dist-types/models/models_7.d.ts +216 -1
- package/dist-types/pagination/DescribeCapacityBlockOfferingsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -1
- package/dist-types/protocols/Aws_ec2.d.ts +18 -0
- package/dist-types/ts3.4/EC2.d.ts +34 -0
- package/dist-types/ts3.4/EC2Client.d.ts +12 -0
- package/dist-types/ts3.4/commands/DeletePublicIpv4PoolCommand.d.ts +4 -2
- package/dist-types/ts3.4/commands/DescribeCapacityBlockOfferingsCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/DescribeInstancesCommand.d.ts +4 -2
- package/dist-types/ts3.4/commands/DescribeTrunkInterfaceAssociationsCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/DescribeVerifiedAccessEndpointsCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/GetTransitGatewayPolicyTableEntriesCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/GetTransitGatewayPrefixListReferencesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/GetTransitGatewayRouteTableAssociationsCommand.d.ts +4 -2
- package/dist-types/ts3.4/commands/PurchaseCapacityBlockCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/RestoreSnapshotTierCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/RevokeClientVpnIngressCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/RevokeSecurityGroupEgressCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/RevokeSecurityGroupIngressCommand.d.ts +4 -2
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +10 -4
- package/dist-types/ts3.4/models/models_1.d.ts +6 -11
- package/dist-types/ts3.4/models/models_2.d.ts +13 -5
- package/dist-types/ts3.4/models/models_3.d.ts +31 -25
- package/dist-types/ts3.4/models/models_4.d.ts +28 -30
- package/dist-types/ts3.4/models/models_5.d.ts +26 -22
- package/dist-types/ts3.4/models/models_6.d.ts +33 -47
- package/dist-types/ts3.4/models/models_7.d.ts +46 -0
- package/dist-types/ts3.4/pagination/DescribeCapacityBlockOfferingsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -1
- package/dist-types/ts3.4/protocols/Aws_ec2.d.ts +24 -0
- package/package.json +4 -4
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_PurchaseCapacityBlockCommand, se_PurchaseCapacityBlockCommand } from "../protocols/Aws_ec2";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class PurchaseCapacityBlockCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, PurchaseCapacityBlockCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "EC2Client";
|
|
26
|
+
const commandName = "PurchaseCapacityBlockCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonEC2",
|
|
35
|
+
operation: "PurchaseCapacityBlock",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const { requestHandler } = configuration;
|
|
39
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
+
}
|
|
41
|
+
serialize(input, context) {
|
|
42
|
+
return se_PurchaseCapacityBlockCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_PurchaseCapacityBlockCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -224,6 +224,7 @@ export * from "./DescribeAvailabilityZonesCommand";
|
|
|
224
224
|
export * from "./DescribeAwsNetworkPerformanceMetricSubscriptionsCommand";
|
|
225
225
|
export * from "./DescribeBundleTasksCommand";
|
|
226
226
|
export * from "./DescribeByoipCidrsCommand";
|
|
227
|
+
export * from "./DescribeCapacityBlockOfferingsCommand";
|
|
227
228
|
export * from "./DescribeCapacityReservationFleetsCommand";
|
|
228
229
|
export * from "./DescribeCapacityReservationsCommand";
|
|
229
230
|
export * from "./DescribeCarrierGatewaysCommand";
|
|
@@ -537,6 +538,7 @@ export * from "./MoveByoipCidrToIpamCommand";
|
|
|
537
538
|
export * from "./ProvisionByoipCidrCommand";
|
|
538
539
|
export * from "./ProvisionIpamPoolCidrCommand";
|
|
539
540
|
export * from "./ProvisionPublicIpv4PoolCidrCommand";
|
|
541
|
+
export * from "./PurchaseCapacityBlockCommand";
|
|
540
542
|
export * from "./PurchaseHostReservationCommand";
|
|
541
543
|
export * from "./PurchaseReservedInstancesOfferingCommand";
|
|
542
544
|
export * from "./PurchaseScheduledInstancesCommand";
|
|
@@ -468,12 +468,19 @@ export const CapacityReservationTenancy = {
|
|
|
468
468
|
dedicated: "dedicated",
|
|
469
469
|
default: "default",
|
|
470
470
|
};
|
|
471
|
+
export const CapacityReservationType = {
|
|
472
|
+
CAPACITY_BLOCK: "capacity-block",
|
|
473
|
+
DEFAULT: "default",
|
|
474
|
+
};
|
|
471
475
|
export const CapacityReservationState = {
|
|
472
476
|
active: "active",
|
|
473
477
|
cancelled: "cancelled",
|
|
474
478
|
expired: "expired",
|
|
475
479
|
failed: "failed",
|
|
480
|
+
payment_failed: "payment-failed",
|
|
481
|
+
payment_pending: "payment-pending",
|
|
476
482
|
pending: "pending",
|
|
483
|
+
scheduled: "scheduled",
|
|
477
484
|
};
|
|
478
485
|
export const FleetInstanceMatchCriteria = {
|
|
479
486
|
open: "open",
|
|
@@ -100,6 +100,7 @@ export const FleetReplacementStrategy = {
|
|
|
100
100
|
LAUNCH_BEFORE_TERMINATE: "launch-before-terminate",
|
|
101
101
|
};
|
|
102
102
|
export const DefaultTargetCapacityType = {
|
|
103
|
+
CAPACITY_BLOCK: "capacity-block",
|
|
103
104
|
ON_DEMAND: "on-demand",
|
|
104
105
|
SPOT: "spot",
|
|
105
106
|
};
|
|
@@ -265,6 +266,7 @@ export const ShutdownBehavior = {
|
|
|
265
266
|
terminate: "terminate",
|
|
266
267
|
};
|
|
267
268
|
export const MarketType = {
|
|
269
|
+
capacity_block: "capacity-block",
|
|
268
270
|
spot: "spot",
|
|
269
271
|
};
|
|
270
272
|
export const InstanceInterruptionBehavior = {
|
|
@@ -209,10 +209,6 @@ export const InstanceAttributeName = {
|
|
|
209
209
|
sriovNetSupport: "sriovNetSupport",
|
|
210
210
|
userData: "userData",
|
|
211
211
|
};
|
|
212
|
-
export const InstanceBootModeValues = {
|
|
213
|
-
legacy_bios: "legacy-bios",
|
|
214
|
-
uefi: "uefi",
|
|
215
|
-
};
|
|
216
212
|
export const DeleteVerifiedAccessTrustProviderResultFilterSensitiveLog = (obj) => ({
|
|
217
213
|
...obj,
|
|
218
214
|
...(obj.VerifiedAccessTrustProvider && {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { SENSITIVE_STRING } from "@smithy/smithy-client";
|
|
2
2
|
import { LaunchTemplateVersionFilterSensitiveLog, } from "./models_1";
|
|
3
|
+
export const InstanceBootModeValues = {
|
|
4
|
+
legacy_bios: "legacy-bios",
|
|
5
|
+
uefi: "uefi",
|
|
6
|
+
};
|
|
3
7
|
export const InstanceLifecycleType = {
|
|
8
|
+
capacity_block: "capacity-block",
|
|
4
9
|
scheduled: "scheduled",
|
|
5
10
|
spot: "spot",
|
|
6
11
|
};
|
|
@@ -139,6 +144,7 @@ export const RootDeviceType = {
|
|
|
139
144
|
instance_store: "instance-store",
|
|
140
145
|
};
|
|
141
146
|
export const UsageClassType = {
|
|
147
|
+
capacity_block: "capacity-block",
|
|
142
148
|
on_demand: "on-demand",
|
|
143
149
|
spot: "spot",
|
|
144
150
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DescribeCapacityBlockOfferingsCommand, } from "../commands/DescribeCapacityBlockOfferingsCommand";
|
|
2
|
+
import { EC2Client } from "../EC2Client";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new DescribeCapacityBlockOfferingsCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateDescribeCapacityBlockOfferings(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.NextToken = token;
|
|
12
|
+
input["MaxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof EC2Client) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected EC2 | EC2Client");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.NextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -2,13 +2,14 @@ export * from "./DescribeAddressTransfersPaginator";
|
|
|
2
2
|
export * from "./DescribeAddressesAttributePaginator";
|
|
3
3
|
export * from "./DescribeAwsNetworkPerformanceMetricSubscriptionsPaginator";
|
|
4
4
|
export * from "./DescribeByoipCidrsPaginator";
|
|
5
|
+
export * from "./DescribeCapacityBlockOfferingsPaginator";
|
|
5
6
|
export * from "./DescribeCapacityReservationFleetsPaginator";
|
|
6
7
|
export * from "./DescribeCapacityReservationsPaginator";
|
|
7
8
|
export * from "./DescribeCarrierGatewaysPaginator";
|
|
8
9
|
export * from "./DescribeClassicLinkInstancesPaginator";
|
|
9
10
|
export * from "./DescribeClientVpnAuthorizationRulesPaginator";
|
|
10
|
-
export * from "./DescribeClientVpnConnectionsPaginator";
|
|
11
11
|
export * from "./Interfaces";
|
|
12
|
+
export * from "./DescribeClientVpnConnectionsPaginator";
|
|
12
13
|
export * from "./DescribeClientVpnEndpointsPaginator";
|
|
13
14
|
export * from "./DescribeClientVpnRoutesPaginator";
|
|
14
15
|
export * from "./DescribeClientVpnTargetNetworksPaginator";
|
|
@@ -2263,6 +2263,16 @@ export const se_DescribeByoipCidrsCommand = async (input, context) => {
|
|
|
2263
2263
|
});
|
|
2264
2264
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
2265
2265
|
};
|
|
2266
|
+
export const se_DescribeCapacityBlockOfferingsCommand = async (input, context) => {
|
|
2267
|
+
const headers = SHARED_HEADERS;
|
|
2268
|
+
let body;
|
|
2269
|
+
body = buildFormUrlencodedString({
|
|
2270
|
+
...se_DescribeCapacityBlockOfferingsRequest(input, context),
|
|
2271
|
+
Action: "DescribeCapacityBlockOfferings",
|
|
2272
|
+
Version: "2016-11-15",
|
|
2273
|
+
});
|
|
2274
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
2275
|
+
};
|
|
2266
2276
|
export const se_DescribeCapacityReservationFleetsCommand = async (input, context) => {
|
|
2267
2277
|
const headers = SHARED_HEADERS;
|
|
2268
2278
|
let body;
|
|
@@ -5393,6 +5403,16 @@ export const se_ProvisionPublicIpv4PoolCidrCommand = async (input, context) => {
|
|
|
5393
5403
|
});
|
|
5394
5404
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
5395
5405
|
};
|
|
5406
|
+
export const se_PurchaseCapacityBlockCommand = async (input, context) => {
|
|
5407
|
+
const headers = SHARED_HEADERS;
|
|
5408
|
+
let body;
|
|
5409
|
+
body = buildFormUrlencodedString({
|
|
5410
|
+
...se_PurchaseCapacityBlockRequest(input, context),
|
|
5411
|
+
Action: "PurchaseCapacityBlock",
|
|
5412
|
+
Version: "2016-11-15",
|
|
5413
|
+
});
|
|
5414
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
5415
|
+
};
|
|
5396
5416
|
export const se_PurchaseHostReservationCommand = async (input, context) => {
|
|
5397
5417
|
const headers = SHARED_HEADERS;
|
|
5398
5418
|
let body;
|
|
@@ -11798,6 +11818,32 @@ const de_DescribeByoipCidrsCommandError = async (output, context) => {
|
|
|
11798
11818
|
errorCode,
|
|
11799
11819
|
});
|
|
11800
11820
|
};
|
|
11821
|
+
export const de_DescribeCapacityBlockOfferingsCommand = async (output, context) => {
|
|
11822
|
+
if (output.statusCode >= 300) {
|
|
11823
|
+
return de_DescribeCapacityBlockOfferingsCommandError(output, context);
|
|
11824
|
+
}
|
|
11825
|
+
const data = await parseBody(output.body, context);
|
|
11826
|
+
let contents = {};
|
|
11827
|
+
contents = de_DescribeCapacityBlockOfferingsResult(data, context);
|
|
11828
|
+
const response = {
|
|
11829
|
+
$metadata: deserializeMetadata(output),
|
|
11830
|
+
...contents,
|
|
11831
|
+
};
|
|
11832
|
+
return response;
|
|
11833
|
+
};
|
|
11834
|
+
const de_DescribeCapacityBlockOfferingsCommandError = async (output, context) => {
|
|
11835
|
+
const parsedOutput = {
|
|
11836
|
+
...output,
|
|
11837
|
+
body: await parseErrorBody(output.body, context),
|
|
11838
|
+
};
|
|
11839
|
+
const errorCode = loadEc2ErrorCode(output, parsedOutput.body);
|
|
11840
|
+
const parsedBody = parsedOutput.body;
|
|
11841
|
+
return throwDefaultError({
|
|
11842
|
+
output,
|
|
11843
|
+
parsedBody: parsedBody.Errors.Error,
|
|
11844
|
+
errorCode,
|
|
11845
|
+
});
|
|
11846
|
+
};
|
|
11801
11847
|
export const de_DescribeCapacityReservationFleetsCommand = async (output, context) => {
|
|
11802
11848
|
if (output.statusCode >= 300) {
|
|
11803
11849
|
return de_DescribeCapacityReservationFleetsCommandError(output, context);
|
|
@@ -19885,6 +19931,32 @@ const de_ProvisionPublicIpv4PoolCidrCommandError = async (output, context) => {
|
|
|
19885
19931
|
errorCode,
|
|
19886
19932
|
});
|
|
19887
19933
|
};
|
|
19934
|
+
export const de_PurchaseCapacityBlockCommand = async (output, context) => {
|
|
19935
|
+
if (output.statusCode >= 300) {
|
|
19936
|
+
return de_PurchaseCapacityBlockCommandError(output, context);
|
|
19937
|
+
}
|
|
19938
|
+
const data = await parseBody(output.body, context);
|
|
19939
|
+
let contents = {};
|
|
19940
|
+
contents = de_PurchaseCapacityBlockResult(data, context);
|
|
19941
|
+
const response = {
|
|
19942
|
+
$metadata: deserializeMetadata(output),
|
|
19943
|
+
...contents,
|
|
19944
|
+
};
|
|
19945
|
+
return response;
|
|
19946
|
+
};
|
|
19947
|
+
const de_PurchaseCapacityBlockCommandError = async (output, context) => {
|
|
19948
|
+
const parsedOutput = {
|
|
19949
|
+
...output,
|
|
19950
|
+
body: await parseErrorBody(output.body, context),
|
|
19951
|
+
};
|
|
19952
|
+
const errorCode = loadEc2ErrorCode(output, parsedOutput.body);
|
|
19953
|
+
const parsedBody = parsedOutput.body;
|
|
19954
|
+
return throwDefaultError({
|
|
19955
|
+
output,
|
|
19956
|
+
parsedBody: parsedBody.Errors.Error,
|
|
19957
|
+
errorCode,
|
|
19958
|
+
});
|
|
19959
|
+
};
|
|
19888
19960
|
export const de_PurchaseHostReservationCommand = async (output, context) => {
|
|
19889
19961
|
if (output.statusCode >= 300) {
|
|
19890
19962
|
return de_PurchaseHostReservationCommandError(output, context);
|
|
@@ -27704,6 +27776,34 @@ const se_DescribeByoipCidrsRequest = (input, context) => {
|
|
|
27704
27776
|
}
|
|
27705
27777
|
return entries;
|
|
27706
27778
|
};
|
|
27779
|
+
const se_DescribeCapacityBlockOfferingsRequest = (input, context) => {
|
|
27780
|
+
const entries = {};
|
|
27781
|
+
if (input.DryRun != null) {
|
|
27782
|
+
entries["DryRun"] = input.DryRun;
|
|
27783
|
+
}
|
|
27784
|
+
if (input.InstanceType != null) {
|
|
27785
|
+
entries["InstanceType"] = input.InstanceType;
|
|
27786
|
+
}
|
|
27787
|
+
if (input.InstanceCount != null) {
|
|
27788
|
+
entries["InstanceCount"] = input.InstanceCount;
|
|
27789
|
+
}
|
|
27790
|
+
if (input.StartDateRange != null) {
|
|
27791
|
+
entries["StartDateRange"] = input.StartDateRange.toISOString().split(".")[0] + "Z";
|
|
27792
|
+
}
|
|
27793
|
+
if (input.EndDateRange != null) {
|
|
27794
|
+
entries["EndDateRange"] = input.EndDateRange.toISOString().split(".")[0] + "Z";
|
|
27795
|
+
}
|
|
27796
|
+
if (input.CapacityDurationHours != null) {
|
|
27797
|
+
entries["CapacityDurationHours"] = input.CapacityDurationHours;
|
|
27798
|
+
}
|
|
27799
|
+
if (input.NextToken != null) {
|
|
27800
|
+
entries["NextToken"] = input.NextToken;
|
|
27801
|
+
}
|
|
27802
|
+
if (input.MaxResults != null) {
|
|
27803
|
+
entries["MaxResults"] = input.MaxResults;
|
|
27804
|
+
}
|
|
27805
|
+
return entries;
|
|
27806
|
+
};
|
|
27707
27807
|
const se_DescribeCapacityReservationFleetsRequest = (input, context) => {
|
|
27708
27808
|
const entries = {};
|
|
27709
27809
|
if (input.CapacityReservationFleetIds != null) {
|
|
@@ -39712,6 +39812,29 @@ const se_PublicIpv4PoolIdStringList = (input, context) => {
|
|
|
39712
39812
|
}
|
|
39713
39813
|
return entries;
|
|
39714
39814
|
};
|
|
39815
|
+
const se_PurchaseCapacityBlockRequest = (input, context) => {
|
|
39816
|
+
const entries = {};
|
|
39817
|
+
if (input.DryRun != null) {
|
|
39818
|
+
entries["DryRun"] = input.DryRun;
|
|
39819
|
+
}
|
|
39820
|
+
if (input.TagSpecifications != null) {
|
|
39821
|
+
const memberEntries = se_TagSpecificationList(input.TagSpecifications, context);
|
|
39822
|
+
if (input.TagSpecifications?.length === 0) {
|
|
39823
|
+
entries.TagSpecification = [];
|
|
39824
|
+
}
|
|
39825
|
+
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
39826
|
+
const loc = `TagSpecification.${key.substring(key.indexOf(".") + 1)}`;
|
|
39827
|
+
entries[loc] = value;
|
|
39828
|
+
});
|
|
39829
|
+
}
|
|
39830
|
+
if (input.CapacityBlockOfferingId != null) {
|
|
39831
|
+
entries["CapacityBlockOfferingId"] = input.CapacityBlockOfferingId;
|
|
39832
|
+
}
|
|
39833
|
+
if (input.InstancePlatform != null) {
|
|
39834
|
+
entries["InstancePlatform"] = input.InstancePlatform;
|
|
39835
|
+
}
|
|
39836
|
+
return entries;
|
|
39837
|
+
};
|
|
39715
39838
|
const se_PurchaseHostReservationRequest = (input, context) => {
|
|
39716
39839
|
const entries = {};
|
|
39717
39840
|
if (input.ClientToken != null) {
|
|
@@ -45481,6 +45604,47 @@ const de_CapacityAllocations = (output, context) => {
|
|
|
45481
45604
|
return de_CapacityAllocation(entry, context);
|
|
45482
45605
|
});
|
|
45483
45606
|
};
|
|
45607
|
+
const de_CapacityBlockOffering = (output, context) => {
|
|
45608
|
+
const contents = {};
|
|
45609
|
+
if (output["capacityBlockOfferingId"] !== undefined) {
|
|
45610
|
+
contents.CapacityBlockOfferingId = __expectString(output["capacityBlockOfferingId"]);
|
|
45611
|
+
}
|
|
45612
|
+
if (output["instanceType"] !== undefined) {
|
|
45613
|
+
contents.InstanceType = __expectString(output["instanceType"]);
|
|
45614
|
+
}
|
|
45615
|
+
if (output["availabilityZone"] !== undefined) {
|
|
45616
|
+
contents.AvailabilityZone = __expectString(output["availabilityZone"]);
|
|
45617
|
+
}
|
|
45618
|
+
if (output["instanceCount"] !== undefined) {
|
|
45619
|
+
contents.InstanceCount = __strictParseInt32(output["instanceCount"]);
|
|
45620
|
+
}
|
|
45621
|
+
if (output["startDate"] !== undefined) {
|
|
45622
|
+
contents.StartDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(output["startDate"]));
|
|
45623
|
+
}
|
|
45624
|
+
if (output["endDate"] !== undefined) {
|
|
45625
|
+
contents.EndDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(output["endDate"]));
|
|
45626
|
+
}
|
|
45627
|
+
if (output["capacityBlockDurationHours"] !== undefined) {
|
|
45628
|
+
contents.CapacityBlockDurationHours = __strictParseInt32(output["capacityBlockDurationHours"]);
|
|
45629
|
+
}
|
|
45630
|
+
if (output["upfrontFee"] !== undefined) {
|
|
45631
|
+
contents.UpfrontFee = __expectString(output["upfrontFee"]);
|
|
45632
|
+
}
|
|
45633
|
+
if (output["currencyCode"] !== undefined) {
|
|
45634
|
+
contents.CurrencyCode = __expectString(output["currencyCode"]);
|
|
45635
|
+
}
|
|
45636
|
+
if (output["tenancy"] !== undefined) {
|
|
45637
|
+
contents.Tenancy = __expectString(output["tenancy"]);
|
|
45638
|
+
}
|
|
45639
|
+
return contents;
|
|
45640
|
+
};
|
|
45641
|
+
const de_CapacityBlockOfferingSet = (output, context) => {
|
|
45642
|
+
return (output || [])
|
|
45643
|
+
.filter((e) => e != null)
|
|
45644
|
+
.map((entry) => {
|
|
45645
|
+
return de_CapacityBlockOffering(entry, context);
|
|
45646
|
+
});
|
|
45647
|
+
};
|
|
45484
45648
|
const de_CapacityReservation = (output, context) => {
|
|
45485
45649
|
const contents = {};
|
|
45486
45650
|
if (output["capacityReservationId"] !== undefined) {
|
|
@@ -45558,6 +45722,9 @@ const de_CapacityReservation = (output, context) => {
|
|
|
45558
45722
|
else if (output["capacityAllocationSet"] !== undefined && output["capacityAllocationSet"]["item"] !== undefined) {
|
|
45559
45723
|
contents.CapacityAllocations = de_CapacityAllocations(__getArrayIfSingleItem(output["capacityAllocationSet"]["item"]), context);
|
|
45560
45724
|
}
|
|
45725
|
+
if (output["reservationType"] !== undefined) {
|
|
45726
|
+
contents.ReservationType = __expectString(output["reservationType"]);
|
|
45727
|
+
}
|
|
45561
45728
|
return contents;
|
|
45562
45729
|
};
|
|
45563
45730
|
const de_CapacityReservationFleet = (output, context) => {
|
|
@@ -47826,6 +47993,20 @@ const de_DescribeByoipCidrsResult = (output, context) => {
|
|
|
47826
47993
|
}
|
|
47827
47994
|
return contents;
|
|
47828
47995
|
};
|
|
47996
|
+
const de_DescribeCapacityBlockOfferingsResult = (output, context) => {
|
|
47997
|
+
const contents = {};
|
|
47998
|
+
if (output.capacityBlockOfferingSet === "") {
|
|
47999
|
+
contents.CapacityBlockOfferings = [];
|
|
48000
|
+
}
|
|
48001
|
+
else if (output["capacityBlockOfferingSet"] !== undefined &&
|
|
48002
|
+
output["capacityBlockOfferingSet"]["item"] !== undefined) {
|
|
48003
|
+
contents.CapacityBlockOfferings = de_CapacityBlockOfferingSet(__getArrayIfSingleItem(output["capacityBlockOfferingSet"]["item"]), context);
|
|
48004
|
+
}
|
|
48005
|
+
if (output["nextToken"] !== undefined) {
|
|
48006
|
+
contents.NextToken = __expectString(output["nextToken"]);
|
|
48007
|
+
}
|
|
48008
|
+
return contents;
|
|
48009
|
+
};
|
|
47829
48010
|
const de_DescribeCapacityReservationFleetsResult = (output, context) => {
|
|
47830
48011
|
const contents = {};
|
|
47831
48012
|
if (output.capacityReservationFleetSet === "") {
|
|
@@ -58615,6 +58796,13 @@ const de_Purchase = (output, context) => {
|
|
|
58615
58796
|
}
|
|
58616
58797
|
return contents;
|
|
58617
58798
|
};
|
|
58799
|
+
const de_PurchaseCapacityBlockResult = (output, context) => {
|
|
58800
|
+
const contents = {};
|
|
58801
|
+
if (output["capacityReservation"] !== undefined) {
|
|
58802
|
+
contents.CapacityReservation = de_CapacityReservation(output["capacityReservation"], context);
|
|
58803
|
+
}
|
|
58804
|
+
return contents;
|
|
58805
|
+
};
|
|
58618
58806
|
const de_PurchasedScheduledInstanceSet = (output, context) => {
|
|
58619
58807
|
return (output || [])
|
|
58620
58808
|
.filter((e) => e != null)
|
package/dist-types/EC2.d.ts
CHANGED
|
@@ -225,6 +225,7 @@ import { DescribeAvailabilityZonesCommandInput, DescribeAvailabilityZonesCommand
|
|
|
225
225
|
import { DescribeAwsNetworkPerformanceMetricSubscriptionsCommandInput, DescribeAwsNetworkPerformanceMetricSubscriptionsCommandOutput } from "./commands/DescribeAwsNetworkPerformanceMetricSubscriptionsCommand";
|
|
226
226
|
import { DescribeBundleTasksCommandInput, DescribeBundleTasksCommandOutput } from "./commands/DescribeBundleTasksCommand";
|
|
227
227
|
import { DescribeByoipCidrsCommandInput, DescribeByoipCidrsCommandOutput } from "./commands/DescribeByoipCidrsCommand";
|
|
228
|
+
import { DescribeCapacityBlockOfferingsCommandInput, DescribeCapacityBlockOfferingsCommandOutput } from "./commands/DescribeCapacityBlockOfferingsCommand";
|
|
228
229
|
import { DescribeCapacityReservationFleetsCommandInput, DescribeCapacityReservationFleetsCommandOutput } from "./commands/DescribeCapacityReservationFleetsCommand";
|
|
229
230
|
import { DescribeCapacityReservationsCommandInput, DescribeCapacityReservationsCommandOutput } from "./commands/DescribeCapacityReservationsCommand";
|
|
230
231
|
import { DescribeCarrierGatewaysCommandInput, DescribeCarrierGatewaysCommandOutput } from "./commands/DescribeCarrierGatewaysCommand";
|
|
@@ -538,6 +539,7 @@ import { MoveByoipCidrToIpamCommandInput, MoveByoipCidrToIpamCommandOutput } fro
|
|
|
538
539
|
import { ProvisionByoipCidrCommandInput, ProvisionByoipCidrCommandOutput } from "./commands/ProvisionByoipCidrCommand";
|
|
539
540
|
import { ProvisionIpamPoolCidrCommandInput, ProvisionIpamPoolCidrCommandOutput } from "./commands/ProvisionIpamPoolCidrCommand";
|
|
540
541
|
import { ProvisionPublicIpv4PoolCidrCommandInput, ProvisionPublicIpv4PoolCidrCommandOutput } from "./commands/ProvisionPublicIpv4PoolCidrCommand";
|
|
542
|
+
import { PurchaseCapacityBlockCommandInput, PurchaseCapacityBlockCommandOutput } from "./commands/PurchaseCapacityBlockCommand";
|
|
541
543
|
import { PurchaseHostReservationCommandInput, PurchaseHostReservationCommandOutput } from "./commands/PurchaseHostReservationCommand";
|
|
542
544
|
import { PurchaseReservedInstancesOfferingCommandInput, PurchaseReservedInstancesOfferingCommandOutput } from "./commands/PurchaseReservedInstancesOfferingCommand";
|
|
543
545
|
import { PurchaseScheduledInstancesCommandInput, PurchaseScheduledInstancesCommandOutput } from "./commands/PurchaseScheduledInstancesCommand";
|
|
@@ -1957,6 +1959,12 @@ export interface EC2 {
|
|
|
1957
1959
|
describeByoipCidrs(args: DescribeByoipCidrsCommandInput, options?: __HttpHandlerOptions): Promise<DescribeByoipCidrsCommandOutput>;
|
|
1958
1960
|
describeByoipCidrs(args: DescribeByoipCidrsCommandInput, cb: (err: any, data?: DescribeByoipCidrsCommandOutput) => void): void;
|
|
1959
1961
|
describeByoipCidrs(args: DescribeByoipCidrsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeByoipCidrsCommandOutput) => void): void;
|
|
1962
|
+
/**
|
|
1963
|
+
* @see {@link DescribeCapacityBlockOfferingsCommand}
|
|
1964
|
+
*/
|
|
1965
|
+
describeCapacityBlockOfferings(args: DescribeCapacityBlockOfferingsCommandInput, options?: __HttpHandlerOptions): Promise<DescribeCapacityBlockOfferingsCommandOutput>;
|
|
1966
|
+
describeCapacityBlockOfferings(args: DescribeCapacityBlockOfferingsCommandInput, cb: (err: any, data?: DescribeCapacityBlockOfferingsCommandOutput) => void): void;
|
|
1967
|
+
describeCapacityBlockOfferings(args: DescribeCapacityBlockOfferingsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeCapacityBlockOfferingsCommandOutput) => void): void;
|
|
1960
1968
|
/**
|
|
1961
1969
|
* @see {@link DescribeCapacityReservationFleetsCommand}
|
|
1962
1970
|
*/
|
|
@@ -3835,6 +3843,12 @@ export interface EC2 {
|
|
|
3835
3843
|
provisionPublicIpv4PoolCidr(args: ProvisionPublicIpv4PoolCidrCommandInput, options?: __HttpHandlerOptions): Promise<ProvisionPublicIpv4PoolCidrCommandOutput>;
|
|
3836
3844
|
provisionPublicIpv4PoolCidr(args: ProvisionPublicIpv4PoolCidrCommandInput, cb: (err: any, data?: ProvisionPublicIpv4PoolCidrCommandOutput) => void): void;
|
|
3837
3845
|
provisionPublicIpv4PoolCidr(args: ProvisionPublicIpv4PoolCidrCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ProvisionPublicIpv4PoolCidrCommandOutput) => void): void;
|
|
3846
|
+
/**
|
|
3847
|
+
* @see {@link PurchaseCapacityBlockCommand}
|
|
3848
|
+
*/
|
|
3849
|
+
purchaseCapacityBlock(args: PurchaseCapacityBlockCommandInput, options?: __HttpHandlerOptions): Promise<PurchaseCapacityBlockCommandOutput>;
|
|
3850
|
+
purchaseCapacityBlock(args: PurchaseCapacityBlockCommandInput, cb: (err: any, data?: PurchaseCapacityBlockCommandOutput) => void): void;
|
|
3851
|
+
purchaseCapacityBlock(args: PurchaseCapacityBlockCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PurchaseCapacityBlockCommandOutput) => void): void;
|
|
3838
3852
|
/**
|
|
3839
3853
|
* @see {@link PurchaseHostReservationCommand}
|
|
3840
3854
|
*/
|