@aws-sdk/client-amp 3.32.0 → 3.36.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.
Files changed (219) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +7 -7
  3. package/dist-cjs/Amp.js +265 -0
  4. package/{dist/cjs → dist-cjs}/AmpClient.js +8 -9
  5. package/dist-cjs/commands/CreateAlertManagerDefinitionCommand.js +60 -0
  6. package/dist-cjs/commands/CreateRuleGroupsNamespaceCommand.js +60 -0
  7. package/{dist/cjs → dist-cjs}/commands/CreateWorkspaceCommand.js +2 -3
  8. package/dist-cjs/commands/DeleteAlertManagerDefinitionCommand.js +60 -0
  9. package/dist-cjs/commands/DeleteRuleGroupsNamespaceCommand.js +60 -0
  10. package/{dist/cjs → dist-cjs}/commands/DeleteWorkspaceCommand.js +2 -3
  11. package/dist-cjs/commands/DescribeAlertManagerDefinitionCommand.js +60 -0
  12. package/dist-cjs/commands/DescribeRuleGroupsNamespaceCommand.js +60 -0
  13. package/{dist/cjs → dist-cjs}/commands/DescribeWorkspaceCommand.js +2 -3
  14. package/dist-cjs/commands/ListRuleGroupsNamespacesCommand.js +60 -0
  15. package/{dist/cjs → dist-cjs}/commands/ListTagsForResourceCommand.js +2 -3
  16. package/{dist/cjs → dist-cjs}/commands/ListWorkspacesCommand.js +2 -3
  17. package/dist-cjs/commands/PutAlertManagerDefinitionCommand.js +60 -0
  18. package/dist-cjs/commands/PutRuleGroupsNamespaceCommand.js +60 -0
  19. package/{dist/cjs → dist-cjs}/commands/TagResourceCommand.js +2 -3
  20. package/{dist/cjs → dist-cjs}/commands/UntagResourceCommand.js +2 -3
  21. package/{dist/cjs → dist-cjs}/commands/UpdateWorkspaceAliasCommand.js +2 -3
  22. package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
  23. package/{dist/cjs → dist-cjs}/index.js +12 -1
  24. package/{dist/cjs → dist-cjs}/models/index.js +0 -1
  25. package/dist-cjs/models/models_0.js +501 -0
  26. package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
  27. package/dist-cjs/pagination/ListRuleGroupsNamespacesPaginator.js +45 -0
  28. package/{dist/cjs → dist-cjs}/pagination/ListWorkspacesPaginator.js +0 -1
  29. package/dist-cjs/protocols/Aws_restJson1.js +2393 -0
  30. package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +2 -2
  31. package/{dist/cjs → dist-cjs}/runtimeConfig.js +2 -2
  32. package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -1
  33. package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -2
  34. package/dist-cjs/waiters/waitForWorkspaceActive.js +63 -0
  35. package/dist-cjs/waiters/waitForWorkspaceDeleted.js +48 -0
  36. package/dist-es/Amp.js +265 -0
  37. package/{dist/es → dist-es}/AmpClient.js +2 -11
  38. package/dist-es/commands/CreateAlertManagerDefinitionCommand.js +39 -0
  39. package/dist-es/commands/CreateRuleGroupsNamespaceCommand.js +39 -0
  40. package/{dist/es → dist-es}/commands/CreateWorkspaceCommand.js +4 -30
  41. package/dist-es/commands/DeleteAlertManagerDefinitionCommand.js +39 -0
  42. package/dist-es/commands/DeleteRuleGroupsNamespaceCommand.js +39 -0
  43. package/{dist/es → dist-es}/commands/DeleteWorkspaceCommand.js +4 -30
  44. package/dist-es/commands/DescribeAlertManagerDefinitionCommand.js +39 -0
  45. package/dist-es/commands/DescribeRuleGroupsNamespaceCommand.js +39 -0
  46. package/{dist/es → dist-es}/commands/DescribeWorkspaceCommand.js +4 -30
  47. package/dist-es/commands/ListRuleGroupsNamespacesCommand.js +39 -0
  48. package/{dist/es → dist-es}/commands/ListTagsForResourceCommand.js +4 -30
  49. package/{dist/es → dist-es}/commands/ListWorkspacesCommand.js +4 -30
  50. package/dist-es/commands/PutAlertManagerDefinitionCommand.js +39 -0
  51. package/dist-es/commands/PutRuleGroupsNamespaceCommand.js +39 -0
  52. package/{dist/es → dist-es}/commands/TagResourceCommand.js +4 -30
  53. package/{dist/es → dist-es}/commands/UntagResourceCommand.js +4 -30
  54. package/{dist/es → dist-es}/commands/UpdateWorkspaceAliasCommand.js +4 -30
  55. package/{dist/es → dist-es}/endpoints.js +1 -2
  56. package/dist-es/index.js +25 -0
  57. package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
  58. package/dist-es/models/models_0.js +218 -0
  59. package/dist-es/pagination/Interfaces.js +1 -0
  60. package/dist-es/pagination/ListRuleGroupsNamespacesPaginator.js +74 -0
  61. package/{dist/es → dist-es}/pagination/ListWorkspacesPaginator.js +16 -29
  62. package/dist-es/protocols/Aws_restJson1.js +2684 -0
  63. package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
  64. package/{dist/es → dist-es}/runtimeConfig.js +1 -5
  65. package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
  66. package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
  67. package/dist-es/waiters/waitForWorkspaceActive.js +69 -0
  68. package/dist-es/waiters/waitForWorkspaceDeleted.js +54 -0
  69. package/dist-types/Amp.d.ts +126 -0
  70. package/{dist/types/ts3.4 → dist-types}/AmpClient.d.ts +149 -140
  71. package/dist-types/commands/CreateAlertManagerDefinitionCommand.d.ts +35 -0
  72. package/dist-types/commands/CreateRuleGroupsNamespaceCommand.d.ts +35 -0
  73. package/{dist/types → dist-types}/commands/CreateWorkspaceCommand.d.ts +2 -2
  74. package/dist-types/commands/DeleteAlertManagerDefinitionCommand.d.ts +35 -0
  75. package/dist-types/commands/DeleteRuleGroupsNamespaceCommand.d.ts +35 -0
  76. package/{dist/types → dist-types}/commands/DeleteWorkspaceCommand.d.ts +2 -2
  77. package/dist-types/commands/DescribeAlertManagerDefinitionCommand.d.ts +35 -0
  78. package/dist-types/commands/DescribeRuleGroupsNamespaceCommand.d.ts +35 -0
  79. package/{dist/types → dist-types}/commands/DescribeWorkspaceCommand.d.ts +2 -2
  80. package/dist-types/commands/ListRuleGroupsNamespacesCommand.d.ts +35 -0
  81. package/{dist/types → dist-types}/commands/ListTagsForResourceCommand.d.ts +2 -2
  82. package/{dist/types → dist-types}/commands/ListWorkspacesCommand.d.ts +2 -2
  83. package/dist-types/commands/PutAlertManagerDefinitionCommand.d.ts +35 -0
  84. package/dist-types/commands/PutRuleGroupsNamespaceCommand.d.ts +35 -0
  85. package/{dist/types → dist-types}/commands/TagResourceCommand.d.ts +2 -2
  86. package/{dist/types → dist-types}/commands/UntagResourceCommand.d.ts +2 -2
  87. package/{dist/types → dist-types}/commands/UpdateWorkspaceAliasCommand.d.ts +2 -2
  88. package/{dist/types → dist-types}/endpoints.d.ts +0 -0
  89. package/dist-types/index.d.ts +25 -0
  90. package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
  91. package/dist-types/models/models_0.d.ts +1103 -0
  92. package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
  93. package/dist-types/pagination/ListRuleGroupsNamespacesPaginator.d.ts +4 -0
  94. package/{dist/types → dist-types}/pagination/ListWorkspacesPaginator.d.ts +1 -1
  95. package/dist-types/protocols/Aws_restJson1.d.ts +53 -0
  96. package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +1 -0
  97. package/{dist/types/ts3.4 → dist-types}/runtimeConfig.d.ts +37 -36
  98. package/{dist/types → dist-types}/runtimeConfig.native.d.ts +1 -0
  99. package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
  100. package/dist-types/ts3.4/Amp.d.ts +126 -0
  101. package/{dist/types → dist-types/ts3.4}/AmpClient.d.ts +149 -140
  102. package/dist-types/ts3.4/commands/CreateAlertManagerDefinitionCommand.d.ts +35 -0
  103. package/dist-types/ts3.4/commands/CreateRuleGroupsNamespaceCommand.d.ts +35 -0
  104. package/{dist/types → dist-types}/ts3.4/commands/CreateWorkspaceCommand.d.ts +2 -2
  105. package/dist-types/ts3.4/commands/DeleteAlertManagerDefinitionCommand.d.ts +35 -0
  106. package/dist-types/ts3.4/commands/DeleteRuleGroupsNamespaceCommand.d.ts +35 -0
  107. package/{dist/types → dist-types}/ts3.4/commands/DeleteWorkspaceCommand.d.ts +2 -2
  108. package/dist-types/ts3.4/commands/DescribeAlertManagerDefinitionCommand.d.ts +35 -0
  109. package/dist-types/ts3.4/commands/DescribeRuleGroupsNamespaceCommand.d.ts +35 -0
  110. package/{dist/types → dist-types}/ts3.4/commands/DescribeWorkspaceCommand.d.ts +2 -2
  111. package/dist-types/ts3.4/commands/ListRuleGroupsNamespacesCommand.d.ts +35 -0
  112. package/{dist/types → dist-types}/ts3.4/commands/ListTagsForResourceCommand.d.ts +2 -2
  113. package/{dist/types → dist-types}/ts3.4/commands/ListWorkspacesCommand.d.ts +2 -2
  114. package/dist-types/ts3.4/commands/PutAlertManagerDefinitionCommand.d.ts +35 -0
  115. package/dist-types/ts3.4/commands/PutRuleGroupsNamespaceCommand.d.ts +35 -0
  116. package/{dist/types → dist-types}/ts3.4/commands/TagResourceCommand.d.ts +2 -2
  117. package/{dist/types → dist-types}/ts3.4/commands/UntagResourceCommand.d.ts +2 -2
  118. package/{dist/types → dist-types}/ts3.4/commands/UpdateWorkspaceAliasCommand.d.ts +2 -2
  119. package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
  120. package/dist-types/ts3.4/index.d.ts +25 -0
  121. package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
  122. package/dist-types/ts3.4/models/models_0.d.ts +1103 -0
  123. package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
  124. package/dist-types/ts3.4/pagination/ListRuleGroupsNamespacesPaginator.d.ts +4 -0
  125. package/{dist/types → dist-types}/ts3.4/pagination/ListWorkspacesPaginator.d.ts +1 -1
  126. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +53 -0
  127. package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -0
  128. package/{dist/types → dist-types/ts3.4}/runtimeConfig.d.ts +37 -36
  129. package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -0
  130. package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +0 -0
  131. package/dist-types/ts3.4/waiters/waitForWorkspaceActive.d.ts +14 -0
  132. package/dist-types/ts3.4/waiters/waitForWorkspaceDeleted.d.ts +14 -0
  133. package/dist-types/waiters/waitForWorkspaceActive.d.ts +14 -0
  134. package/dist-types/waiters/waitForWorkspaceDeleted.d.ts +14 -0
  135. package/package.json +53 -49
  136. package/Amp.ts +0 -293
  137. package/AmpClient.ts +0 -265
  138. package/commands/CreateWorkspaceCommand.ts +0 -94
  139. package/commands/DeleteWorkspaceCommand.ts +0 -94
  140. package/commands/DescribeWorkspaceCommand.ts +0 -94
  141. package/commands/ListTagsForResourceCommand.ts +0 -94
  142. package/commands/ListWorkspacesCommand.ts +0 -94
  143. package/commands/TagResourceCommand.ts +0 -94
  144. package/commands/UntagResourceCommand.ts +0 -94
  145. package/commands/UpdateWorkspaceAliasCommand.ts +0 -94
  146. package/dist/cjs/Amp.js +0 -131
  147. package/dist/cjs/Amp.js.map +0 -1
  148. package/dist/cjs/AmpClient.js.map +0 -1
  149. package/dist/cjs/commands/CreateWorkspaceCommand.js.map +0 -1
  150. package/dist/cjs/commands/DeleteWorkspaceCommand.js.map +0 -1
  151. package/dist/cjs/commands/DescribeWorkspaceCommand.js.map +0 -1
  152. package/dist/cjs/commands/ListTagsForResourceCommand.js.map +0 -1
  153. package/dist/cjs/commands/ListWorkspacesCommand.js.map +0 -1
  154. package/dist/cjs/commands/TagResourceCommand.js.map +0 -1
  155. package/dist/cjs/commands/UntagResourceCommand.js.map +0 -1
  156. package/dist/cjs/commands/UpdateWorkspaceAliasCommand.js.map +0 -1
  157. package/dist/cjs/endpoints.js.map +0 -1
  158. package/dist/cjs/index.js.map +0 -1
  159. package/dist/cjs/models/index.js.map +0 -1
  160. package/dist/cjs/models/models_0.js +0 -259
  161. package/dist/cjs/models/models_0.js.map +0 -1
  162. package/dist/cjs/package.json +0 -93
  163. package/dist/cjs/pagination/Interfaces.js.map +0 -1
  164. package/dist/cjs/pagination/ListWorkspacesPaginator.js.map +0 -1
  165. package/dist/cjs/protocols/Aws_restJson1.js +0 -1176
  166. package/dist/cjs/protocols/Aws_restJson1.js.map +0 -1
  167. package/dist/cjs/runtimeConfig.browser.js.map +0 -1
  168. package/dist/cjs/runtimeConfig.js.map +0 -1
  169. package/dist/cjs/runtimeConfig.native.js.map +0 -1
  170. package/dist/cjs/runtimeConfig.shared.js.map +0 -1
  171. package/dist/es/Amp.js +0 -134
  172. package/dist/es/Amp.js.map +0 -1
  173. package/dist/es/AmpClient.js.map +0 -1
  174. package/dist/es/commands/CreateWorkspaceCommand.js.map +0 -1
  175. package/dist/es/commands/DeleteWorkspaceCommand.js.map +0 -1
  176. package/dist/es/commands/DescribeWorkspaceCommand.js.map +0 -1
  177. package/dist/es/commands/ListTagsForResourceCommand.js.map +0 -1
  178. package/dist/es/commands/ListWorkspacesCommand.js.map +0 -1
  179. package/dist/es/commands/TagResourceCommand.js.map +0 -1
  180. package/dist/es/commands/UntagResourceCommand.js.map +0 -1
  181. package/dist/es/commands/UpdateWorkspaceAliasCommand.js.map +0 -1
  182. package/dist/es/endpoints.js.map +0 -1
  183. package/dist/es/index.js +0 -14
  184. package/dist/es/index.js.map +0 -1
  185. package/dist/es/models/index.js +0 -2
  186. package/dist/es/models/index.js.map +0 -1
  187. package/dist/es/models/models_0.js +0 -207
  188. package/dist/es/models/models_0.js.map +0 -1
  189. package/dist/es/package.json +0 -93
  190. package/dist/es/pagination/Interfaces.js +0 -2
  191. package/dist/es/pagination/Interfaces.js.map +0 -1
  192. package/dist/es/pagination/ListWorkspacesPaginator.js.map +0 -1
  193. package/dist/es/protocols/Aws_restJson1.js +0 -1327
  194. package/dist/es/protocols/Aws_restJson1.js.map +0 -1
  195. package/dist/es/runtimeConfig.browser.js.map +0 -1
  196. package/dist/es/runtimeConfig.js.map +0 -1
  197. package/dist/es/runtimeConfig.native.js.map +0 -1
  198. package/dist/es/runtimeConfig.shared.js.map +0 -1
  199. package/dist/types/Amp.d.ts +0 -63
  200. package/dist/types/index.d.ts +0 -13
  201. package/dist/types/models/models_0.d.ts +0 -562
  202. package/dist/types/protocols/Aws_restJson1.d.ts +0 -26
  203. package/dist/types/ts3.4/Amp.d.ts +0 -63
  204. package/dist/types/ts3.4/index.d.ts +0 -13
  205. package/dist/types/ts3.4/models/models_0.d.ts +0 -562
  206. package/dist/types/ts3.4/protocols/Aws_restJson1.d.ts +0 -26
  207. package/endpoints.ts +0 -57
  208. package/index.ts +0 -13
  209. package/jest.config.js +0 -4
  210. package/models/models_0.ts +0 -689
  211. package/pagination/Interfaces.ts +0 -7
  212. package/pagination/ListWorkspacesPaginator.ts +0 -58
  213. package/protocols/Aws_restJson1.ts +0 -1348
  214. package/runtimeConfig.browser.ts +0 -40
  215. package/runtimeConfig.native.ts +0 -16
  216. package/runtimeConfig.shared.ts +0 -16
  217. package/runtimeConfig.ts +0 -45
  218. package/tsconfig.es.json +0 -12
  219. package/tsconfig.json +0 -32
