@scaleway/sdk 1.16.0 → 1.18.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/container/v1beta1/api.gen.js +99 -2
- package/dist/api/container/v1beta1/content.gen.js +4 -1
- package/dist/api/container/v1beta1/index.gen.js +1 -1
- package/dist/api/container/v1beta1/marshalling.gen.js +107 -1
- package/dist/api/instance/v1/marshalling.gen.js +1 -0
- package/dist/api/k8s/v1/api.gen.js +13 -1
- package/dist/api/k8s/v1/marshalling.gen.js +13 -1
- package/dist/api/lb/v1/api.gen.js +72 -49
- package/dist/api/lb/v1/marshalling.gen.js +0 -4
- package/dist/api/marketplace/v2/api.gen.js +1 -1
- package/dist/api/marketplace/v2/marshalling.gen.js +1 -0
- package/dist/api/rdb/v1/index.gen.js +2 -0
- package/dist/api/rdb/v1/marshalling.gen.js +2 -0
- package/dist/api/rdb/v1/validation-rules.gen.js +10 -0
- package/dist/api/secret/v1alpha1/api.gen.js +30 -1
- package/dist/api/secret/v1alpha1/marshalling.gen.js +4 -1
- package/dist/api/vpc/v2/api.gen.js +16 -1
- package/dist/api/vpc/v2/marshalling.gen.js +1 -0
- package/dist/api/vpcgw/v1/api.gen.js +1 -1
- package/dist/index.cjs +308 -23
- package/dist/index.d.ts +471 -112
- 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 = 'v1.
|
|
500
|
+
const version = 'v1.17.0';
|
|
501
501
|
const userAgent = `scaleway-sdk-js/${version}`;
|
|
502
502
|
|
|
503
503
|
const isBrowser = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
@@ -3423,7 +3423,7 @@ const UpdateServerRequest = {
|
|
|
3423
3423
|
}
|
|
3424
3424
|
};
|
|
3425
3425
|
|
|
3426
|
-
var validationRules_gen$
|
|
3426
|
+
var validationRules_gen$5 = /*#__PURE__*/Object.freeze({
|
|
3427
3427
|
__proto__: null,
|
|
3428
3428
|
CreateServerRequest: CreateServerRequest,
|
|
3429
3429
|
CreateServerRequestInstall: CreateServerRequestInstall,
|
|
@@ -3444,7 +3444,7 @@ var index$r = /*#__PURE__*/Object.freeze({
|
|
|
3444
3444
|
SERVER_INSTALL_TRANSIENT_STATUSES: SERVER_INSTALL_TRANSIENT_STATUSES,
|
|
3445
3445
|
SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES,
|
|
3446
3446
|
SERVER_TRANSIENT_STATUSES: SERVER_TRANSIENT_STATUSES$1,
|
|
3447
|
-
ValidationRules: validationRules_gen$
|
|
3447
|
+
ValidationRules: validationRules_gen$5
|
|
3448
3448
|
});
|
|
3449
3449
|
|
|
3450
3450
|
var index$q = /*#__PURE__*/Object.freeze({
|
|
@@ -4091,6 +4091,9 @@ const NAMESPACE_TRANSIENT_STATUSES$2 = ['deleting', 'creating', 'pending'];
|
|
|
4091
4091
|
/** Lists transient statutes of the enum {@link TokenStatus}. */
|
|
4092
4092
|
const TOKEN_TRANSIENT_STATUSES$1 = ['deleting', 'creating'];
|
|
4093
4093
|
|
|
4094
|
+
/** Lists transient statutes of the enum {@link TriggerStatus}. */
|
|
4095
|
+
const TRIGGER_TRANSIENT_STATUSES$1 = ['deleting', 'creating', 'pending'];
|
|
4096
|
+
|
|
4094
4097
|
// This file was automatically generated. DO NOT EDIT.
|
|
4095
4098
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
4096
4099
|
const unmarshalSecretHashedValue$1 = data => {
|
|
@@ -4102,6 +4105,41 @@ const unmarshalSecretHashedValue$1 = data => {
|
|
|
4102
4105
|
key: data.key
|
|
4103
4106
|
};
|
|
4104
4107
|
};
|
|
4108
|
+
const unmarshalTriggerMnqNatsClientConfig$1 = data => {
|
|
4109
|
+
if (!isJSONObject(data)) {
|
|
4110
|
+
throw new TypeError(`Unmarshalling the type 'TriggerMnqNatsClientConfig' failed as data isn't a dictionary.`);
|
|
4111
|
+
}
|
|
4112
|
+
return {
|
|
4113
|
+
mnqCredentialId: data.mnq_credential_id,
|
|
4114
|
+
mnqNamespaceId: data.mnq_namespace_id,
|
|
4115
|
+
mnqProjectId: data.mnq_project_id,
|
|
4116
|
+
mnqRegion: data.mnq_region,
|
|
4117
|
+
subject: data.subject
|
|
4118
|
+
};
|
|
4119
|
+
};
|
|
4120
|
+
const unmarshalTriggerMnqSqsClientConfig$1 = data => {
|
|
4121
|
+
if (!isJSONObject(data)) {
|
|
4122
|
+
throw new TypeError(`Unmarshalling the type 'TriggerMnqSqsClientConfig' failed as data isn't a dictionary.`);
|
|
4123
|
+
}
|
|
4124
|
+
return {
|
|
4125
|
+
mnqCredentialId: data.mnq_credential_id,
|
|
4126
|
+
mnqNamespaceId: data.mnq_namespace_id,
|
|
4127
|
+
mnqProjectId: data.mnq_project_id,
|
|
4128
|
+
mnqRegion: data.mnq_region,
|
|
4129
|
+
queue: data.queue
|
|
4130
|
+
};
|
|
4131
|
+
};
|
|
4132
|
+
const unmarshalTriggerSqsClientConfig$1 = data => {
|
|
4133
|
+
if (!isJSONObject(data)) {
|
|
4134
|
+
throw new TypeError(`Unmarshalling the type 'TriggerSqsClientConfig' failed as data isn't a dictionary.`);
|
|
4135
|
+
}
|
|
4136
|
+
return {
|
|
4137
|
+
accessKey: data.access_key,
|
|
4138
|
+
endpoint: data.endpoint,
|
|
4139
|
+
queueUrl: data.queue_url,
|
|
4140
|
+
secretKey: data.secret_key
|
|
4141
|
+
};
|
|
4142
|
+
};
|
|
4105
4143
|
const unmarshalContainer = data => {
|
|
4106
4144
|
if (!isJSONObject(data)) {
|
|
4107
4145
|
throw new TypeError(`Unmarshalling the type 'Container' failed as data isn't a dictionary.`);
|
|
@@ -4203,6 +4241,23 @@ const unmarshalToken$1 = data => {
|
|
|
4203
4241
|
token: data.token
|
|
4204
4242
|
};
|
|
4205
4243
|
};
|
|
4244
|
+
const unmarshalTrigger$1 = data => {
|
|
4245
|
+
if (!isJSONObject(data)) {
|
|
4246
|
+
throw new TypeError(`Unmarshalling the type 'Trigger' failed as data isn't a dictionary.`);
|
|
4247
|
+
}
|
|
4248
|
+
return {
|
|
4249
|
+
containerId: data.container_id,
|
|
4250
|
+
description: data.description,
|
|
4251
|
+
errorMessage: data.error_message,
|
|
4252
|
+
id: data.id,
|
|
4253
|
+
inputType: data.input_type,
|
|
4254
|
+
name: data.name,
|
|
4255
|
+
scwNatsConfig: data.scw_nats_config ? unmarshalTriggerMnqNatsClientConfig$1(data.scw_nats_config) : undefined,
|
|
4256
|
+
scwSqsConfig: data.scw_sqs_config ? unmarshalTriggerMnqSqsClientConfig$1(data.scw_sqs_config) : undefined,
|
|
4257
|
+
sqsConfig: data.sqs_config ? unmarshalTriggerSqsClientConfig$1(data.sqs_config) : undefined,
|
|
4258
|
+
status: data.status
|
|
4259
|
+
};
|
|
4260
|
+
};
|
|
4206
4261
|
const unmarshalListContainersResponse = data => {
|
|
4207
4262
|
if (!isJSONObject(data)) {
|
|
4208
4263
|
throw new TypeError(`Unmarshalling the type 'ListContainersResponse' failed as data isn't a dictionary.`);
|
|
@@ -4257,10 +4312,41 @@ const unmarshalListTokensResponse$1 = data => {
|
|
|
4257
4312
|
totalCount: data.total_count
|
|
4258
4313
|
};
|
|
4259
4314
|
};
|
|
4315
|
+
const unmarshalListTriggersResponse$1 = data => {
|
|
4316
|
+
if (!isJSONObject(data)) {
|
|
4317
|
+
throw new TypeError(`Unmarshalling the type 'ListTriggersResponse' failed as data isn't a dictionary.`);
|
|
4318
|
+
}
|
|
4319
|
+
return {
|
|
4320
|
+
totalCount: data.total_count,
|
|
4321
|
+
triggers: unmarshalArrayOfObject(data.triggers, unmarshalTrigger$1)
|
|
4322
|
+
};
|
|
4323
|
+
};
|
|
4324
|
+
const marshalCreateTriggerRequestMnqNatsClientConfig$1 = (request, defaults) => ({
|
|
4325
|
+
mnq_namespace_id: request.mnqNamespaceId,
|
|
4326
|
+
mnq_project_id: request.mnqProjectId,
|
|
4327
|
+
mnq_region: request.mnqRegion,
|
|
4328
|
+
subject: request.subject
|
|
4329
|
+
});
|
|
4330
|
+
const marshalCreateTriggerRequestMnqSqsClientConfig$1 = (request, defaults) => ({
|
|
4331
|
+
mnq_namespace_id: request.mnqNamespaceId,
|
|
4332
|
+
mnq_project_id: request.mnqProjectId,
|
|
4333
|
+
mnq_region: request.mnqRegion,
|
|
4334
|
+
queue: request.queue
|
|
4335
|
+
});
|
|
4336
|
+
const marshalCreateTriggerRequestSqsClientConfig$1 = (request, defaults) => ({
|
|
4337
|
+
access_key: request.accessKey,
|
|
4338
|
+
endpoint: request.endpoint,
|
|
4339
|
+
queue_url: request.queueUrl,
|
|
4340
|
+
secret_key: request.secretKey
|
|
4341
|
+
});
|
|
4260
4342
|
const marshalSecret$1 = (request, defaults) => ({
|
|
4261
4343
|
key: request.key,
|
|
4262
4344
|
value: request.value
|
|
4263
4345
|
});
|
|
4346
|
+
const marshalUpdateTriggerRequestSqsClientConfig$1 = (request, defaults) => ({
|
|
4347
|
+
access_key: request.accessKey,
|
|
4348
|
+
secret_key: request.secretKey
|
|
4349
|
+
});
|
|
4264
4350
|
const marshalCreateContainerRequest = (request, defaults) => ({
|
|
4265
4351
|
cpu_limit: request.cpuLimit,
|
|
4266
4352
|
description: request.description,
|
|
@@ -4307,6 +4393,21 @@ const marshalCreateTokenRequest$1 = (request, defaults) => ({
|
|
|
4307
4393
|
value: request.namespaceId
|
|
4308
4394
|
}])
|
|
4309
4395
|
});
|
|
4396
|
+
const marshalCreateTriggerRequest$1 = (request, defaults) => ({
|
|
4397
|
+
container_id: request.containerId,
|
|
4398
|
+
description: request.description,
|
|
4399
|
+
name: request.name,
|
|
4400
|
+
...resolveOneOf([{
|
|
4401
|
+
param: 'scw_sqs_config',
|
|
4402
|
+
value: request.scwSqsConfig ? marshalCreateTriggerRequestMnqSqsClientConfig$1(request.scwSqsConfig) : undefined
|
|
4403
|
+
}, {
|
|
4404
|
+
param: 'sqs_config',
|
|
4405
|
+
value: request.sqsConfig ? marshalCreateTriggerRequestSqsClientConfig$1(request.sqsConfig) : undefined
|
|
4406
|
+
}, {
|
|
4407
|
+
param: 'scw_nats_config',
|
|
4408
|
+
value: request.scwNatsConfig ? marshalCreateTriggerRequestMnqNatsClientConfig$1(request.scwNatsConfig) : undefined
|
|
4409
|
+
}])
|
|
4410
|
+
});
|
|
4310
4411
|
const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
4311
4412
|
cpu_limit: request.cpuLimit,
|
|
4312
4413
|
description: request.description,
|
|
@@ -4335,6 +4436,14 @@ const marshalUpdateNamespaceRequest$3 = (request, defaults) => ({
|
|
|
4335
4436
|
environment_variables: request.environmentVariables,
|
|
4336
4437
|
secret_environment_variables: request.secretEnvironmentVariables ? request.secretEnvironmentVariables.map(elt => marshalSecret$1(elt)) : undefined
|
|
4337
4438
|
});
|
|
4439
|
+
const marshalUpdateTriggerRequest$1 = (request, defaults) => ({
|
|
4440
|
+
description: request.description,
|
|
4441
|
+
name: request.name,
|
|
4442
|
+
...resolveOneOf([{
|
|
4443
|
+
param: 'sqs_config',
|
|
4444
|
+
value: request.sqsConfig ? marshalUpdateTriggerRequestSqsClientConfig$1(request.sqsConfig) : undefined
|
|
4445
|
+
}])
|
|
4446
|
+
});
|
|
4338
4447
|
|
|
4339
4448
|
// This file was automatically generated. DO NOT EDIT.
|
|
4340
4449
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -4722,6 +4831,87 @@ let API$m = class API extends API$s {
|
|
|
4722
4831
|
method: 'DELETE',
|
|
4723
4832
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
4724
4833
|
}, unmarshalToken$1);
|
|
4834
|
+
|
|
4835
|
+
/**
|
|
4836
|
+
* Create a trigger. Create a new trigger for a specified container.
|
|
4837
|
+
*
|
|
4838
|
+
* @param request - The request {@link CreateTriggerRequest}
|
|
4839
|
+
* @returns A Promise of Trigger
|
|
4840
|
+
*/
|
|
4841
|
+
createTrigger = request => this.client.fetch({
|
|
4842
|
+
body: JSON.stringify(marshalCreateTriggerRequest$1(request, this.client.settings)),
|
|
4843
|
+
headers: jsonContentHeaders$k,
|
|
4844
|
+
method: 'POST',
|
|
4845
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers`
|
|
4846
|
+
}, unmarshalTrigger$1);
|
|
4847
|
+
|
|
4848
|
+
/**
|
|
4849
|
+
* Get a trigger. Get a trigger with a specified ID.
|
|
4850
|
+
*
|
|
4851
|
+
* @param request - The request {@link GetTriggerRequest}
|
|
4852
|
+
* @returns A Promise of Trigger
|
|
4853
|
+
*/
|
|
4854
|
+
getTrigger = request => this.client.fetch({
|
|
4855
|
+
method: 'GET',
|
|
4856
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
4857
|
+
}, unmarshalTrigger$1);
|
|
4858
|
+
|
|
4859
|
+
/**
|
|
4860
|
+
* Waits for {@link Trigger} to be in a final state.
|
|
4861
|
+
*
|
|
4862
|
+
* @param request - The request {@link GetTriggerRequest}
|
|
4863
|
+
* @param options - The waiting options
|
|
4864
|
+
* @returns A Promise of Trigger
|
|
4865
|
+
*/
|
|
4866
|
+
waitForTrigger = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TRIGGER_TRANSIENT_STATUSES$1.includes(res.status))), this.getTrigger, request, options);
|
|
4867
|
+
pageOfListTriggers = (request = {}) => this.client.fetch({
|
|
4868
|
+
method: 'GET',
|
|
4869
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers`,
|
|
4870
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
|
|
4871
|
+
default: this.client.settings.defaultProjectId,
|
|
4872
|
+
param: 'project_id',
|
|
4873
|
+
value: request.projectId
|
|
4874
|
+
}, {
|
|
4875
|
+
param: 'container_id',
|
|
4876
|
+
value: request.containerId
|
|
4877
|
+
}, {
|
|
4878
|
+
param: 'namespace_id',
|
|
4879
|
+
value: request.namespaceId
|
|
4880
|
+
}])))
|
|
4881
|
+
}, unmarshalListTriggersResponse$1);
|
|
4882
|
+
|
|
4883
|
+
/**
|
|
4884
|
+
* List all triggers. List all triggers belonging to a specified Organization
|
|
4885
|
+
* or Project.
|
|
4886
|
+
*
|
|
4887
|
+
* @param request - The request {@link ListTriggersRequest}
|
|
4888
|
+
* @returns A Promise of ListTriggersResponse
|
|
4889
|
+
*/
|
|
4890
|
+
listTriggers = (request = {}) => enrichForPagination('triggers', this.pageOfListTriggers, request);
|
|
4891
|
+
|
|
4892
|
+
/**
|
|
4893
|
+
* Update a trigger. Update a trigger with a specified ID.
|
|
4894
|
+
*
|
|
4895
|
+
* @param request - The request {@link UpdateTriggerRequest}
|
|
4896
|
+
* @returns A Promise of Trigger
|
|
4897
|
+
*/
|
|
4898
|
+
updateTrigger = request => this.client.fetch({
|
|
4899
|
+
body: JSON.stringify(marshalUpdateTriggerRequest$1(request, this.client.settings)),
|
|
4900
|
+
headers: jsonContentHeaders$k,
|
|
4901
|
+
method: 'PATCH',
|
|
4902
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
4903
|
+
}, unmarshalTrigger$1);
|
|
4904
|
+
|
|
4905
|
+
/**
|
|
4906
|
+
* Delete a trigger. Delete a trigger with a specified ID.
|
|
4907
|
+
*
|
|
4908
|
+
* @param request - The request {@link DeleteTriggerRequest}
|
|
4909
|
+
* @returns A Promise of Trigger
|
|
4910
|
+
*/
|
|
4911
|
+
deleteTrigger = request => this.client.fetch({
|
|
4912
|
+
method: 'DELETE',
|
|
4913
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
4914
|
+
}, unmarshalTrigger$1);
|
|
4725
4915
|
};
|
|
4726
4916
|
|
|
4727
4917
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -4734,7 +4924,8 @@ var index_gen$j = /*#__PURE__*/Object.freeze({
|
|
|
4734
4924
|
CRON_TRANSIENT_STATUSES: CRON_TRANSIENT_STATUSES$1,
|
|
4735
4925
|
DOMAIN_TRANSIENT_STATUSES: DOMAIN_TRANSIENT_STATUSES$3,
|
|
4736
4926
|
NAMESPACE_TRANSIENT_STATUSES: NAMESPACE_TRANSIENT_STATUSES$2,
|
|
4737
|
-
TOKEN_TRANSIENT_STATUSES: TOKEN_TRANSIENT_STATUSES$1
|
|
4927
|
+
TOKEN_TRANSIENT_STATUSES: TOKEN_TRANSIENT_STATUSES$1,
|
|
4928
|
+
TRIGGER_TRANSIENT_STATUSES: TRIGGER_TRANSIENT_STATUSES$1
|
|
4738
4929
|
});
|
|
4739
4930
|
|
|
4740
4931
|
var index$n = /*#__PURE__*/Object.freeze({
|
|
@@ -6993,7 +7184,7 @@ const ListFlexibleIPsRequest = {
|
|
|
6993
7184
|
}
|
|
6994
7185
|
};
|
|
6995
7186
|
|
|
6996
|
-
var validationRules_gen$
|
|
7187
|
+
var validationRules_gen$4 = /*#__PURE__*/Object.freeze({
|
|
6997
7188
|
__proto__: null,
|
|
6998
7189
|
ListFlexibleIPsRequest: ListFlexibleIPsRequest
|
|
6999
7190
|
});
|
|
@@ -7006,7 +7197,7 @@ var index_gen$h = /*#__PURE__*/Object.freeze({
|
|
|
7006
7197
|
API: API$k,
|
|
7007
7198
|
FLEXIBLE_IP_TRANSIENT_STATUSES: FLEXIBLE_IP_TRANSIENT_STATUSES,
|
|
7008
7199
|
MAC_ADDRESS_TRANSIENT_STATUSES: MAC_ADDRESS_TRANSIENT_STATUSES,
|
|
7009
|
-
ValidationRules: validationRules_gen$
|
|
7200
|
+
ValidationRules: validationRules_gen$4
|
|
7010
7201
|
});
|
|
7011
7202
|
|
|
7012
7203
|
var index$l = /*#__PURE__*/Object.freeze({
|
|
@@ -9114,7 +9305,7 @@ const UpdateSSHKeyRequest = {
|
|
|
9114
9305
|
}
|
|
9115
9306
|
};
|
|
9116
9307
|
|
|
9117
|
-
var validationRules_gen$
|
|
9308
|
+
var validationRules_gen$3 = /*#__PURE__*/Object.freeze({
|
|
9118
9309
|
__proto__: null,
|
|
9119
9310
|
CreateAPIKeyRequest: CreateAPIKeyRequest,
|
|
9120
9311
|
CreateApplicationRequest: CreateApplicationRequest,
|
|
@@ -9145,7 +9336,7 @@ var validationRules_gen$2 = /*#__PURE__*/Object.freeze({
|
|
|
9145
9336
|
var index_gen$f = /*#__PURE__*/Object.freeze({
|
|
9146
9337
|
__proto__: null,
|
|
9147
9338
|
API: API$i,
|
|
9148
|
-
ValidationRules: validationRules_gen$
|
|
9339
|
+
ValidationRules: validationRules_gen$3
|
|
9149
9340
|
});
|
|
9150
9341
|
|
|
9151
9342
|
var index$j = /*#__PURE__*/Object.freeze({
|
|
@@ -10238,6 +10429,7 @@ const marshalCreatePlacementGroupRequest = (request, defaults) => ({
|
|
|
10238
10429
|
}])
|
|
10239
10430
|
});
|
|
10240
10431
|
const marshalCreatePrivateNICRequest = (request, defaults) => ({
|
|
10432
|
+
ip_ids: request.ipIds,
|
|
10241
10433
|
private_network_id: request.privateNetworkId,
|
|
10242
10434
|
tags: request.tags
|
|
10243
10435
|
});
|
|
@@ -13081,6 +13273,7 @@ const unmarshalCluster$1 = data => {
|
|
|
13081
13273
|
autoUpgrade: data.auto_upgrade ? unmarshalClusterAutoUpgrade(data.auto_upgrade) : undefined,
|
|
13082
13274
|
clusterUrl: data.cluster_url,
|
|
13083
13275
|
cni: data.cni,
|
|
13276
|
+
commitmentEndsAt: unmarshalDate(data.commitment_ends_at),
|
|
13084
13277
|
createdAt: unmarshalDate(data.created_at),
|
|
13085
13278
|
dashboardEnabled: data.dashboard_enabled,
|
|
13086
13279
|
description: data.description,
|
|
@@ -13108,6 +13301,8 @@ const unmarshalClusterType = data => {
|
|
|
13108
13301
|
}
|
|
13109
13302
|
return {
|
|
13110
13303
|
availability: data.availability,
|
|
13304
|
+
commitmentDelay: data.commitment_delay,
|
|
13305
|
+
maxNodes: data.max_nodes,
|
|
13111
13306
|
name: data.name
|
|
13112
13307
|
};
|
|
13113
13308
|
};
|
|
@@ -13191,6 +13386,15 @@ const unmarshalExternalNode = data => {
|
|
|
13191
13386
|
poolVersion: data.pool_version
|
|
13192
13387
|
};
|
|
13193
13388
|
};
|
|
13389
|
+
const unmarshalListClusterAvailableTypesResponse = data => {
|
|
13390
|
+
if (!isJSONObject(data)) {
|
|
13391
|
+
throw new TypeError(`Unmarshalling the type 'ListClusterAvailableTypesResponse' failed as data isn't a dictionary.`);
|
|
13392
|
+
}
|
|
13393
|
+
return {
|
|
13394
|
+
clusterTypes: unmarshalArrayOfObject(data.cluster_types, unmarshalClusterType),
|
|
13395
|
+
totalCount: data.total_count
|
|
13396
|
+
};
|
|
13397
|
+
};
|
|
13194
13398
|
const unmarshalListClusterAvailableVersionsResponse = data => {
|
|
13195
13399
|
if (!isJSONObject(data)) {
|
|
13196
13400
|
throw new TypeError(`Unmarshalling the type 'ListClusterAvailableVersionsResponse' failed as data isn't a dictionary.`);
|
|
@@ -13534,6 +13738,18 @@ let API$e = class API extends API$s {
|
|
|
13534
13738
|
method: 'GET',
|
|
13535
13739
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/available-versions`
|
|
13536
13740
|
}, unmarshalListClusterAvailableVersionsResponse);
|
|
13741
|
+
|
|
13742
|
+
/**
|
|
13743
|
+
* List available cluster types for a cluster. List the cluster types that a
|
|
13744
|
+
* specific Kubernetes cluster is allowed to switch to.
|
|
13745
|
+
*
|
|
13746
|
+
* @param request - The request {@link ListClusterAvailableTypesRequest}
|
|
13747
|
+
* @returns A Promise of ListClusterAvailableTypesResponse
|
|
13748
|
+
*/
|
|
13749
|
+
listClusterAvailableTypes = request => this.client.fetch({
|
|
13750
|
+
method: 'GET',
|
|
13751
|
+
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/available-types`
|
|
13752
|
+
}, unmarshalListClusterAvailableTypesResponse);
|
|
13537
13753
|
_getClusterKubeConfig = request => this.client.fetch({
|
|
13538
13754
|
method: 'GET',
|
|
13539
13755
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/kubeconfig`,
|
|
@@ -13908,7 +14124,7 @@ const UpdateClusterRequestAutoscalerConfig = {
|
|
|
13908
14124
|
}
|
|
13909
14125
|
};
|
|
13910
14126
|
|
|
13911
|
-
var validationRules_gen$
|
|
14127
|
+
var validationRules_gen$2 = /*#__PURE__*/Object.freeze({
|
|
13912
14128
|
__proto__: null,
|
|
13913
14129
|
CreateClusterRequest: CreateClusterRequest,
|
|
13914
14130
|
CreateClusterRequestAutoscalerConfig: CreateClusterRequestAutoscalerConfig,
|
|
@@ -13930,7 +14146,7 @@ var index$e = /*#__PURE__*/Object.freeze({
|
|
|
13930
14146
|
CLUSTER_TRANSIENT_STATUSES: CLUSTER_TRANSIENT_STATUSES$1,
|
|
13931
14147
|
NODE_TRANSIENT_STATUSES: NODE_TRANSIENT_STATUSES,
|
|
13932
14148
|
POOL_TRANSIENT_STATUSES: POOL_TRANSIENT_STATUSES,
|
|
13933
|
-
ValidationRules: validationRules_gen$
|
|
14149
|
+
ValidationRules: validationRules_gen$2
|
|
13934
14150
|
});
|
|
13935
14151
|
|
|
13936
14152
|
var index$d = /*#__PURE__*/Object.freeze({
|
|
@@ -14597,7 +14813,6 @@ const marshalCreateFrontendRequest = (request, defaults) => ({
|
|
|
14597
14813
|
timeout_client: request.timeoutClient
|
|
14598
14814
|
});
|
|
14599
14815
|
const marshalCreateIpRequest = (request, defaults) => ({
|
|
14600
|
-
is_ipv6: request.isIpv6,
|
|
14601
14816
|
reverse: request.reverse,
|
|
14602
14817
|
...resolveOneOf([{
|
|
14603
14818
|
default: defaults.defaultProjectId,
|
|
@@ -14613,7 +14828,6 @@ const marshalCreateLbRequest = (request, defaults) => ({
|
|
|
14613
14828
|
assign_flexible_ip: request.assignFlexibleIp,
|
|
14614
14829
|
description: request.description,
|
|
14615
14830
|
ip_id: request.ipId,
|
|
14616
|
-
ip_ids: request.ipIds,
|
|
14617
14831
|
name: request.name || randomName('lb'),
|
|
14618
14832
|
ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
|
|
14619
14833
|
tags: request.tags,
|
|
@@ -14822,7 +15036,6 @@ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
|
|
|
14822
15036
|
timeout_client: request.timeoutClient
|
|
14823
15037
|
});
|
|
14824
15038
|
const marshalZonedApiCreateIpRequest = (request, defaults) => ({
|
|
14825
|
-
is_ipv6: request.isIpv6,
|
|
14826
15039
|
reverse: request.reverse,
|
|
14827
15040
|
...resolveOneOf([{
|
|
14828
15041
|
default: defaults.defaultProjectId,
|
|
@@ -14838,7 +15051,6 @@ const marshalZonedApiCreateLbRequest = (request, defaults) => ({
|
|
|
14838
15051
|
assign_flexible_ip: request.assignFlexibleIp,
|
|
14839
15052
|
description: request.description,
|
|
14840
15053
|
ip_id: request.ipId,
|
|
14841
|
-
ip_ids: request.ipIds,
|
|
14842
15054
|
name: request.name || randomName('lb'),
|
|
14843
15055
|
ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
|
|
14844
15056
|
tags: request.tags,
|
|
@@ -15103,7 +15315,7 @@ let API$d = class API extends API$s {
|
|
|
15103
15315
|
* @param request - The request {@link CreateIpRequest}
|
|
15104
15316
|
* @returns A Promise of Ip
|
|
15105
15317
|
*/
|
|
15106
|
-
createIp = request => this.client.fetch({
|
|
15318
|
+
createIp = (request = {}) => this.client.fetch({
|
|
15107
15319
|
body: JSON.stringify(marshalCreateIpRequest(request, this.client.settings)),
|
|
15108
15320
|
headers: jsonContentHeaders$b,
|
|
15109
15321
|
method: 'POST',
|
|
@@ -15393,6 +15605,13 @@ let API$d = class API extends API$s {
|
|
|
15393
15605
|
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/backend-stats`,
|
|
15394
15606
|
urlParams: urlParams(['backend_id', request.backendId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
15395
15607
|
}, unmarshalListBackendStatsResponse);
|
|
15608
|
+
|
|
15609
|
+
/**
|
|
15610
|
+
* List backend server statistics.
|
|
15611
|
+
*
|
|
15612
|
+
* @param request - The request {@link ListBackendStatsRequest}
|
|
15613
|
+
* @returns A Promise of ListBackendStatsResponse
|
|
15614
|
+
*/
|
|
15396
15615
|
listBackendStats = request => enrichForPagination('backendServersStats', this.pageOfListBackendStats, request);
|
|
15397
15616
|
pageOfListAcls = request => this.client.fetch({
|
|
15398
15617
|
method: 'GET',
|
|
@@ -15669,7 +15888,7 @@ let API$d = class API extends API$s {
|
|
|
15669
15888
|
*/
|
|
15670
15889
|
class ZonedAPI extends API$s {
|
|
15671
15890
|
/** Lists the available zones of the API. */
|
|
15672
|
-
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
|
|
15891
|
+
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
|
|
15673
15892
|
pageOfListLbs = (request = {}) => this.client.fetch({
|
|
15674
15893
|
method: 'GET',
|
|
15675
15894
|
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs`,
|
|
@@ -15791,7 +16010,7 @@ class ZonedAPI extends API$s {
|
|
|
15791
16010
|
* @param request - The request {@link ZonedApiCreateIpRequest}
|
|
15792
16011
|
* @returns A Promise of Ip
|
|
15793
16012
|
*/
|
|
15794
|
-
createIp = request => this.client.fetch({
|
|
16013
|
+
createIp = (request = {}) => this.client.fetch({
|
|
15795
16014
|
body: JSON.stringify(marshalZonedApiCreateIpRequest(request, this.client.settings)),
|
|
15796
16015
|
headers: jsonContentHeaders$b,
|
|
15797
16016
|
method: 'POST',
|
|
@@ -16727,6 +16946,7 @@ const unmarshalLocalImage = data => {
|
|
|
16727
16946
|
compatibleCommercialTypes: data.compatible_commercial_types,
|
|
16728
16947
|
id: data.id,
|
|
16729
16948
|
label: data.label,
|
|
16949
|
+
type: data.type,
|
|
16730
16950
|
zone: data.zone
|
|
16731
16951
|
};
|
|
16732
16952
|
};
|
|
@@ -16839,7 +17059,7 @@ let API$b = class API extends API$s {
|
|
|
16839
17059
|
pageOfListLocalImages = (request = {}) => this.client.fetch({
|
|
16840
17060
|
method: 'GET',
|
|
16841
17061
|
path: `/marketplace/v2/local-images`,
|
|
16842
|
-
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['zone', request.zone ?? this.client.settings.defaultZone], ...Object.entries(resolveOneOf([{
|
|
17062
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['type', request.type ?? 'unknown_type'], ['zone', request.zone ?? this.client.settings.defaultZone], ...Object.entries(resolveOneOf([{
|
|
16843
17063
|
param: 'image_id',
|
|
16844
17064
|
value: request.imageId
|
|
16845
17065
|
}, {
|
|
@@ -17296,6 +17516,7 @@ const unmarshalBackupSchedule = data => {
|
|
|
17296
17516
|
return {
|
|
17297
17517
|
disabled: data.disabled,
|
|
17298
17518
|
frequency: data.frequency,
|
|
17519
|
+
nextRunAt: unmarshalDate(data.next_run_at),
|
|
17299
17520
|
retention: data.retention
|
|
17300
17521
|
};
|
|
17301
17522
|
};
|
|
@@ -17883,6 +18104,7 @@ const marshalUpdateInstanceRequest = (request, defaults) => ({
|
|
|
17883
18104
|
backup_same_region: request.backupSameRegion,
|
|
17884
18105
|
backup_schedule_frequency: request.backupScheduleFrequency,
|
|
17885
18106
|
backup_schedule_retention: request.backupScheduleRetention,
|
|
18107
|
+
backup_schedule_start_hour: request.backupScheduleStartHour,
|
|
17886
18108
|
is_backup_schedule_disabled: request.isBackupScheduleDisabled,
|
|
17887
18109
|
logs_policy: request.logsPolicy ? marshalLogsPolicy(request.logsPolicy) : undefined,
|
|
17888
18110
|
name: request.name,
|
|
@@ -18804,6 +19026,20 @@ let API$9 = class API extends API$s {
|
|
|
18804
19026
|
// This file was automatically generated. DO NOT EDIT.
|
|
18805
19027
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
18806
19028
|
|
|
19029
|
+
const UpdateInstanceRequest = {
|
|
19030
|
+
backupScheduleStartHour: {
|
|
19031
|
+
lessThanOrEqual: 23
|
|
19032
|
+
}
|
|
19033
|
+
};
|
|
19034
|
+
|
|
19035
|
+
var validationRules_gen$1 = /*#__PURE__*/Object.freeze({
|
|
19036
|
+
__proto__: null,
|
|
19037
|
+
UpdateInstanceRequest: UpdateInstanceRequest
|
|
19038
|
+
});
|
|
19039
|
+
|
|
19040
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
19041
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
19042
|
+
|
|
18807
19043
|
var index_gen$9 = /*#__PURE__*/Object.freeze({
|
|
18808
19044
|
__proto__: null,
|
|
18809
19045
|
API: API$9,
|
|
@@ -18812,7 +19048,8 @@ var index_gen$9 = /*#__PURE__*/Object.freeze({
|
|
|
18812
19048
|
INSTANCE_TRANSIENT_STATUSES: INSTANCE_TRANSIENT_STATUSES,
|
|
18813
19049
|
MAINTENANCE_TRANSIENT_STATUSES: MAINTENANCE_TRANSIENT_STATUSES,
|
|
18814
19050
|
READ_REPLICA_TRANSIENT_STATUSES: READ_REPLICA_TRANSIENT_STATUSES,
|
|
18815
|
-
SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES
|
|
19051
|
+
SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES,
|
|
19052
|
+
ValidationRules: validationRules_gen$1
|
|
18816
19053
|
});
|
|
18817
19054
|
|
|
18818
19055
|
var index$8 = /*#__PURE__*/Object.freeze({
|
|
@@ -19836,11 +20073,13 @@ const unmarshalSecret = data => {
|
|
|
19836
20073
|
description: data.description,
|
|
19837
20074
|
id: data.id,
|
|
19838
20075
|
isManaged: data.is_managed,
|
|
20076
|
+
isProtected: data.is_protected,
|
|
19839
20077
|
name: data.name,
|
|
19840
20078
|
projectId: data.project_id,
|
|
19841
20079
|
region: data.region,
|
|
19842
20080
|
status: data.status,
|
|
19843
20081
|
tags: data.tags,
|
|
20082
|
+
type: data.type,
|
|
19844
20083
|
updatedAt: unmarshalDate(data.updated_at),
|
|
19845
20084
|
versionCount: data.version_count
|
|
19846
20085
|
};
|
|
@@ -19912,7 +20151,8 @@ const marshalCreateSecretRequest = (request, defaults) => ({
|
|
|
19912
20151
|
description: request.description,
|
|
19913
20152
|
name: request.name,
|
|
19914
20153
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
19915
|
-
tags: request.tags
|
|
20154
|
+
tags: request.tags,
|
|
20155
|
+
type: request.type ?? 'unknown_secret_type'
|
|
19916
20156
|
});
|
|
19917
20157
|
const marshalCreateSecretVersionRequest = (request, defaults) => ({
|
|
19918
20158
|
data: request.data,
|
|
@@ -20037,6 +20277,35 @@ let API$6 = class API extends API$s {
|
|
|
20037
20277
|
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}`
|
|
20038
20278
|
});
|
|
20039
20279
|
|
|
20280
|
+
/**
|
|
20281
|
+
* Protect a secret. Protect a given secret specified by the `secret_id`
|
|
20282
|
+
* parameter. A protected secret can be read and modified but cannot be
|
|
20283
|
+
* deleted.
|
|
20284
|
+
*
|
|
20285
|
+
* @param request - The request {@link ProtectSecretRequest}
|
|
20286
|
+
* @returns A Promise of Secret
|
|
20287
|
+
*/
|
|
20288
|
+
protectSecret = request => this.client.fetch({
|
|
20289
|
+
body: '{}',
|
|
20290
|
+
headers: jsonContentHeaders$6,
|
|
20291
|
+
method: 'POST',
|
|
20292
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/protect`
|
|
20293
|
+
}, unmarshalSecret);
|
|
20294
|
+
|
|
20295
|
+
/**
|
|
20296
|
+
* Unprotect a secret. Unprotect a given secret specified by the `secret_id`
|
|
20297
|
+
* parameter. An unprotected secret can be read, modified and deleted.
|
|
20298
|
+
*
|
|
20299
|
+
* @param request - The request {@link UnprotectSecretRequest}
|
|
20300
|
+
* @returns A Promise of Secret
|
|
20301
|
+
*/
|
|
20302
|
+
unprotectSecret = request => this.client.fetch({
|
|
20303
|
+
body: '{}',
|
|
20304
|
+
headers: jsonContentHeaders$6,
|
|
20305
|
+
method: 'POST',
|
|
20306
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/unprotect`
|
|
20307
|
+
}, unmarshalSecret);
|
|
20308
|
+
|
|
20040
20309
|
/**
|
|
20041
20310
|
* Allow a product to use the secret.
|
|
20042
20311
|
*
|
|
@@ -20224,7 +20493,7 @@ let API$6 = class API extends API$s {
|
|
|
20224
20493
|
}, unmarshalListTagsResponse);
|
|
20225
20494
|
|
|
20226
20495
|
/**
|
|
20227
|
-
* List tags. List all tags associated
|
|
20496
|
+
* List tags. List all tags associated with secrets within a given Project.
|
|
20228
20497
|
*
|
|
20229
20498
|
* @param request - The request {@link ListTagsRequest}
|
|
20230
20499
|
* @returns A Promise of ListTagsResponse
|
|
@@ -20993,6 +21262,7 @@ const unmarshalPrivateNetwork = data => {
|
|
|
20993
21262
|
}
|
|
20994
21263
|
return {
|
|
20995
21264
|
createdAt: unmarshalDate(data.created_at),
|
|
21265
|
+
dhcpEnabled: data.dhcp_enabled,
|
|
20996
21266
|
id: data.id,
|
|
20997
21267
|
name: data.name,
|
|
20998
21268
|
organizationId: data.organization_id,
|
|
@@ -21179,7 +21449,7 @@ let API$2 = class API extends API$s {
|
|
|
21179
21449
|
pageOfListPrivateNetworks = (request = {}) => this.client.fetch({
|
|
21180
21450
|
method: 'GET',
|
|
21181
21451
|
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks`,
|
|
21182
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags], ['vpc_id', request.vpcId])
|
|
21452
|
+
urlParams: urlParams(['dhcp_enabled', request.dhcpEnabled], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags], ['vpc_id', request.vpcId])
|
|
21183
21453
|
}, unmarshalListPrivateNetworksResponse);
|
|
21184
21454
|
|
|
21185
21455
|
/**
|
|
@@ -21261,6 +21531,21 @@ let API$2 = class API extends API$s {
|
|
|
21261
21531
|
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/migrate-zonal`
|
|
21262
21532
|
});
|
|
21263
21533
|
|
|
21534
|
+
/**
|
|
21535
|
+
* Enable DHCP on a Private Network. Enable DHCP managed on an existing
|
|
21536
|
+
* Private Network. Note that you will not be able to deactivate it
|
|
21537
|
+
* afterwards.
|
|
21538
|
+
*
|
|
21539
|
+
* @param request - The request {@link EnableDHCPRequest}
|
|
21540
|
+
* @returns A Promise of PrivateNetwork
|
|
21541
|
+
*/
|
|
21542
|
+
enableDHCP = request => this.client.fetch({
|
|
21543
|
+
body: '{}',
|
|
21544
|
+
headers: jsonContentHeaders$2,
|
|
21545
|
+
method: 'POST',
|
|
21546
|
+
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/enable-dhcp`
|
|
21547
|
+
}, unmarshalPrivateNetwork);
|
|
21548
|
+
|
|
21264
21549
|
/**
|
|
21265
21550
|
* Set the subnets of a Private Network. Set subnets for an existing Private
|
|
21266
21551
|
* Network. Note that the method is PUT and not PATCH. Any existing subnets
|
|
@@ -21672,7 +21957,7 @@ const jsonContentHeaders$1 = {
|
|
|
21672
21957
|
/** Public Gateways API. */
|
|
21673
21958
|
let API$1 = class API extends API$s {
|
|
21674
21959
|
/** Lists the available zones of the API. */
|
|
21675
|
-
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
|
|
21960
|
+
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
|
|
21676
21961
|
pageOfListGateways = (request = {}) => this.client.fetch({
|
|
21677
21962
|
method: 'GET',
|
|
21678
21963
|
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways`,
|