@scaleway/sdk 2.0.0-alpha.15 → 2.0.0-alpha.17

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.
Files changed (37) hide show
  1. package/dist/api/baremetal/v1/marshalling.gen.js +4 -4
  2. package/dist/api/billing/v2alpha1/api.gen.js +32 -1
  3. package/dist/api/billing/v2alpha1/marshalling.gen.js +46 -1
  4. package/dist/api/cockpit/v1beta1/marshalling.gen.js +3 -1
  5. package/dist/api/container/v1beta1/marshalling.gen.js +3 -3
  6. package/dist/api/function/v1beta1/api.gen.js +36 -0
  7. package/dist/api/function/v1beta1/marshalling.gen.js +3 -3
  8. package/dist/api/iam/v1alpha1/api.gen.js +27 -1
  9. package/dist/api/iam/v1alpha1/marshalling.gen.js +26 -1
  10. package/dist/api/iam/v1alpha1/validation-rules.gen.js +10 -1
  11. package/dist/api/instance/v1/content.gen.js +4 -1
  12. package/dist/api/instance/v1/index.js +1 -1
  13. package/dist/api/instance/v1/marshalling.gen.js +34 -32
  14. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -7
  15. package/dist/api/jobs/index.js +2 -0
  16. package/dist/api/jobs/v1alpha1/api.gen.js +111 -0
  17. package/dist/api/jobs/v1alpha1/content.gen.js +7 -0
  18. package/dist/api/jobs/v1alpha1/index.gen.js +7 -0
  19. package/dist/api/jobs/v1alpha1/marshalling.gen.js +84 -0
  20. package/dist/api/jobs/v1alpha1/validation-rules.gen.js +45 -0
  21. package/dist/api/k8s/v1/marshalling.gen.js +4 -4
  22. package/dist/api/lb/v1/marshalling.gen.js +24 -24
  23. package/dist/api/rdb/v1/marshalling.gen.js +11 -4
  24. package/dist/api/registry/v1/marshalling.gen.js +4 -4
  25. package/dist/api/secret/v1alpha1/api.gen.js +2 -2
  26. package/dist/api/secret/v1alpha1/marshalling.gen.js +6 -1
  27. package/dist/api/std/index.gen.js +1 -0
  28. package/dist/api/tem/v1alpha1/api.gen.js +8 -2
  29. package/dist/api/tem/v1alpha1/marshalling.gen.js +13 -0
  30. package/dist/api/test/v1/marshalling.gen.js +4 -4
  31. package/dist/api/vpcgw/v1/marshalling.gen.js +9 -3
  32. package/dist/index.cjs +873 -472
  33. package/dist/index.d.ts +2032 -1396
  34. package/dist/index.js +30 -26
  35. package/dist/node_modules/@scaleway/random-name/dist/index.js +13 -0
  36. package/dist/scw/constants.js +1 -1
  37. package/package.json +2 -2
@@ -358,13 +358,13 @@ const marshalCreateServerRequest = (request, defaults) => ({
358
358
  option_ids: request.optionIds,
359
359
  tags: request.tags,
360
360
  ...resolveOneOf([{
361
- default: defaults.defaultOrganizationId,
362
- param: 'organization_id',
363
- value: request.organizationId
364
- }, {
365
361
  default: defaults.defaultProjectId,
366
362
  param: 'project_id',
367
363
  value: request.projectId
364
+ }, {
365
+ default: defaults.defaultOrganizationId,
366
+ param: 'organization_id',
367
+ value: request.organizationId
368
368
  }])
369
369
  });
