@scaleway/sdk 1.4.0 → 1.6.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/account/index.js +0 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
- package/dist/api/baremetal/index.js +2 -2
- package/dist/api/baremetal/v1/api.gen.js +2 -2
- package/dist/api/billing/index.js +2 -0
- package/dist/api/billing/v2alpha1/api.gen.js +52 -0
- package/dist/api/billing/v2alpha1/index.gen.js +3 -0
- package/dist/api/billing/v2alpha1/marshalling.gen.js +52 -0
- package/dist/api/cockpit/v1beta1/api.gen.js +62 -7
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +46 -2
- package/dist/api/container/v1beta1/api.gen.js +1 -1
- package/dist/api/flexibleip/v1alpha1/api.gen.js +8 -1
- package/dist/api/function/v1beta1/api.gen.js +1 -1
- package/dist/api/function/v1beta1/marshalling.gen.js +3 -20
- package/dist/api/iam/v1alpha1/api.gen.js +7 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +10 -10
- package/dist/api/instance/index.js +2 -2
- package/dist/api/instance/v1/api.gen.js +86 -67
- package/dist/api/iot/v1/api.gen.js +1 -1
- package/dist/api/k8s/index.js +2 -2
- package/dist/api/k8s/v1/api.gen.js +14 -2
- package/dist/api/k8s/v1/marshalling.gen.js +6 -1
- package/dist/api/lb/index.js +2 -2
- package/dist/api/lb/v1/api.gen.js +2 -2
- package/dist/api/lb/v1/marshalling.gen.js +33 -19
- package/dist/api/mnq/v1alpha1/api.gen.js +1 -1
- package/dist/api/rdb/v1/api.gen.js +11 -11
- package/dist/api/redis/v1/api.gen.js +89 -27
- package/dist/api/redis/v1/marshalling.gen.js +2 -0
- package/dist/api/registry/v1/api.gen.js +1 -1
- package/dist/api/secret/v1alpha1/api.gen.js +44 -20
- package/dist/api/secret/v1alpha1/marshalling.gen.js +14 -2
- package/dist/api/tem/v1alpha1/api.gen.js +26 -14
- package/dist/api/vpc/v1/api.gen.js +2 -2
- package/dist/api/vpcgw/v1/api.gen.js +1 -1
- package/dist/api/webhosting/v1alpha1/api.gen.js +4 -3
- package/dist/helpers/is-response.js +10 -0
- package/dist/index.cjs +625 -366
- package/dist/index.d.ts +1444 -1106
- package/dist/index.js +44 -42
- package/dist/internal/async/interval-retrier.js +6 -0
- package/dist/internal/logger/level-resolver.js +3 -3
- package/dist/scw/client-ini-factory.js +6 -0
- package/dist/scw/client-ini-profile.js +18 -0
- package/dist/scw/client-settings.js +12 -0
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/standard/quotas-exceeded-error.js +6 -0
- package/dist/scw/fetch/response-parser.js +2 -1
- package/package.json +2 -2
- package/dist/api/account/v2alpha1/api.gen.js +0 -85
- package/dist/api/account/v2alpha1/index.js +0 -1
- package/dist/api/account/v2alpha1/marshalling.gen.js +0 -57
|
@@ -132,7 +132,8 @@ const unmarshalHealthCheck = data => {
|
|
|
132
132
|
pgsqlConfig: data.pgsql_config ? unmarshalHealthCheckPgsqlConfig(data.pgsql_config) : undefined,
|
|
133
133
|
port: data.port,
|
|
134
134
|
redisConfig: data.redis_config ? unmarshalHealthCheckRedisConfig(data.redis_config) : undefined,
|
|
135
|
-
tcpConfig: data.tcp_config ? unmarshalHealthCheckTcpConfig(data.tcp_config) : undefined
|
|
135
|
+
tcpConfig: data.tcp_config ? unmarshalHealthCheckTcpConfig(data.tcp_config) : undefined,
|
|
136
|
+
transientCheckDelay: data.transient_check_delay
|
|
136
137
|
};
|
|
137
138
|
};
|
|
138
139
|
const unmarshalLb = data => {
|
|
@@ -186,10 +187,12 @@ const unmarshalBackend = data => {
|
|
|
186
187
|
id: data.id,
|
|
187
188
|
ignoreSslServerVerify: data.ignore_ssl_server_verify,
|
|
188
189
|
lb: data.lb ? unmarshalLb(data.lb) : undefined,
|
|
190
|
+
maxRetries: data.max_retries,
|
|
189
191
|
name: data.name,
|
|
190
192
|
onMarkedDownAction: data.on_marked_down_action,
|
|
191
193
|
pool: data.pool,
|
|
192
194
|
proxyProtocol: data.proxy_protocol,
|
|
195
|
+
redispatchAttemptCount: data.redispatch_attempt_count,
|
|
193
196
|
sendProxyV2: data.send_proxy_v2,
|
|
194
197
|
sslBridging: data.ssl_bridging,
|
|
195
198
|
stickySessions: data.sticky_sessions,
|
|
@@ -531,21 +534,22 @@ const marshalHealthCheck = (request, defaults) => ({
|
|
|
531
534
|
check_send_proxy: request.checkSendProxy,
|
|
532
535
|
check_timeout: request.checkTimeout,
|
|
533
536
|
port: request.port,
|
|
537
|
+
transient_check_delay: request.transientCheckDelay,
|
|
534
538
|
...resolveOneOf([{
|
|
539
|
+
param: 'tcp_config',
|
|
540
|
+
value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
|
|
541
|
+
}, {
|
|
535
542
|
param: 'mysql_config',
|
|
536
543
|
value: request.mysqlConfig ? marshalHealthCheckMysqlConfig(request.mysqlConfig) : undefined
|
|
544
|
+
}, {
|
|
545
|
+
param: 'pgsql_config',
|
|
546
|
+
value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
|
|
537
547
|
}, {
|
|
538
548
|
param: 'ldap_config',
|
|
539
549
|
value: request.ldapConfig ? marshalHealthCheckLdapConfig(request.ldapConfig) : undefined
|
|
540
550
|
}, {
|
|
541
551
|
param: 'redis_config',
|
|
542
552
|
value: request.redisConfig ? marshalHealthCheckRedisConfig(request.redisConfig) : undefined
|
|
543
|
-
}, {
|
|
544
|
-
param: 'tcp_config',
|
|
545
|
-
value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
|
|
546
|
-
}, {
|
|
547
|
-
param: 'pgsql_config',
|
|
548
|
-
value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
|
|
549
553
|
}, {
|
|
550
554
|
param: 'http_config',
|
|
551
555
|
value: request.httpConfig ? marshalHealthCheckHttpConfig(request.httpConfig) : undefined
|
|
@@ -603,9 +607,11 @@ const marshalCreateBackendRequest = (request, defaults) => ({
|
|
|
603
607
|
forward_protocol: request.forwardProtocol,
|
|
604
608
|
health_check: marshalHealthCheck(request.healthCheck),
|
|
605
609
|
ignore_ssl_server_verify: request.ignoreSslServerVerify,
|
|
610
|
+
max_retries: request.maxRetries,
|
|
606
611
|
name: request.name || randomName('lbb'),
|
|
607
612
|
on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
|
|
608
613
|
proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
|
|
614
|
+
redispatch_attempt_count: request.redispatchAttemptCount,
|
|
609
615
|
send_proxy_v2: request.sendProxyV2,
|
|
610
616
|
server_ip: request.serverIp,
|
|
611
617
|
ssl_bridging: request.sslBridging,
|
|
@@ -712,9 +718,11 @@ const marshalUpdateBackendRequest = (request, defaults) => ({
|
|
|
712
718
|
forward_port_algorithm: request.forwardPortAlgorithm,
|
|
713
719
|
forward_protocol: request.forwardProtocol,
|
|
714
720
|
ignore_ssl_server_verify: request.ignoreSslServerVerify,
|
|
721
|
+
max_retries: request.maxRetries,
|
|
715
722
|
name: request.name,
|
|
716
723
|
on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
|
|
717
724
|
proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
|
|
725
|
+
redispatch_attempt_count: request.redispatchAttemptCount,
|
|
718
726
|
send_proxy_v2: request.sendProxyV2,
|
|
719
727
|
ssl_bridging: request.sslBridging,
|
|
720
728
|
sticky_sessions: request.stickySessions,
|
|
@@ -741,21 +749,22 @@ const marshalUpdateHealthCheckRequest = (request, defaults) => ({
|
|
|
741
749
|
check_send_proxy: request.checkSendProxy,
|
|
742
750
|
check_timeout: request.checkTimeout,
|
|
743
751
|
port: request.port,
|
|
752
|
+
transient_check_delay: request.transientCheckDelay,
|
|
744
753
|
...resolveOneOf([{
|
|
754
|
+
param: 'tcp_config',
|
|
755
|
+
value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
|
|
756
|
+
}, {
|
|
745
757
|
param: 'mysql_config',
|
|
746
758
|
value: request.mysqlConfig ? marshalHealthCheckMysqlConfig(request.mysqlConfig) : undefined
|
|
759
|
+
}, {
|
|
760
|
+
param: 'pgsql_config',
|
|
761
|
+
value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
|
|
747
762
|
}, {
|
|
748
763
|
param: 'ldap_config',
|
|
749
764
|
value: request.ldapConfig ? marshalHealthCheckLdapConfig(request.ldapConfig) : undefined
|
|
750
765
|
}, {
|
|
751
766
|
param: 'redis_config',
|
|
752
767
|
value: request.redisConfig ? marshalHealthCheckRedisConfig(request.redisConfig) : undefined
|
|
753
|
-
}, {
|
|
754
|
-
param: 'pgsql_config',
|
|
755
|
-
value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
|
|
756
|
-
}, {
|
|
757
|
-
param: 'tcp_config',
|
|
758
|
-
value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
|
|
759
768
|
}, {
|
|
760
769
|
param: 'http_config',
|
|
761
770
|
value: request.httpConfig ? marshalHealthCheckHttpConfig(request.httpConfig) : undefined
|
|
@@ -816,9 +825,11 @@ const marshalZonedApiCreateBackendRequest = (request, defaults) => ({
|
|
|
816
825
|
forward_protocol: request.forwardProtocol,
|
|
817
826
|
health_check: marshalHealthCheck(request.healthCheck),
|
|
818
827
|
ignore_ssl_server_verify: request.ignoreSslServerVerify,
|
|
828
|
+
max_retries: request.maxRetries,
|
|
819
829
|
name: request.name || randomName('lbb'),
|
|
820
830
|
on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
|
|
821
831
|
proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
|
|
832
|
+
redispatch_attempt_count: request.redispatchAttemptCount,
|
|
822
833
|
send_proxy_v2: request.sendProxyV2,
|
|
823
834
|
server_ip: request.serverIp,
|
|
824
835
|
ssl_bridging: request.sslBridging,
|
|
@@ -928,9 +939,11 @@ const marshalZonedApiUpdateBackendRequest = (request, defaults) => ({
|
|
|
928
939
|
forward_port_algorithm: request.forwardPortAlgorithm,
|
|
929
940
|
forward_protocol: request.forwardProtocol,
|
|
930
941
|
ignore_ssl_server_verify: request.ignoreSslServerVerify,
|
|
942
|
+
max_retries: request.maxRetries,
|
|
931
943
|
name: request.name,
|
|
932
944
|
on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
|
|
933
945
|
proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
|
|
946
|
+
redispatch_attempt_count: request.redispatchAttemptCount,
|
|
934
947
|
send_proxy_v2: request.sendProxyV2,
|
|
935
948
|
ssl_bridging: request.sslBridging,
|
|
936
949
|
sticky_sessions: request.stickySessions,
|
|
@@ -957,21 +970,22 @@ const marshalZonedApiUpdateHealthCheckRequest = (request, defaults) => ({
|
|
|
957
970
|
check_send_proxy: request.checkSendProxy,
|
|
958
971
|
check_timeout: request.checkTimeout,
|
|
959
972
|
port: request.port,
|
|
973
|
+
transient_check_delay: request.transientCheckDelay,
|
|
960
974
|
...resolveOneOf([{
|
|
975
|
+
param: 'tcp_config',
|
|
976
|
+
value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
|
|
977
|
+
}, {
|
|
961
978
|
param: 'mysql_config',
|
|
962
979
|
value: request.mysqlConfig ? marshalHealthCheckMysqlConfig(request.mysqlConfig) : undefined
|
|
980
|
+
}, {
|
|
981
|
+
param: 'pgsql_config',
|
|
982
|
+
value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
|
|
963
983
|
}, {
|
|
964
984
|
param: 'ldap_config',
|
|
965
985
|
value: request.ldapConfig ? marshalHealthCheckLdapConfig(request.ldapConfig) : undefined
|
|
966
986
|
}, {
|
|
967
987
|
param: 'redis_config',
|
|
968
988
|
value: request.redisConfig ? marshalHealthCheckRedisConfig(request.redisConfig) : undefined
|
|
969
|
-
}, {
|
|
970
|
-
param: 'pgsql_config',
|
|
971
|
-
value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
|
|
972
|
-
}, {
|
|
973
|
-
param: 'tcp_config',
|
|
974
|
-
value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
|
|
975
989
|
}, {
|
|
976
990
|
param: 'http_config',
|
|
977
991
|
value: request.httpConfig ? marshalHealthCheckHttpConfig(request.httpConfig) : undefined
|
|
@@ -150,8 +150,8 @@ class API extends API$1 {
|
|
|
150
150
|
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
|
|
151
151
|
}, unmarshalCredential);
|
|
152
152
|
}
|
|
153
|
+
/** Lists the available regions of the API. */
|
|
153
154
|
}
|
|
154
|
-
/** Lists the available regions of the API. */
|
|
155
155
|
API.LOCALITIES = ['fr-par'];
|
|
156
156
|
|
|
157
157
|
export { API };
|
|
@@ -46,8 +46,8 @@ class API extends API$1 {
|
|
|
46
46
|
}, unmarshalListNodeTypesResponse);
|
|
47
47
|
/**
|
|
48
48
|
* List available node types. List all available node types. By default, the
|
|
49
|
-
*
|
|
50
|
-
* order, though this can be modified via the order_by field.
|
|
49
|
+
* node types returned in the list are ordered by creation date in ascending
|
|
50
|
+
* order, though this can be modified via the `order_by` field.
|
|
51
51
|
*
|
|
52
52
|
* @param request - The request {@link ListNodeTypesRequest}
|
|
53
53
|
* @returns A Promise of ListNodeTypesResponse
|
|
@@ -64,7 +64,7 @@ class API extends API$1 {
|
|
|
64
64
|
}, unmarshalListDatabaseBackupsResponse);
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
|
-
* List database backups. List all backups in a specified
|
|
67
|
+
* List database backups. List all backups in a specified region, for a given
|
|
68
68
|
* Scaleway Organization or Scaleway Project. By default, the backups listed
|
|
69
69
|
* are ordered by creation date in ascending order. This can be modified via
|
|
70
70
|
* the `order_by` field.
|
|
@@ -190,9 +190,9 @@ class API extends API$1 {
|
|
|
190
190
|
}, unmarshalListInstancesResponse);
|
|
191
191
|
};
|
|
192
192
|
/**
|
|
193
|
-
* List Database Instances. List all Database Instances in the specified
|
|
194
|
-
* for a given Scaleway Organization or Scaleway Project. By default,
|
|
195
|
-
* Database Instances returned in the list are ordered by creation date in
|
|
193
|
+
* List Database Instances. List all Database Instances in the specified
|
|
194
|
+
* region, for a given Scaleway Organization or Scaleway Project. By default,
|
|
195
|
+
* the Database Instances returned in the list are ordered by creation date in
|
|
196
196
|
* ascending order, though this can be modified via the order_by field. You
|
|
197
197
|
* can define additional parameters for your query, such as `tags` and `name`.
|
|
198
198
|
* For the `name` parameter, the value you include will be checked against the
|
|
@@ -329,7 +329,7 @@ class API extends API$1 {
|
|
|
329
329
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/renew-certificate`
|
|
330
330
|
});
|
|
331
331
|
/**
|
|
332
|
-
* Get Database Instance metrics. Retrieve the time series metrics of a
|
|
332
|
+
* Get Database Instance metrics. Retrieve the time series metrics of a given
|
|
333
333
|
* Database Instance. You can define the period from which to retrieve metrics
|
|
334
334
|
* by specifying the `start_date` and `end_date`.
|
|
335
335
|
*
|
|
@@ -726,10 +726,10 @@ class API extends API$1 {
|
|
|
726
726
|
};
|
|
727
727
|
/**
|
|
728
728
|
* List snapshots. List snapshots. You can include the `instance_id` or
|
|
729
|
-
* `project_id` in your query to get the list of
|
|
729
|
+
* `project_id` in your query to get the list of snapshots for specific
|
|
730
730
|
* Database Instances and/or Projects. By default, the details returned in the
|
|
731
731
|
* list are ordered by creation date in ascending order, though this can be
|
|
732
|
-
* modified via the order_by field.
|
|
732
|
+
* modified via the `order_by` field.
|
|
733
733
|
*
|
|
734
734
|
* @param request - The request {@link ListSnapshotsRequest}
|
|
735
735
|
* @returns A Promise of ListSnapshotsResponse
|
|
@@ -820,7 +820,7 @@ class API extends API$1 {
|
|
|
820
820
|
}, unmarshalInstance);
|
|
821
821
|
/**
|
|
822
822
|
* Create a new Database Instance endpoint. Create a new endpoint for a
|
|
823
|
-
* Database Instance. You can add `
|
|
823
|
+
* Database Instance. You can add `load_balancer` and `private_network`
|
|
824
824
|
* specifications to the body of the request. Note that this action replaces
|
|
825
825
|
* your current endpoint, which means you might need to update any environment
|
|
826
826
|
* configurations that point to the old endpoint.
|
|
@@ -872,8 +872,8 @@ class API extends API$1 {
|
|
|
872
872
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam('endpointId', request.endpointId)}/migrate`
|
|
873
873
|
}, unmarshalEndpoint);
|
|
874
874
|
}
|
|
875
|
+
/** Lists the available regions of the API. */
|
|
875
876
|
}
|
|
876
|
-
/** Lists the available regions of the API. */
|
|
877
877
|
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
878
878
|
|
|
879
879
|
export { API };
|
|
@@ -17,7 +17,10 @@ class API extends API$1 {
|
|
|
17
17
|
super(...arguments);
|
|
18
18
|
_this = this;
|
|
19
19
|
/**
|
|
20
|
-
* Create a
|
|
20
|
+
* Create a Redis™ Database Instance. Create a new Redis™ Database Instance
|
|
21
|
+
* (Redis™ cluster). You must set the `zone`, `project_id`, `version`,
|
|
22
|
+
* `node_type`, `user_name` and `password` parameters. Optionally you can
|
|
23
|
+
* define `acl_rules`, `endpoints`, `tls_enabled` and `cluster_settings`.
|
|
21
24
|
*
|
|
22
25
|
* @param request - The request {@link CreateClusterRequest}
|
|
23
26
|
* @returns A Promise of Cluster
|
|
@@ -29,7 +32,9 @@ class API extends API$1 {
|
|
|
29
32
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/clusters`
|
|
30
33
|
}, unmarshalCluster);
|
|
31
34
|
/**
|
|
32
|
-
* Update a
|
|
35
|
+
* Update a Redis™ Database Instance. Update the parameters of a Redis™
|
|
36
|
+
* Database Instance (Redis™ cluster), including `name`, `tags`, `user_name`
|
|
37
|
+
* and `password`.
|
|
33
38
|
*
|
|
34
39
|
* @param request - The request {@link UpdateClusterRequest}
|
|
35
40
|
* @returns A Promise of Cluster
|
|
@@ -41,7 +46,11 @@ class API extends API$1 {
|
|
|
41
46
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/clusters/${validatePathParam('clusterId', request.clusterId)}`
|
|
42
47
|
}, unmarshalCluster);
|
|
43
48
|
/**
|
|
44
|
-
* Get a
|
|
49
|
+
* Get a Redis™ Database Instance. Retrieve information about a Redis™
|
|
50
|
+
* Database Instance (Redis™ cluster). Specify the `cluster_id` and `region`
|
|
51
|
+
* in your request to get information such as `id`, `status`, `version`,
|
|
52
|
+
* `tls_enabled`, `cluster_settings`, `upgradable_versions` and `endpoints`
|
|
53
|
+
* about your cluster in the response.
|
|
45
54
|
*
|
|
46
55
|
* @param request - The request {@link GetClusterRequest}
|
|
47
56
|
* @returns A Promise of Cluster
|
|
@@ -69,7 +78,12 @@ class API extends API$1 {
|
|
|
69
78
|
}, unmarshalListClustersResponse);
|
|
70
79
|
};
|
|
71
80
|
/**
|
|
72
|
-
* List
|
|
81
|
+
* List Redis™ Database Instances. List all Redis™ Database Instances (Redis™
|
|
82
|
+
* cluster) in the specified zone. By default, the Database Instances returned
|
|
83
|
+
* in the list are ordered by creation date in ascending order, though this
|
|
84
|
+
* can be modified via the order_by field. You can define additional
|
|
85
|
+
* parameters for your query, such as `tags`, `name`, `organization_id` and
|
|
86
|
+
* `version`.
|
|
73
87
|
*
|
|
74
88
|
* @param request - The request {@link ListClustersRequest}
|
|
75
89
|
* @returns A Promise of ListClustersResponse
|
|
@@ -81,11 +95,13 @@ class API extends API$1 {
|
|
|
81
95
|
return enrichForPagination('clusters', _this.pageOfListClusters, request);
|
|
82
96
|
};
|
|
83
97
|
/**
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* scaling
|
|
87
|
-
*
|
|
88
|
-
*
|
|
98
|
+
* Scale up a Redis™ Database Instance. Upgrade your standalone Redis™
|
|
99
|
+
* Database Instance node, either by upgrading to a bigger node type (vertical
|
|
100
|
+
* scaling) or by adding more nodes to your Database Instance to increase your
|
|
101
|
+
* number of endpoints and distribute cache (horizontal scaling). Note that
|
|
102
|
+
* scaling horizontally your Redis™ Database Instance will not renew its TLS
|
|
103
|
+
* certificate. In order to refresh the TLS certificate, you must use the
|
|
104
|
+
* Renew TLS certificate endpoint.
|
|
89
105
|
*
|
|
90
106
|
* @param request - The request {@link MigrateClusterRequest}
|
|
91
107
|
* @returns A Promise of Cluster
|
|
@@ -97,7 +113,10 @@ class API extends API$1 {
|
|
|
97
113
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/clusters/${validatePathParam('clusterId', request.clusterId)}/migrate`
|
|
98
114
|
}, unmarshalCluster);
|
|
99
115
|
/**
|
|
100
|
-
* Delete a
|
|
116
|
+
* Delete a Redis™ Database Instance. Delete a Redis™ Database Instance
|
|
117
|
+
* (Redis™ cluster), specified by the `region` and `cluster_id` parameters.
|
|
118
|
+
* Deleting a Database Instance is permanent, and cannot be undone. Note that
|
|
119
|
+
* upon deletion all your data will be lost.
|
|
101
120
|
*
|
|
102
121
|
* @param request - The request {@link DeleteClusterRequest}
|
|
103
122
|
* @returns A Promise of Cluster
|
|
@@ -107,7 +126,9 @@ class API extends API$1 {
|
|
|
107
126
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/clusters/${validatePathParam('clusterId', request.clusterId)}`
|
|
108
127
|
}, unmarshalCluster);
|
|
109
128
|
/**
|
|
110
|
-
* Get metrics of a
|
|
129
|
+
* Get metrics of a Redis™ Database Instance. Retrieve the metrics of a Redis™
|
|
130
|
+
* Database Instance (Redis™ cluster). You can define the period from which to
|
|
131
|
+
* retrieve metrics by specifying the `start_date` and `end_date`.
|
|
111
132
|
*
|
|
112
133
|
* @param request - The request {@link GetClusterMetricsRequest}
|
|
113
134
|
* @returns A Promise of ClusterMetricsResponse
|
|
@@ -123,7 +144,9 @@ class API extends API$1 {
|
|
|
123
144
|
urlParams: urlParams(['include_disabled_types', request.includeDisabledTypes], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
124
145
|
}, unmarshalListNodeTypesResponse);
|
|
125
146
|
/**
|
|
126
|
-
* List available node types.
|
|
147
|
+
* List available node types. List all available node types. By default, the
|
|
148
|
+
* node types returned in the list are ordered by creation date in ascending
|
|
149
|
+
* order, though this can be modified via the `order_by` field.
|
|
127
150
|
*
|
|
128
151
|
* @param request - The request {@link ListNodeTypesRequest}
|
|
129
152
|
* @returns A Promise of ListNodeTypesResponse
|
|
@@ -135,14 +158,18 @@ class API extends API$1 {
|
|
|
135
158
|
urlParams: urlParams(['include_beta', request.includeBeta], ['include_deprecated', request.includeDeprecated], ['include_disabled', request.includeDisabled], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['version', request.version])
|
|
136
159
|
}, unmarshalListClusterVersionsResponse);
|
|
137
160
|
/**
|
|
138
|
-
* List available Redis™ versions.
|
|
161
|
+
* List available Redis™ versions. List the Redis™ database engine versions
|
|
162
|
+
* available. You can define additional parameters for your query, such as
|
|
163
|
+
* `include_disabled`, `include_beta`, `include_deprecated` and `version`.
|
|
139
164
|
*
|
|
140
165
|
* @param request - The request {@link ListClusterVersionsRequest}
|
|
141
166
|
* @returns A Promise of ListClusterVersionsResponse
|
|
142
167
|
*/
|
|
143
168
|
this.listClusterVersions = request => enrichForPagination('versions', this.pageOfListClusterVersions, request);
|
|
144
169
|
/**
|
|
145
|
-
* Get the TLS certificate of a cluster.
|
|
170
|
+
* Get the TLS certificate of a cluster. Retrieve information about the TLS
|
|
171
|
+
* certificate of a Redis™ Database Instance (Redis™ cluster). Details like
|
|
172
|
+
* name and content are returned in the response.
|
|
146
173
|
*
|
|
147
174
|
* @param request - The request {@link GetClusterCertificateRequest}
|
|
148
175
|
* @returns A Promise of Blob
|
|
@@ -154,7 +181,11 @@ class API extends API$1 {
|
|
|
154
181
|
responseType: 'blob'
|
|
155
182
|
});
|
|
156
183
|
/**
|
|
157
|
-
* Renew the TLS certificate of a cluster.
|
|
184
|
+
* Renew the TLS certificate of a cluster. Renew a TLS certificate for a
|
|
185
|
+
* Redis™ Database Instance (Redis™ cluster). Renewing a certificate means
|
|
186
|
+
* that you will not be able to connect to your Database Instance using the
|
|
187
|
+
* previous certificate. You will also need to download and update the new
|
|
188
|
+
* certificate for all database clients.
|
|
158
189
|
*
|
|
159
190
|
* @param request - The request {@link RenewClusterCertificateRequest}
|
|
160
191
|
* @returns A Promise of Cluster
|
|
@@ -166,7 +197,9 @@ class API extends API$1 {
|
|
|
166
197
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/clusters/${validatePathParam('clusterId', request.clusterId)}/renew-certificate`
|
|
167
198
|
}, unmarshalCluster);
|
|
168
199
|
/**
|
|
169
|
-
* Add
|
|
200
|
+
* Add advanced settings. Add an advanced setting to a Redis™ Database
|
|
201
|
+
* Instance (Redis™ cluster). You must set the `name` and the `value` of each
|
|
202
|
+
* setting.
|
|
170
203
|
*
|
|
171
204
|
* @param request - The request {@link AddClusterSettingsRequest}
|
|
172
205
|
* @returns A Promise of ClusterSettingsResponse
|
|
@@ -178,7 +211,9 @@ class API extends API$1 {
|
|
|
178
211
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/clusters/${validatePathParam('clusterId', request.clusterId)}/settings`
|
|
179
212
|
}, unmarshalClusterSettingsResponse);
|
|
180
213
|
/**
|
|
181
|
-
* Delete a
|
|
214
|
+
* Delete advanced setting. Delete an advanced setting in a Redis™ Database
|
|
215
|
+
* Instance (Redis™ cluster). You must specify the names of the settings you
|
|
216
|
+
* want to delete in the request body.
|
|
182
217
|
*
|
|
183
218
|
* @param request - The request {@link DeleteClusterSettingRequest}
|
|
184
219
|
* @returns A Promise of Cluster
|
|
@@ -188,7 +223,9 @@ class API extends API$1 {
|
|
|
188
223
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/clusters/${validatePathParam('clusterId', request.clusterId)}/settings/${validatePathParam('settingName', request.settingName)}`
|
|
189
224
|
}, unmarshalCluster);
|
|
190
225
|
/**
|
|
191
|
-
* Set
|
|
226
|
+
* Set advanced settings. Update an advanced setting for a Redis™ Database
|
|
227
|
+
* Instance (Redis™ cluster). Settings added upon database engine
|
|
228
|
+
* initalization can only be defined once, and cannot, therefore, be updated.
|
|
192
229
|
*
|
|
193
230
|
* @param request - The request {@link SetClusterSettingsRequest}
|
|
194
231
|
* @returns A Promise of ClusterSettingsResponse
|
|
@@ -200,7 +237,8 @@ class API extends API$1 {
|
|
|
200
237
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/clusters/${validatePathParam('clusterId', request.clusterId)}/settings`
|
|
201
238
|
}, unmarshalClusterSettingsResponse);
|
|
202
239
|
/**
|
|
203
|
-
* Set ACL rules for a
|
|
240
|
+
* Set ACL rules for a cluster. Replace all the ACL rules of a Redis™ Database
|
|
241
|
+
* Instance (Redis™ cluster).
|
|
204
242
|
*
|
|
205
243
|
* @param request - The request {@link SetAclRulesRequest}
|
|
206
244
|
* @returns A Promise of SetAclRulesResponse
|
|
@@ -212,7 +250,8 @@ class API extends API$1 {
|
|
|
212
250
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/clusters/${validatePathParam('clusterId', request.clusterId)}/acls`
|
|
213
251
|
}, unmarshalSetAclRulesResponse);
|
|
214
252
|
/**
|
|
215
|
-
* Add ACL rules for a
|
|
253
|
+
* Add ACL rules for a cluster. Add an additional ACL rule to a Redis™
|
|
254
|
+
* Database Instance (Redis™ cluster).
|
|
216
255
|
*
|
|
217
256
|
* @param request - The request {@link AddAclRulesRequest}
|
|
218
257
|
* @returns A Promise of AddAclRulesResponse
|
|
@@ -224,7 +263,9 @@ class API extends API$1 {
|
|
|
224
263
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/clusters/${validatePathParam('clusterId', request.clusterId)}/acls`
|
|
225
264
|
}, unmarshalAddAclRulesResponse);
|
|
226
265
|
/**
|
|
227
|
-
* Delete an ACL rule for a
|
|
266
|
+
* Delete an ACL rule for a cluster. Delete an ACL rule of a Redis™ Database
|
|
267
|
+
* Instance (Redis™ cluster). You must specify the `acl_id` of the rule you
|
|
268
|
+
* want to delete in your request.
|
|
228
269
|
*
|
|
229
270
|
* @param request - The request {@link DeleteAclRuleRequest}
|
|
230
271
|
* @returns A Promise of Cluster
|
|
@@ -234,7 +275,9 @@ class API extends API$1 {
|
|
|
234
275
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam('aclId', request.aclId)}`
|
|
235
276
|
}, unmarshalCluster);
|
|
236
277
|
/**
|
|
237
|
-
* Get an ACL rule.
|
|
278
|
+
* Get an ACL rule. Retrieve information about an ACL rule of a Redis™
|
|
279
|
+
* Database Instance (Redis™ cluster). You must specify the `acl_id` of the
|
|
280
|
+
* rule in your request.
|
|
238
281
|
*
|
|
239
282
|
* @param request - The request {@link GetAclRuleRequest}
|
|
240
283
|
* @returns A Promise of ACLRule
|
|
@@ -244,7 +287,9 @@ class API extends API$1 {
|
|
|
244
287
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam('aclId', request.aclId)}`
|
|
245
288
|
}, unmarshalACLRule);
|
|
246
289
|
/**
|
|
247
|
-
* Set endpoints for a
|
|
290
|
+
* Set endpoints for a cluster. Update an endpoint for a Redis™ Database
|
|
291
|
+
* Instance (Redis™ cluster). You must specify the `cluster_id` and the
|
|
292
|
+
* `endpoints` parameters in your request.
|
|
248
293
|
*
|
|
249
294
|
* @param request - The request {@link SetEndpointsRequest}
|
|
250
295
|
* @returns A Promise of SetEndpointsResponse
|
|
@@ -256,7 +301,9 @@ class API extends API$1 {
|
|
|
256
301
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/clusters/${validatePathParam('clusterId', request.clusterId)}/endpoints`
|
|
257
302
|
}, unmarshalSetEndpointsResponse);
|
|
258
303
|
/**
|
|
259
|
-
* Add endpoints for a
|
|
304
|
+
* Add endpoints for a cluster. Add a new endpoint for a Redis™ Database
|
|
305
|
+
* Instance (Redis™ cluster). You can add `private_network` or
|
|
306
|
+
* `public_network` specifications to the body of the request.
|
|
260
307
|
*
|
|
261
308
|
* @param request - The request {@link AddEndpointsRequest}
|
|
262
309
|
* @returns A Promise of AddEndpointsResponse
|
|
@@ -268,7 +315,10 @@ class API extends API$1 {
|
|
|
268
315
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/clusters/${validatePathParam('clusterId', request.clusterId)}/endpoints`
|
|
269
316
|
}, unmarshalAddEndpointsResponse);
|
|
270
317
|
/**
|
|
271
|
-
* Delete an endpoint for a
|
|
318
|
+
* Delete an endpoint for a cluster. Delete the endpoint of a Redis™ Database
|
|
319
|
+
* Instance (Redis™ cluster). You must specify the `region` and `endpoint_id`
|
|
320
|
+
* parameters of the endpoint you want to delete. Note that might need to
|
|
321
|
+
* update any environment configurations that point to the deleted endpoint.
|
|
272
322
|
*
|
|
273
323
|
* @param request - The request {@link DeleteEndpointRequest}
|
|
274
324
|
* @returns A Promise of Cluster
|
|
@@ -278,7 +328,10 @@ class API extends API$1 {
|
|
|
278
328
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/endpoints/${validatePathParam('endpointId', request.endpointId)}`
|
|
279
329
|
}, unmarshalCluster);
|
|
280
330
|
/**
|
|
281
|
-
* Get an endpoint.
|
|
331
|
+
* Get an endpoint. Retrieve information about a Redis™ Database Instance
|
|
332
|
+
* (Redis™ cluster) endpoint. Full details about the endpoint, like `ips`,
|
|
333
|
+
* `port`, `private_network` and `public_network` specifications are returned
|
|
334
|
+
* in the response.
|
|
282
335
|
*
|
|
283
336
|
* @param request - The request {@link GetEndpointRequest}
|
|
284
337
|
* @returns A Promise of Endpoint
|
|
@@ -287,6 +340,15 @@ class API extends API$1 {
|
|
|
287
340
|
method: 'GET',
|
|
288
341
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/endpoints/${validatePathParam('endpointId', request.endpointId)}`
|
|
289
342
|
}, unmarshalEndpoint);
|
|
343
|
+
/**
|
|
344
|
+
* Update an endpoint. Update information about a Redis™ Database Instance
|
|
345
|
+
* (Redis™ cluster) endpoint. Full details about the endpoint, like `ips`,
|
|
346
|
+
* `port`, `private_network` and `public_network` specifications are returned
|
|
347
|
+
* in the response.
|
|
348
|
+
*
|
|
349
|
+
* @param request - The request {@link UpdateEndpointRequest}
|
|
350
|
+
* @returns A Promise of Endpoint
|
|
351
|
+
*/
|
|
290
352
|
this.updateEndpoint = request => this.client.fetch({
|
|
291
353
|
body: JSON.stringify(marshalUpdateEndpointRequest(request, this.client.settings)),
|
|
292
354
|
headers: jsonContentHeaders,
|
|
@@ -294,8 +356,8 @@ class API extends API$1 {
|
|
|
294
356
|
path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/endpoints/${validatePathParam('endpointId', request.endpointId)}`
|
|
295
357
|
}, unmarshalEndpoint);
|
|
296
358
|
}
|
|
359
|
+
/** Lists the available zones of the API. */
|
|
297
360
|
}
|
|
298
|
-
/** Lists the available zones of the API. */
|
|
299
361
|
API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
|
|
300
362
|
|
|
301
363
|
export { API };
|
|
@@ -194,8 +194,10 @@ const unmarshalSetEndpointsResponse = data => {
|
|
|
194
194
|
endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint)
|
|
195
195
|
};
|
|
196
196
|
};
|
|
197
|
+
const marshalEndpointSpecPrivateNetworkSpecIpamConfig = (request, defaults) => ({});
|
|
197
198
|
const marshalEndpointSpecPrivateNetworkSpec = (request, defaults) => ({
|
|
198
199
|
id: request.id,
|
|
200
|
+
ipam_config: request.ipamConfig ? marshalEndpointSpecPrivateNetworkSpecIpamConfig(request.ipamConfig) : undefined,
|
|
199
201
|
service_ips: request.serviceIps
|
|
200
202
|
});
|
|
201
203
|
const marshalEndpointSpecPublicNetworkSpec = (request, defaults) => ({});
|
|
@@ -200,8 +200,8 @@ class API extends API$1 {
|
|
|
200
200
|
urlParams: urlParams(['force', request.force])
|
|
201
201
|
}, unmarshalTag);
|
|
202
202
|
}
|
|
203
|
+
/** Lists the available regions of the API. */
|
|
203
204
|
}
|
|
204
|
-
/** Lists the available regions of the API. */
|
|
205
205
|
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
206
206
|
|
|
207
207
|
export { API };
|