@aws-sdk/client-savingsplans 3.535.0 → 3.538.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 CHANGED
@@ -6,10 +6,10 @@
6
6
 
7
7
  AWS SDK for JavaScript Savingsplans Client for Node.js, Browser and React Native.
8
8
 
9
- <p>Savings Plans are a pricing model that offer significant savings on AWS usage (for
10
- example, on Amazon EC2 instances). You commit to a consistent amount of usage, in USD
11
- per hour, for a term of 1 or 3 years, and receive a lower price for that usage. For
12
- more information, see the <a href="https://docs.aws.amazon.com/savingsplans/latest/userguide/">AWS Savings Plans User Guide</a>.</p>
9
+ <p>Savings Plans are a pricing model that offer significant savings on Amazon Web Services usage (for example, on Amazon EC2 instances). You commit to a consistent
10
+ amount of usage per hour, in the specified currency, for a term of one or three years, and
11
+ receive a lower price for that usage. For more information, see the <a href="https://docs.aws.amazon.com/savingsplans/latest/userguide/">Amazon Web Services
12
+ Savings Plans User Guide</a>.</p>
13
13
 
14
14
  ## Installing
15
15
 
@@ -261,6 +261,14 @@ ListTagsForResource
261
261
 
262
262
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/savingsplans/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-savingsplans/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-savingsplans/Interface/ListTagsForResourceCommandOutput/)
263
263
 
264
+ </details>
265
+ <details>
266
+ <summary>
267
+ ReturnSavingsPlan
268
+ </summary>
269
+
270
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/savingsplans/command/ReturnSavingsPlanCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-savingsplans/Interface/ReturnSavingsPlanCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-savingsplans/Interface/ReturnSavingsPlanCommandOutput/)
271
+
264
272
  </details>
265
273
  <details>
266
274
  <summary>
package/dist-cjs/index.js CHANGED
@@ -31,6 +31,7 @@ __export(src_exports, {
31
31
  InternalServerException: () => InternalServerException,
32
32
  ListTagsForResourceCommand: () => ListTagsForResourceCommand,
33
33
  ResourceNotFoundException: () => ResourceNotFoundException,
34
+ ReturnSavingsPlanCommand: () => ReturnSavingsPlanCommand,
34
35
  SavingsPlanOfferingFilterAttribute: () => SavingsPlanOfferingFilterAttribute,
35
36
  SavingsPlanOfferingPropertyKey: () => SavingsPlanOfferingPropertyKey,
36
37
  SavingsPlanPaymentOption: () => SavingsPlanPaymentOption,
@@ -349,9 +350,11 @@ var SavingsPlanState = {
349
350
  ACTIVE: "active",
350
351
  PAYMENT_FAILED: "payment-failed",
351
352
  PAYMENT_PENDING: "payment-pending",
353
+ PENDING_RETURN: "pending-return",
352
354
  QUEUED: "queued",
353
355
  QUEUED_DELETED: "queued-deleted",
354
- RETIRED: "retired"
356
+ RETIRED: "retired",
357
+ RETURNED: "returned"
355
358
  };
356
359
  var SavingsPlanPaymentOption = {
357
360
  ALL_UPFRONT: "All Upfront",
@@ -520,6 +523,22 @@ var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context
520
523
  b.m("POST").h(headers).b(body);
521
524
  return b.build();
522
525
  }, "se_ListTagsForResourceCommand");
526
+ var se_ReturnSavingsPlanCommand = /* @__PURE__ */ __name(async (input, context) => {
527
+ const b = (0, import_core.requestBuilder)(input, context);
528
+ const headers = {
529
+ "content-type": "application/json"
530
+ };
531
+ b.bp("/ReturnSavingsPlan");
532
+ let body;
533
+ body = JSON.stringify(
534
+ (0, import_smithy_client.take)(input, {
535
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
536
+ savingsPlanId: []
537
+ })
538
+ );
539
+ b.m("POST").h(headers).b(body);
540
+ return b.build();
541
+ }, "se_ReturnSavingsPlanCommand");
523
542
  var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
524
543
  const b = (0, import_core.requestBuilder)(input, context);
525
544
  const headers = {
@@ -651,6 +670,20 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
651
670
  Object.assign(contents, doc);
652
671
  return contents;
653
672
  }, "de_ListTagsForResourceCommand");
673
+ var de_ReturnSavingsPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
674
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
675
+ return de_CommandError(output, context);
676
+ }
677
+ const contents = (0, import_smithy_client.map)({
678
+ $metadata: deserializeMetadata(output)
679
+ });
680
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
681
+ const doc = (0, import_smithy_client.take)(data, {
682
+ savingsPlanId: import_smithy_client.expectString
683
+ });
684
+ Object.assign(contents, doc);
685
+ return contents;
686
+ }, "de_ReturnSavingsPlanCommand");
654
687
  var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
