@scaleway/sdk 2.8.0 → 2.10.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/iam/v1alpha1/api.gen.js +14 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.js +4 -1
- package/dist/api/instance/v1/marshalling.gen.js +3 -0
- package/dist/api/ipam/v1/marshalling.gen.js +15 -0
- package/dist/api/jobs/v1alpha1/api.gen.js +64 -0
- package/dist/api/jobs/v1alpha1/marshalling.gen.js +20 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.js +31 -1
- package/dist/api/k8s/v1/marshalling.gen.js +11 -0
- package/dist/api/lb/v1/api.gen.js +4 -4
- package/dist/api/lb/v1/marshalling.gen.js +8 -0
- package/dist/api/secret/v1alpha1/api.gen.js +3 -3
- package/dist/api/secret/v1alpha1/marshalling.gen.js +37 -6
- package/dist/index.cjs +217 -16
- package/dist/index.d.ts +256 -25
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
|
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
499
|
|
|
500
|
-
const version = 'v2.
|
|
500
|
+
const version = 'v2.9.0';
|
|
501
501
|
const userAgent = `scaleway-sdk-js/${version}`;
|
|
502
502
|
|
|
503
503
|
const isBrowser = () =>
|
|
@@ -6430,7 +6430,7 @@ const marshalUpdateSnapshotRequest$2 = (request, defaults) => ({
|
|
|
6430
6430
|
expires_at: request.expiresAt,
|
|
6431
6431
|
name: request.name
|
|
6432
6432
|
});
|
|
6433
|
-
const marshalUpdateUserRequest$
|
|
6433
|
+
const marshalUpdateUserRequest$2 = (request, defaults) => ({
|
|
6434
6434
|
is_admin: request.isAdmin,
|
|
6435
6435
|
password: request.password
|
|
6436
6436
|
});
|
|
@@ -6983,7 +6983,7 @@ let API$o = class API extends API$w {
|
|
|
6983
6983
|
* @returns A Promise of User
|
|
6984
6984
|
*/
|
|
6985
6985
|
updateUser = request => this.client.fetch({
|
|
6986
|
-
body: JSON.stringify(marshalUpdateUserRequest$
|
|
6986
|
+
body: JSON.stringify(marshalUpdateUserRequest$2(request, this.client.settings)),
|
|
6987
6987
|
headers: jsonContentHeaders$n,
|
|
6988
6988
|
method: 'PATCH',
|
|
6989
6989
|
path: `/document-db/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/users/${validatePathParam('name', request.name)}`
|
|
@@ -10968,6 +10968,9 @@ const marshalUpdateSSHKeyRequest = (request, defaults) => ({
|
|
|
10968
10968
|
disabled: request.disabled,
|
|
10969
10969
|
name: request.name
|
|
10970
10970
|
});
|
|
10971
|
+
const marshalUpdateUserRequest$1 = (request, defaults) => ({
|
|
10972
|
+
tags: request.tags
|
|
10973
|
+
});
|
|
10971
10974
|
|
|
10972
10975
|
// This file was automatically generated. DO NOT EDIT.
|
|
10973
10976
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -11077,6 +11080,19 @@ let API$k = class API extends API$w {
|
|
|
11077
11080
|
path: `/iam/v1alpha1/users/${validatePathParam('userId', request.userId)}`
|
|
11078
11081
|
}, unmarshalUser$1);
|
|
11079
11082
|
|
|
11083
|
+
/**
|
|
11084
|
+
* Update a user. Update the parameters of a user, including `tags`.
|
|
11085
|
+
*
|
|
11086
|
+
* @param request - The request {@link UpdateUserRequest}
|
|
11087
|
+
* @returns A Promise of User
|
|
11088
|
+
*/
|
|
11089
|
+
updateUser = request => this.client.fetch({
|
|
11090
|
+
body: JSON.stringify(marshalUpdateUserRequest$1(request, this.client.settings)),
|
|
11091
|
+
headers: jsonContentHeaders$j,
|
|
11092
|
+
method: 'PATCH',
|
|
11093
|
+
path: `/iam/v1alpha1/users/${validatePathParam('userId', request.userId)}`
|
|
11094
|
+
}, unmarshalUser$1);
|
|
11095
|
+
|
|
11080
11096
|
/**
|
|
11081
11097
|
* Delete a guest user from an Organization. Remove a user from an
|
|
11082
11098
|
* Organization in which they are a guest. You must define the `user_id` in
|
|
@@ -12016,6 +12032,7 @@ const unmarshalServerIp = data => {
|
|
|
12016
12032
|
family: data.family,
|
|
12017
12033
|
gateway: data.gateway,
|
|
12018
12034
|
id: data.id,
|
|
12035
|
+
ipamId: data.ipam_id,
|
|
12019
12036
|
netmask: data.netmask,
|
|
12020
12037
|
provisioningMode: data.provisioning_mode,
|
|
12021
12038
|
state: data.state,
|
|
@@ -12134,6 +12151,7 @@ const unmarshalIp$1 = data => {
|
|
|
12134
12151
|
return {
|
|
12135
12152
|
address: data.address,
|
|
12136
12153
|
id: data.id,
|
|
12154
|
+
ipamId: data.ipam_id,
|
|
12137
12155
|
organization: data.organization,
|
|
12138
12156
|
prefix: data.prefix,
|
|
12139
12157
|
project: data.project,
|
|
@@ -13209,6 +13227,7 @@ const marshalServerIp = (request, defaults) => ({
|
|
|
13209
13227
|
family: request.family,
|
|
13210
13228
|
gateway: request.gateway,
|
|
13211
13229
|
id: request.id,
|
|
13230
|
+
ipam_id: request.ipamId,
|
|
13212
13231
|
netmask: request.netmask,
|
|
13213
13232
|
provisioning_mode: request.provisioningMode,
|
|
13214
13233
|
state: request.state,
|
|
@@ -15475,6 +15494,15 @@ const unmarshalResource = data => {
|
|
|
15475
15494
|
type: data.type
|
|
15476
15495
|
};
|
|
15477
15496
|
};
|
|
15497
|
+
const unmarshalReverse = data => {
|
|
15498
|
+
if (!isJSONObject(data)) {
|
|
15499
|
+
throw new TypeError(`Unmarshalling the type 'Reverse' failed as data isn't a dictionary.`);
|
|
15500
|
+
}
|
|
15501
|
+
return {
|
|
15502
|
+
address: data.address,
|
|
15503
|
+
hostname: data.hostname
|
|
15504
|
+
};
|
|
15505
|
+
};
|
|
15478
15506
|
const unmarshalSource = data => {
|
|
15479
15507
|
if (!isJSONObject(data)) {
|
|
15480
15508
|
throw new TypeError(`Unmarshalling the type 'Source' failed as data isn't a dictionary.`);
|
|
@@ -15497,6 +15525,7 @@ const unmarshalIP$1 = data => {
|
|
|
15497
15525
|
projectId: data.project_id,
|
|
15498
15526
|
region: data.region,
|
|
15499
15527
|
resource: data.resource ? unmarshalResource(data.resource) : undefined,
|
|
15528
|
+
reverses: unmarshalArrayOfObject(data.reverses, unmarshalReverse),
|
|
15500
15529
|
source: unmarshalSource(data.source),
|
|
15501
15530
|
tags: data.tags,
|
|
15502
15531
|
updatedAt: unmarshalDate(data.updated_at),
|
|
@@ -15531,7 +15560,12 @@ const marshalBookIPRequest = (request, defaults) => ({
|
|
|
15531
15560
|
source: marshalSource(request.source),
|
|
15532
15561
|
tags: request.tags
|
|
15533
15562
|
});
|
|
15563
|
+
const marshalReverse = (request, defaults) => ({
|
|
15564
|
+
address: request.address,
|
|
15565
|
+
hostname: request.hostname
|
|
15566
|
+
});
|
|
15534
15567
|
const marshalUpdateIPRequest$1 = (request, defaults) => ({
|
|
15568
|
+
reverses: request.reverses !== undefined ? request.reverses.map(elt => marshalReverse(elt)) : undefined,
|
|
15535
15569
|
tags: request.tags
|
|
15536
15570
|
});
|
|
15537
15571
|
|
|
@@ -16140,6 +16174,15 @@ var index$h = /*#__PURE__*/Object.freeze({
|
|
|
16140
16174
|
|
|
16141
16175
|
// This file was automatically generated. DO NOT EDIT.
|
|
16142
16176
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
16177
|
+
const unmarshalCronSchedule = data => {
|
|
16178
|
+
if (!isJSONObject(data)) {
|
|
16179
|
+
throw new TypeError(`Unmarshalling the type 'CronSchedule' failed as data isn't a dictionary.`);
|
|
16180
|
+
}
|
|
16181
|
+
return {
|
|
16182
|
+
schedule: data.schedule,
|
|
16183
|
+
timezone: data.timezone
|
|
16184
|
+
};
|
|
16185
|
+
};
|
|
16143
16186
|
const unmarshalJobDefinition = data => {
|
|
16144
16187
|
if (!isJSONObject(data)) {
|
|
16145
16188
|
throw new TypeError(`Unmarshalling the type 'JobDefinition' failed as data isn't a dictionary.`);
|
|
@@ -16148,6 +16191,7 @@ const unmarshalJobDefinition = data => {
|
|
|
16148
16191
|
command: data.command,
|
|
16149
16192
|
cpuLimit: data.cpu_limit,
|
|
16150
16193
|
createdAt: unmarshalDate(data.created_at),
|
|
16194
|
+
cronSchedule: data.cron_schedule ? unmarshalCronSchedule(data.cron_schedule) : undefined,
|
|
16151
16195
|
description: data.description,
|
|
16152
16196
|
environmentVariables: data.environment_variables,
|
|
16153
16197
|
id: data.id,
|
|
@@ -16197,9 +16241,14 @@ const unmarshalListJobRunsResponse = data => {
|
|
|
16197
16241
|
totalCount: data.total_count
|
|
16198
16242
|
};
|
|
16199
16243
|
};
|
|
16244
|
+
const marshalCreateJobDefinitionRequestCronScheduleConfig = (request, defaults) => ({
|
|
16245
|
+
schedule: request.schedule,
|
|
16246
|
+
timezone: request.timezone
|
|
16247
|
+
});
|
|
16200
16248
|
const marshalCreateJobDefinitionRequest = (request, defaults) => ({
|
|
16201
16249
|
command: request.command,
|
|
16202
16250
|
cpu_limit: request.cpuLimit,
|
|
16251
|
+
cron_schedule: request.cronSchedule !== undefined ? marshalCreateJobDefinitionRequestCronScheduleConfig(request.cronSchedule) : undefined,
|
|
16203
16252
|
description: request.description,
|
|
16204
16253
|
environment_variables: request.environmentVariables !== undefined ? request.environmentVariables : undefined,
|
|
16205
16254
|
image_uri: request.imageUri,
|
|
@@ -16208,9 +16257,14 @@ const marshalCreateJobDefinitionRequest = (request, defaults) => ({
|
|
|
16208
16257
|
name: request.name || randomName('job'),
|
|
16209
16258
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
16210
16259
|
});
|
|
16260
|
+
const marshalUpdateJobDefinitionRequestCronScheduleConfig = (request, defaults) => ({
|
|
16261
|
+
schedule: request.schedule,
|
|
16262
|
+
timezone: request.timezone
|
|
16263
|
+
});
|
|
16211
16264
|
const marshalUpdateJobDefinitionRequest = (request, defaults) => ({
|
|
16212
16265
|
command: request.command,
|
|
16213
16266
|
cpu_limit: request.cpuLimit,
|
|
16267
|
+
cron_schedule: request.cronSchedule !== undefined ? marshalUpdateJobDefinitionRequestCronScheduleConfig(request.cronSchedule) : undefined,
|
|
16214
16268
|
description: request.description,
|
|
16215
16269
|
environment_variables: request.environmentVariables,
|
|
16216
16270
|
image_uri: request.imageUri,
|
|
@@ -16229,12 +16283,26 @@ const jsonContentHeaders$e = {
|
|
|
16229
16283
|
let API$f = class API extends API$w {
|
|
16230
16284
|
/** Lists the available regions of the API. */
|
|
16231
16285
|
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
16286
|
+
|
|
16287
|
+
/**
|
|
16288
|
+
* Create a new job definition in a specified Project.
|
|
16289
|
+
*
|
|
16290
|
+
* @param request - The request {@link CreateJobDefinitionRequest}
|
|
16291
|
+
* @returns A Promise of JobDefinition
|
|
16292
|
+
*/
|
|
16232
16293
|
createJobDefinition = request => this.client.fetch({
|
|
16233
16294
|
body: JSON.stringify(marshalCreateJobDefinitionRequest(request, this.client.settings)),
|
|
16234
16295
|
headers: jsonContentHeaders$e,
|
|
16235
16296
|
method: 'POST',
|
|
16236
16297
|
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-definitions`
|
|
16237
16298
|
}, unmarshalJobDefinition);
|
|
16299
|
+
|
|
16300
|
+
/**
|
|
16301
|
+
* Get a job definition by its unique identifier.
|
|
16302
|
+
*
|
|
16303
|
+
* @param request - The request {@link GetJobDefinitionRequest}
|
|
16304
|
+
* @returns A Promise of JobDefinition
|
|
16305
|
+
*/
|
|
16238
16306
|
getJobDefinition = request => this.client.fetch({
|
|
16239
16307
|
method: 'GET',
|
|
16240
16308
|
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam('jobDefinitionId', request.jobDefinitionId)}`
|
|
@@ -16244,27 +16312,70 @@ let API$f = class API extends API$w {
|
|
|
16244
16312
|
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-definitions`,
|
|
16245
16313
|
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
16246
16314
|
}, unmarshalListJobDefinitionsResponse);
|
|
16315
|
+
|
|
16316
|
+
/**
|
|
16317
|
+
* List all your job definitions with filters.
|
|
16318
|
+
*
|
|
16319
|
+
* @param request - The request {@link ListJobDefinitionsRequest}
|
|
16320
|
+
* @returns A Promise of ListJobDefinitionsResponse
|
|
16321
|
+
*/
|
|
16247
16322
|
listJobDefinitions = (request = {}) => enrichForPagination('jobDefinitions', this.pageOfListJobDefinitions, request);
|
|
16323
|
+
|
|
16324
|
+
/**
|
|
16325
|
+
* Update an existing job definition associated with the specified unique
|
|
16326
|
+
* identifier.
|
|
16327
|
+
*
|
|
16328
|
+
* @param request - The request {@link UpdateJobDefinitionRequest}
|
|
16329
|
+
* @returns A Promise of JobDefinition
|
|
16330
|
+
*/
|
|
16248
16331
|
updateJobDefinition = request => this.client.fetch({
|
|
16249
16332
|
body: JSON.stringify(marshalUpdateJobDefinitionRequest(request, this.client.settings)),
|
|
16250
16333
|
headers: jsonContentHeaders$e,
|
|
16251
16334
|
method: 'PATCH',
|
|
16252
16335
|
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam('jobDefinitionId', request.jobDefinitionId)}`
|
|
16253
16336
|
}, unmarshalJobDefinition);
|
|
16337
|
+
|
|
16338
|
+
/**
|
|
16339
|
+
* Delete an exsisting job definition by its unique identifier.
|
|
16340
|
+
*
|
|
16341
|
+
* @param request - The request {@link DeleteJobDefinitionRequest}
|
|
16342
|
+
*/
|
|
16254
16343
|
deleteJobDefinition = request => this.client.fetch({
|
|
16255
16344
|
method: 'DELETE',
|
|
16256
16345
|
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam('jobDefinitionId', request.jobDefinitionId)}`
|
|
16257
16346
|
});
|
|
16347
|
+
|
|
16348
|
+
/**
|
|
16349
|
+
* Run an existing job definition by its unique identifier. This will create a
|
|
16350
|
+
* new job run.
|
|
16351
|
+
*
|
|
16352
|
+
* @param request - The request {@link StartJobDefinitionRequest}
|
|
16353
|
+
* @returns A Promise of JobRun
|
|
16354
|
+
*/
|
|
16258
16355
|
startJobDefinition = request => this.client.fetch({
|
|
16259
16356
|
body: '{}',
|
|
16260
16357
|
headers: jsonContentHeaders$e,
|
|
16261
16358
|
method: 'POST',
|
|
16262
16359
|
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam('jobDefinitionId', request.jobDefinitionId)}/start`
|
|
16263
16360
|
}, unmarshalJobRun);
|
|
16361
|
+
|
|
16362
|
+
/**
|
|
16363
|
+
* Get a job run by its unique identifier.
|
|
16364
|
+
*
|
|
16365
|
+
* @param request - The request {@link GetJobRunRequest}
|
|
16366
|
+
* @returns A Promise of JobRun
|
|
16367
|
+
*/
|
|
16264
16368
|
getJobRun = request => this.client.fetch({
|
|
16265
16369
|
method: 'GET',
|
|
16266
16370
|
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-runs/${validatePathParam('jobRunId', request.jobRunId)}`
|
|
16267
16371
|
}, unmarshalJobRun);
|
|
16372
|
+
|
|
16373
|
+
/**
|
|
16374
|
+
* Stop a job run by its unique identifier.
|
|
16375
|
+
*
|
|
16376
|
+
* @param request - The request {@link StopJobRunRequest}
|
|
16377
|
+
* @returns A Promise of JobRun
|
|
16378
|
+
*/
|
|
16268
16379
|
stopJobRun = request => this.client.fetch({
|
|
16269
16380
|
body: '{}',
|
|
16270
16381
|
headers: jsonContentHeaders$e,
|
|
@@ -16276,6 +16387,13 @@ let API$f = class API extends API$w {
|
|
|
16276
16387
|
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-runs`,
|
|
16277
16388
|
urlParams: urlParams(['job_definition_id', request.jobDefinitionId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
16278
16389
|
}, unmarshalListJobRunsResponse);
|
|
16390
|
+
|
|
16391
|
+
/**
|
|
16392
|
+
* List all job runs with filters.
|
|
16393
|
+
*
|
|
16394
|
+
* @param request - The request {@link ListJobRunsRequest}
|
|
16395
|
+
* @returns A Promise of ListJobRunsResponse
|
|
16396
|
+
*/
|
|
16279
16397
|
listJobRuns = (request = {}) => enrichForPagination('jobRuns', this.pageOfListJobRuns, request);
|
|
16280
16398
|
};
|
|
16281
16399
|
|
|
@@ -16302,6 +16420,26 @@ const CreateJobDefinitionRequest = {
|
|
|
16302
16420
|
pattern: /^[A-Za-z0-9-_]{3,50}$/
|
|
16303
16421
|
}
|
|
16304
16422
|
};
|
|
16423
|
+
const CreateJobDefinitionRequestCronScheduleConfig = {
|
|
16424
|
+
schedule: {
|
|
16425
|
+
maxLength: 255,
|
|
16426
|
+
minLength: 1
|
|
16427
|
+
},
|
|
16428
|
+
timezone: {
|
|
16429
|
+
maxLength: 255,
|
|
16430
|
+
minLength: 1
|
|
16431
|
+
}
|
|
16432
|
+
};
|
|
16433
|
+
const CronSchedule = {
|
|
16434
|
+
schedule: {
|
|
16435
|
+
maxLength: 255,
|
|
16436
|
+
minLength: 1
|
|
16437
|
+
},
|
|
16438
|
+
timezone: {
|
|
16439
|
+
maxLength: 255,
|
|
16440
|
+
minLength: 1
|
|
16441
|
+
}
|
|
16442
|
+
};
|
|
16305
16443
|
const ListJobDefinitionsRequest = {
|
|
16306
16444
|
page: {
|
|
16307
16445
|
greaterThanOrEqual: 1
|
|
@@ -16334,13 +16472,26 @@ const UpdateJobDefinitionRequest = {
|
|
|
16334
16472
|
pattern: /^[A-Za-z0-9-_]{3,50}$/
|
|
16335
16473
|
}
|
|
16336
16474
|
};
|
|
16475
|
+
const UpdateJobDefinitionRequestCronScheduleConfig = {
|
|
16476
|
+
schedule: {
|
|
16477
|
+
maxLength: 255,
|
|
16478
|
+
minLength: 1
|
|
16479
|
+
},
|
|
16480
|
+
timezone: {
|
|
16481
|
+
maxLength: 255,
|
|
16482
|
+
minLength: 1
|
|
16483
|
+
}
|
|
16484
|
+
};
|
|
16337
16485
|
|
|
16338
16486
|
var validationRules_gen$5 = /*#__PURE__*/Object.freeze({
|
|
16339
16487
|
__proto__: null,
|
|
16340
16488
|
CreateJobDefinitionRequest: CreateJobDefinitionRequest,
|
|
16489
|
+
CreateJobDefinitionRequestCronScheduleConfig: CreateJobDefinitionRequestCronScheduleConfig,
|
|
16490
|
+
CronSchedule: CronSchedule,
|
|
16341
16491
|
ListJobDefinitionsRequest: ListJobDefinitionsRequest,
|
|
16342
16492
|
ListJobRunsRequest: ListJobRunsRequest,
|
|
16343
|
-
UpdateJobDefinitionRequest: UpdateJobDefinitionRequest
|
|
16493
|
+
UpdateJobDefinitionRequest: UpdateJobDefinitionRequest,
|
|
16494
|
+
UpdateJobDefinitionRequestCronScheduleConfig: UpdateJobDefinitionRequestCronScheduleConfig
|
|
16344
16495
|
});
|
|
16345
16496
|
|
|
16346
16497
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -16529,6 +16680,16 @@ const unmarshalNode = data => {
|
|
|
16529
16680
|
updatedAt: unmarshalDate(data.updated_at)
|
|
16530
16681
|
};
|
|
16531
16682
|
};
|
|
16683
|
+
const unmarshalExternalNodeCoreV1Taint = data => {
|
|
16684
|
+
if (!isJSONObject(data)) {
|
|
16685
|
+
throw new TypeError(`Unmarshalling the type 'ExternalNodeCoreV1Taint' failed as data isn't a dictionary.`);
|
|
16686
|
+
}
|
|
16687
|
+
return {
|
|
16688
|
+
effect: data.effect,
|
|
16689
|
+
key: data.key,
|
|
16690
|
+
value: data.value
|
|
16691
|
+
};
|
|
16692
|
+
};
|
|
16532
16693
|
const unmarshalExternalNode = data => {
|
|
16533
16694
|
if (!isJSONObject(data)) {
|
|
16534
16695
|
throw new TypeError(`Unmarshalling the type 'ExternalNode' failed as data isn't a dictionary.`);
|
|
@@ -16544,6 +16705,7 @@ const unmarshalExternalNode = data => {
|
|
|
16544
16705
|
kubeletConfig: data.kubelet_config,
|
|
16545
16706
|
name: data.name,
|
|
16546
16707
|
nodeLabels: data.node_labels,
|
|
16708
|
+
nodeTaints: unmarshalArrayOfObject(data.node_taints, unmarshalExternalNodeCoreV1Taint),
|
|
16547
16709
|
poolVersion: data.pool_version,
|
|
16548
16710
|
runcVersion: data.runc_version
|
|
16549
16711
|
};
|
|
@@ -17978,6 +18140,7 @@ const marshalCreateFrontendRequest = (request, defaults) => ({
|
|
|
17978
18140
|
timeout_client: request.timeoutClient
|
|
17979
18141
|
});
|
|
17980
18142
|
const marshalCreateIpRequest = (request, defaults) => ({
|
|
18143
|
+
is_ipv6: request.isIpv6,
|
|
17981
18144
|
reverse: request.reverse,
|
|
17982
18145
|
...resolveOneOf([{
|
|
17983
18146
|
default: defaults.defaultProjectId,
|
|
@@ -17991,8 +18154,10 @@ const marshalCreateIpRequest = (request, defaults) => ({
|
|
|
17991
18154
|
});
|
|
17992
18155
|
const marshalCreateLbRequest = (request, defaults) => ({
|
|
17993
18156
|
assign_flexible_ip: request.assignFlexibleIp,
|
|
18157
|
+
assign_flexible_ipv6: request.assignFlexibleIpv6,
|
|
17994
18158
|
description: request.description,
|
|
17995
18159
|
ip_id: request.ipId,
|
|
18160
|
+
ip_ids: request.ipIds,
|
|
17996
18161
|
name: request.name || randomName('lb'),
|
|
17997
18162
|
ssl_compatibility_level: request.sslCompatibilityLevel,
|
|
17998
18163
|
tags: request.tags,
|
|
@@ -18129,6 +18294,7 @@ const marshalUpdateHealthCheckRequest = (request, defaults) => ({
|
|
|
18129
18294
|
}])
|
|
18130
18295
|
});
|
|
18131
18296
|
const marshalUpdateIpRequest = (request, defaults) => ({
|
|
18297
|
+
lb_id: request.lbId,
|
|
18132
18298
|
reverse: request.reverse
|
|
18133
18299
|
});
|
|
18134
18300
|
const marshalUpdateLbRequest = (request, defaults) => ({
|
|
@@ -18216,6 +18382,7 @@ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
|
|
|
18216
18382
|
timeout_client: request.timeoutClient
|
|
18217
18383
|
});
|
|
18218
18384
|
const marshalZonedApiCreateIpRequest = (request, defaults) => ({
|
|
18385
|
+
is_ipv6: request.isIpv6,
|
|
18219
18386
|
reverse: request.reverse,
|
|
18220
18387
|
...resolveOneOf([{
|
|
18221
18388
|
default: defaults.defaultProjectId,
|
|
@@ -18229,8 +18396,10 @@ const marshalZonedApiCreateIpRequest = (request, defaults) => ({
|
|
|
18229
18396
|
});
|
|
18230
18397
|
const marshalZonedApiCreateLbRequest = (request, defaults) => ({
|
|
18231
18398
|
assign_flexible_ip: request.assignFlexibleIp,
|
|
18399
|
+
assign_flexible_ipv6: request.assignFlexibleIpv6,
|
|
18232
18400
|
description: request.description,
|
|
18233
18401
|
ip_id: request.ipId,
|
|
18402
|
+
ip_ids: request.ipIds,
|
|
18234
18403
|
name: request.name || randomName('lb'),
|
|
18235
18404
|
ssl_compatibility_level: request.sslCompatibilityLevel,
|
|
18236
18405
|
tags: request.tags,
|
|
@@ -18362,6 +18531,7 @@ const marshalZonedApiUpdateHealthCheckRequest = (request, defaults) => ({
|
|
|
18362
18531
|
}])
|
|
18363
18532
|
});
|
|
18364
18533
|
const marshalZonedApiUpdateIpRequest = (request, defaults) => ({
|
|
18534
|
+
lb_id: request.lbId,
|
|
18365
18535
|
reverse: request.reverse
|
|
18366
18536
|
});
|
|
18367
18537
|
const marshalZonedApiUpdateLbRequest = (request, defaults) => ({
|
|
@@ -18499,7 +18669,7 @@ class ZonedAPI extends API$w {
|
|
|
18499
18669
|
pageOfListIPs = (request = {}) => this.client.fetch({
|
|
18500
18670
|
method: 'GET',
|
|
18501
18671
|
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips`,
|
|
18502
|
-
urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
18672
|
+
urlParams: urlParams(['ip_address', request.ipAddress], ['ip_type', request.ipType], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
18503
18673
|
}, unmarshalListIpsResponse);
|
|
18504
18674
|
|
|
18505
18675
|
/**
|
|
@@ -18520,7 +18690,7 @@ class ZonedAPI extends API$w {
|
|
|
18520
18690
|
* @param request - The request {@link ZonedApiCreateIpRequest}
|
|
18521
18691
|
* @returns A Promise of Ip
|
|
18522
18692
|
*/
|
|
18523
|
-
createIp =
|
|
18693
|
+
createIp = request => this.client.fetch({
|
|
18524
18694
|
body: JSON.stringify(marshalZonedApiCreateIpRequest(request, this.client.settings)),
|
|
18525
18695
|
headers: jsonContentHeaders$c,
|
|
18526
18696
|
method: 'POST',
|
|
@@ -19288,7 +19458,7 @@ let API$d = class API extends API$w {
|
|
|
19288
19458
|
pageOfListIPs = (request = {}) => this.client.fetch({
|
|
19289
19459
|
method: 'GET',
|
|
19290
19460
|
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips`,
|
|
19291
|
-
urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
19461
|
+
urlParams: urlParams(['ip_address', request.ipAddress], ['ip_type', request.ipType], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
19292
19462
|
}, unmarshalListIpsResponse);
|
|
19293
19463
|
|
|
19294
19464
|
/**
|
|
@@ -19305,7 +19475,7 @@ let API$d = class API extends API$w {
|
|
|
19305
19475
|
* @param request - The request {@link CreateIpRequest}
|
|
19306
19476
|
* @returns A Promise of Ip
|
|
19307
19477
|
*/
|
|
19308
|
-
createIp =
|
|
19478
|
+
createIp = request => this.client.fetch({
|
|
19309
19479
|
body: JSON.stringify(marshalCreateIpRequest(request, this.client.settings)),
|
|
19310
19480
|
headers: jsonContentHeaders$c,
|
|
19311
19481
|
method: 'POST',
|
|
@@ -23679,6 +23849,16 @@ const unmarshalFolder = data => {
|
|
|
23679
23849
|
region: data.region
|
|
23680
23850
|
};
|
|
23681
23851
|
};
|
|
23852
|
+
const unmarshalEphemeralProperties = data => {
|
|
23853
|
+
if (!isJSONObject(data)) {
|
|
23854
|
+
throw new TypeError(`Unmarshalling the type 'EphemeralProperties' failed as data isn't a dictionary.`);
|
|
23855
|
+
}
|
|
23856
|
+
return {
|
|
23857
|
+
action: data.action,
|
|
23858
|
+
expiresAt: unmarshalDate(data.expires_at),
|
|
23859
|
+
expiresOnceAccessed: data.expires_once_accessed
|
|
23860
|
+
};
|
|
23861
|
+
};
|
|
23682
23862
|
const unmarshalSecretVersion = data => {
|
|
23683
23863
|
if (!isJSONObject(data)) {
|
|
23684
23864
|
throw new TypeError(`Unmarshalling the type 'SecretVersion' failed as data isn't a dictionary.`);
|
|
@@ -23686,6 +23866,7 @@ const unmarshalSecretVersion = data => {
|
|
|
23686
23866
|
return {
|
|
23687
23867
|
createdAt: unmarshalDate(data.created_at),
|
|
23688
23868
|
description: data.description,
|
|
23869
|
+
ephemeralProperties: data.ephemeral_properties ? unmarshalEphemeralProperties(data.ephemeral_properties) : undefined,
|
|
23689
23870
|
isLatest: data.is_latest,
|
|
23690
23871
|
revision: data.revision,
|
|
23691
23872
|
secretId: data.secret_id,
|
|
@@ -23693,6 +23874,16 @@ const unmarshalSecretVersion = data => {
|
|
|
23693
23874
|
updatedAt: unmarshalDate(data.updated_at)
|
|
23694
23875
|
};
|
|
23695
23876
|
};
|
|
23877
|
+
const unmarshalEphemeralPolicy = data => {
|
|
23878
|
+
if (!isJSONObject(data)) {
|
|
23879
|
+
throw new TypeError(`Unmarshalling the type 'EphemeralPolicy' failed as data isn't a dictionary.`);
|
|
23880
|
+
}
|
|
23881
|
+
return {
|
|
23882
|
+
action: data.action,
|
|
23883
|
+
expiresOnceAccessed: data.expires_once_accessed,
|
|
23884
|
+
timeToLive: data.time_to_live
|
|
23885
|
+
};
|
|
23886
|
+
};
|
|
23696
23887
|
const unmarshalSecret = data => {
|
|
23697
23888
|
if (!isJSONObject(data)) {
|
|
23698
23889
|
throw new TypeError(`Unmarshalling the type 'Secret' failed as data isn't a dictionary.`);
|
|
@@ -23700,8 +23891,7 @@ const unmarshalSecret = data => {
|
|
|
23700
23891
|
return {
|
|
23701
23892
|
createdAt: unmarshalDate(data.created_at),
|
|
23702
23893
|
description: data.description,
|
|
23703
|
-
|
|
23704
|
-
expiresAt: unmarshalDate(data.expires_at),
|
|
23894
|
+
ephemeralPolicy: data.ephemeral_policy ? unmarshalEphemeralPolicy(data.ephemeral_policy) : undefined,
|
|
23705
23895
|
id: data.id,
|
|
23706
23896
|
isManaged: data.is_managed,
|
|
23707
23897
|
isProtected: data.is_protected,
|
|
@@ -23772,10 +23962,14 @@ const marshalCreateFolderRequest = (request, defaults) => ({
|
|
|
23772
23962
|
path: request.path,
|
|
23773
23963
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
23774
23964
|
});
|
|
23965
|
+
const marshalEphemeralPolicy = (request, defaults) => ({
|
|
23966
|
+
action: request.action,
|
|
23967
|
+
expires_once_accessed: request.expiresOnceAccessed,
|
|
23968
|
+
time_to_live: request.timeToLive
|
|
23969
|
+
});
|
|
23775
23970
|
const marshalCreateSecretRequest = (request, defaults) => ({
|
|
23776
23971
|
description: request.description,
|
|
23777
|
-
|
|
23778
|
-
expires_at: request.expiresAt,
|
|
23972
|
+
ephemeral_policy: request.ephemeralPolicy !== undefined ? marshalEphemeralPolicy(request.ephemeralPolicy) : undefined,
|
|
23779
23973
|
name: request.name,
|
|
23780
23974
|
path: request.path,
|
|
23781
23975
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
@@ -23807,12 +24001,19 @@ const marshalGeneratePasswordRequest = (request, defaults) => ({
|
|
|
23807
24001
|
});
|
|
23808
24002
|
const marshalUpdateSecretRequest = (request, defaults) => ({
|
|
23809
24003
|
description: request.description,
|
|
24004
|
+
ephemeral_policy: request.ephemeralPolicy !== undefined ? marshalEphemeralPolicy(request.ephemeralPolicy) : undefined,
|
|
23810
24005
|
name: request.name,
|
|
23811
24006
|
path: request.path,
|
|
23812
24007
|
tags: request.tags
|
|
23813
24008
|
});
|
|
24009
|
+
const marshalEphemeralProperties = (request, defaults) => ({
|
|
24010
|
+
action: request.action,
|
|
24011
|
+
expires_at: request.expiresAt,
|
|
24012
|
+
expires_once_accessed: request.expiresOnceAccessed
|
|
24013
|
+
});
|
|
23814
24014
|
const marshalUpdateSecretVersionRequest = (request, defaults) => ({
|
|
23815
|
-
description: request.description
|
|
24015
|
+
description: request.description,
|
|
24016
|
+
ephemeral_properties: request.ephemeralProperties !== undefined ? marshalEphemeralProperties(request.ephemeralProperties) : undefined
|
|
23816
24017
|
});
|
|
23817
24018
|
|
|
23818
24019
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -23889,9 +24090,9 @@ let API$7 = class API extends API$w {
|
|
|
23889
24090
|
}, unmarshalSecret);
|
|
23890
24091
|
|
|
23891
24092
|
/**
|
|
23892
|
-
* Update metadata of a secret. Edit a secret's metadata such as name, tag(s)
|
|
23893
|
-
* and
|
|
23894
|
-
* `region` parameters.
|
|
24093
|
+
* Update metadata of a secret. Edit a secret's metadata such as name, tag(s),
|
|
24094
|
+
* description and ephemeral policy. The secret to update is specified by the
|
|
24095
|
+
* `secret_id` and `region` parameters.
|
|
23895
24096
|
*
|
|
23896
24097
|
* @param request - The request {@link UpdateSecretRequest}
|
|
23897
24098
|
* @returns A Promise of Secret
|