@scaleway/sdk 1.14.0 → 1.15.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/account/v2/api.gen.js +77 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +174 -152
- package/dist/api/baremetal/v1/api.gen.js +434 -378
- package/dist/api/baremetal/v1/api.utils.js +19 -22
- package/dist/api/billing/v2alpha1/api.gen.js +21 -17
- package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
- package/dist/api/container/v1beta1/api.gen.js +384 -337
- package/dist/api/domain/v2beta1/api.gen.js +754 -668
- package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
- package/dist/api/function/v1beta1/api.gen.js +467 -407
- package/dist/api/iam/v1alpha1/api.gen.js +641 -557
- package/dist/api/instance/v1/api.gen.js +802 -677
- package/dist/api/instance/v1/api.utils.js +337 -325
- package/dist/api/instance/v1/marshalling.gen.js +2 -1
- package/dist/api/iot/v1/api.gen.js +508 -452
- package/dist/api/ipfs/index.js +2 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
- package/dist/api/k8s/v1/api.gen.js +403 -342
- package/dist/api/k8s/v1/api.utils.js +7 -10
- package/dist/api/k8s/v1/marshalling.gen.js +19 -1
- package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
- package/dist/api/lb/v1/api.gen.js +1501 -1363
- package/dist/api/lb/v1/api.utils.js +71 -75
- package/dist/api/lb/v1/marshalling.gen.js +6 -0
- package/dist/api/marketplace/v1/api.gen.js +35 -32
- package/dist/api/marketplace/v2/api.gen.js +117 -102
- package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
- package/dist/api/rdb/v1/api.gen.js +897 -819
- package/dist/api/redis/v1/api.gen.js +358 -333
- package/dist/api/registry/v1/api.gen.js +211 -189
- package/dist/api/secret/v1alpha1/api.gen.js +265 -245
- package/dist/api/tem/v1alpha1/api.gen.js +182 -147
- package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
- package/dist/api/test/v1/api.gen.js +116 -104
- package/dist/api/vpc/v1/api.gen.js +74 -65
- package/dist/api/vpc/v2/api.gen.js +200 -178
- package/dist/api/vpc/v2/marshalling.gen.js +1 -0
- package/dist/api/vpcgw/v1/api.gen.js +575 -501
- package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
- package/dist/index.cjs +732 -311
- package/dist/index.d.ts +2040 -1540
- package/dist/index.js +28 -26
- package/dist/internal/logger/console-logger.js +4 -5
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/scw-error.js +2 -2
- package/package.json +2 -2
|
@@ -16,60 +16,64 @@ const jsonContentHeaders = {
|
|
|
16
16
|
* share sensitive data.
|
|
17
17
|
*/
|
|
18
18
|
class API extends API$1 {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
19
|
+
/** Lists the available regions of the API. */
|
|
20
|
+
static LOCALITIES = ['fr-par'];
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Create a secret. You must sepcify the `region` to create a secret.
|
|
24
|
+
*
|
|
25
|
+
* @param request - The request {@link CreateSecretRequest}
|
|
26
|
+
* @returns A Promise of Secret
|
|
27
|
+
*/
|
|
28
|
+
createSecret = request => this.client.fetch({
|
|
29
|
+
body: JSON.stringify(marshalCreateSecretRequest(request, this.client.settings)),
|
|
30
|
+
headers: jsonContentHeaders,
|
|
31
|
+
method: 'POST',
|
|
32
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets`
|
|
33
|
+
}, unmarshalSecret);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get metadata using the secret's name. Retrieve the metadata of a secret
|
|
37
|
+
* specified by the `region` and the `secret_name` parameters.
|
|
38
|
+
*
|
|
39
|
+
* @param request - The request {@link GetSecretRequest}
|
|
40
|
+
* @returns A Promise of Secret
|
|
41
|
+
*/
|
|
42
|
+
getSecret = request => this.client.fetch({
|
|
43
|
+
method: 'GET',
|
|
44
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}`
|
|
45
|
+
}, unmarshalSecret);
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Get metadata using the secret's ID. Retrieve the metadata of a secret
|
|
49
|
+
* specified by the `region`, `secret_id` and `project_id` parameters.
|
|
50
|
+
*
|
|
51
|
+
* @param request - The request {@link GetSecretByNameRequest}
|
|
52
|
+
* @returns A Promise of Secret
|
|
53
|
+
*/
|
|
54
|
+
getSecretByName = request => this.client.fetch({
|
|
55
|
+
method: 'GET',
|
|
56
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-name/${validatePathParam('secretName', request.secretName)}`,
|
|
57
|
+
urlParams: urlParams(['project_id', request.projectId])
|
|
58
|
+
}, unmarshalSecret);
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Update metadata of a secret. Edit a secret's metadata such as name, tag(s)
|
|
62
|
+
* and description. The secret to update is specified by the `secret_id` and
|
|
63
|
+
* `region` parameters.
|
|
64
|
+
*
|
|
65
|
+
* @param request - The request {@link UpdateSecretRequest}
|
|
66
|
+
* @returns A Promise of Secret
|
|
67
|
+
*/
|
|
68
|
+
updateSecret = request => this.client.fetch({
|
|
69
|
+
body: JSON.stringify(marshalUpdateSecretRequest(request, this.client.settings)),
|
|
70
|
+
headers: jsonContentHeaders,
|
|
71
|
+
method: 'PATCH',
|
|
72
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}`
|
|
73
|
+
}, unmarshalSecret);
|
|
74
|
+
pageOfListSecrets = (() => {
|
|
75
|
+
var _this = this;
|
|
76
|
+
return function (request) {
|
|
73
77
|
if (request === void 0) {
|
|
74
78
|
request = {};
|
|
75
79
|
}
|
|
@@ -79,201 +83,217 @@ class API extends API$1 {
|
|
|
79
83
|
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])
|
|
80
84
|
}, unmarshalListSecretsResponse);
|
|
81
85
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
})();
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* List secrets. Retrieve the list of secrets created within an Organization
|
|
90
|
+
* and/or Project. You must specify either the `organization_id` or the
|
|
91
|
+
* `project_id` and the `region`.
|
|
92
|
+
*
|
|
93
|
+
* @param request - The request {@link ListSecretsRequest}
|
|
94
|
+
* @returns A Promise of ListSecretsResponse
|
|
95
|
+
*/
|
|
96
|
+
listSecrets = (() => {
|
|
97
|
+
var _this2 = this;
|
|
98
|
+
return function (request) {
|
|
91
99
|
if (request === void 0) {
|
|
92
100
|
request = {};
|
|
93
101
|
}
|
|
94
|
-
return enrichForPagination('secrets',
|
|
102
|
+
return enrichForPagination('secrets', _this2.pageOfListSecrets, request);
|
|
95
103
|
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
104
|
+
})();
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Delete a secret. Delete a given secret specified by the `region` and
|
|
108
|
+
* `secret_id` parameters.
|
|
109
|
+
*
|
|
110
|
+
* @param request - The request {@link DeleteSecretRequest}
|
|
111
|
+
*/
|
|
112
|
+
deleteSecret = request => this.client.fetch({
|
|
113
|
+
method: 'DELETE',
|
|
114
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}`
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Allow a product to use the secret.
|
|
119
|
+
*
|
|
120
|
+
* @param request - The request {@link AddSecretOwnerRequest}
|
|
121
|
+
*/
|
|
122
|
+
addSecretOwner = request => this.client.fetch({
|
|
123
|
+
body: JSON.stringify(marshalAddSecretOwnerRequest(request, this.client.settings)),
|
|
124
|
+
headers: jsonContentHeaders,
|
|
125
|
+
method: 'POST',
|
|
126
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/add-owner`
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Create a version. Create a version of a given secret specified by the
|
|
131
|
+
* `region` and `secret_id` parameters.
|
|
132
|
+
*
|
|
133
|
+
* @param request - The request {@link CreateSecretVersionRequest}
|
|
134
|
+
* @returns A Promise of SecretVersion
|
|
135
|
+
*/
|
|
136
|
+
createSecretVersion = request => this.client.fetch({
|
|
137
|
+
body: JSON.stringify(marshalCreateSecretVersionRequest(request, this.client.settings)),
|
|
138
|
+
headers: jsonContentHeaders,
|
|
139
|
+
method: 'POST',
|
|
140
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions`
|
|
141
|
+
}, unmarshalSecretVersion);
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Generate a password in a new version. Generate a password for the given
|
|
145
|
+
* secret specified by the `region` and `secret_id` parameters. This will also
|
|
146
|
+
* create a new version of the secret that will store the password.
|
|
147
|
+
*
|
|
148
|
+
* @param request - The request {@link GeneratePasswordRequest}
|
|
149
|
+
* @returns A Promise of SecretVersion
|
|
150
|
+
*/
|
|
151
|
+
generatePassword = request => this.client.fetch({
|
|
152
|
+
body: JSON.stringify(marshalGeneratePasswordRequest(request, this.client.settings)),
|
|
153
|
+
headers: jsonContentHeaders,
|
|
154
|
+
method: 'POST',
|
|
155
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/generate-password`
|
|
156
|
+
}, unmarshalSecretVersion);
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Get metadata of a secret's version using the secret's ID. Retrieve the
|
|
160
|
+
* metadata of a secret's given version specified by the `region`, `secret_id`
|
|
161
|
+
* and `revision` parameters.
|
|
162
|
+
*
|
|
163
|
+
* @param request - The request {@link GetSecretVersionRequest}
|
|
164
|
+
* @returns A Promise of SecretVersion
|
|
165
|
+
*/
|
|
166
|
+
getSecretVersion = request => this.client.fetch({
|
|
167
|
+
method: 'GET',
|
|
168
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}`
|
|
169
|
+
}, unmarshalSecretVersion);
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Get metadata of a secret's version using the secret's name. Retrieve the
|
|
173
|
+
* metadata of a secret's given version specified by the `region`,
|
|
174
|
+
* `secret_name`, `revision` and `project_id` parameters.
|
|
175
|
+
*
|
|
176
|
+
* @param request - The request {@link GetSecretVersionByNameRequest}
|
|
177
|
+
* @returns A Promise of SecretVersion
|
|
178
|
+
*/
|
|
179
|
+
getSecretVersionByName = request => this.client.fetch({
|
|
180
|
+
method: 'GET',
|
|
181
|
+
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)}`,
|
|
182
|
+
urlParams: urlParams(['project_id', request.projectId])
|
|
183
|
+
}, unmarshalSecretVersion);
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Update metadata of a version. Edit the metadata of a secret's given
|
|
187
|
+
* version, specified by the `region`, `secret_id` and `revision` parameters.
|
|
188
|
+
*
|
|
189
|
+
* @param request - The request {@link UpdateSecretVersionRequest}
|
|
190
|
+
* @returns A Promise of SecretVersion
|
|
191
|
+
*/
|
|
192
|
+
updateSecretVersion = request => this.client.fetch({
|
|
193
|
+
body: JSON.stringify(marshalUpdateSecretVersionRequest(request, this.client.settings)),
|
|
194
|
+
headers: jsonContentHeaders,
|
|
195
|
+
method: 'PATCH',
|
|
196
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}`
|
|
197
|
+
}, unmarshalSecretVersion);
|
|
198
|
+
pageOfListSecretVersions = request => this.client.fetch({
|
|
199
|
+
method: 'GET',
|
|
200
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions`,
|
|
201
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['status', request.status])
|
|
202
|
+
}, unmarshalListSecretVersionsResponse);
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* List versions of a secret using the secret's ID. Retrieve the list of a
|
|
206
|
+
* given secret's versions specified by the `secret_id` and `region`
|
|
207
|
+
* parameters.
|
|
208
|
+
*
|
|
209
|
+
* @param request - The request {@link ListSecretVersionsRequest}
|
|
210
|
+
* @returns A Promise of ListSecretVersionsResponse
|
|
211
|
+
*/
|
|
212
|
+
listSecretVersions = request => enrichForPagination('versions', this.pageOfListSecretVersions, request);
|
|
213
|
+
pageOfListSecretVersionsByName = request => this.client.fetch({
|
|
214
|
+
method: 'GET',
|
|
215
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-name/${validatePathParam('secretName', request.secretName)}/versions`,
|
|
216
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['status', request.status])
|
|
217
|
+
}, unmarshalListSecretVersionsResponse);
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* List versions of a secret using the secret's name. Retrieve the list of a
|
|
221
|
+
* given secret's versions specified by the `secret_name`,`region` and
|
|
222
|
+
* `project_id` parameters.
|
|
223
|
+
*
|
|
224
|
+
* @param request - The request {@link ListSecretVersionsByNameRequest}
|
|
225
|
+
* @returns A Promise of ListSecretVersionsResponse
|
|
226
|
+
*/
|
|
227
|
+
listSecretVersionsByName = request => enrichForPagination('versions', this.pageOfListSecretVersionsByName, request);
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Enable a version. Make a specific version accessible. You must specify the
|
|
231
|
+
* `region`, `secret_id` and `revision` parameters.
|
|
232
|
+
*
|
|
233
|
+
* @param request - The request {@link EnableSecretVersionRequest}
|
|
234
|
+
* @returns A Promise of SecretVersion
|
|
235
|
+
*/
|
|
236
|
+
enableSecretVersion = request => this.client.fetch({
|
|
237
|
+
body: '{}',
|
|
238
|
+
headers: jsonContentHeaders,
|
|
239
|
+
method: 'POST',
|
|
240
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}/enable`
|
|
241
|
+
}, unmarshalSecretVersion);
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Disable a version. Make a specific version inaccessible. You must specify
|
|
245
|
+
* the `region`, `secret_id` and `revision` parameters.
|
|
246
|
+
*
|
|
247
|
+
* @param request - The request {@link DisableSecretVersionRequest}
|
|
248
|
+
* @returns A Promise of SecretVersion
|
|
249
|
+
*/
|
|
250
|
+
disableSecretVersion = 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)}/disable`
|
|
255
|
+
}, unmarshalSecretVersion);
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Access a secret's version using the secret's ID. Access sensitive data in a
|
|
259
|
+
* secret's version specified by the `region`, `secret_id` and `revision`
|
|
260
|
+
* parameters.
|
|
261
|
+
*
|
|
262
|
+
* @param request - The request {@link AccessSecretVersionRequest}
|
|
263
|
+
* @returns A Promise of AccessSecretVersionResponse
|
|
264
|
+
*/
|
|
265
|
+
accessSecretVersion = request => this.client.fetch({
|
|
266
|
+
method: 'GET',
|
|
267
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}/access`
|
|
268
|
+
}, unmarshalAccessSecretVersionResponse);
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Access a secret's version using the secret's name. Access sensitive data in
|
|
272
|
+
* a secret's version specified by the `region`, `secret_name`, `revision` and
|
|
273
|
+
* `project_id` parameters.
|
|
274
|
+
*
|
|
275
|
+
* @param request - The request {@link AccessSecretVersionByNameRequest}
|
|
276
|
+
* @returns A Promise of AccessSecretVersionResponse
|
|
277
|
+
*/
|
|
278
|
+
accessSecretVersionByName = request => this.client.fetch({
|
|
279
|
+
method: 'GET',
|
|
280
|
+
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`,
|
|
281
|
+
urlParams: urlParams(['project_id', request.projectId])
|
|
282
|
+
}, unmarshalAccessSecretVersionResponse);
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Delete a version. Delete a secret's version and the sensitive data
|
|
286
|
+
* contained in it. Deleting a version is permanent and cannot be undone.
|
|
287
|
+
*
|
|
288
|
+
* @param request - The request {@link DestroySecretVersionRequest}
|
|
289
|
+
* @returns A Promise of SecretVersion
|
|
290
|
+
*/
|
|
291
|
+
destroySecretVersion = request => this.client.fetch({
|
|
292
|
+
body: '{}',
|
|
293
|
+
headers: jsonContentHeaders,
|
|
294
|
+
method: 'POST',
|
|
295
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}/destroy`
|
|
296
|
+
}, unmarshalSecretVersion);
|
|
275
297
|
}
|
|
276
|
-
/** Lists the available regions of the API. */
|
|
277
|
-
API.LOCALITIES = ['fr-par'];
|
|
278
298
|
|
|
279
299
|
export { API };
|