@scaleway/sdk 0.1.0-beta.8 → 1.0.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/README.md +1 -1
- package/dist/api/account/index.js +2 -2
- package/dist/api/account/v2/api.gen.js +5 -18
- package/dist/api/account/v2/index.gen.js +3 -0
- package/dist/api/account/v2/marshalling.gen.js +0 -2
- package/dist/api/account/v2alpha1/api.gen.js +3 -13
- package/dist/api/account/v2alpha1/marshalling.gen.js +0 -5
- package/dist/api/applesilicon/index.js +2 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +7 -27
- package/dist/api/applesilicon/v1alpha1/index.gen.js +4 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +1 -14
- package/dist/api/baremetal/v1/api.gen.js +47 -49
- package/dist/api/baremetal/v1/api.utils.js +2 -10
- package/dist/api/baremetal/v1/content.gen.js +6 -3
- package/dist/api/baremetal/v1/index.js +4 -1
- package/dist/api/baremetal/v1/marshalling.gen.js +44 -45
- package/dist/api/baremetal/v1/validation-rules.gen.js +109 -0
- package/dist/api/container/index.js +2 -2
- package/dist/api/container/v1beta1/api.gen.js +5 -51
- package/dist/api/container/v1beta1/content.gen.js +4 -4
- package/dist/api/container/v1beta1/{index.js → index.gen.js} +3 -1
- package/dist/api/container/v1beta1/marshalling.gen.js +12 -26
- package/dist/api/domain/index.js +2 -2
- package/dist/api/domain/v2beta1/api.gen.js +55 -85
- package/dist/api/domain/v2beta1/content.gen.js +22 -1
- package/dist/api/domain/v2beta1/index.gen.js +4 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +47 -165
- package/dist/api/flexibleip/index.js +2 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +5 -22
- package/dist/api/flexibleip/v1alpha1/content.gen.js +1 -1
- package/dist/api/flexibleip/v1alpha1/index.gen.js +6 -0
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -7
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +14 -0
- package/dist/api/function/index.js +2 -2
- package/dist/api/function/v1beta1/api.gen.js +54 -57
- package/dist/api/function/v1beta1/content.gen.js +8 -5
- package/dist/api/function/v1beta1/index.gen.js +4 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +125 -33
- package/dist/api/iam/index.js +2 -2
- package/dist/api/iam/v1alpha1/api.gen.js +15 -62
- package/dist/api/iam/v1alpha1/index.gen.js +5 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +7 -29
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +184 -0
- package/dist/api/instance/v1/api.gen.js +38 -118
- package/dist/api/instance/v1/api.utils.js +59 -51
- package/dist/api/instance/v1/content.gen.js +7 -7
- package/dist/api/instance/v1/marshalling.gen.js +46 -168
- package/dist/api/instance/v1/marshalling.utils.js +63 -0
- package/dist/api/iot/index.js +2 -2
- package/dist/api/iot/v1/api.gen.js +5 -56
- package/dist/api/iot/v1/index.gen.js +4 -0
- package/dist/api/iot/v1/marshalling.gen.js +2 -51
- package/dist/api/k8s/index.js +2 -2
- package/dist/api/k8s/v1/api.gen.js +17 -43
- package/dist/api/k8s/v1/content.gen.js +2 -2
- package/dist/api/k8s/v1/index.gen.js +6 -0
- package/dist/api/k8s/v1/marshalling.gen.js +18 -36
- package/dist/api/k8s/v1/validation-rules.gen.js +92 -0
- package/dist/api/lb/v1/api.gen.js +8 -163
- package/dist/api/lb/v1/api.utils.js +3 -9
- package/dist/api/lb/v1/content.gen.js +3 -3
- package/dist/api/lb/v1/marshalling.gen.js +74 -101
- package/dist/api/marketplace/index.js +4 -2
- package/dist/api/marketplace/v1/api.gen.js +3 -13
- package/dist/api/marketplace/v1/index.gen.js +3 -0
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -13
- package/dist/api/marketplace/v2/api.gen.js +85 -0
- package/dist/api/marketplace/v2/index.gen.js +3 -0
- package/dist/api/marketplace/v2/marshalling.gen.js +92 -0
- package/dist/api/mnq/index.js +2 -2
- package/dist/api/mnq/v1alpha1/api.gen.js +7 -25
- package/dist/api/mnq/v1alpha1/index.gen.js +3 -0
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +7 -46
- package/dist/api/rdb/index.js +2 -2
- package/dist/api/rdb/v1/api.gen.js +15 -89
- package/dist/api/rdb/v1/content.gen.js +10 -4
- package/dist/api/rdb/v1/index.gen.js +4 -0
- package/dist/api/rdb/v1/marshalling.gen.js +25 -81
- package/dist/api/redis/index.js +2 -2
- package/dist/api/redis/{v1alpha1 → v1}/api.gen.js +45 -77
- package/dist/api/redis/{v1alpha1 → v1}/content.gen.js +1 -1
- package/dist/api/redis/v1/index.gen.js +4 -0
- package/dist/api/redis/{v1alpha1 → v1}/marshalling.gen.js +42 -59
- package/dist/api/registry/index.js +2 -2
- package/dist/api/registry/v1/api.gen.js +5 -29
- package/dist/api/registry/v1/content.gen.js +2 -2
- package/dist/api/registry/v1/{index.js → index.gen.js} +3 -1
- package/dist/api/registry/v1/marshalling.gen.js +2 -8
- package/dist/api/secret/index.js +2 -0
- package/dist/api/secret/v1alpha1/api.gen.js +135 -0
- package/dist/api/secret/v1alpha1/index.gen.js +3 -0
- package/dist/api/secret/v1alpha1/marshalling.gen.js +82 -0
- package/dist/api/tem/index.js +2 -0
- package/dist/api/tem/v1alpha1/api.gen.js +109 -0
- package/dist/api/tem/v1alpha1/content.gen.js +10 -0
- package/dist/api/tem/v1alpha1/index.gen.js +4 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.js +132 -0
- package/dist/api/test/index.js +2 -2
- package/dist/api/test/v1/api.gen.js +6 -20
- package/dist/api/test/v1/index.gen.js +4 -0
- package/dist/api/test/v1/marshalling.gen.js +2 -5
- package/dist/api/vpc/index.js +2 -2
- package/dist/api/vpc/v1/api.gen.js +6 -17
- package/dist/api/vpc/v1/index.gen.js +3 -0
- package/dist/api/vpc/v1/marshalling.gen.js +1 -3
- package/dist/api/vpcgw/index.js +2 -2
- package/dist/api/vpcgw/v1/api.gen.js +5 -64
- package/dist/api/vpcgw/v1/content.gen.js +2 -2
- package/dist/api/vpcgw/v1/{index.js → index.gen.js} +3 -1
- package/dist/api/vpcgw/v1/marshalling.gen.js +3 -24
- package/dist/helpers/json.js +1 -2
- package/dist/helpers/marshalling.js +7 -20
- package/dist/index.cjs +3870 -2948
- package/dist/index.d.ts +7218 -4335
- package/dist/index.js +10 -6
- package/dist/internal/async/interval-retrier.js +10 -16
- package/dist/internal/interceptors/interceptor.js +3 -1
- package/dist/internal/interceptors/request.js +1 -3
- package/dist/internal/logger/console-logger.js +3 -5
- package/dist/internal/logger/index.js +3 -5
- package/dist/internal/logger/level-resolver.js +0 -3
- package/dist/internal/validations/string-validation.js +8 -10
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js +13 -0
- package/dist/scw/api.js +3 -4
- package/dist/scw/auth.js +3 -5
- package/dist/scw/client-ini-factory.js +32 -15
- package/dist/scw/client-ini-profile.js +10 -4
- package/dist/scw/client-settings.js +32 -15
- package/dist/scw/client.js +5 -6
- package/dist/scw/constants.js +1 -1
- package/dist/scw/custom-marshalling.js +8 -14
- package/dist/scw/errors/error-parser.js +2 -21
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +17 -15
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +7 -6
- package/dist/scw/errors/scw-error.js +20 -20
- package/dist/scw/errors/standard/already-exists-error.js +3 -4
- package/dist/scw/errors/standard/denied-authentication-error.js +4 -11
- package/dist/scw/errors/standard/invalid-arguments-error.js +1 -10
- package/dist/scw/errors/standard/out-of-stock-error.js +0 -3
- package/dist/scw/errors/standard/permissions-denied-error.js +1 -4
- package/dist/scw/errors/standard/precondition-failed-error.js +4 -8
- package/dist/scw/errors/standard/quotas-exceeded-error.js +14 -14
- package/dist/scw/errors/standard/resource-expired-error.js +3 -4
- package/dist/scw/errors/standard/resource-locked-error.js +3 -4
- package/dist/scw/errors/standard/resource-not-found-error.js +3 -4
- package/dist/scw/errors/standard/too-many-requests-error.js +3 -16
- package/dist/scw/errors/standard/transient-state-error.js +3 -4
- package/dist/scw/errors/types.js +0 -3
- package/dist/scw/fetch/build-fetcher.js +1 -9
- package/dist/scw/fetch/http-dumper.js +4 -7
- package/dist/scw/fetch/http-interceptors.js +9 -12
- package/dist/scw/fetch/resource-paginator.js +18 -16
- package/dist/scw/fetch/response-parser.js +17 -23
- package/node_modules/@scaleway/random-name/CHANGELOG.md +42 -63
- package/node_modules/@scaleway/random-name/dist/index.js +5 -246
- package/node_modules/@scaleway/random-name/package.json +6 -5
- package/package.json +4 -5
- package/dist/api/account/v2/index.js +0 -1
- package/dist/api/applesilicon/v1alpha1/index.js +0 -2
- package/dist/api/domain/v2beta1/index.js +0 -2
- package/dist/api/flexibleip/v1alpha1/index.js +0 -2
- package/dist/api/function/v1beta1/index.js +0 -2
- package/dist/api/iam/v1alpha1/index.js +0 -1
- package/dist/api/iot/v1/index.js +0 -2
- package/dist/api/k8s/v1/index.js +0 -2
- package/dist/api/marketplace/v1/index.js +0 -1
- package/dist/api/mnq/v1alpha1/index.js +0 -1
- package/dist/api/rdb/v1/index.js +0 -2
- package/dist/api/redis/v1alpha1/index.js +0 -2
- package/dist/api/test/v1/index.js +0 -1
- package/dist/api/vpc/v1/index.js +0 -1
- package/dist/node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -254
- package/node_modules/@scaleway/random-name/dist/index.browser.js +0 -256
|
@@ -1,442 +1,368 @@
|
|
|
1
1
|
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
|
-
import { API } from '../../../scw/api.js';
|
|
3
|
-
import { unmarshalScwFile } from '../../../scw/custom-marshalling.js';
|
|
4
|
-
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
2
|
+
import { API as API$1 } from '../../../scw/api.js';
|
|
5
3
|
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
6
|
-
import {
|
|
4
|
+
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
|
+
import { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, READ_REPLICA_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from './content.gen.js';
|
|
7
6
|
import { unmarshalListDatabaseEnginesResponse, unmarshalListNodeTypesResponse, unmarshalListDatabaseBackupsResponse, marshalCreateDatabaseBackupRequest, unmarshalDatabaseBackup, marshalUpdateDatabaseBackupRequest, marshalRestoreDatabaseBackupRequest, marshalUpgradeInstanceRequest, unmarshalInstance, unmarshalListInstancesResponse, marshalCreateInstanceRequest, marshalUpdateInstanceRequest, marshalCloneInstanceRequest, unmarshalInstanceMetrics, marshalCreateReadReplicaRequest, unmarshalReadReplica, marshalCreateReadReplicaEndpointRequest, marshalPrepareInstanceLogsRequest, unmarshalPrepareInstanceLogsResponse, unmarshalListInstanceLogsResponse, unmarshalInstanceLog, marshalPurgeInstanceLogsRequest, unmarshalListInstanceLogsDetailsResponse, marshalAddInstanceSettingsRequest, unmarshalAddInstanceSettingsResponse, marshalDeleteInstanceSettingsRequest, unmarshalDeleteInstanceSettingsResponse, marshalSetInstanceSettingsRequest, unmarshalSetInstanceSettingsResponse, unmarshalListInstanceACLRulesResponse, marshalAddInstanceACLRulesRequest, unmarshalAddInstanceACLRulesResponse, marshalSetInstanceACLRulesRequest, unmarshalSetInstanceACLRulesResponse, marshalDeleteInstanceACLRulesRequest, unmarshalDeleteInstanceACLRulesResponse, unmarshalListUsersResponse, marshalCreateUserRequest, unmarshalUser, marshalUpdateUserRequest, unmarshalListDatabasesResponse, marshalCreateDatabaseRequest, unmarshalDatabase, unmarshalListPrivilegesResponse, marshalSetPrivilegeRequest, unmarshalPrivilege, unmarshalListSnapshotsResponse, unmarshalSnapshot, marshalCreateSnapshotRequest, marshalUpdateSnapshotRequest, marshalCreateInstanceFromSnapshotRequest, marshalCreateEndpointRequest, unmarshalEndpoint } from './marshalling.gen.js';
|
|
8
7
|
|
|
9
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
10
9
|
const jsonContentHeaders = {
|
|
11
10
|
'Content-Type': 'application/json; charset=utf-8'
|
|
12
11
|
};
|
|
13
|
-
/** Database RDB API. */
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
/** Database RDB API. */
|
|
14
|
+
class API extends API$1 {
|
|
16
15
|
constructor() {
|
|
17
16
|
var _this;
|
|
18
|
-
|
|
19
17
|
super(...arguments);
|
|
20
18
|
_this = this;
|
|
21
|
-
|
|
22
19
|
this.pageOfListDatabaseEngines = function (request) {
|
|
23
20
|
if (request === void 0) {
|
|
24
21
|
request = {};
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
return _this.client.fetch({
|
|
28
24
|
method: 'GET',
|
|
29
25
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/database-engines`,
|
|
30
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize])
|
|
26
|
+
urlParams: urlParams(['name', request.name], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['version', request.version])
|
|
31
27
|
}, unmarshalListDatabaseEnginesResponse);
|
|
32
28
|
};
|
|
33
|
-
|
|
34
29
|
this.listDatabaseEngines = function (request) {
|
|
35
30
|
if (request === void 0) {
|
|
36
31
|
request = {};
|
|
37
32
|
}
|
|
38
|
-
|
|
39
33
|
return enrichForPagination('engines', _this.pageOfListDatabaseEngines, request);
|
|
40
34
|
};
|
|
41
|
-
|
|
42
35
|
this.pageOfListNodeTypes = request => this.client.fetch({
|
|
43
36
|
method: 'GET',
|
|
44
37
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/node-types`,
|
|
45
38
|
urlParams: urlParams(['include_disabled_types', request.includeDisabledTypes], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
46
39
|
}, unmarshalListNodeTypesResponse);
|
|
47
|
-
|
|
48
40
|
this.listNodeTypes = request => enrichForPagination('nodeTypes', this.pageOfListNodeTypes, request);
|
|
49
|
-
|
|
50
41
|
this.pageOfListDatabaseBackups = function (request) {
|
|
51
42
|
if (request === void 0) {
|
|
52
43
|
request = {};
|
|
53
44
|
}
|
|
54
|
-
|
|
55
45
|
return _this.client.fetch({
|
|
56
46
|
method: 'GET',
|
|
57
47
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/backups`,
|
|
58
48
|
urlParams: urlParams(['instance_id', request.instanceId], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this.client.settings.defaultProjectId])
|
|
59
49
|
}, unmarshalListDatabaseBackupsResponse);
|
|
60
50
|
};
|
|
61
|
-
|
|
62
51
|
this.listDatabaseBackups = function (request) {
|
|
63
52
|
if (request === void 0) {
|
|
64
53
|
request = {};
|
|
65
54
|
}
|
|
66
|
-
|
|
67
55
|
return enrichForPagination('databaseBackups', _this.pageOfListDatabaseBackups, request);
|
|
68
56
|
};
|
|
69
|
-
|
|
70
57
|
this.createDatabaseBackup = request => this.client.fetch({
|
|
71
58
|
body: JSON.stringify(marshalCreateDatabaseBackupRequest(request, this.client.settings)),
|
|
72
59
|
headers: jsonContentHeaders,
|
|
73
60
|
method: 'POST',
|
|
74
61
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backups`
|
|
75
62
|
}, unmarshalDatabaseBackup);
|
|
76
|
-
|
|
77
63
|
this.getDatabaseBackup = request => this.client.fetch({
|
|
78
64
|
method: 'GET',
|
|
79
65
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backups/${validatePathParam('databaseBackupId', request.databaseBackupId)}`
|
|
80
66
|
}, unmarshalDatabaseBackup);
|
|
81
|
-
|
|
82
67
|
this.waitForDatabaseBackup = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DATABASE_BACKUP_TRANSIENT_STATUSES.includes(res.status))), this.getDatabaseBackup, request, options);
|
|
83
|
-
|
|
84
68
|
this.updateDatabaseBackup = request => this.client.fetch({
|
|
85
69
|
body: JSON.stringify(marshalUpdateDatabaseBackupRequest(request, this.client.settings)),
|
|
86
70
|
headers: jsonContentHeaders,
|
|
87
71
|
method: 'PATCH',
|
|
88
72
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backups/${validatePathParam('databaseBackupId', request.databaseBackupId)}`
|
|
89
73
|
}, unmarshalDatabaseBackup);
|
|
90
|
-
|
|
91
74
|
this.deleteDatabaseBackup = request => this.client.fetch({
|
|
92
75
|
method: 'DELETE',
|
|
93
76
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backups/${validatePathParam('databaseBackupId', request.databaseBackupId)}`
|
|
94
77
|
}, unmarshalDatabaseBackup);
|
|
95
|
-
|
|
96
78
|
this.restoreDatabaseBackup = request => this.client.fetch({
|
|
97
79
|
body: JSON.stringify(marshalRestoreDatabaseBackupRequest(request, this.client.settings)),
|
|
98
80
|
headers: jsonContentHeaders,
|
|
99
81
|
method: 'POST',
|
|
100
82
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backups/${validatePathParam('databaseBackupId', request.databaseBackupId)}/restore`
|
|
101
83
|
}, unmarshalDatabaseBackup);
|
|
102
|
-
|
|
103
84
|
this.exportDatabaseBackup = request => this.client.fetch({
|
|
104
85
|
body: '{}',
|
|
105
86
|
headers: jsonContentHeaders,
|
|
106
87
|
method: 'POST',
|
|
107
88
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backups/${validatePathParam('databaseBackupId', request.databaseBackupId)}/export`
|
|
108
89
|
}, unmarshalDatabaseBackup);
|
|
109
|
-
|
|
110
90
|
this.upgradeInstance = request => this.client.fetch({
|
|
111
91
|
body: JSON.stringify(marshalUpgradeInstanceRequest(request, this.client.settings)),
|
|
112
92
|
headers: jsonContentHeaders,
|
|
113
93
|
method: 'POST',
|
|
114
94
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/upgrade`
|
|
115
95
|
}, unmarshalInstance);
|
|
116
|
-
|
|
117
96
|
this.pageOfListInstances = function (request) {
|
|
118
97
|
if (request === void 0) {
|
|
119
98
|
request = {};
|
|
120
99
|
}
|
|
121
|
-
|
|
122
100
|
return _this.client.fetch({
|
|
123
101
|
method: 'GET',
|
|
124
102
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/instances`,
|
|
125
103
|
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this.client.settings.defaultProjectId], ['tags', request.tags])
|
|
126
104
|
}, unmarshalListInstancesResponse);
|
|
127
105
|
};
|
|
128
|
-
|
|
129
106
|
this.listInstances = function (request) {
|
|
130
107
|
if (request === void 0) {
|
|
131
108
|
request = {};
|
|
132
109
|
}
|
|
133
|
-
|
|
134
110
|
return enrichForPagination('instances', _this.pageOfListInstances, request);
|
|
135
111
|
};
|
|
136
|
-
|
|
137
112
|
this.getInstance = request => this.client.fetch({
|
|
138
113
|
method: 'GET',
|
|
139
114
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}`
|
|
140
115
|
}, unmarshalInstance);
|
|
141
|
-
|
|
142
116
|
this.waitForInstance = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!INSTANCE_TRANSIENT_STATUSES.includes(res.status))), this.getInstance, request, options);
|
|
143
|
-
|
|
144
117
|
this.createInstance = request => this.client.fetch({
|
|
145
118
|
body: JSON.stringify(marshalCreateInstanceRequest(request, this.client.settings)),
|
|
146
119
|
headers: jsonContentHeaders,
|
|
147
120
|
method: 'POST',
|
|
148
121
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances`
|
|
149
122
|
}, unmarshalInstance);
|
|
150
|
-
|
|
151
123
|
this.updateInstance = request => this.client.fetch({
|
|
152
124
|
body: JSON.stringify(marshalUpdateInstanceRequest(request, this.client.settings)),
|
|
153
125
|
headers: jsonContentHeaders,
|
|
154
126
|
method: 'PATCH',
|
|
155
127
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}`
|
|
156
128
|
}, unmarshalInstance);
|
|
157
|
-
|
|
158
129
|
this.deleteInstance = request => this.client.fetch({
|
|
159
130
|
method: 'DELETE',
|
|
160
131
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}`
|
|
161
132
|
}, unmarshalInstance);
|
|
162
|
-
|
|
163
133
|
this.cloneInstance = request => this.client.fetch({
|
|
164
134
|
body: JSON.stringify(marshalCloneInstanceRequest(request, this.client.settings)),
|
|
165
135
|
headers: jsonContentHeaders,
|
|
166
136
|
method: 'POST',
|
|
167
137
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/clone`
|
|
168
138
|
}, unmarshalInstance);
|
|
169
|
-
|
|
170
139
|
this.restartInstance = request => this.client.fetch({
|
|
171
140
|
body: '{}',
|
|
172
141
|
headers: jsonContentHeaders,
|
|
173
142
|
method: 'POST',
|
|
174
143
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/restart`
|
|
175
144
|
}, unmarshalInstance);
|
|
176
|
-
|
|
177
145
|
this.getInstanceCertificate = request => this.client.fetch({
|
|
178
146
|
method: 'GET',
|
|
179
|
-
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/certificate
|
|
180
|
-
|
|
181
|
-
|
|
147
|
+
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/certificate`,
|
|
148
|
+
urlParams: urlParams(['dl', 1]),
|
|
149
|
+
responseType: 'blob'
|
|
150
|
+
});
|
|
182
151
|
this.renewInstanceCertificate = request => this.client.fetch({
|
|
183
152
|
body: '{}',
|
|
184
153
|
headers: jsonContentHeaders,
|
|
185
154
|
method: 'POST',
|
|
186
155
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/renew-certificate`
|
|
187
156
|
});
|
|
188
|
-
|
|
189
157
|
this.getInstanceMetrics = request => this.client.fetch({
|
|
190
158
|
method: 'GET',
|
|
191
159
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/metrics`,
|
|
192
160
|
urlParams: urlParams(['end_date', request.endDate], ['metric_name', request.metricName], ['start_date', request.startDate])
|
|
193
161
|
}, unmarshalInstanceMetrics);
|
|
194
|
-
|
|
195
162
|
this.createReadReplica = request => this.client.fetch({
|
|
196
163
|
body: JSON.stringify(marshalCreateReadReplicaRequest(request, this.client.settings)),
|
|
197
164
|
headers: jsonContentHeaders,
|
|
198
165
|
method: 'POST',
|
|
199
166
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/read-replicas`
|
|
200
167
|
}, unmarshalReadReplica);
|
|
201
|
-
|
|
202
168
|
this.getReadReplica = request => this.client.fetch({
|
|
203
169
|
method: 'GET',
|
|
204
170
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/read-replicas/${validatePathParam('readReplicaId', request.readReplicaId)}`
|
|
205
171
|
}, unmarshalReadReplica);
|
|
206
|
-
|
|
172
|
+
this.waitForReadReplica = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!READ_REPLICA_TRANSIENT_STATUSES.includes(res.status))), this.getReadReplica, request, options);
|
|
207
173
|
this.deleteReadReplica = request => this.client.fetch({
|
|
208
174
|
method: 'DELETE',
|
|
209
175
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/read-replicas/${validatePathParam('readReplicaId', request.readReplicaId)}`
|
|
210
176
|
}, unmarshalReadReplica);
|
|
211
|
-
|
|
212
177
|
this.resetReadReplica = request => this.client.fetch({
|
|
213
178
|
body: '{}',
|
|
214
179
|
headers: jsonContentHeaders,
|
|
215
180
|
method: 'POST',
|
|
216
181
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/read-replicas/${validatePathParam('readReplicaId', request.readReplicaId)}/reset`
|
|
217
182
|
}, unmarshalReadReplica);
|
|
218
|
-
|
|
219
183
|
this.createReadReplicaEndpoint = request => this.client.fetch({
|
|
220
184
|
body: JSON.stringify(marshalCreateReadReplicaEndpointRequest(request, this.client.settings)),
|
|
221
185
|
headers: jsonContentHeaders,
|
|
222
186
|
method: 'POST',
|
|
223
187
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/read-replicas/${validatePathParam('readReplicaId', request.readReplicaId)}/endpoints`
|
|
224
188
|
}, unmarshalReadReplica);
|
|
225
|
-
|
|
226
189
|
this.prepareInstanceLogs = request => this.client.fetch({
|
|
227
190
|
body: JSON.stringify(marshalPrepareInstanceLogsRequest(request, this.client.settings)),
|
|
228
191
|
headers: jsonContentHeaders,
|
|
229
192
|
method: 'POST',
|
|
230
193
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/prepare-logs`
|
|
231
194
|
}, unmarshalPrepareInstanceLogsResponse);
|
|
232
|
-
|
|
233
195
|
this.listInstanceLogs = request => this.client.fetch({
|
|
234
196
|
method: 'GET',
|
|
235
197
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/logs`,
|
|
236
|
-
urlParams: urlParams(['order_by', request.orderBy])
|
|
198
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'])
|
|
237
199
|
}, unmarshalListInstanceLogsResponse);
|
|
238
|
-
|
|
239
200
|
this.getInstanceLog = request => this.client.fetch({
|
|
240
201
|
method: 'GET',
|
|
241
202
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/logs/${validatePathParam('instanceLogId', request.instanceLogId)}`
|
|
242
203
|
}, unmarshalInstanceLog);
|
|
243
|
-
|
|
244
204
|
this.waitForInstanceLog = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!INSTANCE_LOG_TRANSIENT_STATUSES.includes(res.status))), this.getInstanceLog, request, options);
|
|
245
|
-
|
|
246
205
|
this.purgeInstanceLogs = request => this.client.fetch({
|
|
247
206
|
body: JSON.stringify(marshalPurgeInstanceLogsRequest(request, this.client.settings)),
|
|
248
207
|
headers: jsonContentHeaders,
|
|
249
208
|
method: 'POST',
|
|
250
209
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/purge-logs`
|
|
251
210
|
});
|
|
252
|
-
|
|
253
211
|
this.listInstanceLogsDetails = request => this.client.fetch({
|
|
254
212
|
method: 'GET',
|
|
255
213
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/logs-details`
|
|
256
214
|
}, unmarshalListInstanceLogsDetailsResponse);
|
|
257
|
-
|
|
258
215
|
this.addInstanceSettings = request => this.client.fetch({
|
|
259
216
|
body: JSON.stringify(marshalAddInstanceSettingsRequest(request, this.client.settings)),
|
|
260
217
|
headers: jsonContentHeaders,
|
|
261
218
|
method: 'POST',
|
|
262
219
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/settings`
|
|
263
220
|
}, unmarshalAddInstanceSettingsResponse);
|
|
264
|
-
|
|
265
221
|
this.deleteInstanceSettings = request => this.client.fetch({
|
|
266
222
|
body: JSON.stringify(marshalDeleteInstanceSettingsRequest(request, this.client.settings)),
|
|
267
223
|
headers: jsonContentHeaders,
|
|
268
224
|
method: 'DELETE',
|
|
269
225
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/settings`
|
|
270
226
|
}, unmarshalDeleteInstanceSettingsResponse);
|
|
271
|
-
|
|
272
227
|
this.setInstanceSettings = request => this.client.fetch({
|
|
273
228
|
body: JSON.stringify(marshalSetInstanceSettingsRequest(request, this.client.settings)),
|
|
274
229
|
headers: jsonContentHeaders,
|
|
275
230
|
method: 'PUT',
|
|
276
231
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/settings`
|
|
277
232
|
}, unmarshalSetInstanceSettingsResponse);
|
|
278
|
-
|
|
279
233
|
this.pageOfListInstanceACLRules = request => this.client.fetch({
|
|
280
234
|
method: 'GET',
|
|
281
235
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/acls`,
|
|
282
236
|
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
283
237
|
}, unmarshalListInstanceACLRulesResponse);
|
|
284
|
-
|
|
285
238
|
this.listInstanceACLRules = request => enrichForPagination('rules', this.pageOfListInstanceACLRules, request);
|
|
286
|
-
|
|
287
239
|
this.addInstanceACLRules = request => this.client.fetch({
|
|
288
240
|
body: JSON.stringify(marshalAddInstanceACLRulesRequest(request, this.client.settings)),
|
|
289
241
|
headers: jsonContentHeaders,
|
|
290
242
|
method: 'POST',
|
|
291
243
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/acls`
|
|
292
244
|
}, unmarshalAddInstanceACLRulesResponse);
|
|
293
|
-
|
|
294
245
|
this.setInstanceACLRules = request => this.client.fetch({
|
|
295
246
|
body: JSON.stringify(marshalSetInstanceACLRulesRequest(request, this.client.settings)),
|
|
296
247
|
headers: jsonContentHeaders,
|
|
297
248
|
method: 'PUT',
|
|
298
249
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/acls`
|
|
299
250
|
}, unmarshalSetInstanceACLRulesResponse);
|
|
300
|
-
|
|
301
251
|
this.deleteInstanceACLRules = request => this.client.fetch({
|
|
302
252
|
body: JSON.stringify(marshalDeleteInstanceACLRulesRequest(request, this.client.settings)),
|
|
303
253
|
headers: jsonContentHeaders,
|
|
304
254
|
method: 'DELETE',
|
|
305
255
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/acls`
|
|
306
256
|
}, unmarshalDeleteInstanceACLRulesResponse);
|
|
307
|
-
|
|
308
257
|
this.pageOfListUsers = request => this.client.fetch({
|
|
309
258
|
method: 'GET',
|
|
310
259
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/users`,
|
|
311
260
|
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
312
261
|
}, unmarshalListUsersResponse);
|
|
313
|
-
|
|
314
262
|
this.listUsers = request => enrichForPagination('users', this.pageOfListUsers, request);
|
|
315
|
-
|
|
316
263
|
this.createUser = request => this.client.fetch({
|
|
317
264
|
body: JSON.stringify(marshalCreateUserRequest(request, this.client.settings)),
|
|
318
265
|
headers: jsonContentHeaders,
|
|
319
266
|
method: 'POST',
|
|
320
267
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/users`
|
|
321
268
|
}, unmarshalUser);
|
|
322
|
-
|
|
323
269
|
this.updateUser = request => this.client.fetch({
|
|
324
270
|
body: JSON.stringify(marshalUpdateUserRequest(request, this.client.settings)),
|
|
325
271
|
headers: jsonContentHeaders,
|
|
326
272
|
method: 'PATCH',
|
|
327
273
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/users/${validatePathParam('name', request.name)}`
|
|
328
274
|
}, unmarshalUser);
|
|
329
|
-
|
|
330
275
|
this.deleteUser = request => this.client.fetch({
|
|
331
276
|
method: 'DELETE',
|
|
332
277
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/users/${validatePathParam('name', request.name)}`
|
|
333
278
|
});
|
|
334
|
-
|
|
335
279
|
this.pageOfListDatabases = request => this.client.fetch({
|
|
336
280
|
method: 'GET',
|
|
337
281
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/databases`,
|
|
338
282
|
urlParams: urlParams(['managed', request.managed], ['name', request.name], ['order_by', request.orderBy ?? 'name_asc'], ['owner', request.owner], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
339
283
|
}, unmarshalListDatabasesResponse);
|
|
340
|
-
|
|
341
284
|
this.listDatabases = request => enrichForPagination('databases', this.pageOfListDatabases, request);
|
|
342
|
-
|
|
343
285
|
this.createDatabase = request => this.client.fetch({
|
|
344
286
|
body: JSON.stringify(marshalCreateDatabaseRequest(request, this.client.settings)),
|
|
345
287
|
headers: jsonContentHeaders,
|
|
346
288
|
method: 'POST',
|
|
347
289
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/databases`
|
|
348
290
|
}, unmarshalDatabase);
|
|
349
|
-
|
|
350
291
|
this.deleteDatabase = request => this.client.fetch({
|
|
351
292
|
method: 'DELETE',
|
|
352
293
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/databases/${validatePathParam('name', request.name)}`
|
|
353
294
|
});
|
|
354
|
-
|
|
355
295
|
this.pageOfListPrivileges = request => this.client.fetch({
|
|
356
296
|
method: 'GET',
|
|
357
297
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/privileges`,
|
|
358
298
|
urlParams: urlParams(['database_name', request.databaseName], ['order_by', request.orderBy ?? 'user_name_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['user_name', request.userName])
|
|
359
299
|
}, unmarshalListPrivilegesResponse);
|
|
360
|
-
|
|
361
300
|
this.listPrivileges = request => enrichForPagination('privileges', this.pageOfListPrivileges, request);
|
|
362
|
-
|
|
363
301
|
this.setPrivilege = request => this.client.fetch({
|
|
364
302
|
body: JSON.stringify(marshalSetPrivilegeRequest(request, this.client.settings)),
|
|
365
303
|
headers: jsonContentHeaders,
|
|
366
304
|
method: 'PUT',
|
|
367
305
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/privileges`
|
|
368
306
|
}, unmarshalPrivilege);
|
|
369
|
-
|
|
370
307
|
this.pageOfListSnapshots = function (request) {
|
|
371
308
|
if (request === void 0) {
|
|
372
309
|
request = {};
|
|
373
310
|
}
|
|
374
|
-
|
|
375
311
|
return _this.client.fetch({
|
|
376
312
|
method: 'GET',
|
|
377
313
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/snapshots`,
|
|
378
314
|
urlParams: urlParams(['instance_id', request.instanceId], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this.client.settings.defaultProjectId])
|
|
379
315
|
}, unmarshalListSnapshotsResponse);
|
|
380
316
|
};
|
|
381
|
-
|
|
382
317
|
this.listSnapshots = function (request) {
|
|
383
318
|
if (request === void 0) {
|
|
384
319
|
request = {};
|
|
385
320
|
}
|
|
386
|
-
|
|
387
321
|
return enrichForPagination('snapshots', _this.pageOfListSnapshots, request);
|
|
388
322
|
};
|
|
389
|
-
|
|
390
323
|
this.getSnapshot = request => this.client.fetch({
|
|
391
324
|
method: 'GET',
|
|
392
325
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
393
326
|
}, unmarshalSnapshot);
|
|
394
|
-
|
|
327
|
+
this.waitForSnapshot = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))), this.getSnapshot, request, options);
|
|
395
328
|
this.createSnapshot = request => this.client.fetch({
|
|
396
329
|
body: JSON.stringify(marshalCreateSnapshotRequest(request, this.client.settings)),
|
|
397
330
|
headers: jsonContentHeaders,
|
|
398
331
|
method: 'POST',
|
|
399
332
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/snapshots`
|
|
400
333
|
}, unmarshalSnapshot);
|
|
401
|
-
|
|
402
334
|
this.updateSnapshot = request => this.client.fetch({
|
|
403
335
|
body: JSON.stringify(marshalUpdateSnapshotRequest(request, this.client.settings)),
|
|
404
336
|
headers: jsonContentHeaders,
|
|
405
337
|
method: 'PATCH',
|
|
406
338
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
407
339
|
}, unmarshalSnapshot);
|
|
408
|
-
|
|
409
340
|
this.deleteSnapshot = request => this.client.fetch({
|
|
410
341
|
method: 'DELETE',
|
|
411
342
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
412
343
|
}, unmarshalSnapshot);
|
|
413
|
-
|
|
414
344
|
this.createInstanceFromSnapshot = request => this.client.fetch({
|
|
415
345
|
body: JSON.stringify(marshalCreateInstanceFromSnapshotRequest(request, this.client.settings)),
|
|
416
346
|
headers: jsonContentHeaders,
|
|
417
347
|
method: 'POST',
|
|
418
348
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}/create-instance`
|
|
419
349
|
}, unmarshalInstance);
|
|
420
|
-
|
|
421
350
|
this.createEndpoint = request => this.client.fetch({
|
|
422
351
|
body: JSON.stringify(marshalCreateEndpointRequest(request, this.client.settings)),
|
|
423
352
|
headers: jsonContentHeaders,
|
|
424
353
|
method: 'POST',
|
|
425
354
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/endpoints`
|
|
426
355
|
}, unmarshalEndpoint);
|
|
427
|
-
|
|
428
356
|
this.deleteEndpoint = request => this.client.fetch({
|
|
429
357
|
method: 'DELETE',
|
|
430
358
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam('endpointId', request.endpointId)}`
|
|
431
359
|
});
|
|
432
|
-
|
|
433
360
|
this.getEndpoint = request => this.client.fetch({
|
|
434
361
|
method: 'GET',
|
|
435
362
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam('endpointId', request.endpointId)}`
|
|
436
363
|
}, unmarshalEndpoint);
|
|
437
364
|
}
|
|
438
|
-
|
|
439
365
|
}
|
|
440
|
-
|
|
366
|
+
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
441
367
|
|
|
442
|
-
export {
|
|
368
|
+
export { API };
|
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
|
|
4
4
|
/** Lists transient statutes of the enum {@link DatabaseBackupStatus}. */
|
|
5
5
|
const DATABASE_BACKUP_TRANSIENT_STATUSES = ['creating', 'restoring', 'deleting', 'exporting'];
|
|
6
|
-
/** Lists transient statutes of the enum {@link InstanceLogStatus}. */
|
|
7
6
|
|
|
7
|
+
/** Lists transient statutes of the enum {@link InstanceLogStatus}. */
|
|
8
8
|
const INSTANCE_LOG_TRANSIENT_STATUSES = ['creating'];
|
|
9
|
-
/** Lists transient statutes of the enum {@link InstanceStatus}. */
|
|
10
9
|
|
|
10
|
+
/** Lists transient statutes of the enum {@link InstanceStatus}. */
|
|
11
11
|
const INSTANCE_TRANSIENT_STATUSES = ['provisioning', 'configuring', 'deleting', 'autohealing', 'initializing', 'backuping', 'snapshotting', 'restarting'];
|
|
12
|
-
/** Lists transient statutes of the enum {@link MaintenanceStatus}. */
|
|
13
12
|
|
|
13
|
+
/** Lists transient statutes of the enum {@link MaintenanceStatus}. */
|
|
14
14
|
const MAINTENANCE_TRANSIENT_STATUSES = ['pending'];
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
/** Lists transient statutes of the enum {@link ReadReplicaStatus}. */
|
|
17
|
+
const READ_REPLICA_TRANSIENT_STATUSES = ['provisioning', 'initializing', 'deleting', 'configuring'];
|
|
18
|
+
|
|
19
|
+
/** Lists transient statutes of the enum {@link SnapshotStatus}. */
|
|
20
|
+
const SNAPSHOT_TRANSIENT_STATUSES = ['creating', 'restoring', 'deleting'];
|
|
21
|
+
|
|
22
|
+
export { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES, READ_REPLICA_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
|
+
export { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES, READ_REPLICA_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from './content.gen.js';
|
|
3
|
+
|
|
4
|
+
// This file was automatically generated. DO NOT EDIT.
|