@scaleway/sdk 1.6.0 → 1.8.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.
- package/dist/api/applesilicon/v1alpha1/api.gen.js +5 -4
- package/dist/api/baremetal/v1/api.gen.js +6 -6
- package/dist/api/baremetal/v1/api.utils.js +1 -1
- package/dist/api/cockpit/v1beta1/api.gen.js +39 -30
- package/dist/api/container/v1beta1/api.gen.js +35 -33
- package/dist/api/container/v1beta1/marshalling.gen.js +3 -1
- package/dist/api/domain/v2beta1/api.gen.js +63 -54
- package/dist/api/flexibleip/v1alpha1/api.gen.js +28 -15
- package/dist/api/function/v1beta1/api.gen.js +39 -30
- package/dist/api/function/v1beta1/marshalling.gen.js +1 -0
- package/dist/api/iam/v1alpha1/api.gen.js +2 -3
- package/dist/api/iam/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/instance/v1/api.gen.js +2 -2
- package/dist/api/instance/v1/api.utils.js +7 -13
- package/dist/api/iot/v1/api.gen.js +68 -36
- package/dist/api/k8s/v1/api.gen.js +4 -4
- package/dist/api/lb/v1/api.gen.js +4 -4
- package/dist/api/lb/v1/api.utils.js +4 -4
- package/dist/api/marketplace/v2/api.gen.js +46 -3
- package/dist/api/mnq/v1alpha1/api.gen.js +36 -13
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +3 -9
- package/dist/api/rdb/v1/api.gen.js +5 -5
- package/dist/api/redis/v1/api.gen.js +1 -1
- package/dist/api/registry/v1/api.gen.js +44 -22
- package/dist/api/secret/v1alpha1/api.gen.js +29 -18
- package/dist/api/secret/v1alpha1/marshalling.gen.js +8 -1
- package/dist/api/tem/v1alpha1/api.gen.js +3 -7
- package/dist/api/test/v1/api.gen.js +1 -1
- package/dist/api/vpc/v1/api.gen.js +13 -5
- package/dist/api/vpcgw/v1/api.gen.js +2 -2
- package/dist/api/webhosting/v1alpha1/api.gen.js +1 -1
- package/dist/helpers/marshalling.js +1 -1
- package/dist/index.cjs +457 -269
- package/dist/index.d.ts +1412 -736
- package/dist/internal/async/interval-retrier.js +2 -2
- package/dist/scw/constants.js +1 -1
- package/dist/scw/custom-marshalling.js +4 -7
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
2
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
|
-
import { unmarshalDate, unmarshalArrayOfObject
|
|
3
|
+
import { unmarshalDate, unmarshalArrayOfObject } from '../../../helpers/marshalling.js';
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
6
|
const unmarshalPermissions = data => {
|
|
@@ -106,10 +106,7 @@ const marshalPermissions = (request, defaults) => ({
|
|
|
106
106
|
const marshalCreateCredentialRequest = (request, defaults) => ({
|
|
107
107
|
name: request.name || randomName('mnq'),
|
|
108
108
|
namespace_id: request.namespaceId,
|
|
109
|
-
|
|
110
|
-
param: 'permissions',
|
|
111
|
-
value: request.permissions ? marshalPermissions(request.permissions) : undefined
|
|
112
|
-
}])
|
|
109
|
+
permissions: request.permissions ? marshalPermissions(request.permissions) : undefined
|
|
113
110
|
});
|
|
114
111
|
const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
115
112
|
name: request.name || randomName('mnq'),
|
|
@@ -118,10 +115,7 @@ const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
|
118
115
|
});
|
|
119
116
|
const marshalUpdateCredentialRequest = (request, defaults) => ({
|
|
120
117
|
name: request.name,
|
|
121
|
-
|
|
122
|
-
param: 'permissions',
|
|
123
|
-
value: request.permissions ? marshalPermissions(request.permissions) : undefined
|
|
124
|
-
}])
|
|
118
|
+
permissions: request.permissions ? marshalPermissions(request.permissions) : undefined
|
|
125
119
|
});
|
|
126
120
|
const marshalUpdateNamespaceRequest = (request, defaults) => ({
|
|
127
121
|
name: request.name,
|
|
@@ -110,7 +110,7 @@ class API extends API$1 {
|
|
|
110
110
|
* @param options - The waiting options
|
|
111
111
|
* @returns A Promise of DatabaseBackup
|
|
112
112
|
*/
|
|
113
|
-
this.waitForDatabaseBackup = (request, options) => waitForResource(
|
|
113
|
+
this.waitForDatabaseBackup = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DATABASE_BACKUP_TRANSIENT_STATUSES.includes(res.status))), this.getDatabaseBackup, request, options);
|
|
114
114
|
/**
|
|
115
115
|
* Update a database backup. Update the parameters of a backup, including name
|
|
116
116
|
* and expiration date.
|
|
@@ -228,7 +228,7 @@ class API extends API$1 {
|
|
|
228
228
|
* @param options - The waiting options
|
|
229
229
|
* @returns A Promise of Instance
|
|
230
230
|
*/
|
|
231
|
-
this.waitForInstance = (request, options) => waitForResource(
|
|
231
|
+
this.waitForInstance = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!INSTANCE_TRANSIENT_STATUSES.includes(res.status))), this.getInstance, request, options);
|
|
232
232
|
/**
|
|
233
233
|
* Create a Database Instance. Create a new Database Instance. You must set
|
|
234
234
|
* the `engine`, `user_name`, `password` and `node_type` parameters.
|
|
@@ -374,7 +374,7 @@ class API extends API$1 {
|
|
|
374
374
|
* @param options - The waiting options
|
|
375
375
|
* @returns A Promise of ReadReplica
|
|
376
376
|
*/
|
|
377
|
-
this.waitForReadReplica = (request, options) => waitForResource(
|
|
377
|
+
this.waitForReadReplica = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!READ_REPLICA_TRANSIENT_STATUSES.includes(res.status))), this.getReadReplica, request, options);
|
|
378
378
|
/**
|
|
379
379
|
* Delete a Read Replica. Delete a Read Replica of a Database Instance. You
|
|
380
380
|
* must specify the `region` and `read_replica_id` parameters of the Read
|
|
@@ -468,7 +468,7 @@ class API extends API$1 {
|
|
|
468
468
|
* @param options - The waiting options
|
|
469
469
|
* @returns A Promise of InstanceLog
|
|
470
470
|
*/
|
|
471
|
-
this.waitForInstanceLog = (request, options) => waitForResource(
|
|
471
|
+
this.waitForInstanceLog = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!INSTANCE_LOG_TRANSIENT_STATUSES.includes(res.status))), this.getInstanceLog, request, options);
|
|
472
472
|
/**
|
|
473
473
|
* Purge remote Database Instance logs. Purge a given remote log from a
|
|
474
474
|
* Database Instance. You can specify the `log_name` of the log you wish to
|
|
@@ -759,7 +759,7 @@ class API extends API$1 {
|
|
|
759
759
|
* @param options - The waiting options
|
|
760
760
|
* @returns A Promise of Snapshot
|
|
761
761
|
*/
|
|
762
|
-
this.waitForSnapshot = (request, options) => waitForResource(
|
|
762
|
+
this.waitForSnapshot = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))), this.getSnapshot, request, options);
|
|
763
763
|
/**
|
|
764
764
|
* Create a Database Instance snapshot. Create a new snapshot of a Database
|
|
765
765
|
* Instance. You must define the `name` parameter in the request.
|
|
@@ -66,7 +66,7 @@ class API extends API$1 {
|
|
|
66
66
|
* @param options - The waiting options
|
|
67
67
|
* @returns A Promise of Cluster
|
|
68
68
|
*/
|
|
69
|
-
this.waitForCluster = (request, options) => waitForResource(
|
|
69
|
+
this.waitForCluster = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))), this.getCluster, request, options);
|
|
70
70
|
this.pageOfListClusters = function (request) {
|
|
71
71
|
if (request === void 0) {
|
|
72
72
|
request = {};
|
|
@@ -10,11 +10,7 @@ const jsonContentHeaders = {
|
|
|
10
10
|
'Content-Type': 'application/json; charset=utf-8'
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* Registry API.
|
|
15
|
-
*
|
|
16
|
-
* Container registry API. Registry API.
|
|
17
|
-
*/
|
|
13
|
+
/** Container Registry API. */
|
|
18
14
|
class API extends API$1 {
|
|
19
15
|
constructor() {
|
|
20
16
|
var _this;
|
|
@@ -31,7 +27,11 @@ class API extends API$1 {
|
|
|
31
27
|
}, unmarshalListNamespacesResponse);
|
|
32
28
|
};
|
|
33
29
|
/**
|
|
34
|
-
* List all
|
|
30
|
+
* List namespaces. List all namespaces in a specified region. By default, the
|
|
31
|
+
* namespaces listed are ordered by creation date in ascending order. This can
|
|
32
|
+
* be modified via the order_by field. You can also define additional
|
|
33
|
+
* parameters for your query, such as the `instance_id` and `project_id`
|
|
34
|
+
* parameters.
|
|
35
35
|
*
|
|
36
36
|
* @param request - The request {@link ListNamespacesRequest}
|
|
37
37
|
* @returns A Promise of ListNamespacesResponse
|
|
@@ -43,7 +43,10 @@ class API extends API$1 {
|
|
|
43
43
|
return enrichForPagination('namespaces', _this.pageOfListNamespaces, request);
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
46
|
-
* Get a namespace.
|
|
46
|
+
* Get a namespace. Retrieve information about a given namespace, specified by
|
|
47
|
+
* its `namespace_id` and region. Full details about the namespace, such as
|
|
48
|
+
* `description`, `project_id`, `status`, `endpoint`, `is_public`, `size`, and
|
|
49
|
+
* `image_count` are returned in the response.
|
|
47
50
|
*
|
|
48
51
|
* @param request - The request {@link GetNamespaceRequest}
|
|
49
52
|
* @returns A Promise of Namespace
|
|
@@ -59,9 +62,12 @@ class API extends API$1 {
|
|
|
59
62
|
* @param options - The waiting options
|
|
60
63
|
* @returns A Promise of Namespace
|
|
61
64
|
*/
|
|
62
|
-
this.waitForNamespace = (request, options) => waitForResource(
|
|
65
|
+
this.waitForNamespace = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
|
|
63
66
|
/**
|
|
64
|
-
* Create a new namespace.
|
|
67
|
+
* Create a namespace. Create a new Container Registry namespace. You must
|
|
68
|
+
* specify the namespace name and region in which you want it to be created.
|
|
69
|
+
* Optionally, you can specify the `project_id` and `is_public` in the request
|
|
70
|
+
* payload.
|
|
65
71
|
*
|
|
66
72
|
* @param request - The request {@link CreateNamespaceRequest}
|
|
67
73
|
* @returns A Promise of Namespace
|
|
@@ -73,8 +79,9 @@ class API extends API$1 {
|
|
|
73
79
|
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
|
|
74
80
|
}, unmarshalNamespace);
|
|
75
81
|
/**
|
|
76
|
-
* Update
|
|
77
|
-
*
|
|
82
|
+
* Update a namespace. Update the parameters of a given namespace, specified
|
|
83
|
+
* by its `namespace_id` and `region`. You can update the `description` and
|
|
84
|
+
* `is_public` parameters.
|
|
78
85
|
*
|
|
79
86
|
* @param request - The request {@link UpdateNamespaceRequest}
|
|
80
87
|
* @returns A Promise of Namespace
|
|
@@ -86,8 +93,9 @@ class API extends API$1 {
|
|
|
86
93
|
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
87
94
|
}, unmarshalNamespace);
|
|
88
95
|
/**
|
|
89
|
-
* Delete
|
|
90
|
-
*
|
|
96
|
+
* Delete a namespace. Delete a given namespace. You must specify, in the
|
|
97
|
+
* endpoint, the `region` and `namespace_id` parameters of the namespace you
|
|
98
|
+
* want to delete.
|
|
91
99
|
*
|
|
92
100
|
* @param request - The request {@link DeleteNamespaceRequest}
|
|
93
101
|
* @returns A Promise of Namespace
|
|
@@ -107,7 +115,10 @@ class API extends API$1 {
|
|
|
107
115
|
}, unmarshalListImagesResponse);
|
|
108
116
|
};
|
|
109
117
|
/**
|
|
110
|
-
* List all
|
|
118
|
+
* List images. List all images in a specified region. By default, the images
|
|
119
|
+
* listed are ordered by creation date in ascending order. This can be
|
|
120
|
+
* modified via the order_by field. You can also define additional parameters
|
|
121
|
+
* for your query, such as the `namespace_id` and `project_id` parameters.
|
|
111
122
|
*
|
|
112
123
|
* @param request - The request {@link ListImagesRequest}
|
|
113
124
|
* @returns A Promise of ListImagesResponse
|
|
@@ -119,7 +130,10 @@ class API extends API$1 {
|
|
|
119
130
|
return enrichForPagination('images', _this.pageOfListImages, request);
|
|
120
131
|
};
|
|
121
132
|
/**
|
|
122
|
-
* Get
|
|
133
|
+
* Get an image. Retrieve information about a given container image, specified
|
|
134
|
+
* by its `image_id` and region. Full details about the image, such as `name`,
|
|
135
|
+
* `namespace_id`, `status`, `visibility`, and `size` are returned in the
|
|
136
|
+
* response.
|
|
123
137
|
*
|
|
124
138
|
* @param request - The request {@link GetImageRequest}
|
|
125
139
|
* @returns A Promise of Image
|
|
@@ -135,9 +149,10 @@ class API extends API$1 {
|
|
|
135
149
|
* @param options - The waiting options
|
|
136
150
|
* @returns A Promise of Image
|
|
137
151
|
*/
|
|
138
|
-
this.waitForImage = (request, options) => waitForResource(
|
|
152
|
+
this.waitForImage = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!IMAGE_TRANSIENT_STATUSES.includes(res.status))), this.getImage, request, options);
|
|
139
153
|
/**
|
|
140
|
-
* Update an
|
|
154
|
+
* Update an image. Update the parameters of a given image, specified by its
|
|
155
|
+
* `image_id` and `region`. You can update the `visibility` parameter.
|
|
141
156
|
*
|
|
142
157
|
* @param request - The request {@link UpdateImageRequest}
|
|
143
158
|
* @returns A Promise of Image
|
|
@@ -149,7 +164,8 @@ class API extends API$1 {
|
|
|
149
164
|
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/images/${validatePathParam('imageId', request.imageId)}`
|
|
150
165
|
}, unmarshalImage);
|
|
151
166
|
/**
|
|
152
|
-
* Delete an image. Delete
|
|
167
|
+
* Delete an image. Delete a given image. You must specify, in the endpoint,
|
|
168
|
+
* the `region` and `image_id` parameters of the image you want to delete.
|
|
153
169
|
*
|
|
154
170
|
* @param request - The request {@link DeleteImageRequest}
|
|
155
171
|
* @returns A Promise of Image
|
|
@@ -164,14 +180,19 @@ class API extends API$1 {
|
|
|
164
180
|
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
165
181
|
}, unmarshalListTagsResponse);
|
|
166
182
|
/**
|
|
167
|
-
* List all
|
|
183
|
+
* List tags. List all tags for a given image, specified by region. By
|
|
184
|
+
* default, the tags listed are ordered by creation date in ascending order.
|
|
185
|
+
* This can be modified via the order_by field. You can also define additional
|
|
186
|
+
* parameters for your query, such as the `name`.
|
|
168
187
|
*
|
|
169
188
|
* @param request - The request {@link ListTagsRequest}
|
|
170
189
|
* @returns A Promise of ListTagsResponse
|
|
171
190
|
*/
|
|
172
191
|
this.listTags = request => enrichForPagination('tags', this.pageOfListTags, request);
|
|
173
192
|
/**
|
|
174
|
-
* Get a tag.
|
|
193
|
+
* Get a tag. Retrieve information about a given image tag, specified by its
|
|
194
|
+
* `tag_id` and region. Full details about the tag, such as `name`,
|
|
195
|
+
* `image_id`, `status`, and `digest` are returned in the response.
|
|
175
196
|
*
|
|
176
197
|
* @param request - The request {@link GetTagRequest}
|
|
177
198
|
* @returns A Promise of Tag
|
|
@@ -187,9 +208,10 @@ class API extends API$1 {
|
|
|
187
208
|
* @param options - The waiting options
|
|
188
209
|
* @returns A Promise of Tag
|
|
189
210
|
*/
|
|
190
|
-
this.waitForTag = (request, options) => waitForResource(
|
|
211
|
+
this.waitForTag = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TAG_TRANSIENT_STATUSES.includes(res.status))), this.getTag, request, options);
|
|
191
212
|
/**
|
|
192
|
-
* Delete a tag. Delete
|
|
213
|
+
* Delete a tag. Delete a given image tag. You must specify, in the endpoint,
|
|
214
|
+
* the `region` and `tag_id` parameters of the tag you want to delete.
|
|
193
215
|
*
|
|
194
216
|
* @param request - The request {@link DeleteTagRequest}
|
|
195
217
|
* @returns A Promise of Tag
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { API as API$1 } from '../../../scw/api.js';
|
|
2
2
|
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
3
3
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
-
import { marshalCreateSecretRequest, unmarshalSecret, marshalUpdateSecretRequest, unmarshalListSecretsResponse, marshalCreateSecretVersionRequest, unmarshalSecretVersion, marshalUpdateSecretVersionRequest, unmarshalListSecretVersionsResponse, unmarshalAccessSecretVersionResponse } from './marshalling.gen.js';
|
|
4
|
+
import { marshalCreateSecretRequest, unmarshalSecret, marshalUpdateSecretRequest, unmarshalListSecretsResponse, marshalAddSecretOwnerRequest, marshalCreateSecretVersionRequest, unmarshalSecretVersion, marshalUpdateSecretVersionRequest, unmarshalListSecretVersionsResponse, unmarshalAccessSecretVersionResponse } from './marshalling.gen.js';
|
|
5
5
|
|
|
6
6
|
// This file was automatically generated. DO NOT EDIT.
|
|
7
7
|
const jsonContentHeaders = {
|
|
@@ -9,10 +9,10 @@ const jsonContentHeaders = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Secret Manager API
|
|
12
|
+
* Secret Manager API.
|
|
13
13
|
*
|
|
14
|
-
* This API allows you to conveniently store, access and
|
|
15
|
-
*
|
|
14
|
+
* Secret Manager API. This API allows you to conveniently store, access and
|
|
15
|
+
* share sensitive data.
|
|
16
16
|
*/
|
|
17
17
|
class API extends API$1 {
|
|
18
18
|
constructor() {
|
|
@@ -74,7 +74,7 @@ class API extends API$1 {
|
|
|
74
74
|
return _this.client.fetch({
|
|
75
75
|
method: 'GET',
|
|
76
76
|
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/secrets`,
|
|
77
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'name_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['tags', request.tags])
|
|
77
|
+
urlParams: urlParams(['is_managed', request.isManaged], ['name', request.name], ['order_by', request.orderBy ?? 'name_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['tags', request.tags])
|
|
78
78
|
}, unmarshalListSecretsResponse);
|
|
79
79
|
};
|
|
80
80
|
/**
|
|
@@ -101,6 +101,17 @@ class API extends API$1 {
|
|
|
101
101
|
method: 'DELETE',
|
|
102
102
|
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}`
|
|
103
103
|
});
|
|
104
|
+
/**
|
|
105
|
+
* Allow a product to use the secret.
|
|
106
|
+
*
|
|
107
|
+
* @param request - The request {@link AddSecretOwnerRequest}
|
|
108
|
+
*/
|
|
109
|
+
this.addSecretOwner = request => this.client.fetch({
|
|
110
|
+
body: JSON.stringify(marshalAddSecretOwnerRequest(request, this.client.settings)),
|
|
111
|
+
headers: jsonContentHeaders,
|
|
112
|
+
method: 'POST',
|
|
113
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/add-owner`
|
|
114
|
+
});
|
|
104
115
|
/**
|
|
105
116
|
* Create a version. Create a version of a given secret specified by the
|
|
106
117
|
* `region` and `secret_id` parameters.
|
|
@@ -179,19 +190,6 @@ class API extends API$1 {
|
|
|
179
190
|
* @returns A Promise of ListSecretVersionsResponse
|
|
180
191
|
*/
|
|
181
192
|
this.listSecretVersionsByName = request => enrichForPagination('versions', this.pageOfListSecretVersionsByName, request);
|
|
182
|
-
/**
|
|
183
|
-
* Delete a version. Delete a secret's version and the sensitive data
|
|
184
|
-
* contained in it. Deleting a version is permanent and cannot be undone.
|
|
185
|
-
*
|
|
186
|
-
* @param request - The request {@link DestroySecretVersionRequest}
|
|
187
|
-
* @returns A Promise of SecretVersion
|
|
188
|
-
*/
|
|
189
|
-
this.destroySecretVersion = request => this.client.fetch({
|
|
190
|
-
body: '{}',
|
|
191
|
-
headers: jsonContentHeaders,
|
|
192
|
-
method: 'POST',
|
|
193
|
-
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}/destroy`
|
|
194
|
-
}, unmarshalSecretVersion);
|
|
195
193
|
/**
|
|
196
194
|
* Enable a version. Make a specific version accessible. You must specify the
|
|
197
195
|
* `region`, `secret_id` and `revision` parameters.
|
|
@@ -242,6 +240,19 @@ class API extends API$1 {
|
|
|
242
240
|
method: 'GET',
|
|
243
241
|
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-name/${validatePathParam('secretName', request.secretName)}/versions/${validatePathParam('revision', request.revision)}/access`
|
|
244
242
|
}, unmarshalAccessSecretVersionResponse);
|
|
243
|
+
/**
|
|
244
|
+
* Delete a version. Delete a secret's version and the sensitive data
|
|
245
|
+
* contained in it. Deleting a version is permanent and cannot be undone.
|
|
246
|
+
*
|
|
247
|
+
* @param request - The request {@link DestroySecretVersionRequest}
|
|
248
|
+
* @returns A Promise of SecretVersion
|
|
249
|
+
*/
|
|
250
|
+
this.destroySecretVersion = request => this.client.fetch({
|
|
251
|
+
body: '{}',
|
|
252
|
+
headers: jsonContentHeaders,
|
|
253
|
+
method: 'POST',
|
|
254
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}/destroy`
|
|
255
|
+
}, unmarshalSecretVersion);
|
|
245
256
|
}
|
|
246
257
|
/** Lists the available regions of the API. */
|
|
247
258
|
}
|
|
@@ -10,6 +10,7 @@ const unmarshalSecret = data => {
|
|
|
10
10
|
createdAt: unmarshalDate(data.created_at),
|
|
11
11
|
description: data.description,
|
|
12
12
|
id: data.id,
|
|
13
|
+
isManaged: data.is_managed,
|
|
13
14
|
name: data.name,
|
|
14
15
|
projectId: data.project_id,
|
|
15
16
|
region: data.region,
|
|
@@ -26,6 +27,7 @@ const unmarshalSecretVersion = data => {
|
|
|
26
27
|
return {
|
|
27
28
|
createdAt: unmarshalDate(data.created_at),
|
|
28
29
|
description: data.description,
|
|
30
|
+
isLatest: data.is_latest,
|
|
29
31
|
revision: data.revision,
|
|
30
32
|
secretId: data.secret_id,
|
|
31
33
|
status: data.status,
|
|
@@ -38,6 +40,7 @@ const unmarshalAccessSecretVersionResponse = data => {
|
|
|
38
40
|
}
|
|
39
41
|
return {
|
|
40
42
|
data: data.data,
|
|
43
|
+
dataCrc32: data.data_crc32,
|
|
41
44
|
revision: data.revision,
|
|
42
45
|
secretId: data.secret_id
|
|
43
46
|
};
|
|
@@ -67,6 +70,9 @@ const marshalPasswordGenerationParams = (request, defaults) => ({
|
|
|
67
70
|
no_lowercase_letters: request.noLowercaseLetters,
|
|
68
71
|
no_uppercase_letters: request.noUppercaseLetters
|
|
69
72
|
});
|
|
73
|
+
const marshalAddSecretOwnerRequest = (request, defaults) => ({
|
|
74
|
+
product_name: request.productName
|
|
75
|
+
});
|
|
70
76
|
const marshalCreateSecretRequest = (request, defaults) => ({
|
|
71
77
|
description: request.description,
|
|
72
78
|
name: request.name,
|
|
@@ -75,6 +81,7 @@ const marshalCreateSecretRequest = (request, defaults) => ({
|
|
|
75
81
|
});
|
|
76
82
|
const marshalCreateSecretVersionRequest = (request, defaults) => ({
|
|
77
83
|
data: request.data,
|
|
84
|
+
data_crc32: request.dataCrc32,
|
|
78
85
|
description: request.description,
|
|
79
86
|
disable_previous: request.disablePrevious,
|
|
80
87
|
...resolveOneOf([{
|
|
@@ -91,4 +98,4 @@ const marshalUpdateSecretVersionRequest = (request, defaults) => ({
|
|
|
91
98
|
description: request.description
|
|
92
99
|
});
|
|
93
100
|
|
|
94
|
-
export { marshalCreateSecretRequest, marshalCreateSecretVersionRequest, marshalUpdateSecretRequest, marshalUpdateSecretVersionRequest, unmarshalAccessSecretVersionResponse, unmarshalListSecretVersionsResponse, unmarshalListSecretsResponse, unmarshalSecret, unmarshalSecretVersion };
|
|
101
|
+
export { marshalAddSecretOwnerRequest, marshalCreateSecretRequest, marshalCreateSecretVersionRequest, marshalUpdateSecretRequest, marshalUpdateSecretVersionRequest, unmarshalAccessSecretVersionResponse, unmarshalListSecretVersionsResponse, unmarshalListSecretsResponse, unmarshalSecret, unmarshalSecretVersion };
|
|
@@ -10,11 +10,7 @@ const jsonContentHeaders = {
|
|
|
10
10
|
'Content-Type': 'application/json; charset=utf-8'
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* Transactional Email API documentation.
|
|
15
|
-
*
|
|
16
|
-
* Tem. Transactional Email API documentation.
|
|
17
|
-
*/
|
|
13
|
+
/** Transactional Email API. */
|
|
18
14
|
class API extends API$1 {
|
|
19
15
|
constructor() {
|
|
20
16
|
var _this;
|
|
@@ -53,7 +49,7 @@ class API extends API$1 {
|
|
|
53
49
|
* @param options - The waiting options
|
|
54
50
|
* @returns A Promise of Email
|
|
55
51
|
*/
|
|
56
|
-
this.waitForEmail = (request, options) => waitForResource(
|
|
52
|
+
this.waitForEmail = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!EMAIL_TRANSIENT_STATUSES.includes(res.status))), this.getEmail, request, options);
|
|
57
53
|
this.pageOfListEmails = function (request) {
|
|
58
54
|
if (request === void 0) {
|
|
59
55
|
request = {};
|
|
@@ -138,7 +134,7 @@ class API extends API$1 {
|
|
|
138
134
|
* @param options - The waiting options
|
|
139
135
|
* @returns A Promise of Domain
|
|
140
136
|
*/
|
|
141
|
-
this.waitForDomain = (request, options) => waitForResource(
|
|
137
|
+
this.waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
142
138
|
this.pageOfListDomains = function (request) {
|
|
143
139
|
if (request === void 0) {
|
|
144
140
|
request = {};
|
|
@@ -84,7 +84,7 @@ class API extends API$1 {
|
|
|
84
84
|
* @param options - The waiting options
|
|
85
85
|
* @returns A Promise of Human
|
|
86
86
|
*/
|
|
87
|
-
this.waitForHuman = (request, options) => waitForResource(
|
|
87
|
+
this.waitForHuman = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!HUMAN_TRANSIENT_STATUSES.includes(res.status))), this.getHuman, request, options);
|
|
88
88
|
/**
|
|
89
89
|
* Create a new human.
|
|
90
90
|
*
|
|
@@ -25,7 +25,10 @@ class API extends API$1 {
|
|
|
25
25
|
}, unmarshalListPrivateNetworksResponse);
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
* List
|
|
28
|
+
* List Private Networks. List existing Private Networks in a specified
|
|
29
|
+
* Availability Zone. By default, the Private Networks returned in the list
|
|
30
|
+
* are ordered by creation date in ascending order, though this can be
|
|
31
|
+
* modified via the order_by field.
|
|
29
32
|
*
|
|
30
33
|
* @param request - The request {@link ListPrivateNetworksRequest}
|
|
31
34
|
* @returns A Promise of ListPrivateNetworksResponse
|
|
@@ -37,7 +40,8 @@ class API extends API$1 {
|
|
|
37
40
|
return enrichForPagination('privateNetworks', _this.pageOfListPrivateNetworks, request);
|
|
38
41
|
};
|
|
39
42
|
/**
|
|
40
|
-
* Create a
|
|
43
|
+
* Create a Private Network. Create a new Private Network. Once created, you
|
|
44
|
+
* can attach Scaleway resources in the same Availability Zone.
|
|
41
45
|
*
|
|
42
46
|
* @param request - The request {@link CreatePrivateNetworkRequest}
|
|
43
47
|
* @returns A Promise of PrivateNetwork
|
|
@@ -54,7 +58,9 @@ class API extends API$1 {
|
|
|
54
58
|
}, unmarshalPrivateNetwork);
|
|
55
59
|
};
|
|
56
60
|
/**
|
|
57
|
-
* Get a
|
|
61
|
+
* Get a Private Network. Retrieve information about an existing Private
|
|
62
|
+
* Network, specified by its Private Network ID. Its full details are returned
|
|
63
|
+
* in the response object.
|
|
58
64
|
*
|
|
59
65
|
* @param request - The request {@link GetPrivateNetworkRequest}
|
|
60
66
|
* @returns A Promise of PrivateNetwork
|
|
@@ -64,7 +70,8 @@ class API extends API$1 {
|
|
|
64
70
|
path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
|
|
65
71
|
}, unmarshalPrivateNetwork);
|
|
66
72
|
/**
|
|
67
|
-
* Update
|
|
73
|
+
* Update Private Network. Update parameters (such as name or tags) of an
|
|
74
|
+
* existing Private Network, specified by its Private Network ID.
|
|
68
75
|
*
|
|
69
76
|
* @param request - The request {@link UpdatePrivateNetworkRequest}
|
|
70
77
|
* @returns A Promise of PrivateNetwork
|
|
@@ -76,7 +83,8 @@ class API extends API$1 {
|
|
|
76
83
|
path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
|
|
77
84
|
}, unmarshalPrivateNetwork);
|
|
78
85
|
/**
|
|
79
|
-
* Delete a
|
|
86
|
+
* Delete a Private Network. Delete an existing Private Network. Note that you
|
|
87
|
+
* must first detach all resources from the network, in order to delete it.
|
|
80
88
|
*
|
|
81
89
|
* @param request - The request {@link DeletePrivateNetworkRequest}
|
|
82
90
|
*/
|
|
@@ -59,7 +59,7 @@ class API extends API$1 {
|
|
|
59
59
|
* @param options - The waiting options
|
|
60
60
|
* @returns A Promise of Gateway
|
|
61
61
|
*/
|
|
62
|
-
this.waitForGateway = (request, options) => waitForResource(
|
|
62
|
+
this.waitForGateway = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!GATEWAY_TRANSIENT_STATUSES.includes(res.status))), this.getGateway, request, options);
|
|
63
63
|
/**
|
|
64
64
|
* Create a Public Gateway. Create a new Public Gateway in the specified
|
|
65
65
|
* Scaleway Project, defining its **name**, **type** and other configuration
|
|
@@ -165,7 +165,7 @@ class API extends API$1 {
|
|
|
165
165
|
* @param options - The waiting options
|
|
166
166
|
* @returns A Promise of GatewayNetwork
|
|
167
167
|
*/
|
|
168
|
-
this.waitForGatewayNetwork = (request, options) => waitForResource(
|
|
168
|
+
this.waitForGatewayNetwork = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!GATEWAY_NETWORK_TRANSIENT_STATUSES.includes(res.status))), this.getGatewayNetwork, request, options);
|
|
169
169
|
/**
|
|
170
170
|
* Attach a Public Gateway to a Private Network. Attach a specific Public
|
|
171
171
|
* Gateway to a specific Private Network (create a GatewayNetwork). You can
|
|
@@ -67,7 +67,7 @@ class API extends API$1 {
|
|
|
67
67
|
* @param options - The waiting options
|
|
68
68
|
* @returns A Promise of Hosting
|
|
69
69
|
*/
|
|
70
|
-
this.waitForHosting = (request, options) => waitForResource(
|
|
70
|
+
this.waitForHosting = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!HOSTING_TRANSIENT_STATUSES.includes(res.status))), this.getHosting, request, options);
|
|
71
71
|
/**
|
|
72
72
|
* Update a hosting.
|
|
73
73
|
*
|
|
@@ -34,7 +34,7 @@ const resolveOneOf = function (list, isRequired) {
|
|
|
34
34
|
isRequired = false;
|
|
35
35
|
}
|
|
36
36
|
const elt = list.find(obj => obj.value) || list.find(obj => obj.default);
|
|
37
|
-
const value =
|
|
37
|
+
const value = elt?.value || elt?.default;
|
|
38
38
|
if (value) return {
|
|
39
39
|
[elt.param]: value
|
|
40
40
|
};
|