package/Amp.ts DELETED
@@ -1,293 +0,0 @@
1
- import { AmpClient } from "./AmpClient";
2
- import {
3
- CreateWorkspaceCommand,
4
- CreateWorkspaceCommandInput,
5
- CreateWorkspaceCommandOutput,
6
- } from "./commands/CreateWorkspaceCommand";
7
- import {
8
- DeleteWorkspaceCommand,
9
- DeleteWorkspaceCommandInput,
10
- DeleteWorkspaceCommandOutput,
11
- } from "./commands/DeleteWorkspaceCommand";
12
- import {
13
- DescribeWorkspaceCommand,
14
- DescribeWorkspaceCommandInput,
15
- DescribeWorkspaceCommandOutput,
16
- } from "./commands/DescribeWorkspaceCommand";
17
- import {
18
- ListTagsForResourceCommand,
19
- ListTagsForResourceCommandInput,
20
- ListTagsForResourceCommandOutput,
21
- } from "./commands/ListTagsForResourceCommand";
22
- import {
23
- ListWorkspacesCommand,
24
- ListWorkspacesCommandInput,
25
- ListWorkspacesCommandOutput,
26
- } from "./commands/ListWorkspacesCommand";
27
- import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
28
- import {
29
- UntagResourceCommand,
30
- UntagResourceCommandInput,
31
- UntagResourceCommandOutput,
32
- } from "./commands/UntagResourceCommand";
33
- import {
34
- UpdateWorkspaceAliasCommand,
35
- UpdateWorkspaceAliasCommandInput,
36
- UpdateWorkspaceAliasCommandOutput,
37
- } from "./commands/UpdateWorkspaceAliasCommand";
38
- import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
39
-
40
- /**
41
- * Amazon Managed Service for Prometheus
42
- */
43
- export class Amp extends AmpClient {
44
- /**
45
- * Creates a new AMP workspace.
46
- */
47
- public createWorkspace(
48
- args: CreateWorkspaceCommandInput,
49
- options?: __HttpHandlerOptions
50
- ): Promise<CreateWorkspaceCommandOutput>;
51
- public createWorkspace(
52
- args: CreateWorkspaceCommandInput,
53
- cb: (err: any, data?: CreateWorkspaceCommandOutput) => void
54
- ): void;
55
- public createWorkspace(
56
- args: CreateWorkspaceCommandInput,
57
- options: __HttpHandlerOptions,
58
- cb: (err: any, data?: CreateWorkspaceCommandOutput) => void
59
- ): void;
60
- public createWorkspace(
61
- args: CreateWorkspaceCommandInput,
62
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateWorkspaceCommandOutput) => void),
63
- cb?: (err: any, data?: CreateWorkspaceCommandOutput) => void
64
- ): Promise<CreateWorkspaceCommandOutput> | void {
65
- const command = new CreateWorkspaceCommand(args);
66
- if (typeof optionsOrCb === "function") {
67
- this.send(command, optionsOrCb);
68
- } else if (typeof cb === "function") {
69
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
70
- this.send(command, optionsOrCb || {}, cb);
71
- } else {
72
- return this.send(command, optionsOrCb);
73
- }
74
- }
75
-
76
- /**
77
- * Deletes an AMP workspace.
78
- */
79
- public deleteWorkspace(
80
- args: DeleteWorkspaceCommandInput,
81
- options?: __HttpHandlerOptions
82
- ): Promise<DeleteWorkspaceCommandOutput>;
83
- public deleteWorkspace(
84
- args: DeleteWorkspaceCommandInput,
85
- cb: (err: any, data?: DeleteWorkspaceCommandOutput) => void
86
- ): void;
87
- public deleteWorkspace(
88
- args: DeleteWorkspaceCommandInput,
89
- options: __HttpHandlerOptions,
90
- cb: (err: any, data?: DeleteWorkspaceCommandOutput) => void
91
- ): void;
92
- public deleteWorkspace(
93
- args: DeleteWorkspaceCommandInput,
94
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteWorkspaceCommandOutput) => void),
95
- cb?: (err: any, data?: DeleteWorkspaceCommandOutput) => void
96
- ): Promise<DeleteWorkspaceCommandOutput> | void {
97
- const command = new DeleteWorkspaceCommand(args);
98
- if (typeof optionsOrCb === "function") {
99
- this.send(command, optionsOrCb);
100
- } else if (typeof cb === "function") {
101
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
102
- this.send(command, optionsOrCb || {}, cb);
103
- } else {
104
- return this.send(command, optionsOrCb);
105
- }
106
- }
107
-
108
- /**
109
- * Describes an existing AMP workspace.
110
- */
111
- public describeWorkspace(
112
- args: DescribeWorkspaceCommandInput,
113
- options?: __HttpHandlerOptions
114
- ): Promise<DescribeWorkspaceCommandOutput>;
115
- public describeWorkspace(
116
- args: DescribeWorkspaceCommandInput,
117
- cb: (err: any, data?: DescribeWorkspaceCommandOutput) => void
118
- ): void;
119
- public describeWorkspace(
120
- args: DescribeWorkspaceCommandInput,
121
- options: __HttpHandlerOptions,
122
- cb: (err: any, data?: DescribeWorkspaceCommandOutput) => void
123
- ): void;
124
- public describeWorkspace(
125
- args: DescribeWorkspaceCommandInput,
126
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeWorkspaceCommandOutput) => void),
127
- cb?: (err: any, data?: DescribeWorkspaceCommandOutput) => void
128
- ): Promise<DescribeWorkspaceCommandOutput> | void {
129
- const command = new DescribeWorkspaceCommand(args);
130
- if (typeof optionsOrCb === "function") {
131
- this.send(command, optionsOrCb);
132
- } else if (typeof cb === "function") {
133
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
134
- this.send(command, optionsOrCb || {}, cb);
135
- } else {
136
- return this.send(command, optionsOrCb);
137
- }
138
- }
139
-
140
- /**
141
- * Lists the tags you have assigned to the resource.
142
- */
143
- public listTagsForResource(
144
- args: ListTagsForResourceCommandInput,
145
- options?: __HttpHandlerOptions
146
- ): Promise<ListTagsForResourceCommandOutput>;
147
- public listTagsForResource(
148
- args: ListTagsForResourceCommandInput,
149
- cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
150
- ): void;
151
- public listTagsForResource(
152
- args: ListTagsForResourceCommandInput,
153
- options: __HttpHandlerOptions,
154
- cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
155
- ): void;
156
- public listTagsForResource(
157
- args: ListTagsForResourceCommandInput,
158
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListTagsForResourceCommandOutput) => void),
159
- cb?: (err: any, data?: ListTagsForResourceCommandOutput) => void
160
- ): Promise<ListTagsForResourceCommandOutput> | void {
161
- const command = new ListTagsForResourceCommand(args);
162
- if (typeof optionsOrCb === "function") {
163
- this.send(command, optionsOrCb);
164
- } else if (typeof cb === "function") {
165
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
166
- this.send(command, optionsOrCb || {}, cb);
167
- } else {
168
- return this.send(command, optionsOrCb);
169
- }
170
- }
171
-
172
- /**
173
- * Lists all AMP workspaces, including workspaces being created or deleted.
174
- */
175
- public listWorkspaces(
176
- args: ListWorkspacesCommandInput,
177
- options?: __HttpHandlerOptions
178
- ): Promise<ListWorkspacesCommandOutput>;
179
- public listWorkspaces(
180
- args: ListWorkspacesCommandInput,
181
- cb: (err: any, data?: ListWorkspacesCommandOutput) => void
182
- ): void;
183
- public listWorkspaces(
184
- args: ListWorkspacesCommandInput,
185
- options: __HttpHandlerOptions,
186
- cb: (err: any, data?: ListWorkspacesCommandOutput) => void
187
- ): void;
188
- public listWorkspaces(
189
- args: ListWorkspacesCommandInput,
190
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListWorkspacesCommandOutput) => void),
191
- cb?: (err: any, data?: ListWorkspacesCommandOutput) => void
192
- ): Promise<ListWorkspacesCommandOutput> | void {
193
- const command = new ListWorkspacesCommand(args);
194
- if (typeof optionsOrCb === "function") {
195
- this.send(command, optionsOrCb);
196
- } else if (typeof cb === "function") {
197
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
198
- this.send(command, optionsOrCb || {}, cb);
199
- } else {
200
- return this.send(command, optionsOrCb);
201
- }
202
- }
203
-
204
- /**
205
- * Creates tags for the specified resource.
206
- */
207
- public tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
208
- public tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
209
- public tagResource(
210
- args: TagResourceCommandInput,
211
- options: __HttpHandlerOptions,
212
- cb: (err: any, data?: TagResourceCommandOutput) => void
213
- ): void;
214
- public tagResource(
215
- args: TagResourceCommandInput,
216
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TagResourceCommandOutput) => void),
217
- cb?: (err: any, data?: TagResourceCommandOutput) => void
218
- ): Promise<TagResourceCommandOutput> | void {
219
- const command = new TagResourceCommand(args);
220
- if (typeof optionsOrCb === "function") {
221
- this.send(command, optionsOrCb);
222
- } else if (typeof cb === "function") {
223
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
224
- this.send(command, optionsOrCb || {}, cb);
225
- } else {
226
- return this.send(command, optionsOrCb);
227
- }
228
- }
229
-
230
- /**
231
- * Deletes tags from the specified resource.
232
- */
233
- public untagResource(
234
- args: UntagResourceCommandInput,
235
- options?: __HttpHandlerOptions
236
- ): Promise<UntagResourceCommandOutput>;
237
- public untagResource(
238
- args: UntagResourceCommandInput,
239
- cb: (err: any, data?: UntagResourceCommandOutput) => void
240
- ): void;
241
- public untagResource(
242
- args: UntagResourceCommandInput,
243
- options: __HttpHandlerOptions,
244
- cb: (err: any, data?: UntagResourceCommandOutput) => void
245
- ): void;
246
- public untagResource(
247
- args: UntagResourceCommandInput,
248
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UntagResourceCommandOutput) => void),
249
- cb?: (err: any, data?: UntagResourceCommandOutput) => void
250
- ): Promise<UntagResourceCommandOutput> | void {
251
- const command = new UntagResourceCommand(args);
252
- if (typeof optionsOrCb === "function") {
253
- this.send(command, optionsOrCb);
254
- } else if (typeof cb === "function") {
255
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
256
- this.send(command, optionsOrCb || {}, cb);
257
- } else {
258
- return this.send(command, optionsOrCb);
259
- }
260
- }
261
-
262
- /**
263
- * Updates an AMP workspace alias.
264
- */
265
- public updateWorkspaceAlias(
266
- args: UpdateWorkspaceAliasCommandInput,
267
- options?: __HttpHandlerOptions
268
- ): Promise<UpdateWorkspaceAliasCommandOutput>;
269
- public updateWorkspaceAlias(
270
- args: UpdateWorkspaceAliasCommandInput,
271
- cb: (err: any, data?: UpdateWorkspaceAliasCommandOutput) => void
272
- ): void;
273
- public updateWorkspaceAlias(
274
- args: UpdateWorkspaceAliasCommandInput,
275
- options: __HttpHandlerOptions,
276
- cb: (err: any, data?: UpdateWorkspaceAliasCommandOutput) => void
277
- ): void;
278
- public updateWorkspaceAlias(
279
- args: UpdateWorkspaceAliasCommandInput,
280
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateWorkspaceAliasCommandOutput) => void),
281
- cb?: (err: any, data?: UpdateWorkspaceAliasCommandOutput) => void
282
- ): Promise<UpdateWorkspaceAliasCommandOutput> | void {
283
- const command = new UpdateWorkspaceAliasCommand(args);
284
- if (typeof optionsOrCb === "function") {
285
- this.send(command, optionsOrCb);
286
- } else if (typeof cb === "function") {
287
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
288
- this.send(command, optionsOrCb || {}, cb);
289
- } else {
290
- return this.send(command, optionsOrCb);
291
- }
292
- }
293
- }
package/AmpClient.ts DELETED
@@ -1,265 +0,0 @@
1
- import { CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput } from "./commands/CreateWorkspaceCommand";
2
- import { DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput } from "./commands/DeleteWorkspaceCommand";
3
- import { DescribeWorkspaceCommandInput, DescribeWorkspaceCommandOutput } from "./commands/DescribeWorkspaceCommand";
4
- import {
5
- ListTagsForResourceCommandInput,
6
- ListTagsForResourceCommandOutput,
7
- } from "./commands/ListTagsForResourceCommand";
8
- import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput } from "./commands/ListWorkspacesCommand";
9
- import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
10
- import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
11
- import {
12
- UpdateWorkspaceAliasCommandInput,
13
- UpdateWorkspaceAliasCommandOutput,
14
- } from "./commands/UpdateWorkspaceAliasCommand";
15
- import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
16
- import {
17
- EndpointsInputConfig,
18
- EndpointsResolvedConfig,
19
- RegionInputConfig,
20
- RegionResolvedConfig,
21
- resolveEndpointsConfig,
22
- resolveRegionConfig,
23
- } from "@aws-sdk/config-resolver";
24
- import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
25
- import {
26
- HostHeaderInputConfig,
27
- HostHeaderResolvedConfig,
28
- getHostHeaderPlugin,
29
- resolveHostHeaderConfig,
30
- } from "@aws-sdk/middleware-host-header";
31
- import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
32
- import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
33
- import {
34
- AwsAuthInputConfig,
35
- AwsAuthResolvedConfig,
36
- getAwsAuthPlugin,
37
- resolveAwsAuthConfig,
38
- } from "@aws-sdk/middleware-signing";
39
- import {
40
- UserAgentInputConfig,
41
- UserAgentResolvedConfig,
42
- getUserAgentPlugin,
43
- resolveUserAgentConfig,
44
- } from "@aws-sdk/middleware-user-agent";
45
- import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
46
- import {
47
- Client as __Client,
48
- SmithyConfiguration as __SmithyConfiguration,
49
- SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
50
- } from "@aws-sdk/smithy-client";
51
- import {
52
- Provider,
53
- RegionInfoProvider,
54
- Credentials as __Credentials,
55
- Decoder as __Decoder,
56
- Encoder as __Encoder,
57
- Hash as __Hash,
58
- HashConstructor as __HashConstructor,
59
- HttpHandlerOptions as __HttpHandlerOptions,
60
- Logger as __Logger,
61
- Provider as __Provider,
62
- StreamCollector as __StreamCollector,
63
- UrlParser as __UrlParser,
64
- UserAgent as __UserAgent,
65
- } from "@aws-sdk/types";
66
-
67
- export type ServiceInputTypes =
68
- | CreateWorkspaceCommandInput
69
- | DeleteWorkspaceCommandInput
70
- | DescribeWorkspaceCommandInput
71
- | ListTagsForResourceCommandInput
72
- | ListWorkspacesCommandInput
73
- | TagResourceCommandInput
74
- | UntagResourceCommandInput
75
- | UpdateWorkspaceAliasCommandInput;
76
-
77
- export type ServiceOutputTypes =
78
- | CreateWorkspaceCommandOutput
79
- | DeleteWorkspaceCommandOutput
80
- | DescribeWorkspaceCommandOutput
81
- | ListTagsForResourceCommandOutput
82
- | ListWorkspacesCommandOutput
83
- | TagResourceCommandOutput
84
- | UntagResourceCommandOutput
85
- | UpdateWorkspaceAliasCommandOutput;
86
-
87
- export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
88
- /**
89
- * The HTTP handler to use. Fetch in browser and Https in Nodejs.
90
- */
91
- requestHandler?: __HttpHandler;
92
-
93
- /**
94
- * A constructor for a class implementing the {@link __Hash} interface
95
- * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
96
- * @internal
97
- */
98
- sha256?: __HashConstructor;
99
-
100
- /**
101
- * The function that will be used to convert strings into HTTP endpoints.
102
- * @internal
103
- */
104
- urlParser?: __UrlParser;
105
-
106
- /**
107
- * A function that can calculate the length of a request body.
108
- * @internal
109
- */
110
- bodyLengthChecker?: (body: any) => number | undefined;
111
-
112
- /**
113
- * A function that converts a stream into an array of bytes.
114
- * @internal
115
- */
116
- streamCollector?: __StreamCollector;
117
-
118
- /**
119
- * The function that will be used to convert a base64-encoded string to a byte array.
120
- * @internal
121
- */
122
- base64Decoder?: __Decoder;
123
-
124
- /**
125
- * The function that will be used to convert binary data to a base64-encoded string.
126
- * @internal
127
- */
128
- base64Encoder?: __Encoder;
129
-
130
- /**
131
- * The function that will be used to convert a UTF8-encoded string to a byte array.
132
- * @internal
133
- */
134
- utf8Decoder?: __Decoder;
135
-
136
- /**
137
- * The function that will be used to convert binary data to a UTF-8 encoded string.
138
- * @internal
139
- */
140
- utf8Encoder?: __Encoder;
141
-
142
- /**
143
- * The runtime environment.
144
- * @internal
145
- */
146
- runtime?: string;
147
-
148
- /**
149
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
150
- * trait of an operation.
151
- */
152
- disableHostPrefix?: boolean;
153
-
154
- /**
155
- * Value for how many times a request will be made at most in case of retry.
156
- */
157
- maxAttempts?: number | __Provider<number>;
158
-
159
- /**
160
- * Specifies which retry algorithm to use.
161
- */
162
- retryMode?: string | __Provider<string>;
163
-
164
- /**
165
- * Optional logger for logging debug/info/warn/error.
166
- */
167
- logger?: __Logger;
168
-
169
- /**
170
- * Unique service identifier.
171
- * @internal
172
- */
173
- serviceId?: string;
174
-
175
- /**
176
- * The AWS region to which this client will send requests
177
- */
178
- region?: string | __Provider<string>;
179
-
180
- /**
181
- * Default credentials provider; Not available in browser runtime.
182
- * @internal
183
- */
184
- credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
185
-
186
- /**
187
- * Fetch related hostname, signing name or signing region with given region.
188
- * @internal
189
- */
190
- regionInfoProvider?: RegionInfoProvider;
191
-
192
- /**
193
- * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
194
- * @internal
195
- */
196
- defaultUserAgentProvider?: Provider<__UserAgent>;
197
- }
198
-
199
- type AmpClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
200
- ClientDefaults &
201
- RegionInputConfig &
202
- EndpointsInputConfig &
203
- RetryInputConfig &
204
- HostHeaderInputConfig &
205
- AwsAuthInputConfig &
206
- UserAgentInputConfig;
207
- /**
208
- * The configuration interface of AmpClient class constructor that set the region, credentials and other options.
209
- */
210
- export interface AmpClientConfig extends AmpClientConfigType {}
211
-
212
- type AmpClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
213
- Required<ClientDefaults> &
214
- RegionResolvedConfig &
215
- EndpointsResolvedConfig &
216
- RetryResolvedConfig &
217
- HostHeaderResolvedConfig &
218
- AwsAuthResolvedConfig &
219
- UserAgentResolvedConfig;
220
- /**
221
- * The resolved configuration interface of AmpClient class. This is resolved and normalized from the {@link AmpClientConfig | constructor configuration interface}.
222
- */
223
- export interface AmpClientResolvedConfig extends AmpClientResolvedConfigType {}
224
-
225
- /**
226
- * Amazon Managed Service for Prometheus
227
- */
228
- export class AmpClient extends __Client<
229
- __HttpHandlerOptions,
230
- ServiceInputTypes,
231
- ServiceOutputTypes,
232
- AmpClientResolvedConfig
233
- > {
234
- /**
235
- * The resolved configuration of AmpClient class. This is resolved and normalized from the {@link AmpClientConfig | constructor configuration interface}.
236
- */
237
- readonly config: AmpClientResolvedConfig;
238
-
239
- constructor(configuration: AmpClientConfig) {
240
- let _config_0 = __getRuntimeConfig(configuration);
241
- let _config_1 = resolveRegionConfig(_config_0);
242
- let _config_2 = resolveEndpointsConfig(_config_1);
243
- let _config_3 = resolveRetryConfig(_config_2);
244
- let _config_4 = resolveHostHeaderConfig(_config_3);
245
- let _config_5 = resolveAwsAuthConfig(_config_4);
246
- let _config_6 = resolveUserAgentConfig(_config_5);
247
- super(_config_6);
248
- this.config = _config_6;
249
- this.middlewareStack.use(getRetryPlugin(this.config));
250
- this.middlewareStack.use(getContentLengthPlugin(this.config));
251
- this.middlewareStack.use(getHostHeaderPlugin(this.config));
252
- this.middlewareStack.use(getLoggerPlugin(this.config));
253
- this.middlewareStack.use(getAwsAuthPlugin(this.config));
254
- this.middlewareStack.use(getUserAgentPlugin(this.config));
255
- }
256
-
257
- /**
258
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
259
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
260
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
261
- */
262
- destroy(): void {
263
- super.destroy();
264
- }
265
- }
@@ -1,94 +0,0 @@
1
- import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient";
2
- import { CreateWorkspaceRequest, CreateWorkspaceResponse } from "../models/models_0";
3
- import {
4
- deserializeAws_restJson1CreateWorkspaceCommand,
5
- serializeAws_restJson1CreateWorkspaceCommand,
6
- } from "../protocols/Aws_restJson1";
7
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
8
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
9
- import { Command as $Command } from "@aws-sdk/smithy-client";
10
- import {
11
- FinalizeHandlerArguments,
12
- Handler,
13
- HandlerExecutionContext,
14
- MiddlewareStack,
15
- HttpHandlerOptions as __HttpHandlerOptions,
16
- MetadataBearer as __MetadataBearer,
17
- SerdeContext as __SerdeContext,
18
- } from "@aws-sdk/types";
19
-
20
- export interface CreateWorkspaceCommandInput extends CreateWorkspaceRequest {}
21
- export interface CreateWorkspaceCommandOutput extends CreateWorkspaceResponse, __MetadataBearer {}
22
-
23
- /**
24
- * Creates a new AMP workspace.
25
- * @example
26
- * Use a bare-bones client and the command you need to make an API call.
27
- * ```javascript
28
- * import { AmpClient, CreateWorkspaceCommand } from "@aws-sdk/client-amp"; // ES Modules import
29
- * // const { AmpClient, CreateWorkspaceCommand } = require("@aws-sdk/client-amp"); // CommonJS import
30
- * const client = new AmpClient(config);
31
- * const command = new CreateWorkspaceCommand(input);
32
- * const response = await client.send(command);
33
- * ```
34
- *
35
- * @see {@link CreateWorkspaceCommandInput} for command's `input` shape.
36
- * @see {@link CreateWorkspaceCommandOutput} for command's `response` shape.
37
- * @see {@link AmpClientResolvedConfig | config} for command's `input` shape.
38
- *
39
- */
40
- export class CreateWorkspaceCommand extends $Command<
41
- CreateWorkspaceCommandInput,
42
- CreateWorkspaceCommandOutput,
43
- AmpClientResolvedConfig
44
- > {
45
- // Start section: command_properties
46
- // End section: command_properties
47
-
48
- constructor(readonly input: CreateWorkspaceCommandInput) {
49
- // Start section: command_constructor
50
- super();
51
- // End section: command_constructor
52
- }
53
-
54
- /**
55
- * @internal
56
- */
57
- resolveMiddleware(
58
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
59
- configuration: AmpClientResolvedConfig,
60
- options?: __HttpHandlerOptions
61
- ): Handler<CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput> {
62
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
63
-
64
- const stack = clientStack.concat(this.middlewareStack);
65
-
66
- const { logger } = configuration;
67
- const clientName = "AmpClient";
68
- const commandName = "CreateWorkspaceCommand";
69
- const handlerExecutionContext: HandlerExecutionContext = {
70
- logger,
71
- clientName,
72
- commandName,
73
- inputFilterSensitiveLog: CreateWorkspaceRequest.filterSensitiveLog,
74
- outputFilterSensitiveLog: CreateWorkspaceResponse.filterSensitiveLog,
75
- };
76
- const { requestHandler } = configuration;
77
- return stack.resolve(
78
- (request: FinalizeHandlerArguments<any>) =>
79
- requestHandler.handle(request.request as __HttpRequest, options || {}),
80
- handlerExecutionContext
81
- );
82
- }
83
-
84
- private serialize(input: CreateWorkspaceCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
85
- return serializeAws_restJson1CreateWorkspaceCommand(input, context);
86
- }
87
-
88
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateWorkspaceCommandOutput> {
89
- return deserializeAws_restJson1CreateWorkspaceCommand(output, context);
90
- }
91
-
92
- // Start section: command_body_extra
93
- // End section: command_body_extra
94
- }