@scaleway/sdk-cockpit 2.2.0 → 2.2.2

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,7 +1,9 @@
1
1
  import { GlobalAPI, RegionalAPI } from "./api.gen.js";
2
- import { marshalGlobalApiCreateGrafanaUserRequest, marshalGlobalApiResetGrafanaUserPasswordRequest, marshalGlobalApiSelectPlanRequest, marshalGlobalApiSyncGrafanaDataSourcesRequest, marshalRegionalApiCreateContactPointRequest, marshalRegionalApiCreateDataSourceRequest, marshalRegionalApiCreateTokenRequest, marshalRegionalApiDeleteContactPointRequest, marshalRegionalApiDisableAlertManagerRequest, marshalRegionalApiDisableAlertRulesRequest, marshalRegionalApiDisableManagedAlertsRequest, marshalRegionalApiEnableAlertManagerRequest, marshalRegionalApiEnableAlertRulesRequest, marshalRegionalApiEnableManagedAlertsRequest, marshalRegionalApiTriggerTestAlertRequest, marshalRegionalApiUpdateContactPointRequest, marshalRegionalApiUpdateDataSourceRequest, unmarshalAlertManager, unmarshalContactPoint, unmarshalDataSource, unmarshalDisableAlertRulesResponse, unmarshalEnableAlertRulesResponse, unmarshalGetConfigResponse, unmarshalGetRulesCountResponse, unmarshalGrafana, unmarshalGrafanaProductDashboard, unmarshalGrafanaUser, unmarshalListAlertsResponse, unmarshalListContactPointsResponse, unmarshalListDataSourcesResponse, unmarshalListGrafanaProductDashboardsResponse, unmarshalListGrafanaUsersResponse, unmarshalListPlansResponse, unmarshalListProductsResponse, unmarshalListTokensResponse, unmarshalPlan, unmarshalToken, unmarshalUsageOverview } from "./marshalling.gen.js";
2
+ import { EXPORTER_TRANSIENT_STATUSES } from "./content.gen.js";
3
+ import { marshalGlobalApiCreateGrafanaUserRequest, marshalGlobalApiResetGrafanaUserPasswordRequest, marshalGlobalApiSelectPlanRequest, marshalGlobalApiSyncGrafanaDataSourcesRequest, marshalRegionalApiCreateContactPointRequest, marshalRegionalApiCreateDataSourceRequest, marshalRegionalApiCreateExporterRequest, marshalRegionalApiCreateTokenRequest, marshalRegionalApiDeleteContactPointRequest, marshalRegionalApiDisableAlertManagerRequest, marshalRegionalApiDisableAlertRulesRequest, marshalRegionalApiDisableManagedAlertsRequest, marshalRegionalApiEnableAlertManagerRequest, marshalRegionalApiEnableAlertRulesRequest, marshalRegionalApiEnableManagedAlertsRequest, marshalRegionalApiTriggerTestAlertRequest, marshalRegionalApiUpdateContactPointRequest, marshalRegionalApiUpdateDataSourceRequest, marshalRegionalApiUpdateExporterRequest, unmarshalAlertManager, unmarshalContactPoint, unmarshalDataSource, unmarshalDisableAlertRulesResponse, unmarshalEnableAlertRulesResponse, unmarshalExporter, unmarshalGetConfigResponse, unmarshalGetRulesCountResponse, unmarshalGrafana, unmarshalGrafanaProductDashboard, unmarshalGrafanaUser, unmarshalListAlertsResponse, unmarshalListContactPointsResponse, unmarshalListDataSourcesResponse, unmarshalListExportersResponse, unmarshalListGrafanaProductDashboardsResponse, unmarshalListGrafanaUsersResponse, unmarshalListPlansResponse, unmarshalListProductsResponse, unmarshalListTokensResponse, unmarshalPlan, unmarshalToken, unmarshalUsageOverview } from "./marshalling.gen.js";
3
4
  import * as validationRules_gen from "./validation-rules.gen.js";