655
688
  if (output.statusCode !== 200 && output.statusCode >= 300) {
656
689
  return de_CommandError(output, context);
@@ -874,6 +907,23 @@ var _ListTagsForResourceCommand = class _ListTagsForResourceCommand extends impo
874
907
  __name(_ListTagsForResourceCommand, "ListTagsForResourceCommand");
875
908
  var ListTagsForResourceCommand = _ListTagsForResourceCommand;
876
909
 
910
+ // src/commands/ReturnSavingsPlanCommand.ts
911
+
912
+
913
+
914
+
915
+ var _ReturnSavingsPlanCommand = class _ReturnSavingsPlanCommand extends import_smithy_client.Command.classBuilder().ep({
916
+ ...commonParams
917
+ }).m(function(Command, cs, config, o) {
918
+ return [
919
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
920
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
921
+ ];
922
+ }).s("AWSSavingsPlan", "ReturnSavingsPlan", {}).n("SavingsplansClient", "ReturnSavingsPlanCommand").f(void 0, void 0).ser(se_ReturnSavingsPlanCommand).de(de_ReturnSavingsPlanCommand).build() {
923
+ };
924
+ __name(_ReturnSavingsPlanCommand, "ReturnSavingsPlanCommand");
925
+ var ReturnSavingsPlanCommand = _ReturnSavingsPlanCommand;
926
+
877
927
  // src/commands/TagResourceCommand.ts
878
928
 
879
929
 
@@ -917,6 +967,7 @@ var commands = {
917
967
  DescribeSavingsPlansOfferingRatesCommand,
918
968
  DescribeSavingsPlansOfferingsCommand,
919
969
  ListTagsForResourceCommand,
970
+ ReturnSavingsPlanCommand,
920
971
  TagResourceCommand,
921
972
  UntagResourceCommand
922
973
  };
@@ -943,6 +994,7 @@ var import_util_endpoints = require("@aws-sdk/util-endpoints");
943
994
  DescribeSavingsPlansOfferingRatesCommand,
944
995
  DescribeSavingsPlansOfferingsCommand,
945
996
  ListTagsForResourceCommand,
997
+ ReturnSavingsPlanCommand,
946
998
  TagResourceCommand,
947
999
  UntagResourceCommand,
948
1000
  InternalServerException,
@@ -6,6 +6,7 @@ import { DescribeSavingsPlansCommand, } from "./commands/DescribeSavingsPlansCom
6
6
  import { DescribeSavingsPlansOfferingRatesCommand, } from "./commands/DescribeSavingsPlansOfferingRatesCommand";
7
7
  import { DescribeSavingsPlansOfferingsCommand, } from "./commands/DescribeSavingsPlansOfferingsCommand";
8
8
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
9
+ import { ReturnSavingsPlanCommand, } from "./commands/ReturnSavingsPlanCommand";
9
10
  import { TagResourceCommand } from "./commands/TagResourceCommand";
10
11
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
11
12
  import { SavingsplansClient } from "./SavingsplansClient";
@@ -17,6 +18,7 @@ const commands = {
17
18
  DescribeSavingsPlansOfferingRatesCommand,
18
19
  DescribeSavingsPlansOfferingsCommand,
19
20
  ListTagsForResourceCommand,
21
+ ReturnSavingsPlanCommand,
20
22
  TagResourceCommand,
21
23
  UntagResourceCommand,
22
24
  };
@@ -0,0 +1,24 @@
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 { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_ReturnSavingsPlanCommand, se_ReturnSavingsPlanCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class ReturnSavingsPlanCommand extends $Command
8
+ .classBuilder()
9
+ .ep({
10
+ ...commonParams,
11
+ })
12
+ .m(function (Command, cs, config, o) {
13
+ return [
14
+ getSerdePlugin(config, this.serialize, this.deserialize),
15
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
16
+ ];
17
+ })
18
+ .s("AWSSavingsPlan", "ReturnSavingsPlan", {})
19
+ .n("SavingsplansClient", "ReturnSavingsPlanCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_ReturnSavingsPlanCommand)
22
+ .de(de_ReturnSavingsPlanCommand)
23
+ .build() {
24
+ }
@@ -5,5 +5,6 @@ export * from "./DescribeSavingsPlansCommand";
5
5
  export * from "./DescribeSavingsPlansOfferingRatesCommand";
6
6
  export * from "./DescribeSavingsPlansOfferingsCommand";
7
7
  export * from "./ListTagsForResourceCommand";
8
+ export * from "./ReturnSavingsPlanCommand";
8
9
  export * from "./TagResourceCommand";
9
10
  export * from "./UntagResourceCommand";
@@ -101,9 +101,11 @@ export const SavingsPlanState = {
101
101
  ACTIVE: "active",
102
102
  PAYMENT_FAILED: "payment-failed",
103
103
  PAYMENT_PENDING: "payment-pending",
104
+ PENDING_RETURN: "pending-return",
104
105
  QUEUED: "queued",
105
106
  QUEUED_DELETED: "queued-deleted",
106
107
  RETIRED: "retired",
108
+ RETURNED: "returned",
107
109
  };
108
110
  export const SavingsPlanPaymentOption = {
109
111
  ALL_UPFRONT: "All Upfront",
@@ -129,6 +129,20 @@ export const se_ListTagsForResourceCommand = async (input, context) => {
129
129
  b.m("POST").h(headers).b(body);
130
130
  return b.build();
131
131
  };
132
+ export const se_ReturnSavingsPlanCommand = async (input, context) => {
133
+ const b = rb(input, context);
134
+ const headers = {
135
+ "content-type": "application/json",
136
+ };
137
+ b.bp("/ReturnSavingsPlan");
138
+ let body;
139
+ body = JSON.stringify(take(input, {
140
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
141
+ savingsPlanId: [],
142
+ }));
143
+ b.m("POST").h(headers).b(body);
144
+ return b.build();
145
+ };
132
146
  export const se_TagResourceCommand = async (input, context) => {
133
147
  const b = rb(input, context);
134
148
  const headers = {
@@ -256,6 +270,20 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
256
270
  Object.assign(contents, doc);
257
271
  return contents;
258
272
  };
273
+ export const de_ReturnSavingsPlanCommand = async (output, context) => {
274
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
275
+ return de_CommandError(output, context);
276
+ }
277
+ const contents = map({
278
+ $metadata: deserializeMetadata(output),
279
+ });
280
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
281
+ const doc = take(data, {
282
+ savingsPlanId: __expectString,
283
+ });
284
+ Object.assign(contents, doc);
285
+ return contents;
286
+ };
259
287
  export const de_TagResourceCommand = async (output, context) => {
260
288
  if (output.statusCode !== 200 && output.statusCode >= 300) {
261
289
  return de_CommandError(output, context);
@@ -6,6 +6,7 @@ import { DescribeSavingsPlansCommandInput, DescribeSavingsPlansCommandOutput } f
6
6
  import { DescribeSavingsPlansOfferingRatesCommandInput, DescribeSavingsPlansOfferingRatesCommandOutput } from "./commands/DescribeSavingsPlansOfferingRatesCommand";
7
7
  import { DescribeSavingsPlansOfferingsCommandInput, DescribeSavingsPlansOfferingsCommandOutput } from "./commands/DescribeSavingsPlansOfferingsCommand";
8
8
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
9
+ import { ReturnSavingsPlanCommandInput, ReturnSavingsPlanCommandOutput } from "./commands/ReturnSavingsPlanCommand";
9
10
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
10
11
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
11
12
  import { SavingsplansClient } from "./SavingsplansClient";
@@ -55,6 +56,12 @@ export interface Savingsplans {
55
56
  listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
56
57
  listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
57
58
  listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
59
+ /**
60
+ * @see {@link ReturnSavingsPlanCommand}
61
+ */
62
+ returnSavingsPlan(args: ReturnSavingsPlanCommandInput, options?: __HttpHandlerOptions): Promise<ReturnSavingsPlanCommandOutput>;
63
+ returnSavingsPlan(args: ReturnSavingsPlanCommandInput, cb: (err: any, data?: ReturnSavingsPlanCommandOutput) => void): void;
64
+ returnSavingsPlan(args: ReturnSavingsPlanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ReturnSavingsPlanCommandOutput) => void): void;
58
65
  /**
59
66
  * @see {@link TagResourceCommand}
60
67
  */
@@ -69,10 +76,10 @@ export interface Savingsplans {
69
76
  untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
70
77
  }
71
78
  /**
72
- * <p>Savings Plans are a pricing model that offer significant savings on AWS usage (for
73
- * example, on Amazon EC2 instances). You commit to a consistent amount of usage, in USD
74
- * per hour, for a term of 1 or 3 years, and receive a lower price for that usage. For
75
- * more information, see the <a href="https://docs.aws.amazon.com/savingsplans/latest/userguide/">AWS Savings Plans User Guide</a>.</p>
79
+ * <p>Savings Plans are a pricing model that offer significant savings on Amazon Web Services usage (for example, on Amazon EC2 instances). You commit to a consistent
80
+ * amount of usage per hour, in the specified currency, for a term of one or three years, and
81
+ * receive a lower price for that usage. For more information, see the <a href="https://docs.aws.amazon.com/savingsplans/latest/userguide/">Amazon Web Services
82
+ * Savings Plans User Guide</a>.</p>
76
83
  * @public
77
84
  */
78
85
  export declare class Savingsplans extends SavingsplansClient implements Savingsplans {
@@ -14,6 +14,7 @@ import { DescribeSavingsPlansCommandInput, DescribeSavingsPlansCommandOutput } f
14
14
  import { DescribeSavingsPlansOfferingRatesCommandInput, DescribeSavingsPlansOfferingRatesCommandOutput } from "./commands/DescribeSavingsPlansOfferingRatesCommand";
15
15
  import { DescribeSavingsPlansOfferingsCommandInput, DescribeSavingsPlansOfferingsCommandOutput } from "./commands/DescribeSavingsPlansOfferingsCommand";
16
16
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
17
+ import { ReturnSavingsPlanCommandInput, ReturnSavingsPlanCommandOutput } from "./commands/ReturnSavingsPlanCommand";
17
18
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
18
19
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
19
20
  import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
@@ -22,11 +23,11 @@ export { __Client };
22
23
  /**
23
24
  * @public
24
25
  */
25
- export type ServiceInputTypes = CreateSavingsPlanCommandInput | DeleteQueuedSavingsPlanCommandInput | DescribeSavingsPlanRatesCommandInput | DescribeSavingsPlansCommandInput | DescribeSavingsPlansOfferingRatesCommandInput | DescribeSavingsPlansOfferingsCommandInput | ListTagsForResourceCommandInput | TagResourceCommandInput | UntagResourceCommandInput;
26
+ export type ServiceInputTypes = CreateSavingsPlanCommandInput | DeleteQueuedSavingsPlanCommandInput | DescribeSavingsPlanRatesCommandInput | DescribeSavingsPlansCommandInput | DescribeSavingsPlansOfferingRatesCommandInput | DescribeSavingsPlansOfferingsCommandInput | ListTagsForResourceCommandInput | ReturnSavingsPlanCommandInput | TagResourceCommandInput | UntagResourceCommandInput;
26
27
  /**
27
28
  * @public
28
29
  */
29
- export type ServiceOutputTypes = CreateSavingsPlanCommandOutput | DeleteQueuedSavingsPlanCommandOutput | DescribeSavingsPlanRatesCommandOutput | DescribeSavingsPlansCommandOutput | DescribeSavingsPlansOfferingRatesCommandOutput | DescribeSavingsPlansOfferingsCommandOutput | ListTagsForResourceCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput;
30
+ export type ServiceOutputTypes = CreateSavingsPlanCommandOutput | DeleteQueuedSavingsPlanCommandOutput | DescribeSavingsPlanRatesCommandOutput | DescribeSavingsPlansCommandOutput | DescribeSavingsPlansOfferingRatesCommandOutput | DescribeSavingsPlansOfferingsCommandOutput | ListTagsForResourceCommandOutput | ReturnSavingsPlanCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput;
30
31
  /**
31
32
  * @public
32
33
  */
@@ -160,10 +161,10 @@ export type SavingsplansClientResolvedConfigType = __SmithyResolvedConfiguration
160
161
  export interface SavingsplansClientResolvedConfig extends SavingsplansClientResolvedConfigType {
161
162
  }
162
163
  /**
163
- * <p>Savings Plans are a pricing model that offer significant savings on AWS usage (for
164
- * example, on Amazon EC2 instances). You commit to a consistent amount of usage, in USD
165
- * per hour, for a term of 1 or 3 years, and receive a lower price for that usage. For
166
- * more information, see the <a href="https://docs.aws.amazon.com/savingsplans/latest/userguide/">AWS Savings Plans User Guide</a>.</p>
164
+ * <p>Savings Plans are a pricing model that offer significant savings on Amazon Web Services usage (for example, on Amazon EC2 instances). You commit to a consistent
165
+ * amount of usage per hour, in the specified currency, for a term of one or three years, and
166
+ * receive a lower price for that usage. For more information, see the <a href="https://docs.aws.amazon.com/savingsplans/latest/userguide/">Amazon Web Services
167
+ * Savings Plans User Guide</a>.</p>
167
168
  * @public
168
169
  */
169
170
  export declare class SavingsplansClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, SavingsplansClientResolvedConfig> {
@@ -26,7 +26,7 @@ declare const DescribeSavingsPlanRatesCommand_base: {
26
26
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
27
27
  };
28
28
  /**
29
- * <p>Describes the specified Savings Plans rates.</p>
29
+ * <p>Describes the rates for the specified Savings Plan.</p>
30
30
  * @example
31
31
  * Use a bare-bones client and the command you need to make an API call.
32
32
  * ```javascript
@@ -43,7 +43,7 @@ declare const DescribeSavingsPlansCommand_base: {
43
43
  * nextToken: "STRING_VALUE",
44
44
  * maxResults: Number("int"),
45
45
  * states: [ // SavingsPlanStateList
46
- * "payment-pending" || "payment-failed" || "active" || "retired" || "queued" || "queued-deleted",
46
+ * "payment-pending" || "payment-failed" || "active" || "retired" || "queued" || "queued-deleted" || "pending-return" || "returned",
47
47
  * ],
48
48
  * filters: [ // SavingsPlanFilterList
49
49
  * { // SavingsPlanFilter
@@ -65,7 +65,7 @@ declare const DescribeSavingsPlansCommand_base: {
65
65
  * // description: "STRING_VALUE",
66
66
  * // start: "STRING_VALUE",
67
67
  * // end: "STRING_VALUE",
68
- * // state: "payment-pending" || "payment-failed" || "active" || "retired" || "queued" || "queued-deleted",
68
+ * // state: "payment-pending" || "payment-failed" || "active" || "retired" || "queued" || "queued-deleted" || "pending-return" || "returned",
69
69
  * // region: "STRING_VALUE",
70
70
  * // ec2InstanceFamily: "STRING_VALUE",
71
71
  * // savingsPlanType: "Compute" || "EC2Instance" || "SageMaker",
@@ -81,6 +81,7 @@ declare const DescribeSavingsPlansCommand_base: {
81
81
  * // tags: { // TagMap
82
82
  * // "<keys>": "STRING_VALUE",
83
83
  * // },
84
+ * // returnableUntil: "STRING_VALUE",
84
85
  * // },
85
86
  * // ],
86
87
  * // nextToken: "STRING_VALUE",
@@ -26,7 +26,7 @@ declare const DescribeSavingsPlansOfferingRatesCommand_base: {
26
26
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
27
27
  };
28
28
  /**
29
- * <p>Describes the specified Savings Plans offering rates.</p>
29
+ * <p>Describes the offering rates for the specified Savings Plans.</p>
30
30
  * @example
31
31
  * Use a bare-bones client and the command you need to make an API call.
32
32
  * ```javascript
@@ -26,7 +26,7 @@ declare const DescribeSavingsPlansOfferingsCommand_base: {
26
26
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
27
27
  };
28
28
  /**
29
- * <p>Describes the specified Savings Plans offerings.</p>
29
+ * <p>Describes the offerings for the specified Savings Plans.</p>
30
30
  * @example
31
31
  * Use a bare-bones client and the command you need to make an API call.
32
32
  * ```javascript
@@ -0,0 +1,72 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { ReturnSavingsPlanRequest, ReturnSavingsPlanResponse } from "../models/models_0";
4
+ import { SavingsplansClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SavingsplansClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export { __MetadataBearer, $Command };
9
+ /**
10
+ * @public
11
+ *
12
+ * The input for {@link ReturnSavingsPlanCommand}.
13
+ */
14
+ export interface ReturnSavingsPlanCommandInput extends ReturnSavingsPlanRequest {
15
+ }
16
+ /**
17
+ * @public
18
+ *
19
+ * The output of {@link ReturnSavingsPlanCommand}.
20
+ */
21
+ export interface ReturnSavingsPlanCommandOutput extends ReturnSavingsPlanResponse, __MetadataBearer {
22
+ }
23
+ declare const ReturnSavingsPlanCommand_base: {
24
+ new (input: ReturnSavingsPlanCommandInput): import("@smithy/smithy-client").CommandImpl<ReturnSavingsPlanCommandInput, ReturnSavingsPlanCommandOutput, SavingsplansClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
25
+ new (__0_0: ReturnSavingsPlanCommandInput): import("@smithy/smithy-client").CommandImpl<ReturnSavingsPlanCommandInput, ReturnSavingsPlanCommandOutput, SavingsplansClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
27
+ };
28
+ /**
29
+ * <p>Returns the specified Savings Plan.</p>
30
+ * @example
31
+ * Use a bare-bones client and the command you need to make an API call.
32
+ * ```javascript
33
+ * import { SavingsplansClient, ReturnSavingsPlanCommand } from "@aws-sdk/client-savingsplans"; // ES Modules import
34
+ * // const { SavingsplansClient, ReturnSavingsPlanCommand } = require("@aws-sdk/client-savingsplans"); // CommonJS import
35
+ * const client = new SavingsplansClient(config);
36
+ * const input = { // ReturnSavingsPlanRequest
37
+ * savingsPlanId: "STRING_VALUE", // required
38
+ * clientToken: "STRING_VALUE",
39
+ * };
40
+ * const command = new ReturnSavingsPlanCommand(input);
41
+ * const response = await client.send(command);
42
+ * // { // ReturnSavingsPlanResponse
43
+ * // savingsPlanId: "STRING_VALUE",
44
+ * // };
45
+ *
46
+ * ```
47
+ *
48
+ * @param ReturnSavingsPlanCommandInput - {@link ReturnSavingsPlanCommandInput}
49
+ * @returns {@link ReturnSavingsPlanCommandOutput}
50
+ * @see {@link ReturnSavingsPlanCommandInput} for command's `input` shape.
51
+ * @see {@link ReturnSavingsPlanCommandOutput} for command's `response` shape.
52
+ * @see {@link SavingsplansClientResolvedConfig | config} for SavingsplansClient's `config` shape.
53
+ *
54
+ * @throws {@link InternalServerException} (server fault)
55
+ * <p>An unexpected error occurred.</p>
56
+ *
57
+ * @throws {@link ResourceNotFoundException} (client fault)
58
+ * <p>The specified resource was not found.</p>
59
+ *
60
+ * @throws {@link ServiceQuotaExceededException} (client fault)
61
+ * <p>A service quota has been exceeded.</p>
62
+ *
63
+ * @throws {@link ValidationException} (client fault)
64
+ * <p>One of the input parameters is not valid.</p>
65
+ *
66
+ * @throws {@link SavingsplansServiceException}
67
+ * <p>Base exception class for all service exceptions from Savingsplans service.</p>
68
+ *
69
+ * @public
70
+ */
71
+ export declare class ReturnSavingsPlanCommand extends ReturnSavingsPlanCommand_base {
72
+ }
@@ -5,5 +5,6 @@ export * from "./DescribeSavingsPlansCommand";
5
5
  export * from "./DescribeSavingsPlansOfferingRatesCommand";
6
6
  export * from "./DescribeSavingsPlansOfferingsCommand";
7
7
  export * from "./ListTagsForResourceCommand";
8
+ export * from "./ReturnSavingsPlanCommand";
8
9
  export * from "./TagResourceCommand";
9
10
  export * from "./UntagResourceCommand";
@@ -1,8 +1,8 @@
1
1
  /**
2
- * <p>Savings Plans are a pricing model that offer significant savings on AWS usage (for
3
- * example, on Amazon EC2 instances). You commit to a consistent amount of usage, in USD
4
- * per hour, for a term of 1 or 3 years, and receive a lower price for that usage. For
5
- * more information, see the <a href="https://docs.aws.amazon.com/savingsplans/latest/userguide/">AWS Savings Plans User Guide</a>.</p>
2
+ * <p>Savings Plans are a pricing model that offer significant savings on Amazon Web Services usage (for example, on Amazon EC2 instances). You commit to a consistent
3
+ * amount of usage per hour, in the specified currency, for a term of one or three years, and
4
+ * receive a lower price for that usage. For more information, see the <a href="https://docs.aws.amazon.com/savingsplans/latest/userguide/">Amazon Web Services
5
+ * Savings Plans User Guide</a>.</p>
6
6
  *
7
7
  * @packageDocumentation
8
8
  */
@@ -10,24 +10,28 @@ export interface CreateSavingsPlanRequest {
10
10
  */
11
11
  savingsPlanOfferingId: string | undefined;
12
12
  /**
13
- * <p>The hourly commitment, in USD. This is a value between 0.001 and 1 million. You cannot specify more
14
- * than five digits after the decimal point.</p>
13
+ * <p>The hourly commitment, in the same currency of the <code>savingsPlanOfferingId</code>.
14
+ * This is a value between 0.001 and 1 million. You cannot specify more than five digits after
15
+ * the decimal point.</p>
15
16
  * @public
16
17
  */
17
18
  commitment: string | undefined;
18
19
  /**
19
- * <p>The up-front payment amount. This is a whole number between 50 and 99 percent of the total value of the Savings Plan.
20
- * This parameter is supported only if the payment option is <code>Partial Upfront</code>.</p>
20
+ * <p>The up-front payment amount. This is a whole number between 50 and 99 percent of the
21
+ * total value of the Savings Plan. This parameter is only supported if the
22
+ * payment option is <code>Partial Upfront</code>.</p>
21
23
  * @public
22
24
  */
23
25
  upfrontPaymentAmount?: string;
24
26
  /**
25
- * <p>The time at which to purchase the Savings Plan, in UTC format (YYYY-MM-DDTHH:MM:SSZ).</p>
27
+ * <p>The purchase time of the Savings Plan in UTC format
28
+ * (YYYY-MM-DDTHH:MM:SSZ).</p>
26
29
  * @public
27
30
  */
28
31
  purchaseTime?: Date;
29
32
  /**
30
- * <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
33
+ * <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the
34
+ * request.</p>
31
35
  * @public
32
36
  */
33
37
  clientToken?: string;
@@ -129,7 +133,7 @@ export declare const SavingsPlanRateFilterName: {
129
133
  */
130
134
  export type SavingsPlanRateFilterName = (typeof SavingsPlanRateFilterName)[keyof typeof SavingsPlanRateFilterName];
131
135
  /**
132
- * <p>Information about a filter.</p>
136
+ * <p>Information about a Savings Plan rate filter.</p>
133
137
  * @public
134
138
  */
135
139
  export interface SavingsPlanRateFilter {
@@ -164,8 +168,8 @@ export interface DescribeSavingsPlanRatesRequest {
164
168
  */
165
169
  nextToken?: string;
166
170
  /**
167
- * <p>The maximum number of results to return with a single call. To retrieve additional results, make another
168
- * call with the returned token value.</p>
171
+ * <p>The maximum number of results to return with a single call. To retrieve additional
172
+ * results, make another call with the returned token value.</p>
169
173
  * @public
170
174
  */
171
175
  maxResults?: number;
@@ -212,7 +216,7 @@ export declare const SavingsPlanRatePropertyKey: {
212
216
  */
213
217
  export type SavingsPlanRatePropertyKey = (typeof SavingsPlanRatePropertyKey)[keyof typeof SavingsPlanRatePropertyKey];
214
218
  /**
215
- * <p>Information about a property.</p>
219
+ * <p>Information about a Savings Plan rate property.</p>
216
220
  * @public
217
221
  */
218
222
  export interface SavingsPlanRateProperty {
@@ -291,7 +295,8 @@ export interface SavingsPlanRate {
291
295
  */
292
296
  usageType?: string;
293
297
  /**
294
- * <p>The specific AWS operation for the line item in the billing report.</p>
298
+ * <p>The specific Amazon Web Services operation for the line item in the billing
299
+ * report.</p>
295
300
  * @public
296
301
  */
297
302
  operation?: string;
@@ -311,13 +316,13 @@ export interface DescribeSavingsPlanRatesResponse {
311
316
  */
312
317
  savingsPlanId?: string;
313
318
  /**
314
- * <p>Information about the Savings Plans rates.</p>
319
+ * <p>Information about the Savings Plan rates.</p>
315
320
  * @public
316
321
  */
317
322
  searchResults?: SavingsPlanRate[];
318
323
  /**
319
- * <p>The token to use to retrieve the next page of results. This value is null when there are no more
320
- * results to return. </p>
324
+ * <p>The token to use to retrieve the next page of results. This value is null when there are
325
+ * no more results to return.</p>
321
326
  * @public
322
327
  */
323
328
  nextToken?: string;
@@ -342,7 +347,7 @@ export declare const SavingsPlansFilterName: {
342
347
  */
343
348
  export type SavingsPlansFilterName = (typeof SavingsPlansFilterName)[keyof typeof SavingsPlansFilterName];
344
349
  /**
345
- * <p>Information about a filter.</p>
350
+ * <p>Information about a Savings Plan filter.</p>
346
351
  * @public
347
352
  */
348
353
  export interface SavingsPlanFilter {
@@ -365,9 +370,11 @@ export declare const SavingsPlanState: {
365
370
  readonly ACTIVE: "active";
366
371
  readonly PAYMENT_FAILED: "payment-failed";
367
372
  readonly PAYMENT_PENDING: "payment-pending";
373
+ readonly PENDING_RETURN: "pending-return";
368
374
  readonly QUEUED: "queued";
369
375
  readonly QUEUED_DELETED: "queued-deleted";
370
376
  readonly RETIRED: "retired";
377
+ readonly RETURNED: "returned";
371
378
  };
372
379
  /**
373
380
  * @public
@@ -393,13 +400,13 @@ export interface DescribeSavingsPlansRequest {
393
400
  */
394
401
  nextToken?: string;
395
402
  /**
396
- * <p>The maximum number of results to return with a single call. To retrieve additional results, make another
397
- * call with the returned token value.</p>
403
+ * <p>The maximum number of results to return with a single call. To retrieve additional
404
+ * results, make another call with the returned token value.</p>
398
405
  * @public
399
406
  */
400
407
  maxResults?: number;
401
408
  /**
402
- * <p>The states.</p>
409
+ * <p>The current states of the Savings Plans.</p>
403
410
  * @public
404
411
  */
405
412
  states?: SavingsPlanState[];
@@ -471,12 +478,12 @@ export interface SavingsPlan {
471
478
  */
472
479
  end?: string;
473
480
  /**
474
- * <p>The state.</p>
481
+ * <p>The current state.</p>
475
482
  * @public
476
483
  */
477
484
  state?: SavingsPlanState;
478
485
  /**
479
- * <p>The AWS Region.</p>
486
+ * <p>The Amazon Web Services Region.</p>
480
487
  * @public
481
488
  */
482
489
  region?: string;
@@ -506,7 +513,7 @@ export interface SavingsPlan {
506
513
  */
507
514
  currency?: CurrencyCode;
508
515
  /**
509
- * <p>The hourly commitment, in USD.</p>
516
+ * <p>The hourly commitment amount in the specified currency.</p>
510
517
  * @public
511
518
  */
512
519
  commitment?: string;
@@ -530,6 +537,12 @@ export interface SavingsPlan {
530
537
  * @public
531
538
  */
532
539
  tags?: Record<string, string>;
540
+ /**
541
+ * <p>The time until when a return for the Savings Plan can be requested. If the
542
+ * Savings Plan is not returnable, the field reflects the Savings Plan start time.</p>
543
+ * @public
544
+ */
545
+ returnableUntil?: string;
533
546
  }
534
547
  /**
535
548
  * @public
@@ -541,8 +554,8 @@ export interface DescribeSavingsPlansResponse {
541
554
  */
542
555
  savingsPlans?: SavingsPlan[];
543
556
  /**
544
- * <p>The token to use to retrieve the next page of results. This value is null when there are no more
545
- * results to return.</p>
557
+ * <p>The token to use to retrieve the next page of results. This value is null when there are
558
+ * no more results to return.</p>
546
559
  * @public
547
560
  */
548
561
  nextToken?: string;
@@ -564,7 +577,7 @@ export declare const SavingsPlanRateFilterAttribute: {
564
577
  */
565
578
  export type SavingsPlanRateFilterAttribute = (typeof SavingsPlanRateFilterAttribute)[keyof typeof SavingsPlanRateFilterAttribute];
566
579
  /**
567
- * <p>Information about a filter.</p>
580
+ * <p>Information about a Savings Plan offering rate filter.</p>
568
581
  * @public
569
582
  */
570
583
  export interface SavingsPlanOfferingRateFilterElement {
@@ -599,7 +612,7 @@ export interface DescribeSavingsPlansOfferingRatesRequest {
599
612
  */
600
613
  savingsPlanTypes?: SavingsPlanType[];
601
614
  /**
602
- * <p>The AWS products.</p>
615
+ * <p>The Amazon Web Services products.</p>
603
616
  * @public
604
617
  */
605
618
  products?: SavingsPlanProductType[];
@@ -614,7 +627,8 @@ export interface DescribeSavingsPlansOfferingRatesRequest {
614
627
  */
615
628
  usageTypes?: string[];
616
629
  /**
617
- * <p>The specific AWS operation for the line item in the billing report.</p>
630
+ * <p>The specific Amazon Web Services operation for the line item in the billing
631
+ * report.</p>
618
632
  * @public
619
633
  */
620
634
  operations?: string[];
@@ -629,14 +643,14 @@ export interface DescribeSavingsPlansOfferingRatesRequest {
629
643
  */
630
644
  nextToken?: string;
631
645
  /**
632
- * <p>The maximum number of results to return with a single call. To retrieve additional results, make another
633
- * call with the returned token value.</p>
646
+ * <p>The maximum number of results to return with a single call. To retrieve additional
647
+ * results, make another call with the returned token value.</p>
634
648
  * @public
635
649
  */
636
650
  maxResults?: number;
637
651
  }
638
652
  /**
639
- * <p>Information about a property.</p>
653
+ * <p>Information about a Savings Plan offering rate property.</p>
640
654
  * @public
641
655
  */
642
656
  export interface SavingsPlanOfferingRateProperty {
@@ -723,7 +737,8 @@ export interface SavingsPlanOfferingRate {
723
737
  */
724
738
  usageType?: string;
725
739
  /**
726
- * <p>The specific AWS operation for the line item in the billing report.</p>
740
+ * <p>The specific Amazon Web Services operation for the line item in the billing
741
+ * report.</p>
727
742
  * @public
728
743
  */
729
744
  operation?: string;
@@ -743,8 +758,8 @@ export interface DescribeSavingsPlansOfferingRatesResponse {
743
758
  */
744
759
  searchResults?: SavingsPlanOfferingRate[];
745
760
  /**
746
- * <p>The token to use to retrieve the next page of results. This value is null when there are no more
747
- * results to return.</p>
761
+ * <p>The token to use to retrieve the next page of results. This value is null when there are
762
+ * no more results to return.</p>
748
763
  * @public
749
764
  */
750
765
  nextToken?: string;
@@ -762,7 +777,7 @@ export declare const SavingsPlanOfferingFilterAttribute: {
762
777
  */
763
778
  export type SavingsPlanOfferingFilterAttribute = (typeof SavingsPlanOfferingFilterAttribute)[keyof typeof SavingsPlanOfferingFilterAttribute];
764
779
  /**
765
- * <p>Information about a filter.</p>
780
+ * <p>Information about a Savings Plan offering filter.</p>
766
781
  * @public
767
782
  */
768
783
  export interface SavingsPlanOfferingFilterElement {
@@ -797,12 +812,12 @@ export interface DescribeSavingsPlansOfferingsRequest {
797
812
  */
798
813
  productType?: SavingsPlanProductType;
799
814
  /**
800
- * <p>The plan type.</p>
815
+ * <p>The plan types.</p>
801
816
  * @public
802
817
  */
803
818
  planTypes?: SavingsPlanType[];
804
819
  /**
805
- * <p>The durations, in seconds.</p>
820
+ * <p>The duration, in seconds.</p>
806
821
  * @public
807
822
  */
808
823
  durations?: number[];
@@ -827,7 +842,8 @@ export interface DescribeSavingsPlansOfferingsRequest {
827
842
  */
828
843
  usageTypes?: string[];
829
844
  /**
830
- * <p>The specific AWS operation for the line item in the billing report.</p>
845
+ * <p>The specific Amazon Web Services operation for the line item in the billing
846
+ * report.</p>
831
847
  * @public
832
848
  */
833
849
  operations?: string[];
@@ -842,8 +858,8 @@ export interface DescribeSavingsPlansOfferingsRequest {
842
858
  */
843
859
  nextToken?: string;
844
860
  /**
845
- * <p>The maximum number of results to return with a single call. To retrieve additional results, make another
846
- * call with the returned token value.</p>
861
+ * <p>The maximum number of results to return with a single call. To retrieve additional
862
+ * results, make another call with the returned token value.</p>
847
863
  * @public
848
864
  */
849
865
  maxResults?: number;
@@ -861,7 +877,7 @@ export declare const SavingsPlanOfferingPropertyKey: {
861
877
  */
862
878
  export type SavingsPlanOfferingPropertyKey = (typeof SavingsPlanOfferingPropertyKey)[keyof typeof SavingsPlanOfferingPropertyKey];
863
879
  /**
864
- * <p>Information about a property.</p>
880
+ * <p>Information about a Savings Plan offering property.</p>
865
881
  * @public
866
882
  */
867
883
  export interface SavingsPlanOfferingProperty {
@@ -927,7 +943,8 @@ export interface SavingsPlanOffering {
927
943
  */
928
944
  usageType?: string;
929
945
  /**
930
- * <p>The specific AWS operation for the line item in the billing report.</p>
946
+ * <p>The specific Amazon Web Services operation for the line item in the billing
947
+ * report.</p>
931
948
  * @public
932
949
  */
933
950
  operation?: string;
@@ -947,8 +964,8 @@ export interface DescribeSavingsPlansOfferingsResponse {
947
964
  */
948
965
  searchResults?: SavingsPlanOffering[];
949
966
  /**
950
- * <p>The token to use to retrieve the next page of results. This value is null when there are no more
951
- * results to return.</p>
967
+ * <p>The token to use to retrieve the next page of results. This value is null when there are
968
+ * no more results to return.</p>
952
969
  * @public
953
970
  */
954
971
  nextToken?: string;
@@ -973,6 +990,32 @@ export interface ListTagsForResourceResponse {
973
990
  */
974
991
  tags?: Record<string, string>;
975
992
  }
993
+ /**
994
+ * @public
995
+ */
996
+ export interface ReturnSavingsPlanRequest {
997
+ /**
998
+ * <p>The ID of the Savings Plan.</p>
999
+ * @public
1000
+ */
1001
+ savingsPlanId: string | undefined;
1002
+ /**
1003
+ * <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the
1004
+ * request.</p>
1005
+ * @public
1006
+ */
1007
+ clientToken?: string;
1008
+ }
1009
+ /**
1010
+ * @public
1011
+ */
1012
+ export interface ReturnSavingsPlanResponse {
1013
+ /**
1014
+ * <p>The ID of the Savings Plan.</p>
1015
+ * @public
1016
+ */
1017
+ savingsPlanId?: string;
1018
+ }
976
1019
  /**
977
1020
  * @public
978
1021
  */
@@ -7,6 +7,7 @@ import { DescribeSavingsPlansCommandInput, DescribeSavingsPlansCommandOutput } f
7
7
  import { DescribeSavingsPlansOfferingRatesCommandInput, DescribeSavingsPlansOfferingRatesCommandOutput } from "../commands/DescribeSavingsPlansOfferingRatesCommand";
8
8
  import { DescribeSavingsPlansOfferingsCommandInput, DescribeSavingsPlansOfferingsCommandOutput } from "../commands/DescribeSavingsPlansOfferingsCommand";
9
9
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "../commands/ListTagsForResourceCommand";
10
+ import { ReturnSavingsPlanCommandInput, ReturnSavingsPlanCommandOutput } from "../commands/ReturnSavingsPlanCommand";
10
11
  import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
11
12
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
12
13
  /**
@@ -37,6 +38,10 @@ export declare const se_DescribeSavingsPlansOfferingsCommand: (input: DescribeSa
37
38
  * serializeAws_restJson1ListTagsForResourceCommand
38
39
  */
39
40
  export declare const se_ListTagsForResourceCommand: (input: ListTagsForResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
41
+ /**
42
+ * serializeAws_restJson1ReturnSavingsPlanCommand
43
+ */
44
+ export declare const se_ReturnSavingsPlanCommand: (input: ReturnSavingsPlanCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
40
45
  /**
41
46
  * serializeAws_restJson1TagResourceCommand
42
47
  */
@@ -73,6 +78,10 @@ export declare const de_DescribeSavingsPlansOfferingsCommand: (output: __HttpRes
73
78
  * deserializeAws_restJson1ListTagsForResourceCommand
74
79
  */
75
80
  export declare const de_ListTagsForResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListTagsForResourceCommandOutput>;
81
+ /**
82
+ * deserializeAws_restJson1ReturnSavingsPlanCommand
83
+ */
84
+ export declare const de_ReturnSavingsPlanCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ReturnSavingsPlanCommandOutput>;
76
85
  /**
77
86
  * deserializeAws_restJson1TagResourceCommand
78
87
  */
@@ -27,6 +27,10 @@ import {
27
27
  ListTagsForResourceCommandInput,
28
28
  ListTagsForResourceCommandOutput,
29
29
  } from "./commands/ListTagsForResourceCommand";
30
+ import {
31
+ ReturnSavingsPlanCommandInput,
32
+ ReturnSavingsPlanCommandOutput,
33
+ } from "./commands/ReturnSavingsPlanCommand";
30
34
  import {
31
35
  TagResourceCommandInput,
32
36
  TagResourceCommandOutput,
@@ -137,6 +141,19 @@ export interface Savingsplans {
137
141
  options: __HttpHandlerOptions,
138
142
  cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
139
143
  ): void;
144
+ returnSavingsPlan(
145
+ args: ReturnSavingsPlanCommandInput,
146
+ options?: __HttpHandlerOptions
147
+ ): Promise<ReturnSavingsPlanCommandOutput>;
148
+ returnSavingsPlan(
149
+ args: ReturnSavingsPlanCommandInput,
150
+ cb: (err: any, data?: ReturnSavingsPlanCommandOutput) => void
151
+ ): void;
152
+ returnSavingsPlan(
153
+ args: ReturnSavingsPlanCommandInput,
154
+ options: __HttpHandlerOptions,
155
+ cb: (err: any, data?: ReturnSavingsPlanCommandOutput) => void
156
+ ): void;
140
157
  tagResource(
141
158
  args: TagResourceCommandInput,
142
159
  options?: __HttpHandlerOptions
@@ -73,6 +73,10 @@ import {
73
73
  ListTagsForResourceCommandInput,
74
74
  ListTagsForResourceCommandOutput,
75
75
  } from "./commands/ListTagsForResourceCommand";
76
+ import {
77
+ ReturnSavingsPlanCommandInput,
78
+ ReturnSavingsPlanCommandOutput,
79
+ } from "./commands/ReturnSavingsPlanCommand";
76
80
  import {
77
81
  TagResourceCommandInput,
78
82
  TagResourceCommandOutput,
@@ -96,6 +100,7 @@ export type ServiceInputTypes =
96
100
  | DescribeSavingsPlansOfferingRatesCommandInput
97
101
  | DescribeSavingsPlansOfferingsCommandInput
98
102
  | ListTagsForResourceCommandInput
103
+ | ReturnSavingsPlanCommandInput
99
104
  | TagResourceCommandInput
100
105
  | UntagResourceCommandInput;
101
106
  export type ServiceOutputTypes =
@@ -106,6 +111,7 @@ export type ServiceOutputTypes =
106
111
  | DescribeSavingsPlansOfferingRatesCommandOutput
107
112
  | DescribeSavingsPlansOfferingsCommandOutput
108
113
  | ListTagsForResourceCommandOutput
114
+ | ReturnSavingsPlanCommandOutput
109
115
  | TagResourceCommandOutput
110
116
  | UntagResourceCommandOutput;
111
117
  export interface ClientDefaults
@@ -0,0 +1,39 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import {
4
+ ReturnSavingsPlanRequest,
5
+ ReturnSavingsPlanResponse,
6
+ } from "../models/models_0";
7
+ import {
8
+ SavingsplansClientResolvedConfig,
9
+ ServiceInputTypes,
10
+ ServiceOutputTypes,
11
+ } from "../SavingsplansClient";
12
+ export { __MetadataBearer, $Command };
13
+ export interface ReturnSavingsPlanCommandInput
14
+ extends ReturnSavingsPlanRequest {}
15
+ export interface ReturnSavingsPlanCommandOutput
16
+ extends ReturnSavingsPlanResponse,
17
+ __MetadataBearer {}
18
+ declare const ReturnSavingsPlanCommand_base: {
19
+ new (
20
+ input: ReturnSavingsPlanCommandInput
21
+ ): import("@smithy/smithy-client").CommandImpl<
22
+ ReturnSavingsPlanCommandInput,
23
+ ReturnSavingsPlanCommandOutput,
24
+ SavingsplansClientResolvedConfig,
25
+ ServiceInputTypes,
26
+ ServiceOutputTypes
27
+ >;
28
+ new (
29
+ __0_0: ReturnSavingsPlanCommandInput
30
+ ): import("@smithy/smithy-client").CommandImpl<
31
+ ReturnSavingsPlanCommandInput,
32
+ ReturnSavingsPlanCommandOutput,
33
+ SavingsplansClientResolvedConfig,
34
+ ServiceInputTypes,
35
+ ServiceOutputTypes
36
+ >;
37
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
38
+ };
39
+ export declare class ReturnSavingsPlanCommand extends ReturnSavingsPlanCommand_base {}
@@ -5,5 +5,6 @@ export * from "./DescribeSavingsPlansCommand";
5
5
  export * from "./DescribeSavingsPlansOfferingRatesCommand";
6
6
  export * from "./DescribeSavingsPlansOfferingsCommand";
7
7
  export * from "./ListTagsForResourceCommand";
8
+ export * from "./ReturnSavingsPlanCommand";
8
9
  export * from "./TagResourceCommand";
9
10
  export * from "./UntagResourceCommand";
@@ -143,9 +143,11 @@ export declare const SavingsPlanState: {
143
143
  readonly ACTIVE: "active";
144
144
  readonly PAYMENT_FAILED: "payment-failed";
145
145
  readonly PAYMENT_PENDING: "payment-pending";
146
+ readonly PENDING_RETURN: "pending-return";
146
147
  readonly QUEUED: "queued";
147
148
  readonly QUEUED_DELETED: "queued-deleted";
148
149
  readonly RETIRED: "retired";
150
+ readonly RETURNED: "returned";
149
151
  };
150
152
  export type SavingsPlanState =
151
153
  (typeof SavingsPlanState)[keyof typeof SavingsPlanState];
@@ -190,6 +192,7 @@ export interface SavingsPlan {
190
192
  recurringPaymentAmount?: string;
191
193
  termDurationInSeconds?: number;
192
194
  tags?: Record<string, string>;
195
+ returnableUntil?: string;
193
196
  }
194
197
  export interface DescribeSavingsPlansResponse {
195
198
  savingsPlans?: SavingsPlan[];
@@ -305,6 +308,13 @@ export interface ListTagsForResourceRequest {
305
308
  export interface ListTagsForResourceResponse {
306
309
  tags?: Record<string, string>;
307
310
  }
311
+ export interface ReturnSavingsPlanRequest {
312
+ savingsPlanId: string | undefined;
313
+ clientToken?: string;
314
+ }
315
+ export interface ReturnSavingsPlanResponse {
316
+ savingsPlanId?: string;
317
+ }
308
318
  export interface TagResourceRequest {
309
319
  resourceArn: string | undefined;
310
320
  tags: Record<string, string> | undefined;
@@ -31,6 +31,10 @@ import {
31
31
  ListTagsForResourceCommandInput,
32
32
  ListTagsForResourceCommandOutput,
33
33
  } from "../commands/ListTagsForResourceCommand";
34
+ import {
35
+ ReturnSavingsPlanCommandInput,
36
+ ReturnSavingsPlanCommandOutput,
37
+ } from "../commands/ReturnSavingsPlanCommand";
34
38
  import {
35
39
  TagResourceCommandInput,
36
40
  TagResourceCommandOutput,
@@ -67,6 +71,10 @@ export declare const se_ListTagsForResourceCommand: (
67
71
  input: ListTagsForResourceCommandInput,
68
72
  context: __SerdeContext
69
73
  ) => Promise<__HttpRequest>;
74
+ export declare const se_ReturnSavingsPlanCommand: (
75
+ input: ReturnSavingsPlanCommandInput,
76
+ context: __SerdeContext
77
+ ) => Promise<__HttpRequest>;
70
78
  export declare const se_TagResourceCommand: (
71
79
  input: TagResourceCommandInput,
72
80
  context: __SerdeContext
@@ -103,6 +111,10 @@ export declare const de_ListTagsForResourceCommand: (
103
111
  output: __HttpResponse,
104
112
  context: __SerdeContext
105
113
  ) => Promise<ListTagsForResourceCommandOutput>;
114
+ export declare const de_ReturnSavingsPlanCommand: (
115
+ output: __HttpResponse,
116
+ context: __SerdeContext
117
+ ) => Promise<ReturnSavingsPlanCommandOutput>;
106
118
  export declare const de_TagResourceCommand: (
107
119
  output: __HttpResponse,
108
120
  context: __SerdeContext
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-savingsplans",
3
3
  "description": "AWS SDK for JavaScript Savingsplans Client for Node.js, Browser and React Native",
4
- "version": "3.535.0",
4
+ "version": "3.538.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-savingsplans",