@scaleway/sdk-datawarehouse 2.2.0 → 2.3.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.
@@ -1,6 +1,6 @@
1
1
  import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
2
2
  import { API as ParentAPI } from '@scaleway/sdk-client';
3
- import type { CreateDatabaseRequest, CreateDeploymentRequest, CreateEndpointRequest, CreateUserRequest, Database, DeleteDatabaseRequest, DeleteDeploymentRequest, DeleteEndpointRequest, DeleteUserRequest, Deployment, Endpoint, GetDeploymentCertificateRequest, GetDeploymentRequest, ListDatabasesRequest, ListDatabasesResponse, ListDeploymentsRequest, ListDeploymentsResponse, ListPresetsRequest, ListPresetsResponse, ListUsersRequest, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, UpdateDeploymentRequest, UpdateUserRequest, User } from './types.gen.js';
3
+ import type { CreateDatabaseRequest, CreateDeploymentRequest, CreateEndpointRequest, CreateUserRequest, Database, DeleteDatabaseRequest, DeleteDeploymentRequest, DeleteEndpointRequest, DeleteUserRequest, Deployment, Endpoint, GetDeploymentCertificateRequest, GetDeploymentRequest, ListDatabasesRequest, ListDatabasesResponse, ListDeploymentsRequest, ListDeploymentsResponse, ListPresetsRequest, ListPresetsResponse, ListUsersRequest, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, StartDeploymentRequest, StopDeploymentRequest, UpdateDeploymentRequest, UpdateUserRequest, User } from './types.gen.js';
4
4
  /**
5
5
  * Data Warehouse API.
6
6
 
@@ -81,7 +81,27 @@ export declare class API extends ParentAPI {
81
81
  * @returns A Promise of Deployment
82
82
  */
83
83
  deleteDeployment: (request: Readonly<DeleteDeploymentRequest>) => Promise<Deployment>;
84
+ /**
85
+ * Get deployment TLS certificate. Retrieve the TLS certificate associated with a deployment.
86
+ *
87
+ * @param request - The request {@link GetDeploymentCertificateRequest}
88
+ * @returns A Promise of Blob
89
+ */
84
90
  getDeploymentCertificate: (request: Readonly<GetDeploymentCertificateRequest>) => Promise<Blob>;
91
+ /**
92
+ * Start a deployment. Start a stopped deployment.
93
+ *
94
+ * @param request - The request {@link StartDeploymentRequest}
95
+ * @returns A Promise of Deployment
96
+ */
97
+ startDeployment: (request: Readonly<StartDeploymentRequest>) => Promise<Deployment>;
98
+ /**
99
+ * Stop a deployment. Stop a running deployment.
100
+ *
101
+ * @param request - The request {@link StopDeploymentRequest}
102
+ * @returns A Promise of Deployment
103
+ */
104
+ stopDeployment: (request: Readonly<StopDeploymentRequest>) => Promise<Deployment>;
85
105
  protected pageOfListUsers: (request: Readonly<ListUsersRequest>) => Promise<ListUsersResponse>;
