@aws-sdk/client-cloudcontrol 3.312.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.
- package/dist-cjs/CloudControl.js +12 -112
- package/dist-cjs/protocols/Aws_json1_0.js +96 -302
- package/dist-es/CloudControl.js +12 -112
- package/dist-es/protocols/Aws_json1_0.js +97 -303
- package/dist-types/CloudControl.d.ts +16 -56
- package/dist-types/ts3.4/CloudControl.d.ts +4 -1
- package/package.json +6 -6
package/dist-es/CloudControl.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createAggregatedClient } from "@aws-sdk/smithy-client";
|
|
1
2
|
import { CloudControlClient } from "./CloudControlClient";
|
|
2
3
|
import { CancelResourceRequestCommand, } from "./commands/CancelResourceRequestCommand";
|
|
3
4
|
import { CreateResourceCommand, } from "./commands/CreateResourceCommand";
|
|
@@ -7,117 +8,16 @@ import { GetResourceRequestStatusCommand, } from "./commands/GetResourceRequestS
|
|
|
7
8
|
import { ListResourceRequestsCommand, } from "./commands/ListResourceRequestsCommand";
|
|
8
9
|
import { ListResourcesCommand, } from "./commands/ListResourcesCommand";
|
|
9
10
|
import { UpdateResourceCommand, } from "./commands/UpdateResourceCommand";
|
|
11
|
+
const commands = {
|
|
12
|
+
CancelResourceRequestCommand,
|
|
13
|
+
CreateResourceCommand,
|
|
14
|
+
DeleteResourceCommand,
|
|
15
|
+
GetResourceCommand,
|
|
16
|
+
GetResourceRequestStatusCommand,
|
|
17
|
+
ListResourceRequestsCommand,
|
|
18
|
+
ListResourcesCommand,
|
|
19
|
+
UpdateResourceCommand,
|
|
20
|
+
};
|
|
10
21
|
export class CloudControl extends CloudControlClient {
|
|
11
|
-
cancelResourceRequest(args, optionsOrCb, cb) {
|
|
12
|
-
const command = new CancelResourceRequestCommand(args);
|
|
13
|
-
if (typeof optionsOrCb === "function") {
|
|
14
|
-
this.send(command, optionsOrCb);
|
|
15
|
-
}
|
|
16
|
-
else if (typeof cb === "function") {
|
|
17
|
-
if (typeof optionsOrCb !== "object")
|
|
18
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
19
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
return this.send(command, optionsOrCb);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
createResource(args, optionsOrCb, cb) {
|
|
26
|
-
const command = new CreateResourceCommand(args);
|
|
27
|
-
if (typeof optionsOrCb === "function") {
|
|
28
|
-
this.send(command, optionsOrCb);
|
|
29
|
-
}
|
|
30
|
-
else if (typeof cb === "function") {
|
|
31
|
-
if (typeof optionsOrCb !== "object")
|
|
32
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
33
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
return this.send(command, optionsOrCb);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
deleteResource(args, optionsOrCb, cb) {
|
|
40
|
-
const command = new DeleteResourceCommand(args);
|
|
41
|
-
if (typeof optionsOrCb === "function") {
|
|
42
|
-
this.send(command, optionsOrCb);
|
|
43
|
-
}
|
|
44
|
-
else if (typeof cb === "function") {
|
|
45
|
-
if (typeof optionsOrCb !== "object")
|
|
46
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
47
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
return this.send(command, optionsOrCb);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
getResource(args, optionsOrCb, cb) {
|
|
54
|
-
const command = new GetResourceCommand(args);
|
|
55
|
-
if (typeof optionsOrCb === "function") {
|
|
56
|
-
this.send(command, optionsOrCb);
|
|
57
|
-
}
|
|
58
|
-
else if (typeof cb === "function") {
|
|
59
|
-
if (typeof optionsOrCb !== "object")
|
|
60
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
61
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
return this.send(command, optionsOrCb);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
getResourceRequestStatus(args, optionsOrCb, cb) {
|
|
68
|
-
const command = new GetResourceRequestStatusCommand(args);
|
|
69
|
-
if (typeof optionsOrCb === "function") {
|
|
70
|
-
this.send(command, optionsOrCb);
|
|
71
|
-
}
|
|
72
|
-
else if (typeof cb === "function") {
|
|
73
|
-
if (typeof optionsOrCb !== "object")
|
|
74
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
75
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
return this.send(command, optionsOrCb);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
listResourceRequests(args, optionsOrCb, cb) {
|
|
82
|
-
const command = new ListResourceRequestsCommand(args);
|
|
83
|
-
if (typeof optionsOrCb === "function") {
|
|
84
|
-
this.send(command, optionsOrCb);
|
|
85
|
-
}
|
|
86
|
-
else if (typeof cb === "function") {
|
|
87
|
-
if (typeof optionsOrCb !== "object")
|
|
88
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
89
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
return this.send(command, optionsOrCb);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
listResources(args, optionsOrCb, cb) {
|
|
96
|
-
const command = new ListResourcesCommand(args);
|
|
97
|
-
if (typeof optionsOrCb === "function") {
|
|
98
|
-
this.send(command, optionsOrCb);
|
|
99
|
-
}
|
|
100
|
-
else if (typeof cb === "function") {
|
|
101
|
-
if (typeof optionsOrCb !== "object")
|
|
102
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
103
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
return this.send(command, optionsOrCb);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
updateResource(args, optionsOrCb, cb) {
|
|
110
|
-
const command = new UpdateResourceCommand(args);
|
|
111
|
-
if (typeof optionsOrCb === "function") {
|
|
112
|
-
this.send(command, optionsOrCb);
|
|
113
|
-
}
|
|
114
|
-
else if (typeof cb === "function") {
|
|
115
|
-
if (typeof optionsOrCb !== "object")
|
|
116
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
117
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
return this.send(command, optionsOrCb);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
22
|
}
|
|
23
|
+
createAggregatedClient(commands, CloudControl);
|