@aws-sdk/client-auto-scaling-plans 3.315.0 → 3.316.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.
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AutoScalingPlans = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
4
5
  const AutoScalingPlansClient_1 = require("./AutoScalingPlansClient");
5
6
  const CreateScalingPlanCommand_1 = require("./commands/CreateScalingPlanCommand");
6
7
  const DeleteScalingPlanCommand_1 = require("./commands/DeleteScalingPlanCommand");
@@ -8,90 +9,15 @@ const DescribeScalingPlanResourcesCommand_1 = require("./commands/DescribeScalin
8
9
  const DescribeScalingPlansCommand_1 = require("./commands/DescribeScalingPlansCommand");
9
10
  const GetScalingPlanResourceForecastDataCommand_1 = require("./commands/GetScalingPlanResourceForecastDataCommand");
10
11
  const UpdateScalingPlanCommand_1 = require("./commands/UpdateScalingPlanCommand");
12
+ const commands = {
13
+ CreateScalingPlanCommand: CreateScalingPlanCommand_1.CreateScalingPlanCommand,
14
+ DeleteScalingPlanCommand: DeleteScalingPlanCommand_1.DeleteScalingPlanCommand,
15
+ DescribeScalingPlanResourcesCommand: DescribeScalingPlanResourcesCommand_1.DescribeScalingPlanResourcesCommand,
16
+ DescribeScalingPlansCommand: DescribeScalingPlansCommand_1.DescribeScalingPlansCommand,
17
+ GetScalingPlanResourceForecastDataCommand: GetScalingPlanResourceForecastDataCommand_1.GetScalingPlanResourceForecastDataCommand,
18
+ UpdateScalingPlanCommand: UpdateScalingPlanCommand_1.UpdateScalingPlanCommand,
19
+ };
11
20
  class AutoScalingPlans extends AutoScalingPlansClient_1.AutoScalingPlansClient {
12
- createScalingPlan(args, optionsOrCb, cb) {
13
- const command = new CreateScalingPlanCommand_1.CreateScalingPlanCommand(args);
14
- if (typeof optionsOrCb === "function") {
15
- this.send(command, optionsOrCb);
16
- }
17
- else if (typeof cb === "function") {
18
- if (typeof optionsOrCb !== "object")
19
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
20
- this.send(command, optionsOrCb || {}, cb);
21
- }
22
- else {
23
- return this.send(command, optionsOrCb);
24
- }
25
- }
26
- deleteScalingPlan(args, optionsOrCb, cb) {
27
- const command = new DeleteScalingPlanCommand_1.DeleteScalingPlanCommand(args);
28
- if (typeof optionsOrCb === "function") {
29
- this.send(command, optionsOrCb);
30
- }
31
- else if (typeof cb === "function") {
32
- if (typeof optionsOrCb !== "object")
33
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
34
- this.send(command, optionsOrCb || {}, cb);
35
- }
36
- else {
37
- return this.send(command, optionsOrCb);
38
- }
39
- }
40
- describeScalingPlanResources(args, optionsOrCb, cb) {
41
- const command = new DescribeScalingPlanResourcesCommand_1.DescribeScalingPlanResourcesCommand(args);
42
- if (typeof optionsOrCb === "function") {
43
- this.send(command, optionsOrCb);
44
- }
45
- else if (typeof cb === "function") {
46
- if (typeof optionsOrCb !== "object")
47
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
48
- this.send(command, optionsOrCb || {}, cb);
49
- }
50
- else {
51
- return this.send(command, optionsOrCb);
52
- }
53
- }
54
- describeScalingPlans(args, optionsOrCb, cb) {
55
- const command = new DescribeScalingPlansCommand_1.DescribeScalingPlansCommand(args);
56
- if (typeof optionsOrCb === "function") {
57
- this.send(command, optionsOrCb);
58
- }
59
- else if (typeof cb === "function") {
60
- if (typeof optionsOrCb !== "object")
61
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
62
- this.send(command, optionsOrCb || {}, cb);
63
- }
64
- else {
65
- return this.send(command, optionsOrCb);
66
- }
67
- }
68
- getScalingPlanResourceForecastData(args, optionsOrCb, cb) {
69
- const command = new GetScalingPlanResourceForecastDataCommand_1.GetScalingPlanResourceForecastDataCommand(args);
70
- if (typeof optionsOrCb === "function") {
71
- this.send(command, optionsOrCb);
72
- }
73
- else if (typeof cb === "function") {
74
- if (typeof optionsOrCb !== "object")
75
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
76
- this.send(command, optionsOrCb || {}, cb);
77
- }
78
- else {
79
- return this.send(command, optionsOrCb);
80
- }
81
- }
82
- updateScalingPlan(args, optionsOrCb, cb) {
83
- const command = new UpdateScalingPlanCommand_1.UpdateScalingPlanCommand(args);
84
- if (typeof optionsOrCb === "function") {
85
- this.send(command, optionsOrCb);
86
- }
87
- else if (typeof cb === "function") {
88
- if (typeof optionsOrCb !== "object")
89
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
90
- this.send(command, optionsOrCb || {}, cb);
91
- }
92
- else {
93
- return this.send(command, optionsOrCb);
94
- }
95
- }
96
21
  }
97
22
  exports.AutoScalingPlans = AutoScalingPlans;
23
+ (0, smithy_client_1.createAggregatedClient)(commands, AutoScalingPlans);
@@ -1,3 +1,4 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { AutoScalingPlansClient } from "./AutoScalingPlansClient";
2
3
  import { CreateScalingPlanCommand, } from "./commands/CreateScalingPlanCommand";
3
4
  import { DeleteScalingPlanCommand, } from "./commands/DeleteScalingPlanCommand";
@@ -5,89 +6,14 @@ import { DescribeScalingPlanResourcesCommand, } from "./commands/DescribeScaling
5
6
  import { DescribeScalingPlansCommand, } from "./commands/DescribeScalingPlansCommand";
6
7
  import { GetScalingPlanResourceForecastDataCommand, } from "./commands/GetScalingPlanResourceForecastDataCommand";
7
8
  import { UpdateScalingPlanCommand, } from "./commands/UpdateScalingPlanCommand";
9
+ const commands = {
10
+ CreateScalingPlanCommand,
11
+ DeleteScalingPlanCommand,
12
+ DescribeScalingPlanResourcesCommand,
13
+ DescribeScalingPlansCommand,
14
+ GetScalingPlanResourceForecastDataCommand,
15
+ UpdateScalingPlanCommand,
16
+ };
8
17
  export class AutoScalingPlans extends AutoScalingPlansClient {
9
- createScalingPlan(args, optionsOrCb, cb) {
10
- const command = new CreateScalingPlanCommand(args);
11
- if (typeof optionsOrCb === "function") {
12
- this.send(command, optionsOrCb);
13
- }
14
- else if (typeof cb === "function") {
15
- if (typeof optionsOrCb !== "object")
16
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
17
- this.send(command, optionsOrCb || {}, cb);
18
- }
19
- else {
20
- return this.send(command, optionsOrCb);
21
- }
22
- }
23
- deleteScalingPlan(args, optionsOrCb, cb) {
24
- const command = new DeleteScalingPlanCommand(args);
25
- if (typeof optionsOrCb === "function") {
26
- this.send(command, optionsOrCb);
27
- }
28
- else if (typeof cb === "function") {
29
- if (typeof optionsOrCb !== "object")
30
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
31
- this.send(command, optionsOrCb || {}, cb);
32
- }
33
- else {
34
- return this.send(command, optionsOrCb);
35
- }
36
- }
37
- describeScalingPlanResources(args, optionsOrCb, cb) {
38
- const command = new DescribeScalingPlanResourcesCommand(args);
39
- if (typeof optionsOrCb === "function") {
40
- this.send(command, optionsOrCb);
41
- }
42
- else if (typeof cb === "function") {
43
- if (typeof optionsOrCb !== "object")
44
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
45
- this.send(command, optionsOrCb || {}, cb);
46
- }
47
- else {
48
- return this.send(command, optionsOrCb);
49
- }
50
- }
51
- describeScalingPlans(args, optionsOrCb, cb) {
52
- const command = new DescribeScalingPlansCommand(args);
53
- if (typeof optionsOrCb === "function") {
54
- this.send(command, optionsOrCb);
55
- }
56
- else if (typeof cb === "function") {
57
- if (typeof optionsOrCb !== "object")
58
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
59
- this.send(command, optionsOrCb || {}, cb);
60
- }
61
- else {
62
- return this.send(command, optionsOrCb);
63
- }
64
- }
65
- getScalingPlanResourceForecastData(args, optionsOrCb, cb) {
66
- const command = new GetScalingPlanResourceForecastDataCommand(args);
67
- if (typeof optionsOrCb === "function") {
68
- this.send(command, optionsOrCb);
69
- }
70
- else if (typeof cb === "function") {
71
- if (typeof optionsOrCb !== "object")
72
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
73
- this.send(command, optionsOrCb || {}, cb);
74
- }
75
- else {
76
- return this.send(command, optionsOrCb);
77
- }
78
- }
79
- updateScalingPlan(args, optionsOrCb, cb) {
80
- const command = new UpdateScalingPlanCommand(args);
81
- if (typeof optionsOrCb === "function") {
82
- this.send(command, optionsOrCb);
83
- }
84
- else if (typeof cb === "function") {
85
- if (typeof optionsOrCb !== "object")
86
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
87
- this.send(command, optionsOrCb || {}, cb);
88
- }
89
- else {
90
- return this.send(command, optionsOrCb);
91
- }
92
- }
93
18
  }
19
+ createAggregatedClient(commands, AutoScalingPlans);
@@ -6,6 +6,44 @@ import { DescribeScalingPlanResourcesCommandInput, DescribeScalingPlanResourcesC
6
6
  import { DescribeScalingPlansCommandInput, DescribeScalingPlansCommandOutput } from "./commands/DescribeScalingPlansCommand";
7
7
  import { GetScalingPlanResourceForecastDataCommandInput, GetScalingPlanResourceForecastDataCommandOutput } from "./commands/GetScalingPlanResourceForecastDataCommand";
8
8
  import { UpdateScalingPlanCommandInput, UpdateScalingPlanCommandOutput } from "./commands/UpdateScalingPlanCommand";
9
+ export interface AutoScalingPlans {
10
+ /**
11
+ * @see {@link CreateScalingPlanCommand}
12
+ */
13
+ createScalingPlan(args: CreateScalingPlanCommandInput, options?: __HttpHandlerOptions): Promise<CreateScalingPlanCommandOutput>;
14
+ createScalingPlan(args: CreateScalingPlanCommandInput, cb: (err: any, data?: CreateScalingPlanCommandOutput) => void): void;
15
+ createScalingPlan(args: CreateScalingPlanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateScalingPlanCommandOutput) => void): void;
16
+ /**
17
+ * @see {@link DeleteScalingPlanCommand}
18
+ */
19
+ deleteScalingPlan(args: DeleteScalingPlanCommandInput, options?: __HttpHandlerOptions): Promise<DeleteScalingPlanCommandOutput>;
20
+ deleteScalingPlan(args: DeleteScalingPlanCommandInput, cb: (err: any, data?: DeleteScalingPlanCommandOutput) => void): void;
21
+ deleteScalingPlan(args: DeleteScalingPlanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteScalingPlanCommandOutput) => void): void;
22
+ /**
23
+ * @see {@link DescribeScalingPlanResourcesCommand}
24
+ */
25
+ describeScalingPlanResources(args: DescribeScalingPlanResourcesCommandInput, options?: __HttpHandlerOptions): Promise<DescribeScalingPlanResourcesCommandOutput>;
26
+ describeScalingPlanResources(args: DescribeScalingPlanResourcesCommandInput, cb: (err: any, data?: DescribeScalingPlanResourcesCommandOutput) => void): void;
27
+ describeScalingPlanResources(args: DescribeScalingPlanResourcesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeScalingPlanResourcesCommandOutput) => void): void;
28
+ /**
29
+ * @see {@link DescribeScalingPlansCommand}
30
+ */
31
+ describeScalingPlans(args: DescribeScalingPlansCommandInput, options?: __HttpHandlerOptions): Promise<DescribeScalingPlansCommandOutput>;
32
+ describeScalingPlans(args: DescribeScalingPlansCommandInput, cb: (err: any, data?: DescribeScalingPlansCommandOutput) => void): void;
33
+ describeScalingPlans(args: DescribeScalingPlansCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeScalingPlansCommandOutput) => void): void;
34
+ /**
35
+ * @see {@link GetScalingPlanResourceForecastDataCommand}
36
+ */
37
+ getScalingPlanResourceForecastData(args: GetScalingPlanResourceForecastDataCommandInput, options?: __HttpHandlerOptions): Promise<GetScalingPlanResourceForecastDataCommandOutput>;
38
+ getScalingPlanResourceForecastData(args: GetScalingPlanResourceForecastDataCommandInput, cb: (err: any, data?: GetScalingPlanResourceForecastDataCommandOutput) => void): void;
39
+ getScalingPlanResourceForecastData(args: GetScalingPlanResourceForecastDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetScalingPlanResourceForecastDataCommandOutput) => void): void;
40
+ /**
41
+ * @see {@link UpdateScalingPlanCommand}
42
+ */
43
+ updateScalingPlan(args: UpdateScalingPlanCommandInput, options?: __HttpHandlerOptions): Promise<UpdateScalingPlanCommandOutput>;
44
+ updateScalingPlan(args: UpdateScalingPlanCommandInput, cb: (err: any, data?: UpdateScalingPlanCommandOutput) => void): void;
45
+ updateScalingPlan(args: UpdateScalingPlanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateScalingPlanCommandOutput) => void): void;
46
+ }
9
47
  /**
10
48
  * @public
11
49
  * <fullname>AWS Auto Scaling</fullname>
@@ -44,56 +82,5 @@ import { UpdateScalingPlanCommandInput, UpdateScalingPlanCommandOutput } from ".
44
82
  * <p>To learn more about AWS Auto Scaling, including information about granting IAM users required
45
83
  * permissions for AWS Auto Scaling actions, see the <a href="https://docs.aws.amazon.com/autoscaling/plans/userguide/what-is-aws-auto-scaling.html">AWS Auto Scaling User Guide</a>. </p>
46
84
  */
