@scaleway/sdk 1.12.0 → 1.14.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/applesilicon/v1alpha1/api.gen.js +2 -22
- package/dist/api/baremetal/v1/api.gen.js +2 -2
- package/dist/api/container/v1beta1/api.gen.js +1 -1
- package/dist/api/domain/v2beta1/api.gen.js +1 -21
- package/dist/api/flexibleip/v1alpha1/api.gen.js +1 -1
- package/dist/api/function/v1beta1/api.gen.js +2 -2
- package/dist/api/instance/v1/api.gen.js +1 -1
- package/dist/api/iot/v1/api.gen.js +1 -1
- package/dist/api/k8s/v1/api.gen.js +16 -2
- package/dist/api/k8s/v1/marshalling.gen.js +4 -1
- package/dist/api/lb/v1/api.gen.js +6 -4
- package/dist/api/mnq/v1alpha1/api.gen.js +1 -1
- package/dist/api/rdb/v1/api.gen.js +1 -1
- package/dist/api/rdb/v1/marshalling.gen.js +3 -1
- package/dist/api/redis/v1/api.gen.js +1 -1
- package/dist/api/registry/v1/api.gen.js +1 -1
- package/dist/api/secret/v1alpha1/api.gen.js +29 -12
- package/dist/api/secret/v1alpha1/marshalling.gen.js +11 -1
- package/dist/api/tem/v1alpha1/api.gen.js +3 -11
- package/dist/api/vpc/index.js +2 -0
- package/dist/api/vpc/v1/api.gen.js +1 -1
- package/dist/api/vpc/v2/api.gen.js +231 -0
- package/dist/api/vpc/v2/index.gen.js +4 -0
- package/dist/api/vpc/v2/marshalling.gen.js +136 -0
- package/dist/api/vpcgw/v1/api.gen.js +1 -1
- package/dist/api/webhosting/v1alpha1/api.gen.js +1 -1
- package/dist/index.cjs +805 -464
- package/dist/index.d.ts +2247 -1710
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/scw-error.js +1 -2
- package/package.json +2 -2
|
@@ -11,27 +11,7 @@ const jsonContentHeaders = {
|
|
|
11
11
|
'Content-Type': 'application/json; charset=utf-8'
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
/**
|
|
15
|
-
* Apple silicon API.
|
|
16
|
-
*
|
|
17
|
-
* Apple Mac mini as a service. Scaleway Apple silicon as-a-Service is built
|
|
18
|
-
* using the latest generation of Apple Mac mini hardware (fifth generation).
|
|
19
|
-
*
|
|
20
|
-
* These dedicated Mac mini M1s are designed for developing, building, testing,
|
|
21
|
-
* and signing applications for Apple devices, including iPhones, iPads, Mac
|
|
22
|
-
* computers and much more.
|
|
23
|
-
*
|
|
24
|
-
* Get set to explore, learn and build on a dedicated Mac mini M1 with more
|
|
25
|
-
* performance and speed than you ever thought possible.
|
|
26
|
-
*
|
|
27
|
-
* _Apple silicon as a Service comes with a minimum allocation period of 24
|
|
28
|
-
* hours_*.
|
|
29
|
-
*
|
|
30
|
-
* Mac mini and macOS are trademarks of Apple Inc., registered in the U.S. and
|
|
31
|
-
* other countries and regions. IOS is a trademark or registered trademark of
|
|
32
|
-
* Cisco in the U.S. and other countries and is used by Apple under license.
|
|
33
|
-
* Scaleway is not affiliated with Apple Inc.
|
|
34
|
-
*/
|
|
14
|
+
/** Apple silicon API. */
|
|
35
15
|
class API extends API$1 {
|
|
36
16
|
constructor() {
|
|
37
17
|
var _this;
|
|
@@ -211,8 +191,8 @@ class API extends API$1 {
|
|
|
211
191
|
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/reinstall`
|
|
212
192
|
}, unmarshalServer);
|
|
213
193
|
}
|
|
214
|
-
/** Lists the available zones of the API. */
|
|
215
194
|
}
|
|
195
|
+
/** Lists the available zones of the API. */
|
|
216
196
|
API.LOCALITIES = ['fr-par-3'];
|
|
217
197
|
|
|
218
198
|
export { API };
|
|
@@ -390,10 +390,10 @@ class API extends API$1 {
|
|
|
390
390
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/os/${validatePathParam('osId', request.osId)}`
|
|
391
391
|
}, unmarshalOS);
|
|
392
392
|
}
|
|
393
|
-
/** Lists the available zones of the API. */
|
|
394
393
|
}
|
|
395
394
|
|
|
396
395
|
/** Elastic Metal Private Network API. */
|
|
396
|
+
/** Lists the available zones of the API. */
|
|
397
397
|
API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1'];
|
|
398
398
|
class PrivateNetworkAPI extends API$1 {
|
|
399
399
|
constructor() {
|
|
@@ -460,8 +460,8 @@ class PrivateNetworkAPI extends API$1 {
|
|
|
460
460
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
|
-
/** Lists the available zones of the API. */
|
|
464
463
|
}
|
|
464
|
+
/** Lists the available zones of the API. */
|
|
465
465
|
PrivateNetworkAPI.LOCALITIES = ['fr-par-2'];
|
|
466
466
|
|
|
467
467
|
export { API, PrivateNetworkAPI };
|
|
@@ -398,8 +398,8 @@ class API extends API$1 {
|
|
|
398
398
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
399
399
|
}, unmarshalToken);
|
|
400
400
|
}
|
|
401
|
-
/** Lists the available regions of the API. */
|
|
402
401
|
}
|
|
402
|
+
/** Lists the available regions of the API. */
|
|
403
403
|
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
404
404
|
|
|
405
405
|
export { API };
|
|
@@ -663,27 +663,7 @@ class RegistrarAPI extends API$1 {
|
|
|
663
663
|
}, unmarshalGetDomainAuthCodeResponse);
|
|
664
664
|
/**
|
|
665
665
|
* Update domain DNSSEC. If your domain has the default Scaleway NS and uses
|
|
666
|
-
* another registrar, you have to update the DS record manually.
|
|
667
|
-
* algorithm, here are the code numbers for each type:
|
|
668
|
-
*
|
|
669
|
-
* - 1: RSAMD5
|
|
670
|
-
* - 2: DIFFIE_HELLMAN
|
|
671
|
-
* - 3: DSA_SHA1
|
|
672
|
-
* - 5: RSA_SHA1
|
|
673
|
-
* - 6: DSA_NSEC3_SHA1
|
|
674
|
-
* - 7: RSASHA1_NSEC3_SHA1
|
|
675
|
-
* - 8: RSASHA256
|
|
676
|
-
* - 10: RSASHA512
|
|
677
|
-
* - 12: ECC_GOST
|
|
678
|
-
* - 13: ECDSAP256SHA256
|
|
679
|
-
* - 14: ECDSAP384SHA384
|
|
680
|
-
*
|
|
681
|
-
* And for the digest type:
|
|
682
|
-
*
|
|
683
|
-
* - 1: SHA_1
|
|
684
|
-
* - 2: SHA_256
|
|
685
|
-
* - 3: GOST_R_34_11_94
|
|
686
|
-
* - 4: SHA_384
|
|
666
|
+
* another registrar, you have to update the DS record manually.
|
|
687
667
|
*
|
|
688
668
|
* @param request - The request {@link RegistrarApiEnableDomainDNSSECRequest}
|
|
689
669
|
* @returns A Promise of Domain
|
|
@@ -175,8 +175,8 @@ class API extends API$1 {
|
|
|
175
175
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}/mac`
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
/** Lists the available zones of the API. */
|
|
179
178
|
}
|
|
179
|
+
/** Lists the available zones of the API. */
|
|
180
180
|
API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1'];
|
|
181
181
|
|
|
182
182
|
export { API };
|
|
@@ -60,7 +60,7 @@ class API extends API$1 {
|
|
|
60
60
|
this.waitForNamespace = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
|
|
61
61
|
/**
|
|
62
62
|
* Create a new namespace. Create a new namespace in a specified Organization
|
|
63
|
-
* or
|
|
63
|
+
* or Project.
|
|
64
64
|
*
|
|
65
65
|
* @param request - The request {@link CreateNamespaceRequest}
|
|
66
66
|
* @returns A Promise of Namespace
|
|
@@ -493,8 +493,8 @@ class API extends API$1 {
|
|
|
493
493
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
494
494
|
}, unmarshalTrigger);
|
|
495
495
|
}
|
|
496
|
-
/** Lists the available regions of the API. */
|
|
497
496
|
}
|
|
497
|
+
/** Lists the available regions of the API. */
|
|
498
498
|
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
499
499
|
|
|
500
500
|
export { API };
|
|
@@ -828,8 +828,8 @@ class API extends API$1 {
|
|
|
828
828
|
}, unmarshalGetDashboardResponse);
|
|
829
829
|
};
|
|
830
830
|
}
|
|
831
|
-
/** Lists the available zones of the API. */
|
|
832
831
|
}
|
|
832
|
+
/** Lists the available zones of the API. */
|
|
833
833
|
API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
|
|
834
834
|
|
|
835
835
|
export { API };
|
|
@@ -510,8 +510,8 @@ class API extends API$1 {
|
|
|
510
510
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam('twinId', request.twinId)}`
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
|
-
/** Lists the available regions of the API. */
|
|
514
513
|
}
|
|
514
|
+
/** Lists the available regions of the API. */
|
|
515
515
|
API.LOCALITIES = ['fr-par'];
|
|
516
516
|
|
|
517
517
|
export { API };
|
|
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
|
|
|
3
3
|
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
4
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
5
|
import { CLUSTER_TRANSIENT_STATUSES, POOL_TRANSIENT_STATUSES, NODE_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { unmarshalListClustersResponse, marshalCreateClusterRequest, unmarshalCluster, marshalUpdateClusterRequest, marshalUpgradeClusterRequest, marshalSetClusterTypeRequest, unmarshalListClusterAvailableVersionsResponse, unmarshalListPoolsResponse, marshalCreatePoolRequest, unmarshalPool, marshalUpgradePoolRequest, marshalUpdatePoolRequest, unmarshalExternalNode, unmarshalListNodesResponse, unmarshalNode, unmarshalListVersionsResponse, unmarshalVersion } from './marshalling.gen.js';
|
|
6
|
+
import { unmarshalListClustersResponse, marshalCreateClusterRequest, unmarshalCluster, marshalUpdateClusterRequest, marshalUpgradeClusterRequest, marshalSetClusterTypeRequest, unmarshalListClusterAvailableVersionsResponse, marshalMigrateToPrivateNetworkClusterRequest, unmarshalListPoolsResponse, marshalCreatePoolRequest, unmarshalPool, marshalUpgradePoolRequest, marshalUpdatePoolRequest, unmarshalExternalNode, unmarshalListNodesResponse, unmarshalNode, unmarshalListVersionsResponse, unmarshalVersion } from './marshalling.gen.js';
|
|
7
7
|
|
|
8
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
9
9
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -155,6 +155,20 @@ class API extends API$1 {
|
|
|
155
155
|
method: 'POST',
|
|
156
156
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/reset-admin-token`
|
|
157
157
|
});
|
|
158
|
+
/**
|
|
159
|
+
* Migrate an existing cluster to a Private Network cluster. Migrate a cluster
|
|
160
|
+
* that was created before the release of Private Network clusters to a new
|
|
161
|
+
* one with a Private Network.
|
|
162
|
+
*
|
|
163
|
+
* @param request - The request {@link MigrateToPrivateNetworkClusterRequest}
|
|
164
|
+
* @returns A Promise of Cluster
|
|
165
|
+
*/
|
|
166
|
+
this.migrateToPrivateNetworkCluster = request => this.client.fetch({
|
|
167
|
+
body: JSON.stringify(marshalMigrateToPrivateNetworkClusterRequest(request, this.client.settings)),
|
|
168
|
+
headers: jsonContentHeaders,
|
|
169
|
+
method: 'POST',
|
|
170
|
+
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/migrate-to-private-network`
|
|
171
|
+
}, unmarshalCluster);
|
|
158
172
|
this.pageOfListPools = request => this.client.fetch({
|
|
159
173
|
method: 'GET',
|
|
160
174
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/pools`,
|
|
@@ -357,8 +371,8 @@ class API extends API$1 {
|
|
|
357
371
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/versions/${validatePathParam('versionName', request.versionName)}`
|
|
358
372
|
}, unmarshalVersion);
|
|
359
373
|
}
|
|
360
|
-
/** Lists the available regions of the API. */
|
|
361
374
|
}
|
|
375
|
+
/** Lists the available regions of the API. */
|
|
362
376
|
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
363
377
|
|
|
364
378
|
export { API };
|
|
@@ -344,6 +344,9 @@ const marshalCreatePoolRequest = (request, defaults) => ({
|
|
|
344
344
|
upgrade_policy: request.upgradePolicy ? marshalCreatePoolRequestUpgradePolicy(request.upgradePolicy) : undefined,
|
|
345
345
|
zone: request.zone ?? defaults.defaultZone
|
|
346
346
|
});
|
|
347
|
+
const marshalMigrateToPrivateNetworkClusterRequest = (request, defaults) => ({
|
|
348
|
+
private_network_id: request.privateNetworkId
|
|
349
|
+
});
|
|
347
350
|
const marshalSetClusterTypeRequest = (request, defaults) => ({
|
|
348
351
|
type: request.type
|
|
349
352
|
});
|
|
@@ -378,4 +381,4 @@ const marshalUpgradePoolRequest = (request, defaults) => ({
|
|
|
378
381
|
version: request.version
|
|
379
382
|
});
|
|
380
383
|
|
|
381
|
-
export { marshalCreateClusterRequest, marshalCreatePoolRequest, marshalSetClusterTypeRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalCluster, unmarshalExternalNode, unmarshalListClusterAvailableVersionsResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalPool, unmarshalVersion };
|
|
384
|
+
export { marshalCreateClusterRequest, marshalCreatePoolRequest, marshalMigrateToPrivateNetworkClusterRequest, marshalSetClusterTypeRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalCluster, unmarshalExternalNode, unmarshalListClusterAvailableVersionsResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalPool, unmarshalVersion };
|
|
@@ -409,7 +409,8 @@ class API extends API$1 {
|
|
|
409
409
|
*/
|
|
410
410
|
this.getLbStats = request => this.client.fetch({
|
|
411
411
|
method: 'GET',
|
|
412
|
-
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/stats
|
|
412
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/stats`,
|
|
413
|
+
urlParams: urlParams(['backend_id', request.backendId])
|
|
413
414
|
}, unmarshalLbStats);
|
|
414
415
|
this.pageOfListBackendStats = request => this.client.fetch({
|
|
415
416
|
method: 'GET',
|
|
@@ -671,7 +672,6 @@ class API extends API$1 {
|
|
|
671
672
|
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/detach`
|
|
672
673
|
});
|
|
673
674
|
}
|
|
674
|
-
/** Lists the available regions of the API. */
|
|
675
675
|
}
|
|
676
676
|
|
|
677
677
|
/**
|
|
@@ -680,6 +680,7 @@ class API extends API$1 {
|
|
|
680
680
|
* This API allows you to manage your Scaleway Load Balancer services. Load
|
|
681
681
|
* Balancer API.
|
|
682
682
|
*/
|
|
683
|
+
/** Lists the available regions of the API. */
|
|
683
684
|
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
684
685
|
class ZonedAPI extends API$1 {
|
|
685
686
|
constructor() {
|
|
@@ -1143,7 +1144,8 @@ class ZonedAPI extends API$1 {
|
|
|
1143
1144
|
*/
|
|
1144
1145
|
this.getLbStats = request => this.client.fetch({
|
|
1145
1146
|
method: 'GET',
|
|
1146
|
-
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/stats
|
|
1147
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/stats`,
|
|
1148
|
+
urlParams: urlParams(['backend_id', request.backendId])
|
|
1147
1149
|
}, unmarshalLbStats);
|
|
1148
1150
|
this.pageOfListBackendStats = request => this.client.fetch({
|
|
1149
1151
|
method: 'GET',
|
|
@@ -1468,8 +1470,8 @@ class ZonedAPI extends API$1 {
|
|
|
1468
1470
|
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/detach`
|
|
1469
1471
|
});
|
|
1470
1472
|
}
|
|
1471
|
-
/** Lists the available zones of the API. */
|
|
1472
1473
|
}
|
|
1474
|
+
/** Lists the available zones of the API. */
|
|
1473
1475
|
ZonedAPI.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
|
|
1474
1476
|
|
|
1475
1477
|
export { API, ZonedAPI };
|
|
@@ -174,8 +174,8 @@ class API extends API$1 {
|
|
|
174
174
|
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
|
|
175
175
|
}, unmarshalCredential);
|
|
176
176
|
}
|
|
177
|
-
/** Lists the available regions of the API. */
|
|
178
177
|
}
|
|
178
|
+
/** Lists the available regions of the API. */
|
|
179
179
|
API.LOCALITIES = ['fr-par'];
|
|
180
180
|
|
|
181
181
|
export { API };
|
|
@@ -873,8 +873,8 @@ class API extends API$1 {
|
|
|
873
873
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam('endpointId', request.endpointId)}/migrate`
|
|
874
874
|
}, unmarshalEndpoint);
|
|
875
875
|
}
|
|
876
|
-
/** Lists the available regions of the API. */
|
|
877
876
|
}
|
|
877
|
+
/** Lists the available regions of the API. */
|
|
878
878
|
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
879
879
|
|
|
880
880
|
export { API };
|
|
@@ -143,6 +143,7 @@ const unmarshalReadReplica = data => {
|
|
|
143
143
|
endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
|
|
144
144
|
id: data.id,
|
|
145
145
|
region: data.region,
|
|
146
|
+
sameZone: data.same_zone,
|
|
146
147
|
status: data.status
|
|
147
148
|
};
|
|
148
149
|
};
|
|
@@ -602,7 +603,8 @@ const marshalCreateReadReplicaEndpointRequest = (request, defaults) => ({
|
|
|
602
603
|
});
|
|
603
604
|
const marshalCreateReadReplicaRequest = (request, defaults) => ({
|
|
604
605
|
endpoint_spec: request.endpointSpec ? request.endpointSpec.map(elt => marshalReadReplicaEndpointSpec(elt)) : undefined,
|
|
605
|
-
instance_id: request.instanceId
|
|
606
|
+
instance_id: request.instanceId,
|
|
607
|
+
same_zone: request.sameZone
|
|
606
608
|
});
|
|
607
609
|
const marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
608
610
|
expires_at: request.expiresAt,
|
|
@@ -357,8 +357,8 @@ class API extends API$1 {
|
|
|
357
357
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/endpoints/${validatePathParam('endpointId', request.endpointId)}`
|
|
358
358
|
}, unmarshalEndpoint);
|
|
359
359
|
}
|
|
360
|
-
/** Lists the available zones of the API. */
|
|
361
360
|
}
|
|
361
|
+
/** Lists the available zones of the API. */
|
|
362
362
|
API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
|
|
363
363
|
|
|
364
364
|
export { API };
|
|
@@ -223,8 +223,8 @@ class API extends API$1 {
|
|
|
223
223
|
urlParams: urlParams(['force', request.force])
|
|
224
224
|
}, unmarshalTag);
|
|
225
225
|
}
|
|
226
|
-
/** Lists the available regions of the API. */
|
|
227
226
|
}
|
|
227
|
+
/** Lists the available regions of the API. */
|
|
228
228
|
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
229
229
|
|
|
230
230
|
export { API };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { API as API$1 } from '../../../scw/api.js';
|
|
2
2
|
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
3
3
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
-
import { marshalCreateSecretRequest, unmarshalSecret, marshalUpdateSecretRequest, unmarshalListSecretsResponse, marshalAddSecretOwnerRequest, marshalCreateSecretVersionRequest, unmarshalSecretVersion, marshalUpdateSecretVersionRequest, unmarshalListSecretVersionsResponse, unmarshalAccessSecretVersionResponse } from './marshalling.gen.js';
|
|
4
|
+
import { marshalCreateSecretRequest, unmarshalSecret, marshalUpdateSecretRequest, unmarshalListSecretsResponse, marshalAddSecretOwnerRequest, marshalCreateSecretVersionRequest, unmarshalSecretVersion, marshalGeneratePasswordRequest, marshalUpdateSecretVersionRequest, unmarshalListSecretVersionsResponse, unmarshalAccessSecretVersionResponse } 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.
|
|
@@ -45,14 +45,15 @@ class API extends API$1 {
|
|
|
45
45
|
}, unmarshalSecret);
|
|
46
46
|
/**
|
|
47
47
|
* Get metadata using the secret's ID. Retrieve the metadata of a secret
|
|
48
|
-
* specified by the `region` and
|
|
48
|
+
* specified by the `region`, `secret_id` and `project_id` parameters.
|
|
49
49
|
*
|
|
50
50
|
* @param request - The request {@link GetSecretByNameRequest}
|
|
51
51
|
* @returns A Promise of Secret
|
|
52
52
|
*/
|
|
53
53
|
this.getSecretByName = request => this.client.fetch({
|
|
54
54
|
method: 'GET',
|
|
55
|
-
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-name/${validatePathParam('secretName', request.secretName)}
|
|
55
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-name/${validatePathParam('secretName', request.secretName)}`,
|
|
56
|
+
urlParams: urlParams(['project_id', request.projectId])
|
|
56
57
|
}, unmarshalSecret);
|
|
57
58
|
/**
|
|
58
59
|
* Update metadata of a secret. Edit a secret's metadata such as name, tag(s)
|
|
@@ -126,6 +127,20 @@ class API extends API$1 {
|
|
|
126
127
|
method: 'POST',
|
|
127
128
|
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions`
|
|
128
129
|
}, unmarshalSecretVersion);
|
|
130
|
+
/**
|
|
131
|
+
* Generate a password in a new version. Generate a password for the given
|
|
132
|
+
* secret specified by the `region` and `secret_id` parameters. This will also
|
|
133
|
+
* create a new version of the secret that will store the password.
|
|
134
|
+
*
|
|
135
|
+
* @param request - The request {@link GeneratePasswordRequest}
|
|
136
|
+
* @returns A Promise of SecretVersion
|
|
137
|
+
*/
|
|
138
|
+
this.generatePassword = request => this.client.fetch({
|
|
139
|
+
body: JSON.stringify(marshalGeneratePasswordRequest(request, this.client.settings)),
|
|
140
|
+
headers: jsonContentHeaders,
|
|
141
|
+
method: 'POST',
|
|
142
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/generate-password`
|
|
143
|
+
}, unmarshalSecretVersion);
|
|
129
144
|
/**
|
|
130
145
|
* Get metadata of a secret's version using the secret's ID. Retrieve the
|
|
131
146
|
* metadata of a secret's given version specified by the `region`, `secret_id`
|
|
@@ -141,14 +156,15 @@ class API extends API$1 {
|
|
|
141
156
|
/**
|
|
142
157
|
* Get metadata of a secret's version using the secret's name. Retrieve the
|
|
143
158
|
* metadata of a secret's given version specified by the `region`,
|
|
144
|
-
* `secret_name` and `
|
|
159
|
+
* `secret_name`, `revision` and `project_id` parameters.
|
|
145
160
|
*
|
|
146
161
|
* @param request - The request {@link GetSecretVersionByNameRequest}
|
|
147
162
|
* @returns A Promise of SecretVersion
|
|
148
163
|
*/
|
|
149
164
|
this.getSecretVersionByName = request => this.client.fetch({
|
|
150
165
|
method: 'GET',
|
|
151
|
-
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-name/${validatePathParam('secretName', request.secretName)}/versions/${validatePathParam('revision', request.revision)}
|
|
166
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-name/${validatePathParam('secretName', request.secretName)}/versions/${validatePathParam('revision', request.revision)}`,
|
|
167
|
+
urlParams: urlParams(['project_id', request.projectId])
|
|
152
168
|
}, unmarshalSecretVersion);
|
|
153
169
|
/**
|
|
154
170
|
* Update metadata of a version. Edit the metadata of a secret's given
|
|
@@ -180,12 +196,12 @@ class API extends API$1 {
|
|
|
180
196
|
this.pageOfListSecretVersionsByName = request => this.client.fetch({
|
|
181
197
|
method: 'GET',
|
|
182
198
|
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-name/${validatePathParam('secretName', request.secretName)}/versions`,
|
|
183
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['status', request.status])
|
|
199
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['status', request.status])
|
|
184
200
|
}, unmarshalListSecretVersionsResponse);
|
|
185
201
|
/**
|
|
186
202
|
* List versions of a secret using the secret's name. Retrieve the list of a
|
|
187
|
-
* given secret's versions specified by the `secret_name` and
|
|
188
|
-
* parameters.
|
|
203
|
+
* given secret's versions specified by the `secret_name`,`region` and
|
|
204
|
+
* `project_id` parameters.
|
|
189
205
|
*
|
|
190
206
|
* @param request - The request {@link ListSecretVersionsByNameRequest}
|
|
191
207
|
* @returns A Promise of ListSecretVersionsResponse
|
|
@@ -231,15 +247,16 @@ class API extends API$1 {
|
|
|
231
247
|
}, unmarshalAccessSecretVersionResponse);
|
|
232
248
|
/**
|
|
233
249
|
* Access a secret's version using the secret's name. Access sensitive data in
|
|
234
|
-
* a secret's version specified by the `region`, `secret_name
|
|
235
|
-
* parameters.
|
|
250
|
+
* a secret's version specified by the `region`, `secret_name`, `revision` and
|
|
251
|
+
* `project_id` parameters.
|
|
236
252
|
*
|
|
237
253
|
* @param request - The request {@link AccessSecretVersionByNameRequest}
|
|
238
254
|
* @returns A Promise of AccessSecretVersionResponse
|
|
239
255
|
*/
|
|
240
256
|
this.accessSecretVersionByName = request => this.client.fetch({
|
|
241
257
|
method: 'GET',
|
|
242
|
-
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-name/${validatePathParam('secretName', request.secretName)}/versions/${validatePathParam('revision', request.revision)}/access
|
|
258
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-name/${validatePathParam('secretName', request.secretName)}/versions/${validatePathParam('revision', request.revision)}/access`,
|
|
259
|
+
urlParams: urlParams(['project_id', request.projectId])
|
|
243
260
|
}, unmarshalAccessSecretVersionResponse);
|
|
244
261
|
/**
|
|
245
262
|
* Delete a version. Delete a secret's version and the sensitive data
|
|
@@ -255,8 +272,8 @@ class API extends API$1 {
|
|
|
255
272
|
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}/destroy`
|
|
256
273
|
}, unmarshalSecretVersion);
|
|
257
274
|
}
|
|
258
|
-
/** Lists the available regions of the API. */
|
|
259
275
|
}
|
|
276
|
+
/** Lists the available regions of the API. */
|
|
260
277
|
API.LOCALITIES = ['fr-par'];
|
|
261
278
|
|
|
262
279
|
export { API };
|
|
@@ -72,6 +72,7 @@ const marshalPasswordGenerationParams = (request, defaults) => ({
|
|
|
72
72
|
no_uppercase_letters: request.noUppercaseLetters
|
|
73
73
|
});
|
|
74
74
|
const marshalAddSecretOwnerRequest = (request, defaults) => ({
|
|
75
|
+
product: request.product ?? 'unknown',
|
|
75
76
|
product_name: request.productName
|
|
76
77
|
});
|
|
77
78
|
const marshalCreateSecretRequest = (request, defaults) => ({
|
|
@@ -90,6 +91,15 @@ const marshalCreateSecretVersionRequest = (request, defaults) => ({
|
|
|
90
91
|
value: request.passwordGeneration ? marshalPasswordGenerationParams(request.passwordGeneration) : undefined
|
|
91
92
|
}])
|
|
92
93
|
});
|
|
94
|
+
const marshalGeneratePasswordRequest = (request, defaults) => ({
|
|
95
|
+
additional_chars: request.additionalChars,
|
|
96
|
+
description: request.description,
|
|
97
|
+
disable_previous: request.disablePrevious,
|
|
98
|
+
length: request.length,
|
|
99
|
+
no_digits: request.noDigits,
|
|
100
|
+
no_lowercase_letters: request.noLowercaseLetters,
|
|
101
|
+
no_uppercase_letters: request.noUppercaseLetters
|
|
102
|
+
});
|
|
93
103
|
const marshalUpdateSecretRequest = (request, defaults) => ({
|
|
94
104
|
description: request.description,
|
|
95
105
|
name: request.name,
|
|
@@ -99,4 +109,4 @@ const marshalUpdateSecretVersionRequest = (request, defaults) => ({
|
|
|
99
109
|
description: request.description
|
|
100
110
|
});
|
|
101
111
|
|
|
102
|
-
export { marshalAddSecretOwnerRequest, marshalCreateSecretRequest, marshalCreateSecretVersionRequest, marshalUpdateSecretRequest, marshalUpdateSecretVersionRequest, unmarshalAccessSecretVersionResponse, unmarshalListSecretVersionsResponse, unmarshalListSecretsResponse, unmarshalSecret, unmarshalSecretVersion };
|
|
112
|
+
export { marshalAddSecretOwnerRequest, marshalCreateSecretRequest, marshalCreateSecretVersionRequest, marshalGeneratePasswordRequest, marshalUpdateSecretRequest, marshalUpdateSecretVersionRequest, unmarshalAccessSecretVersionResponse, unmarshalListSecretVersionsResponse, unmarshalListSecretsResponse, unmarshalSecret, unmarshalSecretVersion };
|
|
@@ -58,20 +58,12 @@ class API extends API$1 {
|
|
|
58
58
|
return _this.client.fetch({
|
|
59
59
|
method: 'GET',
|
|
60
60
|
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/emails`,
|
|
61
|
-
urlParams: urlParams(['domain_id', request.domainId], ['mail_from', request.mailFrom], ['mail_rcpt', request.mailRcpt], ['mail_to', request.mailTo], ['message_id', request.messageId], ['order_by', request.orderBy ?? 'created_at_desc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['since', request.since], ['statuses', request.statuses], ['subject', request.subject], ['until', request.until])
|
|
61
|
+
urlParams: urlParams(['domain_id', request.domainId], ['mail_from', request.mailFrom], ['mail_rcpt', request.mailRcpt], ['mail_to', request.mailTo], ['message_id', request.messageId], ['order_by', request.orderBy ?? 'created_at_desc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['search', request.search], ['since', request.since], ['statuses', request.statuses], ['subject', request.subject], ['until', request.until])
|
|
62
62
|
}, unmarshalListEmailsResponse);
|
|
63
63
|
};
|
|
64
64
|
/**
|
|
65
65
|
* List emails. Retrieve the list of emails sent from a specific domain or for
|
|
66
|
-
* a specific Project or Organization. You must specify the `region`.
|
|
67
|
-
* filter your emails in ascending or descending order using:
|
|
68
|
-
*
|
|
69
|
-
* - Created_at
|
|
70
|
-
* - Updated_at
|
|
71
|
-
* - Status
|
|
72
|
-
* - Mail_from
|
|
73
|
-
* - Mail_rcpt
|
|
74
|
-
* - Subject
|
|
66
|
+
* a specific Project or Organization. You must specify the `region`.
|
|
75
67
|
*
|
|
76
68
|
* @param request - The request {@link ListEmailsRequest}
|
|
77
69
|
* @returns A Promise of ListEmailsResponse
|
|
@@ -195,8 +187,8 @@ class API extends API$1 {
|
|
|
195
187
|
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}/check`
|
|
196
188
|
}, unmarshalDomain);
|
|
197
189
|
}
|
|
198
|
-
/** Lists the available regions of the API. */
|
|
199
190
|
}
|
|
191
|
+
/** Lists the available regions of the API. */
|
|
200
192
|
API.LOCALITIES = ['fr-par'];
|
|
201
193
|
|
|
202
194
|
export { API };
|
package/dist/api/vpc/index.js
CHANGED
|
@@ -94,8 +94,8 @@ class API extends API$1 {
|
|
|
94
94
|
path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
/** Lists the available zones of the API. */
|
|
98
97
|
}
|
|
98
|
+
/** Lists the available zones of the API. */
|
|
99
99
|
API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
|
|
100
100
|
|
|
101
101
|
export { API };
|