@scaleway/sdk-redis 1.0.1
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/LICENSE +191 -0
- package/dist/index.gen.cjs +4 -0
- package/dist/index.gen.d.ts +5 -0
- package/dist/index.gen.js +4 -0
- package/dist/v1/api.gen.cjs +415 -0
- package/dist/v1/api.gen.d.ts +193 -0
- package/dist/v1/api.gen.js +415 -0
- package/dist/v1/content.gen.cjs +10 -0
- package/dist/v1/content.gen.d.ts +3 -0
- package/dist/v1/content.gen.js +10 -0
- package/dist/v1/index.gen.cjs +29 -0
- package/dist/v1/index.gen.d.ts +4 -0
- package/dist/v1/index.gen.js +29 -0
- package/dist/v1/marshalling.gen.cjs +353 -0
- package/dist/v1/marshalling.gen.d.ts +24 -0
- package/dist/v1/marshalling.gen.js +353 -0
- package/dist/v1/types.gen.d.ts +750 -0
- package/package.json +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
https://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2019 Scaleway.
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const sdkClient = require("@scaleway/sdk-client");
|
|
4
|
+
const content_gen = require("./content.gen.cjs");
|
|
5
|
+
const marshalling_gen = require("./marshalling.gen.cjs");
|
|
6
|
+
const jsonContentHeaders = {
|
|
7
|
+
"Content-Type": "application/json; charset=utf-8"
|
|
8
|
+
};
|
|
9
|
+
class API extends sdkClient.API {
|
|
10
|
+
/** Lists the available zones of the API. */
|
|
11
|
+
static LOCALITIES = [
|
|
12
|
+
"fr-par-1",
|
|
13
|
+
"fr-par-2",
|
|
14
|
+
"nl-ams-1",
|
|
15
|
+
"nl-ams-2",
|
|
16
|
+
"pl-waw-1",
|
|
17
|
+
"pl-waw-2"
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Create a Redis™ Database Instance. Create a new Redis™ Database Instance (Redis™ cluster). You must set the `zone`, `project_id`, `version`, `node_type`, `user_name` and `password` parameters. Optionally you can define `acl_rules`, `endpoints`, `tls_enabled` and `cluster_settings`.
|
|
21
|
+
*
|
|
22
|
+
* @param request - The request {@link CreateClusterRequest}
|
|
23
|
+
* @returns A Promise of Cluster
|
|
24
|
+
*/
|
|
25
|
+
createCluster = (request) => this.client.fetch(
|
|
26
|
+
{
|
|
27
|
+
body: JSON.stringify(
|
|
28
|
+
marshalling_gen.marshalCreateClusterRequest(request, this.client.settings)
|
|
29
|
+
),
|
|
30
|
+
headers: jsonContentHeaders,
|
|
31
|
+
method: "POST",
|
|
32
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters`
|
|
33
|
+
},
|
|
34
|
+
marshalling_gen.unmarshalCluster
|
|
35
|
+
);
|
|
36
|
+
/**
|
|
37
|
+
* Update a Redis™ Database Instance. Update the parameters of a Redis™ Database Instance (Redis™ cluster), including `name`, `tags`, `user_name` and `password`.
|
|
38
|
+
*
|
|
39
|
+
* @param request - The request {@link UpdateClusterRequest}
|
|
40
|
+
* @returns A Promise of Cluster
|
|
41
|
+
*/
|
|
42
|
+
updateCluster = (request) => this.client.fetch(
|
|
43
|
+
{
|
|
44
|
+
body: JSON.stringify(
|
|
45
|
+
marshalling_gen.marshalUpdateClusterRequest(request, this.client.settings)
|
|
46
|
+
),
|
|
47
|
+
headers: jsonContentHeaders,
|
|
48
|
+
method: "PATCH",
|
|
49
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}`
|
|
50
|
+
},
|
|
51
|
+
marshalling_gen.unmarshalCluster
|
|
52
|
+
);
|
|
53
|
+
/**
|
|
54
|
+
* Get a Redis™ Database Instance. Retrieve information about a Redis™ Database Instance (Redis™ cluster). Specify the `cluster_id` and `region` in your request to get information such as `id`, `status`, `version`, `tls_enabled`, `cluster_settings`, `upgradable_versions` and `endpoints` about your cluster in the response.
|
|
55
|
+
*
|
|
56
|
+
* @param request - The request {@link GetClusterRequest}
|
|
57
|
+
* @returns A Promise of Cluster
|
|
58
|
+
*/
|
|
59
|
+
getCluster = (request) => this.client.fetch(
|
|
60
|
+
{
|
|
61
|
+
method: "GET",
|
|
62
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}`
|
|
63
|
+
},
|
|
64
|
+
marshalling_gen.unmarshalCluster
|
|
65
|
+
);
|
|
66
|
+
/**
|
|
67
|
+
* Waits for {@link Cluster} to be in a final state.
|
|
68
|
+
*
|
|
69
|
+
* @param request - The request {@link GetClusterRequest}
|
|
70
|
+
* @param options - The waiting options
|
|
71
|
+
* @returns A Promise of Cluster
|
|
72
|
+
*/
|
|
73
|
+
waitForCluster = (request, options) => sdkClient.waitForResource(
|
|
74
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
75
|
+
!content_gen.CLUSTER_TRANSIENT_STATUSES.includes(res.status)
|
|
76
|
+
)),
|
|
77
|
+
this.getCluster,
|
|
78
|
+
request,
|
|
79
|
+
options
|
|
80
|
+
);
|
|
81
|
+
pageOfListClusters = (request = {}) => this.client.fetch(
|
|
82
|
+
{
|
|
83
|
+
method: "GET",
|
|
84
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters`,
|
|
85
|
+
urlParams: sdkClient.urlParams(
|
|
86
|
+
["name", request.name],
|
|
87
|
+
["order_by", request.orderBy],
|
|
88
|
+
["organization_id", request.organizationId],
|
|
89
|
+
["page", request.page],
|
|
90
|
+
[
|
|
91
|
+
"page_size",
|
|
92
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
93
|
+
],
|
|
94
|
+
["project_id", request.projectId],
|
|
95
|
+
["tags", request.tags],
|
|
96
|
+
["version", request.version]
|
|
97
|
+
)
|
|
98
|
+
},
|
|
99
|
+
marshalling_gen.unmarshalListClustersResponse
|
|
100
|
+
);
|
|
101
|
+
/**
|
|
102
|
+
* List Redis™ Database Instances. List all Redis™ Database Instances (Redis™ cluster) in the specified zone. By default, the Database Instances returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `tags`, `name`, `organization_id` and `version`.
|
|
103
|
+
*
|
|
104
|
+
* @param request - The request {@link ListClustersRequest}
|
|
105
|
+
* @returns A Promise of ListClustersResponse
|
|
106
|
+
*/
|
|
107
|
+
listClusters = (request = {}) => sdkClient.enrichForPagination("clusters", this.pageOfListClusters, request);
|
|
108
|
+
/**
|
|
109
|
+
* Scale up a Redis™ Database Instance. Upgrade your Redis™ Database Instance, either by upgrading to a bigger node type (vertical scaling) or by adding more nodes to your Database Instance to increase your number of endpoints and distribute cache (horizontal scaling, available for clusters only). Note that scaling horizontally your Redis™ Database Instance will not renew its TLS certificate. In order to refresh the TLS certificate, you must use the Renew TLS certificate endpoint.
|
|
110
|
+
*
|
|
111
|
+
* @param request - The request {@link MigrateClusterRequest}
|
|
112
|
+
* @returns A Promise of Cluster
|
|
113
|
+
*/
|
|
114
|
+
migrateCluster = (request) => this.client.fetch(
|
|
115
|
+
{
|
|
116
|
+
body: JSON.stringify(
|
|
117
|
+
marshalling_gen.marshalMigrateClusterRequest(request, this.client.settings)
|
|
118
|
+
),
|
|
119
|
+
headers: jsonContentHeaders,
|
|
120
|
+
method: "POST",
|
|
121
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}/migrate`
|
|
122
|
+
},
|
|
123
|
+
marshalling_gen.unmarshalCluster
|
|
124
|
+
);
|
|
125
|
+
/**
|
|
126
|
+
* Delete a Redis™ Database Instance. Delete a Redis™ Database Instance (Redis™ cluster), specified by the `region` and `cluster_id` parameters. Deleting a Database Instance is permanent, and cannot be undone. Note that upon deletion all your data will be lost.
|
|
127
|
+
*
|
|
128
|
+
* @param request - The request {@link DeleteClusterRequest}
|
|
129
|
+
* @returns A Promise of Cluster
|
|
130
|
+
*/
|
|
131
|
+
deleteCluster = (request) => this.client.fetch(
|
|
132
|
+
{
|
|
133
|
+
method: "DELETE",
|
|
134
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}`
|
|
135
|
+
},
|
|
136
|
+
marshalling_gen.unmarshalCluster
|
|
137
|
+
);
|
|
138
|
+
/**
|
|
139
|
+
* Get metrics of a Redis™ Database Instance. Retrieve the metrics of a Redis™ Database Instance (Redis™ cluster). You can define the period from which to retrieve metrics by specifying the `start_date` and `end_date`.
|
|
140
|
+
*
|
|
141
|
+
* @param request - The request {@link GetClusterMetricsRequest}
|
|
142
|
+
* @returns A Promise of ClusterMetricsResponse
|
|
143
|
+
*/
|
|
144
|
+
getClusterMetrics = (request) => this.client.fetch(
|
|
145
|
+
{
|
|
146
|
+
method: "GET",
|
|
147
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}/metrics`,
|
|
148
|
+
urlParams: sdkClient.urlParams(
|
|
149
|
+
["end_at", request.endAt],
|
|
150
|
+
["metric_name", request.metricName],
|
|
151
|
+
["start_at", request.startAt]
|
|
152
|
+
)
|
|
153
|
+
},
|
|
154
|
+
marshalling_gen.unmarshalClusterMetricsResponse
|
|
155
|
+
);
|
|
156
|
+
pageOfListNodeTypes = (request) => this.client.fetch(
|
|
157
|
+
{
|
|
158
|
+
method: "GET",
|
|
159
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/node-types`,
|
|
160
|
+
urlParams: sdkClient.urlParams(
|
|
161
|
+
["include_disabled_types", request.includeDisabledTypes],
|
|
162
|
+
["page", request.page],
|
|
163
|
+
[
|
|
164
|
+
"page_size",
|
|
165
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
166
|
+
]
|
|
167
|
+
)
|
|
168
|
+
},
|
|
169
|
+
marshalling_gen.unmarshalListNodeTypesResponse
|
|
170
|
+
);
|
|
171
|
+
/**
|
|
172
|
+
* List available node types. List all available node types. By default, the node types returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
|
|
173
|
+
*
|
|
174
|
+
* @param request - The request {@link ListNodeTypesRequest}
|
|
175
|
+
* @returns A Promise of ListNodeTypesResponse
|
|
176
|
+
*/
|
|
177
|
+
listNodeTypes = (request) => sdkClient.enrichForPagination("nodeTypes", this.pageOfListNodeTypes, request);
|
|
178
|
+
pageOfListClusterVersions = (request) => this.client.fetch(
|
|
179
|
+
{
|
|
180
|
+
method: "GET",
|
|
181
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/cluster-versions`,
|
|
182
|
+
urlParams: sdkClient.urlParams(
|
|
183
|
+
["include_beta", request.includeBeta],
|
|
184
|
+
["include_deprecated", request.includeDeprecated],
|
|
185
|
+
["include_disabled", request.includeDisabled],
|
|
186
|
+
["page", request.page],
|
|
187
|
+
[
|
|
188
|
+
"page_size",
|
|
189
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
190
|
+
],
|
|
191
|
+
["version", request.version]
|
|
192
|
+
)
|
|
193
|
+
},
|
|
194
|
+
marshalling_gen.unmarshalListClusterVersionsResponse
|
|
195
|
+
);
|
|
196
|
+
/**
|
|
197
|
+
* List available Redis™ versions. List the Redis™ database engine versions available. You can define additional parameters for your query, such as `include_disabled`, `include_beta`, `include_deprecated` and `version`.
|
|
198
|
+
*
|
|
199
|
+
* @param request - The request {@link ListClusterVersionsRequest}
|
|
200
|
+
* @returns A Promise of ListClusterVersionsResponse
|
|
201
|
+
*/
|
|
202
|
+
listClusterVersions = (request) => sdkClient.enrichForPagination("versions", this.pageOfListClusterVersions, request);
|
|
203
|
+
/**
|
|
204
|
+
* Get the TLS certificate of a cluster. Retrieve information about the TLS certificate of a Redis™ Database Instance (Redis™ cluster). Details like name and content are returned in the response.
|
|
205
|
+
*
|
|
206
|
+
* @param request - The request {@link GetClusterCertificateRequest}
|
|
207
|
+
* @returns A Promise of Blob
|
|
208
|
+
*/
|
|
209
|
+
getClusterCertificate = (request) => this.client.fetch({
|
|
210
|
+
method: "GET",
|
|
211
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}/certificate`,
|
|
212
|
+
urlParams: sdkClient.urlParams(["dl", 1]),
|
|
213
|
+
responseType: "blob"
|
|
214
|
+
});
|
|
215
|
+
/**
|
|
216
|
+
* Renew the TLS certificate of a cluster. Renew a TLS certificate for a Redis™ Database Instance (Redis™ cluster). Renewing a certificate means that you will not be able to connect to your Database Instance using the previous certificate. You will also need to download and update the new certificate for all database clients.
|
|
217
|
+
*
|
|
218
|
+
* @param request - The request {@link RenewClusterCertificateRequest}
|
|
219
|
+
* @returns A Promise of Cluster
|
|
220
|
+
*/
|
|
221
|
+
renewClusterCertificate = (request) => this.client.fetch(
|
|
222
|
+
{
|
|
223
|
+
body: "{}",
|
|
224
|
+
headers: jsonContentHeaders,
|
|
225
|
+
method: "POST",
|
|
226
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}/renew-certificate`
|
|
227
|
+
},
|
|
228
|
+
marshalling_gen.unmarshalCluster
|
|
229
|
+
);
|
|
230
|
+
/**
|
|
231
|
+
* Add advanced settings. Add an advanced setting to a Redis™ Database Instance (Redis™ cluster). You must set the `name` and the `value` of each setting.
|
|
232
|
+
*
|
|
233
|
+
* @param request - The request {@link AddClusterSettingsRequest}
|
|
234
|
+
* @returns A Promise of ClusterSettingsResponse
|
|
235
|
+
*/
|
|
236
|
+
addClusterSettings = (request) => this.client.fetch(
|
|
237
|
+
{
|
|
238
|
+
body: JSON.stringify(
|
|
239
|
+
marshalling_gen.marshalAddClusterSettingsRequest(request, this.client.settings)
|
|
240
|
+
),
|
|
241
|
+
headers: jsonContentHeaders,
|
|
242
|
+
method: "POST",
|
|
243
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}/settings`
|
|
244
|
+
},
|
|
245
|
+
marshalling_gen.unmarshalClusterSettingsResponse
|
|
246
|
+
);
|
|
247
|
+
/**
|
|
248
|
+
* Delete advanced setting. Delete an advanced setting in a Redis™ Database Instance (Redis™ cluster). You must specify the names of the settings you want to delete in the request body.
|
|
249
|
+
*
|
|
250
|
+
* @param request - The request {@link DeleteClusterSettingRequest}
|
|
251
|
+
* @returns A Promise of Cluster
|
|
252
|
+
*/
|
|
253
|
+
deleteClusterSetting = (request) => this.client.fetch(
|
|
254
|
+
{
|
|
255
|
+
method: "DELETE",
|
|
256
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}/settings/${sdkClient.validatePathParam("settingName", request.settingName)}`
|
|
257
|
+
},
|
|
258
|
+
marshalling_gen.unmarshalCluster
|
|
259
|
+
);
|
|
260
|
+
/**
|
|
261
|
+
* Set advanced settings. Update an advanced setting for a Redis™ Database Instance (Redis™ cluster). Settings added upon database engine initialization can only be defined once, and cannot, therefore, be updated.
|
|
262
|
+
*
|
|
263
|
+
* @param request - The request {@link SetClusterSettingsRequest}
|
|
264
|
+
* @returns A Promise of ClusterSettingsResponse
|
|
265
|
+
*/
|
|
266
|
+
setClusterSettings = (request) => this.client.fetch(
|
|
267
|
+
{
|
|
268
|
+
body: JSON.stringify(
|
|
269
|
+
marshalling_gen.marshalSetClusterSettingsRequest(request, this.client.settings)
|
|
270
|
+
),
|
|
271
|
+
headers: jsonContentHeaders,
|
|
272
|
+
method: "PUT",
|
|
273
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}/settings`
|
|
274
|
+
},
|
|
275
|
+
marshalling_gen.unmarshalClusterSettingsResponse
|
|
276
|
+
);
|
|
277
|
+
/**
|
|
278
|
+
* Set ACL rules for a cluster. Replace all the ACL rules of a Redis™ Database Instance (Redis™ cluster).
|
|
279
|
+
*
|
|
280
|
+
* @param request - The request {@link SetAclRulesRequest}
|
|
281
|
+
* @returns A Promise of SetAclRulesResponse
|
|
282
|
+
*/
|
|
283
|
+
setAclRules = (request) => this.client.fetch(
|
|
284
|
+
{
|
|
285
|
+
body: JSON.stringify(
|
|
286
|
+
marshalling_gen.marshalSetAclRulesRequest(request, this.client.settings)
|
|
287
|
+
),
|
|
288
|
+
headers: jsonContentHeaders,
|
|
289
|
+
method: "PUT",
|
|
290
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}/acls`
|
|
291
|
+
},
|
|
292
|
+
marshalling_gen.unmarshalSetAclRulesResponse
|
|
293
|
+
);
|
|
294
|
+
/**
|
|
295
|
+
* Add ACL rules for a cluster. Add an additional ACL rule to a Redis™ Database Instance (Redis™ cluster).
|
|
296
|
+
*
|
|
297
|
+
* @param request - The request {@link AddAclRulesRequest}
|
|
298
|
+
* @returns A Promise of AddAclRulesResponse
|
|
299
|
+
*/
|
|
300
|
+
addAclRules = (request) => this.client.fetch(
|
|
301
|
+
{
|
|
302
|
+
body: JSON.stringify(
|
|
303
|
+
marshalling_gen.marshalAddAclRulesRequest(request, this.client.settings)
|
|
304
|
+
),
|
|
305
|
+
headers: jsonContentHeaders,
|
|
306
|
+
method: "POST",
|
|
307
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}/acls`
|
|
308
|
+
},
|
|
309
|
+
marshalling_gen.unmarshalAddAclRulesResponse
|
|
310
|
+
);
|
|
311
|
+
/**
|
|
312
|
+
* Delete an ACL rule for a cluster. Delete an ACL rule of a Redis™ Database Instance (Redis™ cluster). You must specify the `acl_id` of the rule you want to delete in your request.
|
|
313
|
+
*
|
|
314
|
+
* @param request - The request {@link DeleteAclRuleRequest}
|
|
315
|
+
* @returns A Promise of Cluster
|
|
316
|
+
*/
|
|
317
|
+
deleteAclRule = (request) => this.client.fetch(
|
|
318
|
+
{
|
|
319
|
+
method: "DELETE",
|
|
320
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/acls/${sdkClient.validatePathParam("aclId", request.aclId)}`
|
|
321
|
+
},
|
|
322
|
+
marshalling_gen.unmarshalCluster
|
|
323
|
+
);
|
|
324
|
+
/**
|
|
325
|
+
* Get an ACL rule. Retrieve information about an ACL rule of a Redis™ Database Instance (Redis™ cluster). You must specify the `acl_id` of the rule in your request.
|
|
326
|
+
*
|
|
327
|
+
* @param request - The request {@link GetAclRuleRequest}
|
|
328
|
+
* @returns A Promise of ACLRule
|
|
329
|
+
*/
|
|
330
|
+
getAclRule = (request) => this.client.fetch(
|
|
331
|
+
{
|
|
332
|
+
method: "GET",
|
|
333
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/acls/${sdkClient.validatePathParam("aclId", request.aclId)}`
|
|
334
|
+
},
|
|
335
|
+
marshalling_gen.unmarshalACLRule
|
|
336
|
+
);
|
|
337
|
+
/**
|
|
338
|
+
* Set endpoints for a cluster. Update an endpoint for a Redis™ Database Instance (Redis™ cluster). You must specify the `cluster_id` and the `endpoints` parameters in your request.
|
|
339
|
+
*
|
|
340
|
+
* @param request - The request {@link SetEndpointsRequest}
|
|
341
|
+
* @returns A Promise of SetEndpointsResponse
|
|
342
|
+
*/
|
|
343
|
+
setEndpoints = (request) => this.client.fetch(
|
|
344
|
+
{
|
|
345
|
+
body: JSON.stringify(
|
|
346
|
+
marshalling_gen.marshalSetEndpointsRequest(request, this.client.settings)
|
|
347
|
+
),
|
|
348
|
+
headers: jsonContentHeaders,
|
|
349
|
+
method: "PUT",
|
|
350
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}/endpoints`
|
|
351
|
+
},
|
|
352
|
+
marshalling_gen.unmarshalSetEndpointsResponse
|
|
353
|
+
);
|
|
354
|
+
/**
|
|
355
|
+
* Add endpoints for a cluster. Add a new endpoint for a Redis™ Database Instance (Redis™ cluster). You can add `private_network` or `public_network` specifications to the body of the request.
|
|
356
|
+
*
|
|
357
|
+
* @param request - The request {@link AddEndpointsRequest}
|
|
358
|
+
* @returns A Promise of AddEndpointsResponse
|
|
359
|
+
*/
|
|
360
|
+
addEndpoints = (request) => this.client.fetch(
|
|
361
|
+
{
|
|
362
|
+
body: JSON.stringify(
|
|
363
|
+
marshalling_gen.marshalAddEndpointsRequest(request, this.client.settings)
|
|
364
|
+
),
|
|
365
|
+
headers: jsonContentHeaders,
|
|
366
|
+
method: "POST",
|
|
367
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/clusters/${sdkClient.validatePathParam("clusterId", request.clusterId)}/endpoints`
|
|
368
|
+
},
|
|
369
|
+
marshalling_gen.unmarshalAddEndpointsResponse
|
|
370
|
+
);
|
|
371
|
+
/**
|
|
372
|
+
* Delete an endpoint for a cluster. Delete the endpoint of a Redis™ Database Instance (Redis™ cluster). You must specify the `region` and `endpoint_id` parameters of the endpoint you want to delete. Note that might need to update any environment configurations that point to the deleted endpoint.
|
|
373
|
+
*
|
|
374
|
+
* @param request - The request {@link DeleteEndpointRequest}
|
|
375
|
+
* @returns A Promise of Cluster
|
|
376
|
+
*/
|
|
377
|
+
deleteEndpoint = (request) => this.client.fetch(
|
|
378
|
+
{
|
|
379
|
+
method: "DELETE",
|
|
380
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/endpoints/${sdkClient.validatePathParam("endpointId", request.endpointId)}`
|
|
381
|
+
},
|
|
382
|
+
marshalling_gen.unmarshalCluster
|
|
383
|
+
);
|
|
384
|
+
/**
|
|
385
|
+
* Get an endpoint. Retrieve information about a Redis™ Database Instance (Redis™ cluster) endpoint. Full details about the endpoint, like `ips`, `port`, `private_network` and `public_network` specifications are returned in the response.
|
|
386
|
+
*
|
|
387
|
+
* @param request - The request {@link GetEndpointRequest}
|
|
388
|
+
* @returns A Promise of Endpoint
|
|
389
|
+
*/
|
|
390
|
+
getEndpoint = (request) => this.client.fetch(
|
|
391
|
+
{
|
|
392
|
+
method: "GET",
|
|
393
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/endpoints/${sdkClient.validatePathParam("endpointId", request.endpointId)}`
|
|
394
|
+
},
|
|
395
|
+
marshalling_gen.unmarshalEndpoint
|
|
396
|
+
);
|
|
397
|
+
/**
|
|
398
|
+
* Update an endpoint. Update information about a Redis™ Database Instance (Redis™ cluster) endpoint. Full details about the endpoint, like `ips`, `port`, `private_network` and `public_network` specifications are returned in the response.
|
|
399
|
+
*
|
|
400
|
+
* @param request - The request {@link UpdateEndpointRequest}
|
|
401
|
+
* @returns A Promise of Endpoint
|
|
402
|
+
*/
|
|
403
|
+
updateEndpoint = (request) => this.client.fetch(
|
|
404
|
+
{
|
|
405
|
+
body: JSON.stringify(
|
|
406
|
+
marshalling_gen.marshalUpdateEndpointRequest(request, this.client.settings)
|
|
407
|
+
),
|
|
408
|
+
headers: jsonContentHeaders,
|
|
409
|
+
method: "PATCH",
|
|
410
|
+
path: `/redis/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/endpoints/${sdkClient.validatePathParam("endpointId", request.endpointId)}`
|
|
411
|
+
},
|
|
412
|
+
marshalling_gen.unmarshalEndpoint
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
exports.API = API;
|