Skip to content

Commit 58b9e78

Browse files
committed
feat: update generated APIs
1 parent 8768d24 commit 58b9e78

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

packages_generated/cockpit/src/v1/api.gen.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import {
66
urlParams,
77
validatePathParam,
88
} from '@scaleway/sdk-client'
9-
import type { Region as ScwRegion } from '@scaleway/sdk-client'
9+
import type { ApiLocality } from '../types/locality'
10+
import { toApiLocality } from '../types/locality'
1011
import {
1112
marshalGlobalApiCreateGrafanaUserRequest,
1213
marshalGlobalApiResetGrafanaUserPasswordRequest,
@@ -386,12 +387,13 @@ Deprecated: retention is now managed at the data source level.
386387
The Cockpit API allows you to create data sources and Cockpit tokens to store and query data types such as metrics, logs, and traces. You can also push your data into Cockpit, and send alerts to your contact points when your resources may require your attention, using the regional Alert manager.
387388
*/
388389
export class RegionalAPI extends ParentAPI {
389-
/** Lists the available regions of the API. */
390-
public static readonly LOCALITIES: ScwRegion[] = [
391-
'fr-par',
392-
'nl-ams',
393-
'pl-waw',
394-
]
390+
/**
391+
* Locality of this API.
392+
* type ∈ {'zone','region','global','unspecified'}
393+
*/
394+
public static readonly LOCALITY: ApiLocality = toApiLocality({
395+
regions: ['fr-par', 'nl-ams', 'pl-waw'],
396+
})
395397

396398
/**
397399
* Get the Cockpit configuration.
@@ -409,10 +411,7 @@ export class RegionalAPI extends ParentAPI {
409411
)
410412

411413
/**
412-
* Create a data source. You must specify the data source type upon creation. Available data source types include:
413-
- metrics
414-
- logs
415-
- traces
414+
* Create a data source. You must specify the data source name and type (metrics, logs, traces) upon creation.
416415
The name of the data source will then be used as reference to name the associated Grafana data source.
417416
*
418417
* @param request - The request {@link RegionalApiCreateDataSourceRequest}
@@ -450,7 +449,7 @@ The name of the data source will then be used as reference to name the associate
450449
)
451450

452451
/**
453-
* Delete a data source. Delete a given data source, specified by the data source ID. Note that deleting a data source is irreversible, and cannot be undone.
452+
* Delete a data source. Delete a given data source. Note that this action will permanently delete this data source and any data associated with it.
454453
*
455454
* @param request - The request {@link RegionalApiDeleteDataSourceRequest}
456455
*/
@@ -487,7 +486,6 @@ The name of the data source will then be used as reference to name the associate
487486

488487
/**
489488
* List data sources. Retrieve the list of data sources available in the specified region. By default, the data sources returned in the list are ordered by creation date, in ascending order.
490-
You can list data sources by Project, type and origin.
491489
*
492490
* @param request - The request {@link RegionalApiListDataSourcesRequest}
493491
* @returns A Promise of ListDataSourcesResponse
@@ -497,7 +495,7 @@ You can list data sources by Project, type and origin.
497495
) => enrichForPagination('dataSources', this.pageOfListDataSources, request)
498496

499497
/**
500-
* Update a data source. Update a given data source name, specified by the data source ID.
498+
* Update a data source. Update a given data source attributes (name and/or retention_days).
501499
*
502500
* @param request - The request {@link RegionalApiUpdateDataSourceRequest}
503501
* @returns A Promise of DataSource
@@ -519,7 +517,7 @@ You can list data sources by Project, type and origin.
519517
)
520518

521519
/**
522-
* Get data source usage overview. Retrieve the data source usage overview per type for the specified Project.
520+
* Get data source usage overview. Retrieve the volume of data ingested for each of your data sources in the specified project and region.
523521
*
524522
* @param request - The request {@link RegionalApiGetUsageOverviewRequest}
525523
* @returns A Promise of UsageOverview

packages_generated/cockpit/src/v1/types.gen.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export interface DataSource {
191191
*/
192192
synchronizedWithGrafana: boolean
193193
/**
194-
* BETA - Duration for which the data will be retained in the data source.
194+
* Duration for which the data will be retained in the data source.
195195
*/
196196
retentionDays: number
197197
/**
@@ -754,7 +754,7 @@ export type RegionalApiCreateDataSourceRequest = {
754754
*/
755755
type?: DataSourceType
756756
/**
757-
* Default values are 30 days for metrics, 7 days for logs and traces.
757+
* Default values are 31 days for metrics, 7 days for logs and traces.
758758
*/
759759
retentionDays?: number
760760
}
@@ -1053,11 +1053,11 @@ export type RegionalApiListDataSourcesRequest = {
10531053
*/
10541054
projectId?: string
10551055
/**
1056-
* Origin to filter for, only data sources with matching origin will be returned.
1056+
* Origin to filter for, only data sources with matching origin will be returned. If omitted, all types will be returned.
10571057
*/
10581058
origin?: DataSourceOrigin
10591059
/**
1060-
* Types to filter for, only data sources with matching types will be returned.
1060+
* Types to filter for (metrics, logs, traces), only data sources with matching types will be returned. If omitted, all types will be returned.
10611061
*/
10621062
types?: DataSourceType[]
10631063
}
@@ -1147,7 +1147,7 @@ export type RegionalApiUpdateDataSourceRequest = {
11471147
*/
11481148
name?: string
11491149
/**
1150-
* BETA - Duration for which the data will be retained in the data source.
1150+
* Duration for which the data will be retained in the data source.
11511151
*/
11521152
retentionDays?: number
11531153
}

0 commit comments

Comments
 (0)