@aws-sdk/client-amp 3.454.0 → 3.460.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 (60) hide show
  1. package/README.md +68 -28
  2. package/dist-cjs/Amp.js +10 -0
  3. package/dist-cjs/commands/CreateScraperCommand.js +51 -0
  4. package/dist-cjs/commands/DeleteScraperCommand.js +51 -0
  5. package/dist-cjs/commands/DescribeScraperCommand.js +51 -0
  6. package/dist-cjs/commands/GetDefaultScraperConfigurationCommand.js +51 -0
  7. package/dist-cjs/commands/ListScrapersCommand.js +51 -0
  8. package/dist-cjs/commands/index.js +5 -0
  9. package/dist-cjs/models/models_0.js +32 -1
  10. package/dist-cjs/pagination/ListScrapersPaginator.js +29 -0
  11. package/dist-cjs/pagination/index.js +1 -0
  12. package/dist-cjs/protocols/Aws_restJson1.js +396 -1
  13. package/dist-cjs/waiters/index.js +2 -0
  14. package/dist-cjs/waiters/waitForScraperActive.js +45 -0
  15. package/dist-cjs/waiters/waitForScraperDeleted.js +39 -0
  16. package/dist-es/Amp.js +10 -0
  17. package/dist-es/commands/CreateScraperCommand.js +47 -0
  18. package/dist-es/commands/DeleteScraperCommand.js +47 -0
  19. package/dist-es/commands/DescribeScraperCommand.js +47 -0
  20. package/dist-es/commands/GetDefaultScraperConfigurationCommand.js +47 -0
  21. package/dist-es/commands/ListScrapersCommand.js +47 -0
  22. package/dist-es/commands/index.js +5 -0
  23. package/dist-es/models/models_0.js +31 -0
  24. package/dist-es/pagination/ListScrapersPaginator.js +25 -0
  25. package/dist-es/pagination/index.js +1 -0
  26. package/dist-es/protocols/Aws_restJson1.js +386 -2
  27. package/dist-es/waiters/index.js +2 -0
  28. package/dist-es/waiters/waitForScraperActive.js +40 -0
  29. package/dist-es/waiters/waitForScraperDeleted.js +34 -0
  30. package/dist-types/Amp.d.ts +35 -0
  31. package/dist-types/AmpClient.d.ts +7 -2
  32. package/dist-types/commands/CreateScraperCommand.d.ts +124 -0
  33. package/dist-types/commands/DeleteScraperCommand.d.ts +95 -0
  34. package/dist-types/commands/DescribeScraperCommand.d.ts +121 -0
  35. package/dist-types/commands/GetDefaultScraperConfigurationCommand.d.ts +80 -0
  36. package/dist-types/commands/ListScrapersCommand.d.ts +124 -0
  37. package/dist-types/commands/index.d.ts +5 -0
  38. package/dist-types/models/models_0.d.ts +460 -0
  39. package/dist-types/pagination/ListScrapersPaginator.d.ts +7 -0
  40. package/dist-types/pagination/index.d.ts +1 -0
  41. package/dist-types/protocols/Aws_restJson1.d.ts +45 -0
  42. package/dist-types/ts3.4/Amp.d.ts +85 -0
  43. package/dist-types/ts3.4/AmpClient.d.ts +30 -0
  44. package/dist-types/ts3.4/commands/CreateScraperCommand.d.ts +38 -0
  45. package/dist-types/ts3.4/commands/DeleteScraperCommand.d.ts +38 -0
  46. package/dist-types/ts3.4/commands/DescribeScraperCommand.d.ts +38 -0
  47. package/dist-types/ts3.4/commands/GetDefaultScraperConfigurationCommand.d.ts +42 -0
  48. package/dist-types/ts3.4/commands/ListScrapersCommand.d.ts +35 -0
  49. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  50. package/dist-types/ts3.4/models/models_0.d.ts +140 -0
  51. package/dist-types/ts3.4/pagination/ListScrapersPaginator.d.ts +11 -0
  52. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  53. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
  54. package/dist-types/ts3.4/waiters/index.d.ts +2 -0
  55. package/dist-types/ts3.4/waiters/waitForScraperActive.d.ts +11 -0
  56. package/dist-types/ts3.4/waiters/waitForScraperDeleted.d.ts +11 -0
  57. package/dist-types/waiters/index.d.ts +2 -0
  58. package/dist-types/waiters/waitForScraperActive.d.ts +14 -0
  59. package/dist-types/waiters/waitForScraperDeleted.d.ts +14 -0
  60. package/package.json +12 -12
package/dist-es/Amp.js CHANGED
@@ -3,16 +3,21 @@ import { AmpClient } from "./AmpClient";
3
3
  import { CreateAlertManagerDefinitionCommand, } from "./commands/CreateAlertManagerDefinitionCommand";