4
5
  export {
6
+ EXPORTER_TRANSIENT_STATUSES,
5
7
  GlobalAPI,
6
8
  RegionalAPI,
7
9
  validationRules_gen as ValidationRules,
@@ -11,6 +13,7 @@ export {
11
13
  marshalGlobalApiSyncGrafanaDataSourcesRequest,
12
14
  marshalRegionalApiCreateContactPointRequest,
13
15
  marshalRegionalApiCreateDataSourceRequest,
16
+ marshalRegionalApiCreateExporterRequest,
14
17
  marshalRegionalApiCreateTokenRequest,
15
18
  marshalRegionalApiDeleteContactPointRequest,
16
19
  marshalRegionalApiDisableAlertManagerRequest,
@@ -22,11 +25,13 @@ export {
22
25
  marshalRegionalApiTriggerTestAlertRequest,
23
26
  marshalRegionalApiUpdateContactPointRequest,
24
27
  marshalRegionalApiUpdateDataSourceRequest,
28
+ marshalRegionalApiUpdateExporterRequest,
25
29
  unmarshalAlertManager,
26
30
  unmarshalContactPoint,
27
31
  unmarshalDataSource,
28
32
  unmarshalDisableAlertRulesResponse,
29
33
  unmarshalEnableAlertRulesResponse,
34
+ unmarshalExporter,
30
35
  unmarshalGetConfigResponse,
31
36
  unmarshalGetRulesCountResponse,
32
37
  unmarshalGrafana,
@@ -35,6 +40,7 @@ export {
35
40
  unmarshalListAlertsResponse,
36
41
  unmarshalListContactPointsResponse,
37
42
  unmarshalListDataSourcesResponse,
43
+ unmarshalListExportersResponse,
38
44
  unmarshalListGrafanaProductDashboardsResponse,
39
45
  unmarshalListGrafanaUsersResponse,
40
46
  unmarshalListPlansResponse,
@@ -1,7 +1,8 @@
1
1
  import type { DefaultValues } from '@scaleway/sdk-client';
2
- import type { AlertManager, ContactPoint, DataSource, DisableAlertRulesResponse, EnableAlertRulesResponse, GetConfigResponse, GetRulesCountResponse, GlobalApiCreateGrafanaUserRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, ListAlertsResponse, ListContactPointsResponse, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersResponse, ListPlansResponse, ListProductsResponse, ListTokensResponse, Plan, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableAlertRulesRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableAlertRulesRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiTriggerTestAlertRequest, RegionalApiUpdateContactPointRequest, RegionalApiUpdateDataSourceRequest, Token, UsageOverview } from './types.gen.js';
2
+ import type { AlertManager, ContactPoint, DataSource, DisableAlertRulesResponse, EnableAlertRulesResponse, Exporter, GetConfigResponse, GetRulesCountResponse, GlobalApiCreateGrafanaUserRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, ListAlertsResponse, ListContactPointsResponse, ListDataSourcesResponse, ListExportersResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersResponse, ListPlansResponse, ListProductsResponse, ListTokensResponse, Plan, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateExporterRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableAlertRulesRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableAlertRulesRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiTriggerTestAlertRequest, RegionalApiUpdateContactPointRequest, RegionalApiUpdateDataSourceRequest, RegionalApiUpdateExporterRequest, Token, UsageOverview } from './types.gen.js';
3
3
  export declare const unmarshalContactPoint: (data: unknown) => ContactPoint;
4
4
  export declare const unmarshalDataSource: (data: unknown) => DataSource;
5
+ export declare const unmarshalExporter: (data: unknown) => Exporter;
5
6
  export declare const unmarshalGrafanaProductDashboard: (data: unknown) => GrafanaProductDashboard;
6
7
  export declare const unmarshalGrafanaUser: (data: unknown) => GrafanaUser;
7
8
  export declare const unmarshalPlan: (data: unknown) => Plan;
@@ -15,6 +16,7 @@ export declare const unmarshalGrafana: (data: unknown) => Grafana;
15
16
  export declare const unmarshalListAlertsResponse: (data: unknown) => ListAlertsResponse;
16
17
  export declare const unmarshalListContactPointsResponse: (data: unknown) => ListContactPointsResponse;
17
18
  export declare const unmarshalListDataSourcesResponse: (data: unknown) => ListDataSourcesResponse;
19
+ export declare const unmarshalListExportersResponse: (data: unknown) => ListExportersResponse;
18
20
  export declare const unmarshalListGrafanaProductDashboardsResponse: (data: unknown) => ListGrafanaProductDashboardsResponse;
19
21
  export declare const unmarshalListGrafanaUsersResponse: (data: unknown) => ListGrafanaUsersResponse;
20
22
  export declare const unmarshalListPlansResponse: (data: unknown) => ListPlansResponse;
@@ -27,6 +29,7 @@ export declare const marshalGlobalApiSelectPlanRequest: (request: GlobalApiSelec
27
29
  export declare const marshalGlobalApiSyncGrafanaDataSourcesRequest: (request: GlobalApiSyncGrafanaDataSourcesRequest, defaults: DefaultValues) => Record<string, unknown>;
28
30
  export declare const marshalRegionalApiCreateContactPointRequest: (request: RegionalApiCreateContactPointRequest, defaults: DefaultValues) => Record<string, unknown>;
29
31
  export declare const marshalRegionalApiCreateDataSourceRequest: (request: RegionalApiCreateDataSourceRequest, defaults: DefaultValues) => Record<string, unknown>;
32
+ export declare const marshalRegionalApiCreateExporterRequest: (request: RegionalApiCreateExporterRequest, defaults: DefaultValues) => Record<string, unknown>;
30
33
  export declare const marshalRegionalApiCreateTokenRequest: (request: RegionalApiCreateTokenRequest, defaults: DefaultValues) => Record<string, unknown>;
31
34
  export declare const marshalRegionalApiDeleteContactPointRequest: (request: RegionalApiDeleteContactPointRequest, defaults: DefaultValues) => Record<string, unknown>;
32
35
  export declare const marshalRegionalApiDisableAlertManagerRequest: (request: RegionalApiDisableAlertManagerRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -38,3 +41,4 @@ export declare const marshalRegionalApiEnableManagedAlertsRequest: (request: Reg
38
41
  export declare const marshalRegionalApiTriggerTestAlertRequest: (request: RegionalApiTriggerTestAlertRequest, defaults: DefaultValues) => Record<string, unknown>;
39
42
  export declare const marshalRegionalApiUpdateContactPointRequest: (request: RegionalApiUpdateContactPointRequest, defaults: DefaultValues) => Record<string, unknown>;
40
43
  export declare const marshalRegionalApiUpdateDataSourceRequest: (request: RegionalApiUpdateDataSourceRequest, defaults: DefaultValues) => Record<string, unknown>;
44
+ export declare const marshalRegionalApiUpdateExporterRequest: (request: RegionalApiUpdateExporterRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -42,6 +42,47 @@ const unmarshalDataSource = (data) => {
42
42
  url: data.url
43
43
  };
44
44
  };
45
+ const unmarshalExporterDatadogDestination = (data) => {
46
+ if (!isJSONObject(data)) {
47
+ throw new TypeError(
48
+ `Unmarshalling the type 'ExporterDatadogDestination' failed as data isn't a dictionary.`
49
+ );
50
+ }
51
+ return {
52
+ apiKey: data.api_key,
53
+ endpoint: data.endpoint
54
+ };
55
+ };
56
+ const unmarshalExporterOTLPDestination = (data) => {
57
+ if (!isJSONObject(data)) {
58
+ throw new TypeError(
59
+ `Unmarshalling the type 'ExporterOTLPDestination' failed as data isn't a dictionary.`
60
+ );
61
+ }
62
+ return {
63
+ endpoint: data.endpoint,
64
+ headers: data.headers
65
+ };
66
+ };
67
+ const unmarshalExporter = (data) => {
68
+ if (!isJSONObject(data)) {
69
+ throw new TypeError(
70
+ `Unmarshalling the type 'Exporter' failed as data isn't a dictionary.`
71
+ );
72
+ }
73
+ return {
74
+ createdAt: unmarshalDate(data.created_at),
75
+ datadogDestination: data.datadog_destination ? unmarshalExporterDatadogDestination(data.datadog_destination) : void 0,
76
+ datasourceId: data.datasource_id,
77
+ description: data.description,
78
+ exportedProducts: data.exported_products,
79
+ id: data.id,
80
+ name: data.name,
81
+ otlpDestination: data.otlp_destination ? unmarshalExporterOTLPDestination(data.otlp_destination) : void 0,
82
+ status: data.status,
83
+ updatedAt: unmarshalDate(data.updated_at)
84
+ };
85
+ };
45
86
  const unmarshalGrafanaProductDashboard = (data) => {
46
87
  if (!isJSONObject(data)) {
47
88
  throw new TypeError(
@@ -183,10 +224,7 @@ const unmarshalGetRulesCountResponse = (data) => {
183
224
  return {
184
225
  customRulesCount: data.custom_rules_count,
185
226
  preconfiguredRulesCount: data.preconfigured_rules_count,
186
- rulesCountByDatasource: unmarshalArrayOfObject(
187
- data.rules_count_by_datasource,
188
- unmarshalRulesCount
189
- )
227
+ rulesCountByDatasource: unmarshalArrayOfObject(data.rules_count_by_datasource, unmarshalRulesCount)
190
228
  };
191
229
  };
192
230
  const unmarshalGrafana = (data) => {
@@ -250,10 +288,7 @@ const unmarshalListContactPointsResponse = (data) => {
250
288
  );
251
289
  }
252
290
  return {
253
- contactPoints: unmarshalArrayOfObject(
254
- data.contact_points,
255
- unmarshalContactPoint
256
- ),
291
+ contactPoints: unmarshalArrayOfObject(data.contact_points, unmarshalContactPoint),
257
292
  hasAdditionalContactPoints: data.has_additional_contact_points,
258
293
  hasAdditionalReceivers: data.has_additional_receivers,
259
294
  totalCount: data.total_count
@@ -270,6 +305,17 @@ const unmarshalListDataSourcesResponse = (data) => {
270
305
  totalCount: data.total_count
271
306
  };
272
307
  };
308
+ const unmarshalListExportersResponse = (data) => {
309
+ if (!isJSONObject(data)) {
310
+ throw new TypeError(
311
+ `Unmarshalling the type 'ListExportersResponse' failed as data isn't a dictionary.`
312
+ );
313
+ }
314
+ return {
315
+ exporters: unmarshalArrayOfObject(data.exporters, unmarshalExporter),
316
+ totalCount: data.total_count
317
+ };
318
+ };
273
319
  const unmarshalListGrafanaProductDashboardsResponse = (data) => {
274
320
  if (!isJSONObject(data)) {
275
321
  throw new TypeError(
@@ -277,10 +323,7 @@ const unmarshalListGrafanaProductDashboardsResponse = (data) => {
277
323
  );
278
324
  }
279
325
  return {
280
- dashboards: unmarshalArrayOfObject(
281
- data.dashboards,
282
- unmarshalGrafanaProductDashboard
283
- ),
326
+ dashboards: unmarshalArrayOfObject(data.dashboards, unmarshalGrafanaProductDashboard),
284
327
  totalCount: data.total_count
285
328
  };
286
329
  };
@@ -291,10 +334,7 @@ const unmarshalListGrafanaUsersResponse = (data) => {
291
334
  );
292
335
  }
293
336
  return {
294
- grafanaUsers: unmarshalArrayOfObject(
295
- data.grafana_users,
296
- unmarshalGrafanaUser
297
- ),
337
+ grafanaUsers: unmarshalArrayOfObject(data.grafana_users, unmarshalGrafanaUser),
298
338
  totalCount: data.total_count
299
339
  };
300
340
  };
@@ -409,6 +449,30 @@ const marshalRegionalApiCreateDataSourceRequest = (request, defaults) => ({
409
449
  retention_days: request.retentionDays,
410
450
  type: request.type
411
451
  });
452
+ const marshalExporterDatadogDestination = (request, defaults) => ({
453
+ api_key: request.apiKey,
454
+ endpoint: request.endpoint
455
+ });
456
+ const marshalExporterOTLPDestination = (request, defaults) => ({
457
+ endpoint: request.endpoint,
458
+ headers: request.headers
459
+ });
460
+ const marshalRegionalApiCreateExporterRequest = (request, defaults) => ({
461
+ datasource_id: request.datasourceId,
462
+ description: request.description,
463
+ exported_products: request.exportedProducts,
464
+ name: request.name,
465
+ ...resolveOneOf([
466
+ {
467
+ param: "datadog_destination",
468
+ value: request.datadogDestination !== void 0 ? marshalExporterDatadogDestination(request.datadogDestination) : void 0
469
+ },
470
+ {
471
+ param: "otlp_destination",
472
+ value: request.otlpDestination !== void 0 ? marshalExporterOTLPDestination(request.otlpDestination) : void 0
473
+ }
474
+ ])
475
+ });
412
476
  const marshalRegionalApiCreateTokenRequest = (request, defaults) => ({
413
477
  name: request.name,
414
478
  project_id: request.projectId ?? defaults.defaultProjectId,
@@ -460,6 +524,21 @@ const marshalRegionalApiUpdateDataSourceRequest = (request, defaults) => ({
460
524
  name: request.name,
461
525
  retention_days: request.retentionDays
462
526
  });
527
+ const marshalRegionalApiUpdateExporterRequest = (request, defaults) => ({
528
+ description: request.description,
529
+ exported_products: request.exportedProducts,
530
+ name: request.name,
531
+ ...resolveOneOf([
532
+ {
533
+ param: "datadog_destination",
534
+ value: request.datadogDestination !== void 0 ? marshalExporterDatadogDestination(request.datadogDestination) : void 0
535
+ },
536
+ {
537
+ param: "otlp_destination",
538
+ value: request.otlpDestination !== void 0 ? marshalExporterOTLPDestination(request.otlpDestination) : void 0
539
+ }
540
+ ])
541
+ });
463
542
  export {
464
543
  marshalGlobalApiCreateGrafanaUserRequest,
465
544
  marshalGlobalApiResetGrafanaUserPasswordRequest,
@@ -467,6 +546,7 @@ export {
467
546
  marshalGlobalApiSyncGrafanaDataSourcesRequest,
468
547
  marshalRegionalApiCreateContactPointRequest,
469
548
  marshalRegionalApiCreateDataSourceRequest,
549
+ marshalRegionalApiCreateExporterRequest,
470
550
  marshalRegionalApiCreateTokenRequest,
471
551
  marshalRegionalApiDeleteContactPointRequest,
472
552
  marshalRegionalApiDisableAlertManagerRequest,
@@ -478,11 +558,13 @@ export {
478
558
  marshalRegionalApiTriggerTestAlertRequest,
479
559
  marshalRegionalApiUpdateContactPointRequest,
480
560
  marshalRegionalApiUpdateDataSourceRequest,
561
+ marshalRegionalApiUpdateExporterRequest,
481
562
  unmarshalAlertManager,
482
563
  unmarshalContactPoint,
483
564
  unmarshalDataSource,
484
565
  unmarshalDisableAlertRulesResponse,
485
566
  unmarshalEnableAlertRulesResponse,
567
+ unmarshalExporter,
486
568
  unmarshalGetConfigResponse,
487
569
  unmarshalGetRulesCountResponse,
488
570
  unmarshalGrafana,
@@ -491,6 +573,7 @@ export {
491
573
  unmarshalListAlertsResponse,
492
574
  unmarshalListContactPointsResponse,
493
575
  unmarshalListDataSourcesResponse,
576
+ unmarshalListExportersResponse,
494
577
  unmarshalListGrafanaProductDashboardsResponse,
495
578
  unmarshalListGrafanaUsersResponse,
496
579
  unmarshalListPlansResponse,
@@ -3,8 +3,10 @@ export type AlertState = 'unknown_state' | 'inactive' | 'pending' | 'firing';
3
3
  export type AlertStatus = 'unknown_status' | 'enabled' | 'disabled' | 'enabling' | 'disabling';
4
4
  export type DataSourceOrigin = 'unknown_origin' | 'scaleway' | 'external' | 'custom';
5
5
  export type DataSourceType = 'unknown_type' | 'metrics' | 'logs' | 'traces';
6
+ export type ExporterStatus = 'unknown_status' | 'creating' | 'ready' | 'error';
6
7
  export type GrafanaUserRole = 'unknown_role' | 'editor' | 'viewer';
7
8
  export type ListDataSourcesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'type_asc' | 'type_desc';
9
+ export type ListExportersRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
8
10
  export type ListGrafanaUsersRequestOrderBy = 'login_asc' | 'login_desc';
9
11
  export type ListPlansRequestOrderBy = 'name_asc' | 'name_desc';
10
12
  export type ListProductsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'display_name_asc' | 'display_name_desc' | 'family_name_asc' | 'family_name_desc';
@@ -40,6 +42,14 @@ export interface PreconfiguredAlertData {
40
42
  export interface ContactPointEmail {
41
43
  to: string;
42
44
  }
45
+ export interface ExporterDatadogDestination {
46
+ apiKey?: string;
47
+ endpoint?: string;
48
+ }
49
+ export interface ExporterOTLPDestination {
50
+ endpoint: string;
51
+ headers: Record<string, string>;
52
+ }
43
53
  export interface GetConfigResponseRetention {
44
54
  minDays: number;
45
55
  maxDays: number;
@@ -176,6 +186,55 @@ export interface DataSource {
176
186
  */
177
187
  currentMonthUsage?: number;
178
188
  }
189
+ /**
190
+ * Data exporter.
191
+ */
192
+ export interface Exporter {
193
+ /**
194
+ * ID of the data export.
195
+ */
196
+ id: string;
197
+ /**
198
+ * Name of the data export.
199
+ */
200
+ name: string;
201
+ /**
202
+ * Description of the data export.
203
+ */
204
+ description: string;
205
+ /**
206
+ * ID of the data source linked to the data export.
207
+ */
208
+ datasourceId: string;
209
+ /**
210
+ * Datadog destination configuration for the data export.
211
+ *
212
+ * One-of ('destination'): at most one of 'datadogDestination', 'otlpDestination' could be set.
213
+ */
214
+ datadogDestination?: ExporterDatadogDestination;
215
+ /**
216
+ * OTLP destination configuration for the data export.
217
+ *
218
+ * One-of ('destination'): at most one of 'datadogDestination', 'otlpDestination' could be set.
219
+ */
220
+ otlpDestination?: ExporterOTLPDestination;
221
+ /**
222
+ * Status of the data export.
223
+ */
224
+ status: ExporterStatus;
225
+ /**
226
+ * List of Scaleway products name exported by the data export.
227
+ */
228
+ exportedProducts: string[];
229
+ /**
230
+ * A timestamp of the creation date of the data export.
231
+ */
232
+ createdAt?: Date;
233
+ /**
234
+ * A timestamp of the last update date of the data export.
235
+ */
236
+ updatedAt?: Date;
237
+ }
179
238
  /**
180
239
  * Grafana dashboard.
181
240
  */
@@ -625,6 +684,19 @@ export interface ListDataSourcesResponse {
625
684
  */
626
685
  dataSources: DataSource[];
627
686
  }
687
+ /**
688
+ * Response returned when listing data exports.
689
+ */
690
+ export interface ListExportersResponse {
691
+ /**
692
+ * Total count of data exports matching the request.
693
+ */
694
+ totalCount: number;
695
+ /**
696
+ * Data exports matching the request within the pagination.
697
+ */
698
+ exporters: Exporter[];
699
+ }
628
700
  /**
629
701
  * Output returned when listing dashboards.
630
702
  */
@@ -723,12 +795,50 @@ export type RegionalApiCreateDataSourceRequest = {
723
795
  /**
724
796
  * Data source type.
725
797
  */
726
- type?: DataSourceType;
798
+ type: DataSourceType;
727
799
  /**
728
800
  * Default values are 31 days for metrics, 7 days for logs and traces.
729
801
  */
730
802
  retentionDays?: number;
731
803
  };
804
+ /**
805
+ * Create a data export.
806
+ */
807
+ export type RegionalApiCreateExporterRequest = {
808
+ /**
809
+ * Region to target. If none is passed will use default region from the config.
810
+ */
811
+ region?: ScwRegion;
812
+ /**
813
+ * ID of the data source linked to the data export.
814
+ */
815
+ datasourceId: string;
816
+ /**
817
+ * Datadog destination configuration for the data export.
818
+ *
819
+ * One-of ('destination'): at most one of 'datadogDestination', 'otlpDestination' could be set.
820
+ */
821
+ datadogDestination?: ExporterDatadogDestination;
822
+ /**
823
+ * OTLP destination configuration for the data export.
824
+ *
825
+ * One-of ('destination'): at most one of 'datadogDestination', 'otlpDestination' could be set.
826
+ */
827
+ otlpDestination?: ExporterOTLPDestination;
828
+ /**
829
+ * To include all products in your data export, you can use an array containing "all"
830
+ You can retrieve the complete list of product names using the `ListProducts` endpoint.
831
+ */
832
+ exportedProducts: string[];
833
+ /**
834
+ * Name of the data export.
835
+ */
836
+ name: string;
837
+ /**
838
+ * Description of the data export.
839
+ */
840
+ description?: string;
841
+ };
732
842
  /**
733
843
  * Create a token.
734
844
  */
@@ -782,6 +892,19 @@ export type RegionalApiDeleteDataSourceRequest = {
782
892
  */
783
893
  dataSourceId: string;
784
894
  };
895
+ /**
896
+ * Delete a data export.
897
+ */
898
+ export type RegionalApiDeleteExporterRequest = {
899
+ /**
900
+ * Region to target. If none is passed will use default region from the config.
901
+ */
902
+ region?: ScwRegion;
903
+ /**
904
+ * ID of the data export to update.
905
+ */
906
+ exporterId: string;
907
+ };
785
908
  /**
786
909
  * Delete a token.
787
910
  */
@@ -910,6 +1033,19 @@ export type RegionalApiGetDataSourceRequest = {
910
1033
  */
911
1034
  dataSourceId: string;
912
1035
  };
1036
+ /**
1037
+ * Retrieve a specific data export.
1038
+ */
1039
+ export type RegionalApiGetExporterRequest = {
1040
+ /**
1041
+ * Region to target. If none is passed will use default region from the config.
1042
+ */
1043
+ region?: ScwRegion;
1044
+ /**
1045
+ * ID of the data export to retrieve.
1046
+ */
1047
+ exporterId: string;
1048
+ };
913
1049
  export type RegionalApiGetRulesCountRequest = {
914
1050
  /**
915
1051
  * Region to target. If none is passed will use default region from the config.
@@ -978,6 +1114,10 @@ export type RegionalApiListContactPointsRequest = {
978
1114
  * Region to target. If none is passed will use default region from the config.
979
1115
  */
980
1116
  region?: ScwRegion;
1117
+ /**
1118
+ * ID of the Project containing the contact points to list.
1119
+ */
1120
+ projectId?: string;
981
1121
  /**
982
1122
  * Page number to return, from the paginated results.
983
1123
  */
@@ -986,10 +1126,6 @@ export type RegionalApiListContactPointsRequest = {
986
1126
  * Total count of contact points to return per page.
987
1127
  */
988
1128
  pageSize?: number;
989
- /**
990
- * ID of the Project containing the contact points to list.
991
- */
992
- projectId?: string;
993
1129
  };
994
1130
  /**
995
1131
  * List data sources.
@@ -999,6 +1135,18 @@ export type RegionalApiListDataSourcesRequest = {
999
1135
  * Region to target. If none is passed will use default region from the config.
1000
1136
  */
1001
1137
  region?: ScwRegion;
1138
+ /**
1139
+ * Project ID to filter for, only data sources from this Project will be returned.
1140
+ */
1141
+ projectId?: string;
1142
+ /**
1143
+ * Origin to filter for, only data sources with matching origin will be returned. If omitted, all types will be returned.
1144
+ */
1145
+ origin?: DataSourceOrigin;
1146
+ /**
1147
+ * Types to filter for (metrics, logs, traces), only data sources with matching types will be returned. If omitted, all types will be returned.
1148
+ */
1149
+ types?: DataSourceType[];
1002
1150
  /**
1003
1151
  * Page number to return, from the paginated results.
1004
1152
  */
@@ -1011,18 +1159,35 @@ export type RegionalApiListDataSourcesRequest = {
1011
1159
  * Sort order for data sources in the response.
1012
1160
  */
1013
1161
  orderBy?: ListDataSourcesRequestOrderBy;
1162
+ };
1163
+ /**
1164
+ * List all data exports.
1165
+ */
1166
+ export type RegionalApiListExportersRequest = {
1014
1167
  /**
1015
- * Project ID to filter for, only data sources from this Project will be returned.
1168
+ * Region to target. If none is passed will use default region from the config.
1169
+ */
1170
+ region?: ScwRegion;
1171
+ /**
1172
+ * Project ID to filter for. Only data exports from this Project will be returned.
1016
1173
  */
1017
1174
  projectId?: string;
1018
1175
  /**
1019
- * Origin to filter for, only data sources with matching origin will be returned. If omitted, all types will be returned.
1176
+ * Data source ID to filter for. Only data exports linked to this data source will be returned.
1020
1177
  */
1021
- origin?: DataSourceOrigin;
1178
+ datasourceId?: string;
1022
1179
  /**
1023
- * Types to filter for (metrics, logs, traces), only data sources with matching types will be returned. If omitted, all types will be returned.
1180
+ * Page number to return from the paginated results.
1024
1181
  */
1025
- types?: DataSourceType[];
1182
+ page?: number;
1183
+ /**
1184
+ * Number of data exports to return per page.
1185
+ */
1186
+ pageSize?: number;
1187
+ /**
1188
+ * Sort order for data exports in the response.
1189
+ */
1190
+ orderBy?: ListExportersRequestOrderBy;
1026
1191
  };
1027
1192
  /**
1028
1193
  * List all Scaleway products that send metrics and/or logs to Cockpit.
@@ -1053,6 +1218,14 @@ export type RegionalApiListTokensRequest = {
1053
1218
  * Region to target. If none is passed will use default region from the config.
1054
1219
  */
1055
1220
  region?: ScwRegion;
1221
+ /**
1222
+ * ID of the Project the tokens belong to.
1223
+ */
1224
+ projectId?: string;
1225
+ /**
1226
+ * Token scopes to filter for.
1227
+ */
1228
+ tokenScopes?: TokenScope[];
1056
1229
  /**
1057
1230
  * Page number to return, from the paginated results.
1058
1231
  */
@@ -1065,14 +1238,6 @@ export type RegionalApiListTokensRequest = {
1065
1238
  * Order in which to return results.
1066
1239
  */
1067
1240
  orderBy?: ListTokensRequestOrderBy;
1068
- /**
1069
- * ID of the Project the tokens belong to.
1070
- */
1071
- projectId?: string;
1072
- /**
1073
- * Token scopes to filter for.
1074
- */
1075
- tokenScopes?: TokenScope[];
1076
1241
  };
1077
1242
  /**
1078
1243
  * Request to trigger a test alert.
@@ -1131,6 +1296,44 @@ export type RegionalApiUpdateDataSourceRequest = {
1131
1296
  */
1132
1297
  retentionDays?: number;
1133
1298
  };
1299
+ /**
1300
+ * Update an existing data export.
1301
+ */
1302
+ export type RegionalApiUpdateExporterRequest = {
1303
+ /**
1304
+ * Region to target. If none is passed will use default region from the config.
1305
+ */
1306
+ region?: ScwRegion;
1307
+ /**
1308
+ * ID of the data export to update.
1309
+ */
1310
+ exporterId: string;
1311
+ /**
1312
+ * Updated Datadog destination configuration for the data export.
1313
+ *
1314
+ * One-of ('destination'): at most one of 'datadogDestination', 'otlpDestination' could be set.
1315
+ */
1316
+ datadogDestination?: ExporterDatadogDestination;
1317
+ /**
1318
+ * Updated OTLP destination configuration for the data export.
1319
+ *
1320
+ * One-of ('destination'): at most one of 'datadogDestination', 'otlpDestination' could be set.
1321
+ */
1322
+ otlpDestination?: ExporterOTLPDestination;
1323
+ /**
1324
+ * Updated name of the data export.
1325
+ */
1326
+ name?: string;
1327
+ /**
1328
+ * Updated description of the data export.
1329
+ */
1330
+ description?: string;
1331
+ /**
1332
+ * To include all products in your data export, you can use an array containing "all"
1333
+ You can retrieve the complete list of product names using the `ListProducts` endpoint.
1334
+ */
1335
+ exportedProducts?: string[];
1336
+ };
1134
1337
  export interface UsageOverview {
1135
1338
  scalewayMetricsUsage?: Usage;
1136
1339
  scalewayLogsUsage?: Usage;
@@ -10,6 +10,15 @@ export declare const RegionalApiCreateDataSourceRequest: {
10
10
  lessThanOrEqual: number;
11
11
  };
12
12
  };
13
+ export declare const RegionalApiCreateExporterRequest: {
14
+ description: {
15
+ maxLength: number;
16
+ };
17
+ name: {
18
+ maxLength: number;
19
+ minLength: number;
20
+ };
21
+ };
13
22
  export declare const RegionalApiCreateTokenRequest: {
14
23
  name: {
15
24
  maxLength: number;
@@ -35,6 +44,16 @@ export declare const RegionalApiListDataSourcesRequest: {
35
44
  lessThanOrEqual: number;
36
45
  };
37
46
  };
47
+ export declare const RegionalApiListExportersRequest: {
48
+ page: {
49
+ greaterThanOrEqual: number;
50
+ lessThanOrEqual: number;
51
+ };
52
+ pageSize: {
53
+ greaterThanOrEqual: number;
54
+ lessThanOrEqual: number;
55
+ };
56
+ };
38
57
  export declare const RegionalApiListProductsRequest: {
39
58
  page: {
40
59
  greaterThanOrEqual: number;
@@ -67,3 +86,12 @@ export declare const RegionalApiUpdateDataSourceRequest: {
67
86
  lessThanOrEqual: number;
68
87
  };
69
88
  };
89
+ export declare const RegionalApiUpdateExporterRequest: {
90
+ description: {
91
+ maxLength: number;
92
+ };
93
+ name: {
94
+ maxLength: number;
95
+ minLength: number;
96
+ };
97
+ };