86
106
  /**
87
107
  * List users associated with a deployment.
@@ -156,12 +156,48 @@ class API extends API$1 {
156
156
  },
157
157
  unmarshalDeployment
158
158
  );
159
+ /**
160
+ * Get deployment TLS certificate. Retrieve the TLS certificate associated with a deployment.
161
+ *
162
+ * @param request - The request {@link GetDeploymentCertificateRequest}
163
+ * @returns A Promise of Blob
164
+ */
159
165
  getDeploymentCertificate = (request) => this.client.fetch({
160
166
  method: "GET",
161
167
  path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/certificate`,
162
168
  urlParams: urlParams(["dl", 1]),
163
169
  responseType: "blob"
164
170
  });
171
+ /**
172
+ * Start a deployment. Start a stopped deployment.
173
+ *
174
+ * @param request - The request {@link StartDeploymentRequest}
175
+ * @returns A Promise of Deployment
176
+ */
177
+ startDeployment = (request) => this.client.fetch(
178
+ {
179
+ body: "{}",
180
+ headers: jsonContentHeaders,
181
+ method: "POST",
182
+ path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/start`
183
+ },
184
+ unmarshalDeployment
185
+ );
186
+ /**
187
+ * Stop a deployment. Stop a running deployment.
188
+ *
189
+ * @param request - The request {@link StopDeploymentRequest}
190
+ * @returns A Promise of Deployment
191
+ */
192
+ stopDeployment = (request) => this.client.fetch(
193
+ {
194
+ body: "{}",
195
+ headers: jsonContentHeaders,
196
+ method: "POST",
197
+ path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/stop`
198
+ },
199
+ unmarshalDeployment
200
+ );
165
201
  pageOfListUsers = (request) => this.client.fetch(
166
202
  {
167
203
  method: "GET",
@@ -4,7 +4,9 @@ const DEPLOYMENT_TRANSIENT_STATUSES = [
4
4
  "deleting",
5
5
  "locking",
6
6
  "unlocking",
7
- "deploying"
7
+ "deploying",
8
+ "stopping",
9
+ "starting"
8
10
  ];
9
11
  export {
10
12
  DEPLOYMENT_TRANSIENT_STATUSES
@@ -1,5 +1,5 @@
1
1
  export { API } from './api.gen.js';
2
2
  export * from './content.gen.js';
3
3
  export * from './marshalling.gen.js';
4
- export type { CreateDatabaseRequest, CreateDeploymentRequest, CreateEndpointRequest, CreateUserRequest, Database, DeleteDatabaseRequest, DeleteDeploymentRequest, DeleteEndpointRequest, DeleteUserRequest, Deployment, DeploymentStatus, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicDetails, EndpointService, EndpointServiceProtocol, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicDetails, GetDeploymentCertificateRequest, GetDeploymentRequest, ListDatabasesRequest, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListDeploymentsRequest, ListDeploymentsRequestOrderBy, ListDeploymentsResponse, ListPresetsRequest, ListPresetsResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, Preset, UpdateDeploymentRequest, UpdateUserRequest, User, Version, } from './types.gen.js';
4
+ export type { CreateDatabaseRequest, CreateDeploymentRequest, CreateEndpointRequest, CreateUserRequest, Database, DeleteDatabaseRequest, DeleteDeploymentRequest, DeleteEndpointRequest, DeleteUserRequest, Deployment, DeploymentStatus, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicDetails, EndpointService, EndpointServiceProtocol, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicDetails, GetDeploymentCertificateRequest, GetDeploymentRequest, ListDatabasesRequest, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListDeploymentsRequest, ListDeploymentsRequestOrderBy, ListDeploymentsResponse, ListPresetsRequest, ListPresetsResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, Preset, StartDeploymentRequest, StopDeploymentRequest, UpdateDeploymentRequest, UpdateUserRequest, User, Version, } from './types.gen.js';
5
5
  export * as ValidationRules from './validation-rules.gen.js';
@@ -1,5 +1,5 @@
1
1
  import type { Region as ScwRegion } from '@scaleway/sdk-client';
2
- export type DeploymentStatus = 'unknown_status' | 'ready' | 'creating' | 'configuring' | 'deleting' | 'error' | 'locked' | 'locking' | 'unlocking' | 'deploying';
2
+ export type DeploymentStatus = 'unknown_status' | 'ready' | 'creating' | 'configuring' | 'deleting' | 'error' | 'locked' | 'locking' | 'unlocking' | 'deploying' | 'stopping' | 'starting' | 'stopped';
3
3
  export type EndpointServiceProtocol = 'unknown_protocol' | 'tcp' | 'https' | 'mysql';
4
4
  export type ListDatabasesRequestOrderBy = 'name_asc' | 'name_desc' | 'size_asc' | 'size_desc';
5
5
  export type ListDeploymentsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'name_asc' | 'name_desc';
@@ -326,6 +326,9 @@ export type GetDeploymentCertificateRequest = {
326
326
  * Region to target. If none is passed will use default region from the config.
327
327
  */
328
328
  region?: ScwRegion;
329
+ /**
330
+ * UUID of the deployment.
331
+ */
329
332
  deploymentId: string;
330
333
  };
331
334
  export type GetDeploymentRequest = {
@@ -473,6 +476,26 @@ export interface ListVersionsResponse {
473
476
  */
474
477
  totalCount: number;
475
478
  }
479
+ export type StartDeploymentRequest = {
480
+ /**
481
+ * Region to target. If none is passed will use default region from the config.
482
+ */
483
+ region?: ScwRegion;
484
+ /**
485
+ * UUID of the deployment.
486
+ */
487
+ deploymentId: string;
488
+ };
489
+ export type StopDeploymentRequest = {
490
+ /**
491
+ * Region to target. If none is passed will use default region from the config.
492
+ */
493
+ region?: ScwRegion;
494
+ /**
495
+ * UUID of the deployment.
496
+ */
497
+ deploymentId: string;
498
+ };
476
499
  export type UpdateDeploymentRequest = {
477
500
  /**
478
501
  * Region to target. If none is passed will use default region from the config.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-datawarehouse",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Scaleway SDK datawarehouse",
5
5
  "license": "Apache-2.0",
6
6
  "files": [