4
4
  import { CreateLoggingConfigurationCommand, } from "./commands/CreateLoggingConfigurationCommand";
5
5
  import { CreateRuleGroupsNamespaceCommand, } from "./commands/CreateRuleGroupsNamespaceCommand";
6
+ import { CreateScraperCommand, } from "./commands/CreateScraperCommand";
6
7
  import { CreateWorkspaceCommand, } from "./commands/CreateWorkspaceCommand";
7
8
  import { DeleteAlertManagerDefinitionCommand, } from "./commands/DeleteAlertManagerDefinitionCommand";
8
9
  import { DeleteLoggingConfigurationCommand, } from "./commands/DeleteLoggingConfigurationCommand";
9
10
  import { DeleteRuleGroupsNamespaceCommand, } from "./commands/DeleteRuleGroupsNamespaceCommand";
11
+ import { DeleteScraperCommand, } from "./commands/DeleteScraperCommand";
10
12
  import { DeleteWorkspaceCommand, } from "./commands/DeleteWorkspaceCommand";
11
13
  import { DescribeAlertManagerDefinitionCommand, } from "./commands/DescribeAlertManagerDefinitionCommand";
12
14
  import { DescribeLoggingConfigurationCommand, } from "./commands/DescribeLoggingConfigurationCommand";
13
15
  import { DescribeRuleGroupsNamespaceCommand, } from "./commands/DescribeRuleGroupsNamespaceCommand";
16
+ import { DescribeScraperCommand, } from "./commands/DescribeScraperCommand";
14
17
  import { DescribeWorkspaceCommand, } from "./commands/DescribeWorkspaceCommand";
18
+ import { GetDefaultScraperConfigurationCommand, } from "./commands/GetDefaultScraperConfigurationCommand";
15
19
  import { ListRuleGroupsNamespacesCommand, } from "./commands/ListRuleGroupsNamespacesCommand";
20
+ import { ListScrapersCommand, } from "./commands/ListScrapersCommand";
16
21
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
17
22
  import { ListWorkspacesCommand, } from "./commands/ListWorkspacesCommand";
18
23
  import { PutAlertManagerDefinitionCommand, } from "./commands/PutAlertManagerDefinitionCommand";
@@ -25,16 +30,21 @@ const commands = {
25
30
  CreateAlertManagerDefinitionCommand,
26
31
  CreateLoggingConfigurationCommand,
27
32
  CreateRuleGroupsNamespaceCommand,
33
+ CreateScraperCommand,
28
34
  CreateWorkspaceCommand,
29
35
  DeleteAlertManagerDefinitionCommand,
30
36
  DeleteLoggingConfigurationCommand,
31
37
  DeleteRuleGroupsNamespaceCommand,
38
+ DeleteScraperCommand,
32
39
  DeleteWorkspaceCommand,
33
40
  DescribeAlertManagerDefinitionCommand,
34
41
  DescribeLoggingConfigurationCommand,
35
42
  DescribeRuleGroupsNamespaceCommand,
43
+ DescribeScraperCommand,
36
44
  DescribeWorkspaceCommand,
45
+ GetDefaultScraperConfigurationCommand,
37
46
  ListRuleGroupsNamespacesCommand,
47
+ ListScrapersCommand,
38
48
  ListTagsForResourceCommand,
39
49
  ListWorkspacesCommand,
40
50
  PutAlertManagerDefinitionCommand,
@@ -0,0 +1,47 @@
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_CreateScraperCommand, se_CreateScraperCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class CreateScraperCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, CreateScraperCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "AmpClient";
26
+ const commandName = "CreateScraperCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "AmazonPrometheusService",
35
+ operation: "CreateScraper",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_CreateScraperCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_CreateScraperCommand(output, context);
46
+ }
47
+ }
@@ -0,0 +1,47 @@
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_DeleteScraperCommand, se_DeleteScraperCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class DeleteScraperCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, DeleteScraperCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "AmpClient";
26
+ const commandName = "DeleteScraperCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "AmazonPrometheusService",
35
+ operation: "DeleteScraper",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_DeleteScraperCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_DeleteScraperCommand(output, context);
46
+ }
47
+ }
@@ -0,0 +1,47 @@
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_DescribeScraperCommand, se_DescribeScraperCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class DescribeScraperCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, DescribeScraperCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "AmpClient";
26
+ const commandName = "DescribeScraperCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "AmazonPrometheusService",
35
+ operation: "DescribeScraper",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_DescribeScraperCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_DescribeScraperCommand(output, context);
46
+ }
47
+ }
@@ -0,0 +1,47 @@
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_GetDefaultScraperConfigurationCommand, se_GetDefaultScraperConfigurationCommand, } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class GetDefaultScraperConfigurationCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, GetDefaultScraperConfigurationCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "AmpClient";
26
+ const commandName = "GetDefaultScraperConfigurationCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "AmazonPrometheusService",
35
+ operation: "GetDefaultScraperConfiguration",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_GetDefaultScraperConfigurationCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_GetDefaultScraperConfigurationCommand(output, context);
46
+ }
47
+ }
@@ -0,0 +1,47 @@
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_ListScrapersCommand, se_ListScrapersCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class ListScrapersCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListScrapersCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "AmpClient";
26
+ const commandName = "ListScrapersCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "AmazonPrometheusService",
35
+ operation: "ListScrapers",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_ListScrapersCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_ListScrapersCommand(output, context);
46
+ }
47
+ }
@@ -1,16 +1,21 @@
1
1
  export * from "./CreateAlertManagerDefinitionCommand";