47
- export declare class AutoScalingPlans extends AutoScalingPlansClient {
48
- /**
49
- * @public
50
- * <p>Creates a scaling plan. </p>
51
- */
52
- createScalingPlan(args: CreateScalingPlanCommandInput, options?: __HttpHandlerOptions): Promise<CreateScalingPlanCommandOutput>;
53
- createScalingPlan(args: CreateScalingPlanCommandInput, cb: (err: any, data?: CreateScalingPlanCommandOutput) => void): void;
54
- createScalingPlan(args: CreateScalingPlanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateScalingPlanCommandOutput) => void): void;
55
- /**
56
- * @public
57
- * <p>Deletes the specified scaling plan.</p>
58
- * <p>Deleting a scaling plan deletes the underlying <a>ScalingInstruction</a> for
59
- * all of the scalable resources that are covered by the plan.</p>
60
- * <p>If the plan has launched resources or has scaling activities in progress, you must
61
- * delete those resources separately.</p>
62
- */
63
- deleteScalingPlan(args: DeleteScalingPlanCommandInput, options?: __HttpHandlerOptions): Promise<DeleteScalingPlanCommandOutput>;
64
- deleteScalingPlan(args: DeleteScalingPlanCommandInput, cb: (err: any, data?: DeleteScalingPlanCommandOutput) => void): void;
65
- deleteScalingPlan(args: DeleteScalingPlanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteScalingPlanCommandOutput) => void): void;
66
- /**
67
- * @public
68
- * <p>Describes the scalable resources in the specified scaling plan.</p>
69
- */
70
- describeScalingPlanResources(args: DescribeScalingPlanResourcesCommandInput, options?: __HttpHandlerOptions): Promise<DescribeScalingPlanResourcesCommandOutput>;
71
- describeScalingPlanResources(args: DescribeScalingPlanResourcesCommandInput, cb: (err: any, data?: DescribeScalingPlanResourcesCommandOutput) => void): void;
72
- describeScalingPlanResources(args: DescribeScalingPlanResourcesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeScalingPlanResourcesCommandOutput) => void): void;
73
- /**
74
- * @public
75
- * <p>Describes one or more of your scaling plans.</p>
76
- */
77
- describeScalingPlans(args: DescribeScalingPlansCommandInput, options?: __HttpHandlerOptions): Promise<DescribeScalingPlansCommandOutput>;
78
- describeScalingPlans(args: DescribeScalingPlansCommandInput, cb: (err: any, data?: DescribeScalingPlansCommandOutput) => void): void;
79
- describeScalingPlans(args: DescribeScalingPlansCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeScalingPlansCommandOutput) => void): void;
80
- /**
81
- * @public
82
- * <p>Retrieves the forecast data for a scalable resource.</p>
83
- * <p>Capacity forecasts are represented as predicted values, or data points, that are
84
- * calculated using historical data points from a specified CloudWatch load metric. Data points are
85
- * available for up to 56 days. </p>
86
- */
87
- getScalingPlanResourceForecastData(args: GetScalingPlanResourceForecastDataCommandInput, options?: __HttpHandlerOptions): Promise<GetScalingPlanResourceForecastDataCommandOutput>;
88
- getScalingPlanResourceForecastData(args: GetScalingPlanResourceForecastDataCommandInput, cb: (err: any, data?: GetScalingPlanResourceForecastDataCommandOutput) => void): void;
89
- getScalingPlanResourceForecastData(args: GetScalingPlanResourceForecastDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetScalingPlanResourceForecastDataCommandOutput) => void): void;
90
- /**
91
- * @public
92
- * <p>Updates the specified scaling plan.</p>
93
- * <p>You cannot update a scaling plan if it is in the process of being created, updated, or
94
- * deleted.</p>
95
- */
96
- updateScalingPlan(args: UpdateScalingPlanCommandInput, options?: __HttpHandlerOptions): Promise<UpdateScalingPlanCommandOutput>;
97
- updateScalingPlan(args: UpdateScalingPlanCommandInput, cb: (err: any, data?: UpdateScalingPlanCommandOutput) => void): void;
98
- updateScalingPlan(args: UpdateScalingPlanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateScalingPlanCommandOutput) => void): void;
85
+ export declare class AutoScalingPlans extends AutoScalingPlansClient implements AutoScalingPlans {
99
86
  }