370
370
  const marshalInstallServerRequest = (request, defaults) => ({
@@ -1,7 +1,7 @@
1
1
  import { API as API$1 } from '../../../scw/api.js';
2
2
  import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
3
3
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
4
- import { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse } from './marshalling.gen.js';
4
+ import { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse, unmarshalListDiscountsResponse } from './marshalling.gen.js';
5
5
 
6
6
  // This file was automatically generated. DO NOT EDIT.
7
7
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -75,6 +75,37 @@ class API extends API$1 {
75
75
  urlParams: urlParams(['dl', 1], ['file_type', request.fileType]),
76
76
  responseType: 'blob'
77
77
  });
78
+ pageOfListDiscounts = (() => {
79
+ var _this4 = this;
80
+ return function (request) {
81
+ if (request === void 0) {
82
+ request = {};
83
+ }
84
+ return _this4.client.fetch({
85
+ method: 'GET',
86
+ path: `/billing/v2alpha1/discounts`,
87
+ urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize])
88
+ }, unmarshalListDiscountsResponse);
89
+ };
90
+ })();
91
+
92
+ /**
93
+ * List all user's discounts. List all discounts for an organization and
94
+ * usable categories/products/offers/references/regions/zones where the
95
+ * discount can be applied.
96
+ *
97
+ * @param request - The request {@link ListDiscountsRequest}
98
+ * @returns A Promise of ListDiscountsResponse
99
+ */
100
+ listDiscounts = (() => {
101
+ var _this5 = this;
102
+ return function (request) {
103
+ if (request === void 0) {
104
+ request = {};
105
+ }
106
+ return enrichForPagination('discounts', _this5.pageOfListDiscounts, request);
107
+ };
108
+ })();
78
109
  }
79
110
 
80
111
  export { API };
@@ -25,6 +25,51 @@ const unmarshalGetConsumptionResponse = data => {
25
25
  updatedAt: unmarshalDate(data.updated_at)
26
26
  };
27
27
  };
28
+ const unmarshalDiscountCoupon = data => {
29
+ if (!isJSONObject(data)) {
30
+ throw new TypeError(`Unmarshalling the type 'DiscountCoupon' failed as data isn't a dictionary.`);
31
+ }
32
+ return {
33
+ description: data.description
34
+ };
35
+ };
36
+ const unmarshalDiscountFilter = data => {
37
+ if (!isJSONObject(data)) {
38
+ throw new TypeError(`Unmarshalling the type 'DiscountFilter' failed as data isn't a dictionary.`);
39
+ }
40
+ return {
41
+ type: data.type,
42
+ value: data.value
43
+ };
44
+ };
45
+ const unmarshalDiscount = data => {
46
+ if (!isJSONObject(data)) {
47
+ throw new TypeError(`Unmarshalling the type 'Discount' failed as data isn't a dictionary.`);
48
+ }
49
+ return {
50
+ coupon: data.coupon ? unmarshalDiscountCoupon(data.coupon) : undefined,
51
+ creationDate: unmarshalDate(data.creation_date),
52
+ description: data.description,
53
+ filters: unmarshalArrayOfObject(data.filters, unmarshalDiscountFilter),
54
+ id: data.id,
55
+ mode: data.mode,
56
+ organizationId: data.organization_id,
57
+ startDate: unmarshalDate(data.start_date),
58
+ stopDate: unmarshalDate(data.stop_date),
59
+ value: data.value,
60
+ valueRemaining: data.value_remaining,
61
+ valueUsed: data.value_used
62
+ };
63
+ };
64
+ const unmarshalListDiscountsResponse = data => {
65
+ if (!isJSONObject(data)) {
66
+ throw new TypeError(`Unmarshalling the type 'ListDiscountsResponse' failed as data isn't a dictionary.`);
67
+ }
68
+ return {
69
+ discounts: unmarshalArrayOfObject(data.discounts, unmarshalDiscount),
70
+ totalCount: data.total_count
71
+ };
72
+ };
28
73
  const unmarshalInvoice = data => {
29
74
  if (!isJSONObject(data)) {
30
75
  throw new TypeError(`Unmarshalling the type 'Invoice' failed as data isn't a dictionary.`);
@@ -50,4 +95,4 @@ const unmarshalListInvoicesResponse = data => {
50
95
  };
51
96
  };
52
97
 
53
- export { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse };
98
+ export { unmarshalGetConsumptionResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse };
@@ -109,7 +109,9 @@ const unmarshalPlan = data => {
109
109
  retentionLogsInterval: data.retention_logs_interval,
110
110
  retentionMetricsInterval: data.retention_metrics_interval,
111
111
  retentionPrice: data.retention_price,
112
- sampleIngestionPrice: data.sample_ingestion_price
112
+ retentionTracesInterval: data.retention_traces_interval,
113
+ sampleIngestionPrice: data.sample_ingestion_price,
114
+ tracesIngestionPrice: data.traces_ingestion_price
113
115
  };
114
116
  };
