Skip to content

Commit 09743d7

Browse files
author
awstools
committed
feat(client-amp): This release adds support for the Amazon Managed Service for Prometheus collector, a fully managed, agentless Prometheus metrics scraping capability.
1 parent 842884c commit 09743d7

17 files changed

+3658
-169
lines changed

clients/client-amp/README.md

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ using your favorite package manager:
2323

2424
The AWS SDK is modulized by clients and commands.
2525
To send a request, you only need to import the `AmpClient` and
26-
the commands you need, for example `ListWorkspacesCommand`:
26+
the commands you need, for example `ListScrapersCommand`:
2727

2828
```js
2929
// ES5 example
30-
const { AmpClient, ListWorkspacesCommand } = require("@aws-sdk/client-amp");
30+
const { AmpClient, ListScrapersCommand } = require("@aws-sdk/client-amp");
3131
```
3232

3333
```ts
3434
// ES6+ example
35-
import { AmpClient, ListWorkspacesCommand } from "@aws-sdk/client-amp";
35+
import { AmpClient, ListScrapersCommand } from "@aws-sdk/client-amp";
3636
```
3737

3838
### Usage
@@ -51,7 +51,7 @@ const client = new AmpClient({ region: "REGION" });
5151
const params = {
5252
/** input parameters */
5353
};
54-
const command = new ListWorkspacesCommand(params);
54+
const command = new ListScrapersCommand(params);
5555
```
5656

5757
#### Async/await
@@ -130,15 +130,15 @@ const client = new AWS.Amp({ region: "REGION" });
130130

131131
// async/await.
132132
try {
133-
const data = await client.listWorkspaces(params);
133+
const data = await client.listScrapers(params);
134134
// process data.
135135
} catch (error) {
136136
// error handling.
137137
}
138138

139139
// Promises.
140140
client
141-
.listWorkspaces(params)
141+
.listScrapers(params)
142142
.then((data) => {
143143
// process data.
144144
})
@@ -147,7 +147,7 @@ client
147147
});
148148

149149
// callbacks.
150-
client.listWorkspaces(params, (err, data) => {
150+
client.listScrapers(params, (err, data) => {
151151
// process err and data.
152152
});
153153
```
@@ -226,6 +226,14 @@ CreateRuleGroupsNamespace
226226

227227
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/CreateRuleGroupsNamespaceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/CreateRuleGroupsNamespaceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/CreateRuleGroupsNamespaceCommandOutput/)
228228

229+
</details>
230+
<details>
231+
<summary>
232+
CreateScraper
233+
</summary>
234+
235+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/CreateScraperCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/CreateScraperCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/CreateScraperCommandOutput/)
236+
229237
</details>
230238
<details>
231239
<summary>
@@ -258,6 +266,14 @@ DeleteRuleGroupsNamespace
258266

259267
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/DeleteRuleGroupsNamespaceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DeleteRuleGroupsNamespaceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DeleteRuleGroupsNamespaceCommandOutput/)
260268

269+
</details>
270+
<details>
271+
<summary>
272+
DeleteScraper
273+
</summary>
274+
275+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/DeleteScraperCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DeleteScraperCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DeleteScraperCommandOutput/)
276+
261277
</details>
262278
<details>
263279
<summary>
@@ -290,6 +306,14 @@ DescribeRuleGroupsNamespace
290306

291307
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/DescribeRuleGroupsNamespaceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DescribeRuleGroupsNamespaceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DescribeRuleGroupsNamespaceCommandOutput/)
292308

309+
</details>
310+
<details>
311+
<summary>
312+
DescribeScraper
313+
</summary>
314+
315+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/DescribeScraperCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DescribeScraperCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DescribeScraperCommandOutput/)
316+
293317
</details>
294318
<details>
295319
<summary>
@@ -298,6 +322,14 @@ DescribeWorkspace
298322

299323
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/DescribeWorkspaceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DescribeWorkspaceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DescribeWorkspaceCommandOutput/)
300324

325+
</details>
326+
<details>
327+
<summary>
328+
GetDefaultScraperConfiguration
329+
</summary>
330+
331+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/GetDefaultScraperConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/GetDefaultScraperConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/GetDefaultScraperConfigurationCommandOutput/)
332+
301333
</details>
302334
<details>
303335
<summary>
@@ -306,6 +338,14 @@ ListRuleGroupsNamespaces
306338

307339
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/ListRuleGroupsNamespacesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/ListRuleGroupsNamespacesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/ListRuleGroupsNamespacesCommandOutput/)
308340

