@scaleway/sdk 1.15.0 → 1.17.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/index.cjs CHANGED
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
497
497
  }
498
498
  };
499
499
 
500
- const version = 'v1.14.0';
500
+ const version = 'v1.16.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$4 = /*#__PURE__*/Object.freeze({
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$4
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$3 = /*#__PURE__*/Object.freeze({
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$3
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$2 = /*#__PURE__*/Object.freeze({
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$2
9339
+ ValidationRules: validationRules_gen$3
9149
9340
  });
9150
9341
 
9151
9342
  var index$j = /*#__PURE__*/Object.freeze({
@@ -9299,7 +9490,11 @@ const unmarshalServerIp = data => {
9299
9490
  return {
9300
9491
  address: data.address,
9301
9492
  dynamic: data.dynamic,
9302
- id: data.id
9493
+ family: data.family,
9494
+ gateway: data.gateway,
9495
+ id: data.id,
9496
+ netmask: data.netmask,
9497
+ provisioningMode: data.provisioning_mode
9303
9498
  };
9304
9499
  };
9305
9500
  const unmarshalServerIpv6 = data => {
@@ -9444,10 +9639,13 @@ const unmarshalIp$1 = data => {
9444
9639
  address: data.address,
9445
9640
  id: data.id,
9446
9641
  organization: data.organization,
9642
+ prefix: data.prefix,
9447
9643
  project: data.project,
9448
9644
  reverse: data.reverse,
9449
9645
  server: data.server ? unmarshalServerSummary(data.server) : undefined,
9646
+ state: data.state,
9450
9647
  tags: data.tags,
9648
+ type: data.type,
9451
9649
  zone: data.zone
9452
9650
  };
9453
9651
  };
@@ -9520,6 +9718,7 @@ const unmarshalServer = data => {
9520
9718
  image: data.image ? unmarshalImage$3(data.image) : undefined,
9521
9719
  ipv6: data.ipv6 ? unmarshalServerIpv6(data.ipv6) : undefined,
9522
9720
  location: data.location ? unmarshalServerLocation(data.location) : undefined,
9721
+ macAddress: data.mac_address,
9523
9722
  maintenances: unmarshalArrayOfObject(data.maintenances, unmarshalServerMaintenance),
9524
9723
  modificationDate: unmarshalDate(data.modification_date),
9525
9724
  name: data.name,
@@ -9530,6 +9729,8 @@ const unmarshalServer = data => {
9530
9729
  project: data.project,
9531
9730
  protected: data.protected,
9532
9731
  publicIp: data.public_ip ? unmarshalServerIp(data.public_ip) : undefined,
9732
+ publicIps: unmarshalArrayOfObject(data.public_ips, unmarshalServerIp),
9733
+ routedIpEnabled: data.routed_ip_enabled,
9533
9734
  securityGroup: data.security_group ? unmarshalSecurityGroupSummary(data.security_group) : undefined,
9534
9735
  state: data.state,
9535
9736
  stateDetail: data.state_detail,
@@ -10117,7 +10318,11 @@ const marshalServerActionRequestVolumeBackupTemplate = (request, defaults) => ({
10117
10318
  const marshalServerIp = (request, defaults) => ({
10118
10319
  address: request.address,
10119
10320
  dynamic: request.dynamic,
10120
- id: request.id
10321
+ family: request.family,
10322
+ gateway: request.gateway,
10323
+ id: request.id,
10324
+ netmask: request.netmask,
10325
+ provisioning_mode: request.provisioningMode
10121
10326
  });
10122
10327
  const marshalServerIpv6 = (request, defaults) => ({
10123
10328
  address: request.address,
@@ -10197,6 +10402,7 @@ const marshalCreateImageRequest = (request, defaults) => ({
10197
10402
  const marshalCreateIpRequest$1 = (request, defaults) => ({
10198
10403
  server: request.server,
10199
10404
  tags: request.tags,
10405
+ type: request.type ?? 'unknown_iptype',
10200
10406
  ...resolveOneOf([{
10201
10407
  default: defaults.defaultProjectId,
10202
10408
  param: 'project',
@@ -10223,6 +10429,7 @@ const marshalCreatePlacementGroupRequest = (request, defaults) => ({
10223
10429
  }])
10224
10430
  });
10225
10431
  const marshalCreatePrivateNICRequest = (request, defaults) => ({
10432
+ ip_ids: request.ipIds,
10226
10433
  private_network_id: request.privateNetworkId,
10227
10434
  tags: request.tags
10228
10435
  });
@@ -10271,6 +10478,8 @@ const marshalCreateServerRequest = (request, defaults) => ({
10271
10478
  name: request.name || randomName('srv'),
10272
10479
  placement_group: request.placementGroup,
10273
10480
  public_ip: request.publicIp,
10481
+ public_ips: request.publicIps,
10482
+ routed_ip_enabled: request.routedIpEnabled,
10274
10483
  security_group: request.securityGroup,
10275
10484
  tags: request.tags,
10276
10485
  volumes: request.volumes ? Object.entries(request.volumes).reduce((acc, [key, value]) => ({
@@ -10423,6 +10632,8 @@ const marshalSetServerRequest = (request, defaults) => ({
10423
10632
  project: request.project,
10424
10633
  protected: request.protected,
10425
10634
  public_ip: request.publicIp ? marshalServerIp(request.publicIp) : undefined,
10635
+ public_ips: request.publicIps ? request.publicIps.map(elt => marshalServerIp(elt)) : undefined,
10636
+ routed_ip_enabled: request.routedIpEnabled,
10426
10637
  security_group: request.securityGroup ? marshalSecurityGroupSummary(request.securityGroup) : undefined,
10427
10638
  state: request.state,
10428
10639
  state_detail: request.stateDetail,
@@ -10448,7 +10659,8 @@ const marshalSetSnapshotRequest = (request, defaults) => ({
10448
10659
  const marshalUpdateIpRequest$1 = (request, defaults) => ({
10449
10660
  reverse: request.reverse,
10450
10661
  server: request.server,
10451
- tags: request.tags
10662
+ tags: request.tags,
10663
+ type: request.type ?? 'unknown_iptype'
10452
10664
  });
10453
10665
  const marshalUpdatePlacementGroupRequest = (request, defaults) => ({
10454
10666
  name: request.name,
@@ -10471,6 +10683,8 @@ const marshalUpdateServerRequest = (request, defaults) => ({
10471
10683
  placement_group: request.placementGroup,
10472
10684
  private_nics: request.privateNics ? request.privateNics.map(elt => marshalPrivateNIC(elt)) : undefined,
10473
10685
  protected: request.protected,
10686
+ public_ips: request.publicIps ? request.publicIps.map(elt => marshalServerIp(elt)) : undefined,
10687
+ routed_ip_enabled: request.routedIpEnabled,
10474
10688
  security_group: request.securityGroup ? marshalSecurityGroupTemplate(request.securityGroup) : undefined,
10475
10689
  tags: request.tags,
10476
10690
  volumes: request.volumes ? Object.entries(request.volumes).reduce((acc, [key, value]) => ({
@@ -10493,7 +10707,7 @@ const jsonContentHeaders$f = {
10493
10707
  /** Instance API. */
10494
10708
  let API$h = class API extends API$s {
10495
10709
  /** Lists the available zones of the API. */
10496
- static LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
10710
+ static LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
10497
10711
 
10498
10712
  /**
10499
10713
  * Get availability. Get availability for all Instance types.
@@ -10604,6 +10818,7 @@ let API$h = class API extends API$s {
10604
10818
  * keep the slot on the hypervisor. `reboot`: Stop the instance and restart
10605
10819
  * it. `backup`: Create an image with all the volumes of an Instance.
10606
10820
  * `terminate`: Delete the Instance along with all attached volumes.
10821
+ * `enable_routed_ip`: Migrate the Instance to the new network stack.
10607
10822
  *
10608
10823
  * Keep in mind that terminating an Instance will result in the deletion of
10609
10824
  * all attached volumes, including local and block storage. If you want to
@@ -11244,6 +11459,9 @@ let API$h = class API extends API$s {
11244
11459
  /** Lists transient statutes of the enum {@link ImageState}. */
11245
11460
  const IMAGE_TRANSIENT_STATUSES$1 = ['creating'];
11246
11461
 
11462
+ /** Lists transient statutes of the enum {@link IpState}. */
11463
+ const IP_TRANSIENT_STATUSES = ['pending'];
11464
+
11247
11465
  /** Lists transient statutes of the enum {@link PrivateNICState}. */
11248
11466
  const PRIVATE_NIC_TRANSIENT_STATUSES = ['syncing'];
11249
11467
 
@@ -11689,6 +11907,7 @@ var index$i = /*#__PURE__*/Object.freeze({
11689
11907
  __proto__: null,
11690
11908
  API: InstanceV1UtilsAPI,
11691
11909
  IMAGE_TRANSIENT_STATUSES: IMAGE_TRANSIENT_STATUSES$1,
11910
+ IP_TRANSIENT_STATUSES: IP_TRANSIENT_STATUSES,
11692
11911
  PRIVATE_NIC_TRANSIENT_STATUSES: PRIVATE_NIC_TRANSIENT_STATUSES,
11693
11912
  SECURITY_GROUP_TRANSIENT_STATUSES: SECURITY_GROUP_TRANSIENT_STATUSES,
11694
11913
  SERVER_TRANSIENT_STATUSES: SERVER_TRANSIENT_STATUSES,
@@ -13881,7 +14100,7 @@ const UpdateClusterRequestAutoscalerConfig = {
13881
14100
  }
13882
14101
  };
13883
14102
 
13884
- var validationRules_gen$1 = /*#__PURE__*/Object.freeze({
14103
+ var validationRules_gen$2 = /*#__PURE__*/Object.freeze({
13885
14104
  __proto__: null,
13886
14105
  CreateClusterRequest: CreateClusterRequest,
13887
14106
  CreateClusterRequestAutoscalerConfig: CreateClusterRequestAutoscalerConfig,
@@ -13903,7 +14122,7 @@ var index$e = /*#__PURE__*/Object.freeze({
13903
14122
  CLUSTER_TRANSIENT_STATUSES: CLUSTER_TRANSIENT_STATUSES$1,
13904
14123
  NODE_TRANSIENT_STATUSES: NODE_TRANSIENT_STATUSES,
13905
14124
  POOL_TRANSIENT_STATUSES: POOL_TRANSIENT_STATUSES,
13906
- ValidationRules: validationRules_gen$1
14125
+ ValidationRules: validationRules_gen$2
13907
14126
  });
13908
14127
 
13909
14128
  var index$d = /*#__PURE__*/Object.freeze({
@@ -14570,7 +14789,6 @@ const marshalCreateFrontendRequest = (request, defaults) => ({
14570
14789
  timeout_client: request.timeoutClient
14571
14790
  });
14572
14791
  const marshalCreateIpRequest = (request, defaults) => ({
14573
- is_ipv6: request.isIpv6,
14574
14792
  reverse: request.reverse,
14575
14793
  ...resolveOneOf([{
14576
14794
  default: defaults.defaultProjectId,
@@ -14586,7 +14804,6 @@ const marshalCreateLbRequest = (request, defaults) => ({
14586
14804
  assign_flexible_ip: request.assignFlexibleIp,
14587
14805
  description: request.description,
14588
14806
  ip_id: request.ipId,
14589
- ip_ids: request.ipIds,
14590
14807
  name: request.name || randomName('lb'),
14591
14808
  ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
14592
14809
  tags: request.tags,
@@ -14795,7 +15012,6 @@ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
14795
15012
  timeout_client: request.timeoutClient
14796
15013
  });
14797
15014
  const marshalZonedApiCreateIpRequest = (request, defaults) => ({
14798
- is_ipv6: request.isIpv6,
14799
15015
  reverse: request.reverse,
14800
15016
  ...resolveOneOf([{
14801
15017
  default: defaults.defaultProjectId,
@@ -14811,7 +15027,6 @@ const marshalZonedApiCreateLbRequest = (request, defaults) => ({
14811
15027
  assign_flexible_ip: request.assignFlexibleIp,
14812
15028
  description: request.description,
14813
15029
  ip_id: request.ipId,
14814
- ip_ids: request.ipIds,
14815
15030
  name: request.name || randomName('lb'),
14816
15031
  ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
14817
15032
  tags: request.tags,
@@ -15076,7 +15291,7 @@ let API$d = class API extends API$s {
15076
15291
  * @param request - The request {@link CreateIpRequest}
15077
15292
  * @returns A Promise of Ip
15078
15293
  */
15079
- createIp = request => this.client.fetch({
15294
+ createIp = (request = {}) => this.client.fetch({
15080
15295
  body: JSON.stringify(marshalCreateIpRequest(request, this.client.settings)),
15081
15296
  headers: jsonContentHeaders$b,
15082
15297
  method: 'POST',
@@ -15366,6 +15581,13 @@ let API$d = class API extends API$s {
15366
15581
  path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/backend-stats`,
15367
15582
  urlParams: urlParams(['backend_id', request.backendId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
15368
15583
  }, unmarshalListBackendStatsResponse);
15584
+
15585
+ /**
15586
+ * List backend server statistics.
15587
+ *
15588
+ * @param request - The request {@link ListBackendStatsRequest}
15589
+ * @returns A Promise of ListBackendStatsResponse
15590
+ */
15369
15591
  listBackendStats = request => enrichForPagination('backendServersStats', this.pageOfListBackendStats, request);
15370
15592
  pageOfListAcls = request => this.client.fetch({
15371
15593
  method: 'GET',
@@ -15642,7 +15864,7 @@ let API$d = class API extends API$s {
15642
15864
  */
15643
15865
  class ZonedAPI extends API$s {
15644
15866
  /** Lists the available zones of the API. */
15645
- static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
15867
+ static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
15646
15868
  pageOfListLbs = (request = {}) => this.client.fetch({
15647
15869
  method: 'GET',
15648
15870
  path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs`,
@@ -15764,7 +15986,7 @@ class ZonedAPI extends API$s {
15764
15986
  * @param request - The request {@link ZonedApiCreateIpRequest}
15765
15987
  * @returns A Promise of Ip
15766
15988
  */
15767
- createIp = request => this.client.fetch({
15989
+ createIp = (request = {}) => this.client.fetch({
15768
15990
  body: JSON.stringify(marshalZonedApiCreateIpRequest(request, this.client.settings)),
15769
15991
  headers: jsonContentHeaders$b,
15770
15992
  method: 'POST',
@@ -16700,6 +16922,7 @@ const unmarshalLocalImage = data => {
16700
16922
  compatibleCommercialTypes: data.compatible_commercial_types,
16701
16923
  id: data.id,
16702
16924
  label: data.label,
16925
+ type: data.type,
16703
16926
  zone: data.zone
16704
16927
  };
16705
16928
  };
@@ -16812,7 +17035,7 @@ let API$b = class API extends API$s {
16812
17035
  pageOfListLocalImages = (request = {}) => this.client.fetch({
16813
17036
  method: 'GET',
16814
17037
  path: `/marketplace/v2/local-images`,
16815
- 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([{
17038
+ 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([{
16816
17039
  param: 'image_id',
16817
17040
  value: request.imageId
16818
17041
  }, {
@@ -17269,6 +17492,7 @@ const unmarshalBackupSchedule = data => {
17269
17492
  return {
17270
17493
  disabled: data.disabled,
17271
17494
  frequency: data.frequency,
17495
+ nextRunAt: unmarshalDate(data.next_run_at),
17272
17496
  retention: data.retention
17273
17497
  };
17274
17498
  };
@@ -17856,6 +18080,7 @@ const marshalUpdateInstanceRequest = (request, defaults) => ({
17856
18080
  backup_same_region: request.backupSameRegion,
17857
18081
  backup_schedule_frequency: request.backupScheduleFrequency,
17858
18082
  backup_schedule_retention: request.backupScheduleRetention,
18083
+ backup_schedule_start_hour: request.backupScheduleStartHour,
17859
18084
  is_backup_schedule_disabled: request.isBackupScheduleDisabled,
17860
18085
  logs_policy: request.logsPolicy ? marshalLogsPolicy(request.logsPolicy) : undefined,
17861
18086
  name: request.name,
@@ -18777,6 +19002,20 @@ let API$9 = class API extends API$s {
18777
19002
  // This file was automatically generated. DO NOT EDIT.
18778
19003
  // If you have any remark or suggestion do not hesitate to open an issue.
18779
19004
 
19005
+ const UpdateInstanceRequest = {
19006
+ backupScheduleStartHour: {
19007
+ lessThanOrEqual: 23
19008
+ }
19009
+ };
19010
+
19011
+ var validationRules_gen$1 = /*#__PURE__*/Object.freeze({
19012
+ __proto__: null,
19013
+ UpdateInstanceRequest: UpdateInstanceRequest
19014
+ });
19015
+
19016
+ // This file was automatically generated. DO NOT EDIT.
19017
+ // If you have any remark or suggestion do not hesitate to open an issue.
19018
+
18780
19019
  var index_gen$9 = /*#__PURE__*/Object.freeze({
18781
19020
  __proto__: null,
18782
19021
  API: API$9,
@@ -18785,7 +19024,8 @@ var index_gen$9 = /*#__PURE__*/Object.freeze({
18785
19024
  INSTANCE_TRANSIENT_STATUSES: INSTANCE_TRANSIENT_STATUSES,
18786
19025
  MAINTENANCE_TRANSIENT_STATUSES: MAINTENANCE_TRANSIENT_STATUSES,
18787
19026
  READ_REPLICA_TRANSIENT_STATUSES: READ_REPLICA_TRANSIENT_STATUSES,
18788
- SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES
19027
+ SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES,
19028
+ ValidationRules: validationRules_gen$1
18789
19029
  });
18790
19030
 
18791
19031
  var index$8 = /*#__PURE__*/Object.freeze({
@@ -18807,6 +19047,7 @@ const unmarshalPrivateNetwork$2 = data => {
18807
19047
  }
18808
19048
  return {
18809
19049
  id: data.id,
19050
+ provisioningMode: data.provisioning_mode,
18810
19051
  serviceIps: data.service_ips,
18811
19052
  zone: data.zone
18812
19053
  };
@@ -19538,7 +19779,7 @@ const unmarshalListNamespacesResponse = data => {
19538
19779
  totalCount: data.total_count
19539
19780
  };
19540
19781
  };
19541
- const unmarshalListTagsResponse = data => {
19782
+ const unmarshalListTagsResponse$1 = data => {
19542
19783
  if (!isJSONObject(data)) {
19543
19784
  throw new TypeError(`Unmarshalling the type 'ListTagsResponse' failed as data isn't a dictionary.`);
19544
19785
  }
@@ -19732,7 +19973,7 @@ let API$7 = class API extends API$s {
19732
19973
  method: 'GET',
19733
19974
  path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/images/${validatePathParam('imageId', request.imageId)}/tags`,
19734
19975
  urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
19735
- }, unmarshalListTagsResponse);
19976
+ }, unmarshalListTagsResponse$1);
19736
19977
 
19737
19978
  /**
19738
19979
  * List tags. List all tags for a given image, specified by region. By
@@ -19813,6 +20054,7 @@ const unmarshalSecret = data => {
19813
20054
  region: data.region,
19814
20055
  status: data.status,
19815
20056
  tags: data.tags,
20057
+ type: data.type,
19816
20058
  updatedAt: unmarshalDate(data.updated_at),
19817
20059
  versionCount: data.version_count
19818
20060
  };
@@ -19860,6 +20102,15 @@ const unmarshalListSecretsResponse = data => {
19860
20102
  totalCount: data.total_count
19861
20103
  };
19862
20104
  };
20105
+ const unmarshalListTagsResponse = data => {
20106
+ if (!isJSONObject(data)) {
20107
+ throw new TypeError(`Unmarshalling the type 'ListTagsResponse' failed as data isn't a dictionary.`);
20108
+ }
20109
+ return {
20110
+ tags: data.tags,
20111
+ totalCount: data.total_count
20112
+ };
20113
+ };
19863
20114
  const marshalPasswordGenerationParams = (request, defaults) => ({
19864
20115
  additional_chars: request.additionalChars,
19865
20116
  length: request.length,
@@ -19875,7 +20126,8 @@ const marshalCreateSecretRequest = (request, defaults) => ({
19875
20126
  description: request.description,
19876
20127
  name: request.name,
19877
20128
  project_id: request.projectId ?? defaults.defaultProjectId,
19878
- tags: request.tags
20129
+ tags: request.tags,
20130
+ type: request.type ?? 'unknown_secret_type'
19879
20131
  });
19880
20132
  const marshalCreateSecretVersionRequest = (request, defaults) => ({
19881
20133
  data: request.data,
@@ -19935,8 +20187,8 @@ let API$6 = class API extends API$s {
19935
20187
  }, unmarshalSecret);
19936
20188
 
19937
20189
  /**
19938
- * Get metadata using the secret's name. Retrieve the metadata of a secret
19939
- * specified by the `region` and the `secret_name` parameters.
20190
+ * Get metadata using the secret's ID. Retrieve the metadata of a secret
20191
+ * specified by the `region` and `secret_id` parameters.
19940
20192
  *
19941
20193
  * @param request - The request {@link GetSecretRequest}
19942
20194
  * @returns A Promise of Secret
@@ -19947,8 +20199,8 @@ let API$6 = class API extends API$s {
19947
20199
  }, unmarshalSecret);
19948
20200
 
19949
20201
  /**
19950
- * Get metadata using the secret's ID. Retrieve the metadata of a secret
19951
- * specified by the `region`, `secret_id` and `project_id` parameters.
20202
+ * Get metadata using the secret's name. Retrieve the metadata of a secret
20203
+ * specified by the `region` and `secret_name` parameters.
19952
20204
  *
19953
20205
  * @param request - The request {@link GetSecretByNameRequest}
19954
20206
  * @returns A Promise of Secret
@@ -20180,6 +20432,19 @@ let API$6 = class API extends API$s {
20180
20432
  method: 'POST',
20181
20433
  path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}/destroy`
20182
20434
  }, unmarshalSecretVersion);
20435
+ pageOfListTags = (request = {}) => this.client.fetch({
20436
+ method: 'GET',
20437
+ path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tags`,
20438
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
20439
+ }, unmarshalListTagsResponse);
20440
+
20441
+ /**
20442
+ * List tags. List all tags associated with secrets within a given Project.
20443
+ *
20444
+ * @param request - The request {@link ListTagsRequest}
20445
+ * @returns A Promise of ListTagsResponse
20446
+ */
20447
+ listTags = (request = {}) => enrichForPagination('tags', this.pageOfListTags, request);
20183
20448
  };
20184
20449
 
20185
20450
  // This file was automatically generated. DO NOT EDIT.
@@ -20845,7 +21110,7 @@ const jsonContentHeaders$3 = {
20845
21110
  /** VPC API. */
20846
21111
  let API$3 = class API extends API$s {
20847
21112
  /** Lists the available zones of the API. */
20848
- static LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
21113
+ static LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
20849
21114
  pageOfListPrivateNetworks = (request = {}) => this.client.fetch({
20850
21115
  method: 'GET',
20851
21116
  path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks`,
@@ -20943,6 +21208,7 @@ const unmarshalPrivateNetwork = data => {
20943
21208
  }
20944
21209
  return {
20945
21210
  createdAt: unmarshalDate(data.created_at),
21211
+ dhcpEnabled: data.dhcp_enabled,
20946
21212
  id: data.id,
20947
21213
  name: data.name,
20948
21214
  organizationId: data.organization_id,
@@ -21129,7 +21395,7 @@ let API$2 = class API extends API$s {
21129
21395
  pageOfListPrivateNetworks = (request = {}) => this.client.fetch({
21130
21396
  method: 'GET',
21131
21397
  path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks`,
21132
- 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])
21398
+ 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])
21133
21399
  }, unmarshalListPrivateNetworksResponse);
21134
21400
 
21135
21401
  /**
@@ -21211,6 +21477,21 @@ let API$2 = class API extends API$s {
21211
21477
  path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/migrate-zonal`
21212
21478
  });
21213
21479
 
21480
+ /**
21481
+ * Enable DHCP on a Private Network. Enable DHCP managed on an existing
21482
+ * Private Network. Note that you will not be able to deactivate it
21483
+ * afterwards.
21484
+ *
21485
+ * @param request - The request {@link EnableDHCPRequest}
21486
+ * @returns A Promise of PrivateNetwork
21487
+ */
21488
+ enableDHCP = request => this.client.fetch({
21489
+ body: '{}',
21490
+ headers: jsonContentHeaders$2,
21491
+ method: 'POST',
21492
+ path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/enable-dhcp`
21493
+ }, unmarshalPrivateNetwork);
21494
+
21214
21495
  /**
21215
21496
  * Set the subnets of a Private Network. Set subnets for an existing Private
21216
21497
  * Network. Note that the method is PUT and not PATCH. Any existing subnets
@@ -21622,7 +21903,7 @@ const jsonContentHeaders$1 = {
21622
21903
  /** Public Gateways API. */
21623
21904
  let API$1 = class API extends API$s {
21624
21905
  /** Lists the available zones of the API. */
21625
- static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
21906
+ static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
21626
21907
  pageOfListGateways = (request = {}) => this.client.fetch({
21627
21908
  method: 'GET',
21628
21909
  path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways`,
@@ -22181,7 +22462,7 @@ var index$1 = /*#__PURE__*/Object.freeze({
22181
22462
  // If you have any remark or suggestion do not hesitate to open an issue.
22182
22463
 
22183
22464
  /** Lists transient statutes of the enum {@link HostingStatus}. */
22184
- const HOSTING_TRANSIENT_STATUSES = ['delivering', 'deleting'];
22465
+ const HOSTING_TRANSIENT_STATUSES = ['delivering', 'deleting', 'migrating'];
22185
22466
 
22186
22467
  // This file was automatically generated. DO NOT EDIT.
22187
22468
  // If you have any remark or suggestion do not hesitate to open an issue.