115
117
  const unmarshalCockpit = data => {
@@ -306,12 +306,12 @@ const marshalCreateTriggerRequest = (request, defaults) => ({
306
306
  ...resolveOneOf([{
307
307
  param: 'scw_sqs_config',
308
308
  value: request.scwSqsConfig !== undefined ? marshalCreateTriggerRequestMnqSqsClientConfig(request.scwSqsConfig) : undefined
309
- }, {
310
- param: 'sqs_config',
311
- value: request.sqsConfig !== undefined ? marshalCreateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
312
309
  }, {
313
310
  param: 'scw_nats_config',
314
311
  value: request.scwNatsConfig !== undefined ? marshalCreateTriggerRequestMnqNatsClientConfig(request.scwNatsConfig) : undefined
312
+ }, {
313
+ param: 'sqs_config',
314
+ value: request.sqsConfig !== undefined ? marshalCreateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
315
315
  }])
316
316
  });
317
317
  const marshalUpdateContainerRequest = (request, defaults) => ({
@@ -494,12 +494,26 @@ class API extends API$1 {
494
494
  method: 'DELETE',
495
495
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
496
496
  }, unmarshalToken);
497
+
498
+ /**
499
+ * Create a trigger. Create a new trigger for a specified function.
500
+ *
501
+ * @param request - The request {@link CreateTriggerRequest}
502
+ * @returns A Promise of Trigger
503
+ */
497
504
  createTrigger = request => this.client.fetch({
498
505
  body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
499
506
  headers: jsonContentHeaders,
500
507
  method: 'POST',
501
508
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers`
502
509
  }, unmarshalTrigger);
510
+
511
+ /**
512
+ * Get a trigger. Get a trigger with a specified ID.
513
+ *
514
+ * @param request - The request {@link GetTriggerRequest}
515
+ * @returns A Promise of Trigger
516
+ */
503
517
  getTrigger = request => this.client.fetch({
504
518
  method: 'GET',
505
519
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
@@ -536,6 +550,14 @@ class API extends API$1 {
536
550
  }, unmarshalListTriggersResponse);
537
551
  };
538
552
  })();
553
+
554
+ /**
555
+ * List all triggers. List all triggers belonging to a specified Organization
556
+ * or Project.
557
+ *
558
+ * @param request - The request {@link ListTriggersRequest}
559
+ * @returns A Promise of ListTriggersResponse
560
+ */
539
561
  listTriggers = (() => {
540
562
  var _this10 = this;
541
563
  return function (request) {
@@ -545,12 +567,26 @@ class API extends API$1 {
545
567
  return enrichForPagination('triggers', _this10.pageOfListTriggers, request);
546
568
  };
547
569
  })();
570
+
571
+ /**
572
+ * Update a trigger. Update a trigger with a specified ID.
573
+ *
574
+ * @param request - The request {@link UpdateTriggerRequest}
575
+ * @returns A Promise of Trigger
576
+ */
548
577
  updateTrigger = request => this.client.fetch({
549
578
  body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
550
579
  headers: jsonContentHeaders,
551
580
  method: 'PATCH',
552
581
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
553
582
  }, unmarshalTrigger);
583
+
584
+ /**
585
+ * Delete a trigger. Delete a trigger with a specified ID.
586
+ *
587
+ * @param request - The request {@link DeleteTriggerRequest}
588
+ * @returns A Promise of Trigger
589
+ */
554
590
  deleteTrigger = request => this.client.fetch({
555
591
  method: 'DELETE',
556
592
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
@@ -347,12 +347,12 @@ const marshalCreateTriggerRequest = (request, defaults) => ({
347
347
  ...resolveOneOf([{
348
348
  param: 'scw_sqs_config',
349
349
  value: request.scwSqsConfig !== undefined ? marshalCreateTriggerRequestMnqSqsClientConfig(request.scwSqsConfig) : undefined
350
- }, {
351
- param: 'sqs_config',
352
- value: request.sqsConfig !== undefined ? marshalCreateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
353
350
  }, {
354
351
  param: 'scw_nats_config',
355
352
  value: request.scwNatsConfig !== undefined ? marshalCreateTriggerRequestMnqNatsClientConfig(request.scwNatsConfig) : undefined
353
+ }, {
354
+ param: 'sqs_config',
355
+ value: request.sqsConfig !== undefined ? marshalCreateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
356
356
  }])
357
357
  });
358
358
  const marshalUpdateCronRequest = (request, defaults) => ({
@@ -1,7 +1,7 @@
1
1
  import { API as API$1 } from '../../../scw/api.js';
2
2
  import { urlParams, validatePathParam, resolveOneOf } from '../../../helpers/marshalling.js';
3
3
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
4
- import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, marshalCreateUserRequest, unmarshalListApplicationsResponse, marshalCreateApplicationRequest, unmarshalApplication, marshalUpdateApplicationRequest, unmarshalListGroupsResponse, marshalCreateGroupRequest, unmarshalGroup, marshalUpdateGroupRequest, marshalSetGroupMembersRequest, marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalRemoveGroupMemberRequest, unmarshalListPoliciesResponse, marshalCreatePolicyRequest, unmarshalPolicy, marshalUpdatePolicyRequest, marshalSetRulesRequest, unmarshalSetRulesResponse, unmarshalListRulesResponse, unmarshalListPermissionSetsResponse, unmarshalListAPIKeysResponse, marshalCreateAPIKeyRequest, unmarshalAPIKey, marshalUpdateAPIKeyRequest, unmarshalListQuotaResponse, unmarshalQuotum, unmarshalListJWTsResponse, unmarshalJWT } from './marshalling.gen.js';
4
+ import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, marshalCreateUserRequest, unmarshalListApplicationsResponse, marshalCreateApplicationRequest, unmarshalApplication, marshalUpdateApplicationRequest, unmarshalListGroupsResponse, marshalCreateGroupRequest, unmarshalGroup, marshalUpdateGroupRequest, marshalSetGroupMembersRequest, marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalRemoveGroupMemberRequest, unmarshalListPoliciesResponse, marshalCreatePolicyRequest, unmarshalPolicy, marshalUpdatePolicyRequest, marshalSetRulesRequest, unmarshalSetRulesResponse, unmarshalListRulesResponse, unmarshalListPermissionSetsResponse, unmarshalListAPIKeysResponse, marshalCreateAPIKeyRequest, unmarshalAPIKey, marshalUpdateAPIKeyRequest, unmarshalListQuotaResponse, unmarshalQuotum, unmarshalListJWTsResponse, unmarshalJWT, unmarshalListLogsResponse, unmarshalLog } from './marshalling.gen.js';
5
5
 
6
6
  // This file was automatically generated. DO NOT EDIT.
7
7
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -778,6 +778,32 @@ class API extends API$1 {
778
778
  method: 'DELETE',
779
779
  path: `/iam/v1alpha1/jwts/${validatePathParam('jti', request.jti)}`
780
780
  });
781
+ pageOfListLogs = (() => {
782
+ var _this19 = this;
783
+ return function (request) {
784
+ if (request === void 0) {
785
+ request = {};
786
+ }
787
+ return _this19.client.fetch({
788
+ method: 'GET',
789
+ path: `/iam/v1alpha1/logs`,
790
+ urlParams: urlParams(['action', request.action], ['created_after', request.createdAfter], ['created_before', request.createdBefore], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this19.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize], ['resource_type', request.resourceType], ['search', request.search])
791
+ }, unmarshalListLogsResponse);
792
+ };
793
+ })();
794
+ listLogs = (() => {
795
+ var _this20 = this;
796
+ return function (request) {
797
+ if (request === void 0) {
798
+ request = {};
799
+ }
800
+ return enrichForPagination('logs', _this20.pageOfListLogs, request);
801
+ };
802
+ })();
803
+ getLog = request => this.client.fetch({
804
+ method: 'GET',
805
+ path: `/iam/v1alpha1/logs/${validatePathParam('logId', request.logId)}`
806
+ }, unmarshalLog);
781
807
  }
782
808
 
783
809
  export { API };
@@ -67,6 +67,22 @@ const unmarshalGroup = data => {
67
67
  userIds: data.user_ids
68
68
  };
69
69
  };
70
+ const unmarshalLog = data => {
71
+ if (!isJSONObject(data)) {
72
+ throw new TypeError(`Unmarshalling the type 'Log' failed as data isn't a dictionary.`);
73
+ }
74
+ return {
75
+ action: data.action,
76
+ bearerId: data.bearer_id,
77
+ createdAt: unmarshalDate(data.created_at),
78
+ id: data.id,
79
+ ip: data.ip,
80
+ organizationId: data.organization_id,
81
+ resourceId: data.resource_id,
82
+ resourceType: data.resource_type,
83
+ userAgent: data.user_agent
84
+ };
85
+ };
70
86
  const unmarshalPolicy = data => {
71
87
  if (!isJSONObject(data)) {
72
88
  throw new TypeError(`Unmarshalling the type 'Policy' failed as data isn't a dictionary.`);
@@ -169,6 +185,15 @@ const unmarshalListJWTsResponse = data => {
169
185
  totalCount: data.total_count
170
186
  };
171
187
  };
188
+ const unmarshalListLogsResponse = data => {
189
+ if (!isJSONObject(data)) {
190
+ throw new TypeError(`Unmarshalling the type 'ListLogsResponse' failed as data isn't a dictionary.`);
191
+ }
192
+ return {
193
+ logs: unmarshalArrayOfObject(data.logs, unmarshalLog),
194
+ totalCount: data.total_count
195
+ };
196
+ };
172
197
  const unmarshalPermissionSet = data => {
173
198
  if (!isJSONObject(data)) {
174
199
  throw new TypeError(`Unmarshalling the type 'PermissionSet' failed as data isn't a dictionary.`);
@@ -381,4 +406,4 @@ const marshalUpdateSSHKeyRequest = (request, defaults) => ({
381
406
  name: request.name
382
407
  });
383
408
 
384
- export { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalRemoveGroupMemberRequest, marshalSetGroupMembersRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, unmarshalAPIKey, unmarshalApplication, unmarshalGroup, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListUsersResponse, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSetRulesResponse, unmarshalUser };
409
+ export { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalRemoveGroupMemberRequest, marshalSetGroupMembersRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, unmarshalAPIKey, unmarshalApplication, unmarshalGroup, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListLogsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListUsersResponse, unmarshalLog, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSetRulesResponse, unmarshalUser };
@@ -102,6 +102,15 @@ const ListJWTsRequest = {
102
102
  lessThanOrEqual: 100
103
103
  }
104
104
  };
105
+ const ListLogsRequest = {
106
+ page: {
107
+ greaterThan: 0
108
+ },
109
+ pageSize: {
110
+ greaterThanOrEqual: 1,
111
+ lessThanOrEqual: 100
112
+ }
113
+ };
105
114
  const ListPermissionSetsRequest = {
106
115
  page: {
107
116
  greaterThan: 0
@@ -204,4 +213,4 @@ const UpdateSSHKeyRequest = {
204
213
  }
205
214
  };
206
215
 
207
- export { CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreatePolicyRequest, CreateSSHKeyRequest, GetQuotumRequest, ListAPIKeysRequest, ListApplicationsRequest, ListGroupsRequest, ListJWTsRequest, ListPermissionSetsRequest, ListPoliciesRequest, ListQuotaRequest, ListRulesRequest, ListSSHKeysRequest, ListUsersRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdatePolicyRequest, UpdateSSHKeyRequest };
216
+ export { CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreatePolicyRequest, CreateSSHKeyRequest, GetQuotumRequest, ListAPIKeysRequest, ListApplicationsRequest, ListGroupsRequest, ListJWTsRequest, ListLogsRequest, ListPermissionSetsRequest, ListPoliciesRequest, ListQuotaRequest, ListRulesRequest, ListSSHKeysRequest, ListUsersRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdatePolicyRequest, UpdateSSHKeyRequest };
@@ -13,6 +13,9 @@ const PRIVATE_NIC_TRANSIENT_STATUSES = ['syncing'];
13
13
  /** Lists transient statutes of the enum {@link SecurityGroupState}. */
14
14
  const SECURITY_GROUP_TRANSIENT_STATUSES = ['syncing'];
15
15
 
16
+ /** Lists transient statutes of the enum {@link ServerIpState}. */
17
+ const SERVER_IP_TRANSIENT_STATUSES = ['pending'];
18
+
16
19
  /** Lists transient statutes of the enum {@link ServerState}. */
17
20
  const SERVER_TRANSIENT_STATUSES = ['starting', 'stopping'];
18
21
 
@@ -28,4 +31,4 @@ const VOLUME_SERVER_TRANSIENT_STATUSES = ['snapshotting', 'fetching', 'resizing'
28
31
  /** Lists transient statutes of the enum {@link VolumeState}. */
29
32
  const VOLUME_TRANSIENT_STATUSES = ['snapshotting', 'fetching', 'resizing', 'saving', 'hotsyncing'];
30
33
 
31
- export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES };
34
+ export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_IP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES };
@@ -1,2 +1,2 @@
1
1
  export { InstanceV1UtilsAPI as API } from './api.utils.js';
2
- export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from './content.gen.js';
2
+ export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_IP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from './content.gen.js';
@@ -242,6 +242,7 @@ const unmarshalServerIp = data => {
242
242
  id: data.id,
243
243
  netmask: data.netmask,
244
244
  provisioningMode: data.provisioning_mode,
245
+ state: data.state,
245
246
  tags: data.tags
246
247
  };
247
248
  };
@@ -912,13 +913,13 @@ const marshalVolumeTemplate = (request, defaults) => ({
912
913
  size: request.size,
913
914
  volume_type: request.volumeType,
914
915
  ...resolveOneOf([{
915
- default: defaults.defaultOrganizationId,
916
- param: 'organization',
917
- value: request.organization
918
- }, {
919
916
  default: defaults.defaultProjectId,
920
917
  param: 'project',
921
918
  value: request.project
919
+ }, {
920
+ default: defaults.defaultOrganizationId,
921
+ param: 'organization',
922
+ value: request.organization
922
923
  }])
923
924
  });
924
925
  const marshalCreateImageRequest = (request, defaults) => ({
@@ -936,13 +937,13 @@ const marshalCreateImageRequest = (request, defaults) => ({
936
937
  root_volume: request.rootVolume,
937
938
  tags: request.tags,
938
939
  ...resolveOneOf([{
939
- default: defaults.defaultOrganizationId,
940
- param: 'organization',
941
- value: request.organization
942
- }, {
943
940
  default: defaults.defaultProjectId,
944
941
  param: 'project',
945
942
  value: request.project
943
+ }, {
944
+ default: defaults.defaultOrganizationId,
945
+ param: 'organization',
946
+ value: request.organization
946
947
  }])
947
948
  });
948
949
  const marshalCreateIpRequest = (request, defaults) => ({
@@ -950,13 +951,13 @@ const marshalCreateIpRequest = (request, defaults) => ({
950
951
  tags: request.tags,
951
952
  type: request.type,
952
953
  ...resolveOneOf([{
953
- default: defaults.defaultOrganizationId,
954
- param: 'organization',
955
- value: request.organization
956
- }, {
957
954
  default: defaults.defaultProjectId,
958
955
  param: 'project',
959
956
  value: request.project
957
+ }, {
958
+ default: defaults.defaultOrganizationId,
959
+ param: 'organization',
960
+ value: request.organization
960
961
  }])
961
962
  });
962
963
  const marshalCreatePlacementGroupRequest = (request, defaults) => ({
@@ -965,13 +966,13 @@ const marshalCreatePlacementGroupRequest = (request, defaults) => ({
965
966
  policy_type: request.policyType,
966
967
  tags: request.tags,
967
968
  ...resolveOneOf([{
968
- default: defaults.defaultOrganizationId,
969
- param: 'organization',
970
- value: request.organization
971
- }, {
972
969
  default: defaults.defaultProjectId,
973
970
  param: 'project',
974
971
  value: request.project
972
+ }, {
973
+ default: defaults.defaultOrganizationId,
974
+ param: 'organization',
975
+ value: request.organization
975
976
  }])
976
977
  });
977
978
  const marshalCreatePrivateNICRequest = (request, defaults) => ({
@@ -988,13 +989,13 @@ const marshalCreateSecurityGroupRequest = (request, defaults) => ({
988
989
  stateful: request.stateful,
989
990
  tags: request.tags,
990
991
  ...resolveOneOf([{
991
- default: defaults.defaultOrganizationId,
992
- param: 'organization',
993
- value: request.organization
994
- }, {
995
992
  default: defaults.defaultProjectId,
996
993
  param: 'project',
997
994
  value: request.project
995
+ }, {
996
+ default: defaults.defaultOrganizationId,
997
+ param: 'organization',
998
+ value: request.organization
998
999
  }]),
999
1000
  ...resolveOneOf([{
1000
1001
  param: 'organization_default',
@@ -1046,13 +1047,13 @@ const marshalCreateServerRequest = (request, defaults) => ({
1046
1047
  };
1047
1048
  }, {}) : undefined,
1048
1049
  ...resolveOneOf([{
1049
- default: defaults.defaultOrganizationId,
1050
- param: 'organization',
1051
- value: request.organization
1052
- }, {
1053
1050
  default: defaults.defaultProjectId,
1054
1051
  param: 'project',
1055
1052
  value: request.project
1053
+ }, {
1054
+ default: defaults.defaultOrganizationId,
1055
+ param: 'organization',
1056
+ value: request.organization
1056
1057
  }])
1057
1058
  });
1058
1059
  const marshalCreateSnapshotRequest = (request, defaults) => ({
@@ -1064,13 +1065,13 @@ const marshalCreateSnapshotRequest = (request, defaults) => ({
1064
1065
  volume_id: request.volumeId,
1065
1066
  volume_type: request.volumeType,
1066
1067
  ...resolveOneOf([{
1067
- default: defaults.defaultOrganizationId,
1068
- param: 'organization',
1069
- value: request.organization
1070
- }, {
1071
1068
  default: defaults.defaultProjectId,
1072
1069
  param: 'project',
1073
1070
  value: request.project
1071
+ }, {
1072
+ default: defaults.defaultOrganizationId,
1073
+ param: 'organization',
1074
+ value: request.organization
1074
1075
  }])
1075
1076
  });
1076
1077
  const marshalCreateVolumeRequest = (request, defaults) => ({
@@ -1078,13 +1079,13 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
1078
1079
  tags: request.tags,
1079
1080
  volume_type: request.volumeType,
1080
1081
  ...resolveOneOf([{
1081
- default: defaults.defaultOrganizationId,
1082
- param: 'organization',
1083
- value: request.organization
1084
- }, {
1085
1082
  default: defaults.defaultProjectId,
1086
1083
  param: 'project',
1087
1084
  value: request.project
1085
+ }, {
1086
+ default: defaults.defaultOrganizationId,
1087
+ param: 'organization',
1088
+ value: request.organization
1088
1089
  }]),
1089
1090
  ...resolveOneOf([{
1090
1091
  param: 'size',
@@ -1291,6 +1292,7 @@ const marshalServerIp = (request, defaults) => ({
1291
1292
  id: request.id,
1292
1293
  netmask: request.netmask,
1293
1294
  provisioning_mode: request.provisioningMode,
1295
+ state: request.state,
1294
1296
  tags: request.tags
1295
1297
  });
1296
1298
  const marshalServerIpv6 = (request, defaults) => ({
@@ -128,20 +128,14 @@ const unmarshalReplacePinResponse = data => {
128
128
  pin: data.pin ? unmarshalPin(data.pin) : undefined
129
129
  };
130
130
  };
131
- const marshalPinOptions = (request, defaults) => ({
132
- replication_count: request.replicationCount,
133
- required_zones: request.requiredZones
134
- });
135
131
  const marshalCreatePinByCIDRequest = (request, defaults) => ({
136
132
  cid: request.cid,
137
133
  name: request.name,
138
134
  origins: request.origins,
139
- pin_options: request.pinOptions !== undefined ? marshalPinOptions(request.pinOptions) : undefined,
140
135
  volume_id: request.volumeId
141
136
  });
142
137
  const marshalCreatePinByURLRequest = (request, defaults) => ({
143
138
  name: request.name,
144
- pin_options: request.pinOptions !== undefined ? marshalPinOptions(request.pinOptions) : undefined,
145
139
  url: request.url,
146
140
  volume_id: request.volumeId
147
141
  });
@@ -169,7 +163,6 @@ const marshalReplacePinRequest = (request, defaults) => ({
169
163
  cid: request.cid,
170
164
  name: request.name,
171
165
  origins: request.origins,
172
- pin_options: request.pinOptions !== undefined ? marshalPinOptions(request.pinOptions) : undefined,
173
166
  volume_id: request.volumeId
174
167
  });
175
168
  const marshalUpdateVolumeRequest = (request, defaults) => ({
@@ -0,0 +1,2 @@
1
+ import * as index_gen from './v1alpha1/index.gen.js';
2
+ export { index_gen as v1alpha1 };