341+
</details>
342+
<details>
343+
<summary>
344+
ListScrapers
345+
</summary>
346+
347+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/ListScrapersCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/ListScrapersCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/ListScrapersCommandOutput/)
348+
309349
</details>
310350
<details>
311351
<summary>

clients/client-amp/src/Amp.ts

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ import {
1818
CreateRuleGroupsNamespaceCommandInput,
1919
CreateRuleGroupsNamespaceCommandOutput,
2020
} from "./commands/CreateRuleGroupsNamespaceCommand";
21+
import {
22+
CreateScraperCommand,
23+
CreateScraperCommandInput,
24+
CreateScraperCommandOutput,
25+
} from "./commands/CreateScraperCommand";
2126
import {
2227
CreateWorkspaceCommand,
2328
CreateWorkspaceCommandInput,
@@ -38,6 +43,11 @@ import {
3843
DeleteRuleGroupsNamespaceCommandInput,
3944
DeleteRuleGroupsNamespaceCommandOutput,
4045
} from "./commands/DeleteRuleGroupsNamespaceCommand";
46+
import {
47+
DeleteScraperCommand,
48+
DeleteScraperCommandInput,
49+
DeleteScraperCommandOutput,
50+
} from "./commands/DeleteScraperCommand";
4151
import {
4252
DeleteWorkspaceCommand,
4353
DeleteWorkspaceCommandInput,
@@ -58,16 +68,31 @@ import {
5868
DescribeRuleGroupsNamespaceCommandInput,
5969
DescribeRuleGroupsNamespaceCommandOutput,
6070
} from "./commands/DescribeRuleGroupsNamespaceCommand";
71+
import {
72+
DescribeScraperCommand,
73+
DescribeScraperCommandInput,
74+
DescribeScraperCommandOutput,
75+
} from "./commands/DescribeScraperCommand";
6176
import {
6277
DescribeWorkspaceCommand,
6378
DescribeWorkspaceCommandInput,
6479
DescribeWorkspaceCommandOutput,
6580
} from "./commands/DescribeWorkspaceCommand";
81+
import {
82+
GetDefaultScraperConfigurationCommand,
83+
GetDefaultScraperConfigurationCommandInput,
84+
GetDefaultScraperConfigurationCommandOutput,
85+
} from "./commands/GetDefaultScraperConfigurationCommand";
6686
import {
6787
ListRuleGroupsNamespacesCommand,
6888
ListRuleGroupsNamespacesCommandInput,
6989
ListRuleGroupsNamespacesCommandOutput,
7090
} from "./commands/ListRuleGroupsNamespacesCommand";
91+
import {
92+
ListScrapersCommand,
93+
ListScrapersCommandInput,
94+
ListScrapersCommandOutput,
95+
} from "./commands/ListScrapersCommand";
7196
import {
7297
ListTagsForResourceCommand,
7398
ListTagsForResourceCommandInput,
@@ -109,16 +134,21 @@ const commands = {
109134
CreateAlertManagerDefinitionCommand,
110135
CreateLoggingConfigurationCommand,
111136
CreateRuleGroupsNamespaceCommand,
137+
CreateScraperCommand,
112138
CreateWorkspaceCommand,
113139
DeleteAlertManagerDefinitionCommand,
114140
DeleteLoggingConfigurationCommand,
115141
DeleteRuleGroupsNamespaceCommand,
142+
DeleteScraperCommand,
116143
DeleteWorkspaceCommand,
117144
DescribeAlertManagerDefinitionCommand,
118145
DescribeLoggingConfigurationCommand,
119146
DescribeRuleGroupsNamespaceCommand,
147+
DescribeScraperCommand,
120148
DescribeWorkspaceCommand,
149+
GetDefaultScraperConfigurationCommand,
121150
ListRuleGroupsNamespacesCommand,
151+
ListScrapersCommand,
122152
ListTagsForResourceCommand,
123153
ListWorkspacesCommand,
124154
PutAlertManagerDefinitionCommand,
@@ -181,6 +211,17 @@ export interface Amp {
181211
cb: (err: any, data?: CreateRuleGroupsNamespaceCommandOutput) => void
182212
): void;
183213

214+
/**
215+
* @see {@link CreateScraperCommand}
216+
*/
217+
createScraper(args: CreateScraperCommandInput, options?: __HttpHandlerOptions): Promise<CreateScraperCommandOutput>;
218+
createScraper(args: CreateScraperCommandInput, cb: (err: any, data?: CreateScraperCommandOutput) => void): void;
219+
createScraper(
220+
args: CreateScraperCommandInput,
221+
options: __HttpHandlerOptions,
222+
cb: (err: any, data?: CreateScraperCommandOutput) => void
223+
): void;
224+
184225
/**
185226
* @see {@link CreateWorkspaceCommand}
186227
*/
@@ -246,6 +287,17 @@ export interface Amp {
246287
cb: (err: any, data?: DeleteRuleGroupsNamespaceCommandOutput) => void
247288
): void;
248289

290+
/**
291+
* @see {@link DeleteScraperCommand}
292+
*/
293+
deleteScraper(args: DeleteScraperCommandInput, options?: __HttpHandlerOptions): Promise<DeleteScraperCommandOutput>;
294+
deleteScraper(args: DeleteScraperCommandInput, cb: (err: any, data?: DeleteScraperCommandOutput) => void): void;
295+
deleteScraper(
296+
args: DeleteScraperCommandInput,
297+
options: __HttpHandlerOptions,
298+
cb: (err: any, data?: DeleteScraperCommandOutput) => void
299+
): void;
300+
249301
/**
250302
* @see {@link DeleteWorkspaceCommand}
251303
*/
@@ -311,6 +363,20 @@ export interface Amp {
311363
cb: (err: any, data?: DescribeRuleGroupsNamespaceCommandOutput) => void
312364
): void;
313365

366+
/**
367+
* @see {@link DescribeScraperCommand}
368+
*/
369+
describeScraper(
370+
args: DescribeScraperCommandInput,
371+
options?: __HttpHandlerOptions
372+
): Promise<DescribeScraperCommandOutput>;
373+
describeScraper(args: DescribeScraperCommandInput, cb: (err: any, data?: DescribeScraperCommandOutput) => void): void;
374+
describeScraper(
375+
args: DescribeScraperCommandInput,
376+
options: __HttpHandlerOptions,
377+
cb: (err: any, data?: DescribeScraperCommandOutput) => void
378+
): void;
379+
314380
/**
315381
* @see {@link DescribeWorkspaceCommand}
316382
*/
@@ -328,6 +394,23 @@ export interface Amp {
328394
cb: (err: any, data?: DescribeWorkspaceCommandOutput) => void
329395
): void;
330396

397+
/**
398+
* @see {@link GetDefaultScraperConfigurationCommand}
399+
*/
400+
getDefaultScraperConfiguration(
401+
args: GetDefaultScraperConfigurationCommandInput,
402+
options?: __HttpHandlerOptions
403+
): Promise<GetDefaultScraperConfigurationCommandOutput>;
404+
getDefaultScraperConfiguration(
405+
args: GetDefaultScraperConfigurationCommandInput,
406+
cb: (err: any, data?: GetDefaultScraperConfigurationCommandOutput) => void
407+
): void;
408+
getDefaultScraperConfiguration(
409+
args: GetDefaultScraperConfigurationCommandInput,
410+
options: __HttpHandlerOptions,
411+
cb: (err: any, data?: GetDefaultScraperConfigurationCommandOutput) => void
412+
): void;
413+
331414
/**
332415
* @see {@link ListRuleGroupsNamespacesCommand}
333416
*/
@@ -345,6 +428,17 @@ export interface Amp {
345428
cb: (err: any, data?: ListRuleGroupsNamespacesCommandOutput) => void
346429
): void;
347430

431+
/**
432+
* @see {@link ListScrapersCommand}
433+
*/
434+
listScrapers(args: ListScrapersCommandInput, options?: __HttpHandlerOptions): Promise<ListScrapersCommandOutput>;
435+
listScrapers(args: ListScrapersCommandInput, cb: (err: any, data?: ListScrapersCommandOutput) => void): void;
436+
listScrapers(
437+
args: ListScrapersCommandInput,
438+
options: __HttpHandlerOptions,
439+
cb: (err: any, data?: ListScrapersCommandOutput) => void
440+
): void;
441+
348442
/**
349443
* @see {@link ListTagsForResourceCommand}
350444
*/

clients/client-amp/src/AmpClient.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ import {
6262
CreateRuleGroupsNamespaceCommandInput,
6363
CreateRuleGroupsNamespaceCommandOutput,
6464
} from "./commands/CreateRuleGroupsNamespaceCommand";
65+
import { CreateScraperCommandInput, CreateScraperCommandOutput } from "./commands/CreateScraperCommand";
6566
import { CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput } from "./commands/CreateWorkspaceCommand";
6667
import {
6768
DeleteAlertManagerDefinitionCommandInput,
@@ -75,6 +76,7 @@ import {
7576
DeleteRuleGroupsNamespaceCommandInput,
7677
DeleteRuleGroupsNamespaceCommandOutput,
7778
} from "./commands/DeleteRuleGroupsNamespaceCommand";
79+
import { DeleteScraperCommandInput, DeleteScraperCommandOutput } from "./commands/DeleteScraperCommand";
7880
import { DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput } from "./commands/DeleteWorkspaceCommand";
7981
import {
8082
DescribeAlertManagerDefinitionCommandInput,
@@ -88,11 +90,17 @@ import {
8890
DescribeRuleGroupsNamespaceCommandInput,
8991
DescribeRuleGroupsNamespaceCommandOutput,
9092
} from "./commands/DescribeRuleGroupsNamespaceCommand";
93+
import { DescribeScraperCommandInput, DescribeScraperCommandOutput } from "./commands/DescribeScraperCommand";
9194
import { DescribeWorkspaceCommandInput, DescribeWorkspaceCommandOutput } from "./commands/DescribeWorkspaceCommand";
95+
import {
96+
GetDefaultScraperConfigurationCommandInput,
97+
GetDefaultScraperConfigurationCommandOutput,
98+
} from "./commands/GetDefaultScraperConfigurationCommand";
9299
import {
93100
ListRuleGroupsNamespacesCommandInput,
94101
ListRuleGroupsNamespacesCommandOutput,
95102
} from "./commands/ListRuleGroupsNamespacesCommand";
103+
import { ListScrapersCommandInput, ListScrapersCommandOutput } from "./commands/ListScrapersCommand";
96104
import {
97105
ListTagsForResourceCommandInput,
98106
ListTagsForResourceCommandOutput,
@@ -134,16 +142,21 @@ export type ServiceInputTypes =
134142
| CreateAlertManagerDefinitionCommandInput
135143
| CreateLoggingConfigurationCommandInput
136144
| CreateRuleGroupsNamespaceCommandInput
145+
| CreateScraperCommandInput
137146
| CreateWorkspaceCommandInput
138147
| DeleteAlertManagerDefinitionCommandInput
139148
| DeleteLoggingConfigurationCommandInput
140149
| DeleteRuleGroupsNamespaceCommandInput
150+
| DeleteScraperCommandInput
141151
| DeleteWorkspaceCommandInput
142152
| DescribeAlertManagerDefinitionCommandInput
143153
| DescribeLoggingConfigurationCommandInput
144154
| DescribeRuleGroupsNamespaceCommandInput
155+
| DescribeScraperCommandInput
145156
| DescribeWorkspaceCommandInput
157+
| GetDefaultScraperConfigurationCommandInput
146158
| ListRuleGroupsNamespacesCommandInput
159+
| ListScrapersCommandInput
147160
| ListTagsForResourceCommandInput
148161
| ListWorkspacesCommandInput
149162
| PutAlertManagerDefinitionCommandInput
@@ -160,16 +173,21 @@ export type ServiceOutputTypes =
160173
| CreateAlertManagerDefinitionCommandOutput
161174
| CreateLoggingConfigurationCommandOutput
162175
| CreateRuleGroupsNamespaceCommandOutput
176+
| CreateScraperCommandOutput
163177
| CreateWorkspaceCommandOutput
164178
| DeleteAlertManagerDefinitionCommandOutput
165179
| DeleteLoggingConfigurationCommandOutput
166180
| DeleteRuleGroupsNamespaceCommandOutput
181+
| DeleteScraperCommandOutput
167182
| DeleteWorkspaceCommandOutput
168183
| DescribeAlertManagerDefinitionCommandOutput
169184
| DescribeLoggingConfigurationCommandOutput
170185
| DescribeRuleGroupsNamespaceCommandOutput
186+
| DescribeScraperCommandOutput
171187
| DescribeWorkspaceCommandOutput
188+
| GetDefaultScraperConfigurationCommandOutput
172189
| ListRuleGroupsNamespacesCommandOutput
190+
| ListScrapersCommandOutput
173191
| ListTagsForResourceCommandOutput
174192
| ListWorkspacesCommandOutput
175193
| PutAlertManagerDefinitionCommandOutput

0 commit comments

Comments
 (0)