@@ -24,7 +24,7 @@ import {
24
24
  UpdateScalingPlanCommandInput,
25
25
  UpdateScalingPlanCommandOutput,
26
26
  } from "./commands/UpdateScalingPlanCommand";
27
- export declare class AutoScalingPlans extends AutoScalingPlansClient {
27
+ export interface AutoScalingPlans {
28
28
  createScalingPlan(
29
29
  args: CreateScalingPlanCommandInput,
30
30
  options?: __HttpHandlerOptions
@@ -110,3 +110,6 @@ export declare class AutoScalingPlans extends AutoScalingPlansClient {
110
110
  cb: (err: any, data?: UpdateScalingPlanCommandOutput) => void
111
111
  ): void;
112
112
  }
113
+ export declare class AutoScalingPlans
114
+ extends AutoScalingPlansClient
115
+ implements AutoScalingPlans {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-auto-scaling-plans",
3
3
  "description": "AWS SDK for JavaScript Auto Scaling Plans Client for Node.js, Browser and React Native",
4
- "version": "3.315.0",
4
+ "version": "3.316.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.315.0",
24
+ "@aws-sdk/client-sts": "3.316.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.315.0",
26
+ "@aws-sdk/credential-provider-node": "3.316.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -40,14 +40,14 @@
40
40
  "@aws-sdk/node-config-provider": "3.310.0",
41
41
  "@aws-sdk/node-http-handler": "3.310.0",
42
42
  "@aws-sdk/protocol-http": "3.310.0",
43
- "@aws-sdk/smithy-client": "3.315.0",
43
+ "@aws-sdk/smithy-client": "3.316.0",
44
44
  "@aws-sdk/types": "3.310.0",
45
45
  "@aws-sdk/url-parser": "3.310.0",
46
46
  "@aws-sdk/util-base64": "3.310.0",
47
47
  "@aws-sdk/util-body-length-browser": "3.310.0",
48
48
  "@aws-sdk/util-body-length-node": "3.310.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.315.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.315.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.316.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.316.0",
51
51
  "@aws-sdk/util-endpoints": "3.310.0",
52
52
  "@aws-sdk/util-retry": "3.310.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.310.0",