2
2
  export * from "./CreateLoggingConfigurationCommand";
3
3
  export * from "./CreateRuleGroupsNamespaceCommand";
4
+ export * from "./CreateScraperCommand";
4
5
  export * from "./CreateWorkspaceCommand";
5
6
  export * from "./DeleteAlertManagerDefinitionCommand";
6
7
  export * from "./DeleteLoggingConfigurationCommand";
7
8
  export * from "./DeleteRuleGroupsNamespaceCommand";
9
+ export * from "./DeleteScraperCommand";
8
10
  export * from "./DeleteWorkspaceCommand";
9
11
  export * from "./DescribeAlertManagerDefinitionCommand";
10
12
  export * from "./DescribeLoggingConfigurationCommand";
11
13
  export * from "./DescribeRuleGroupsNamespaceCommand";
14
+ export * from "./DescribeScraperCommand";
12
15
  export * from "./DescribeWorkspaceCommand";
16
+ export * from "./GetDefaultScraperConfigurationCommand";
13
17
  export * from "./ListRuleGroupsNamespacesCommand";
18
+ export * from "./ListScrapersCommand";
14
19
  export * from "./ListTagsForResourceCommand";
15
20
  export * from "./ListWorkspacesCommand";
16
21
  export * from "./PutAlertManagerDefinitionCommand";
@@ -113,6 +113,37 @@ export class ValidationException extends __BaseException {
113
113
  this.fieldList = opts.fieldList;
114
114
  }
115
115
  }
116
+ export var Destination;
117
+ (function (Destination) {
118
+ Destination.visit = (value, visitor) => {
119
+ if (value.ampConfiguration !== undefined)
120
+ return visitor.ampConfiguration(value.ampConfiguration);
121
+ return visitor._(value.$unknown[0], value.$unknown[1]);
122
+ };
123
+ })(Destination || (Destination = {}));
124
+ export var ScrapeConfiguration;
125
+ (function (ScrapeConfiguration) {
126
+ ScrapeConfiguration.visit = (value, visitor) => {
127
+ if (value.configurationBlob !== undefined)
128
+ return visitor.configurationBlob(value.configurationBlob);
129
+ return visitor._(value.$unknown[0], value.$unknown[1]);
130
+ };
131
+ })(ScrapeConfiguration || (ScrapeConfiguration = {}));
132
+ export var Source;
133
+ (function (Source) {
134
+ Source.visit = (value, visitor) => {
135
+ if (value.eksConfiguration !== undefined)
136
+ return visitor.eksConfiguration(value.eksConfiguration);
137
+ return visitor._(value.$unknown[0], value.$unknown[1]);
138
+ };
139
+ })(Source || (Source = {}));
140
+ export const ScraperStatusCode = {
141
+ ACTIVE: "ACTIVE",
142
+ CREATING: "CREATING",
143
+ CREATION_FAILED: "CREATION_FAILED",
144
+ DELETING: "DELETING",
145
+ DELETION_FAILED: "DELETION_FAILED",
146
+ };
116
147
  export const WorkspaceStatusCode = {
117
148
  ACTIVE: "ACTIVE",
118
149
  CREATING: "CREATING",
@@ -0,0 +1,25 @@
1
+ import { AmpClient } from "../AmpClient";
2
+ import { ListScrapersCommand, } from "../commands/ListScrapersCommand";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new ListScrapersCommand(input), ...args);
5
+ };
6
+ export async function* paginateListScrapers(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ input["maxResults"] = config.pageSize;
13
+ if (config.client instanceof AmpClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected Amp | AmpClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.nextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -1,3 +1,4 @@
1
1
  export * from "./Interfaces";
2
2
  export * from "./ListRuleGroupsNamespacesPaginator";
3
+ export * from "./ListScrapersPaginator";
3
4
  export * from "./ListWorkspacesPaginator";