oci-redis 2.140.1 → 2.141.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.
Files changed (47) hide show
  1. package/lib/client.d.ts +27 -0
  2. package/lib/client.js +184 -0
  3. package/lib/client.js.map +1 -1
  4. package/lib/model/cluster-replication-topology.d.ts +27 -0
  5. package/lib/model/cluster-replication-topology.js +67 -0
  6. package/lib/model/cluster-replication-topology.js.map +1 -0
  7. package/lib/model/convert-to-secondary-cluster-details.d.ts +25 -0
  8. package/lib/model/convert-to-secondary-cluster-details.js +29 -0
  9. package/lib/model/convert-to-secondary-cluster-details.js.map +1 -0
  10. package/lib/model/create-redis-cluster-details.d.ts +4 -0
  11. package/lib/model/create-redis-cluster-details.js.map +1 -1
  12. package/lib/model/index.d.ts +6 -0
  13. package/lib/model/index.js +8 -2
  14. package/lib/model/index.js.map +1 -1
  15. package/lib/model/member-cluster.d.ts +29 -0
  16. package/lib/model/member-cluster.js +29 -0
  17. package/lib/model/member-cluster.js.map +1 -0
  18. package/lib/model/operation-type.d.ts +6 -0
  19. package/lib/model/operation-type.js +6 -0
  20. package/lib/model/operation-type.js.map +1 -1
  21. package/lib/model/redis-cluster-summary.d.ts +8 -0
  22. package/lib/model/redis-cluster-summary.js.map +1 -1
  23. package/lib/model/redis-cluster.d.ts +19 -0
  24. package/lib/model/redis-cluster.js +17 -0
  25. package/lib/model/redis-cluster.js.map +1 -1
  26. package/lib/request/convert-to-secondary-cluster-request.d.ts +49 -0
  27. package/lib/request/convert-to-secondary-cluster-request.js +15 -0
  28. package/lib/request/convert-to-secondary-cluster-request.js.map +1 -0
  29. package/lib/request/convert-to-standalone-cluster-request.d.ts +44 -0
  30. package/lib/request/convert-to-standalone-cluster-request.js +15 -0
  31. package/lib/request/convert-to-standalone-cluster-request.js.map +1 -0
  32. package/lib/request/index.d.ts +6 -0
  33. package/lib/request/index.js.map +1 -1
  34. package/lib/request/switchover-request.d.ts +44 -0
  35. package/lib/request/switchover-request.js +15 -0
  36. package/lib/request/switchover-request.js.map +1 -0
  37. package/lib/response/convert-to-secondary-cluster-response.d.ts +25 -0
  38. package/lib/response/convert-to-secondary-cluster-response.js +15 -0
  39. package/lib/response/convert-to-secondary-cluster-response.js.map +1 -0
  40. package/lib/response/convert-to-standalone-cluster-response.d.ts +25 -0
  41. package/lib/response/convert-to-standalone-cluster-response.js +15 -0
  42. package/lib/response/convert-to-standalone-cluster-response.js.map +1 -0
  43. package/lib/response/index.d.ts +6 -0
  44. package/lib/response/switchover-response.d.ts +25 -0
  45. package/lib/response/switchover-response.js +15 -0
  46. package/lib/response/switchover-response.js.map +1 -0
  47. package/package.json +2 -2
package/lib/client.d.ts CHANGED
@@ -765,6 +765,24 @@ export declare class RedisClusterClient {
765
765
  * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ChangeRedisClusterCompartment.ts.html |here} to see how to use ChangeRedisClusterCompartment API.
766
766
  */
767
767
  changeRedisClusterCompartment(changeRedisClusterCompartmentRequest: requests.ChangeRedisClusterCompartmentRequest): Promise<responses.ChangeRedisClusterCompartmentResponse>;
768
+ /**
769
+ * Converts an existing cluster into a secondary cluster by transforming it into a replica cache that replicates data from the specified primary cluster.
770
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
771
+ * @param ConvertToSecondaryClusterRequest
772
+ * @return ConvertToSecondaryClusterResponse
773
+ * @throws OciError when an error occurs
774
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ConvertToSecondaryCluster.ts.html |here} to see how to use ConvertToSecondaryCluster API.
775
+ */
776
+ convertToSecondaryCluster(convertToSecondaryClusterRequest: requests.ConvertToSecondaryClusterRequest): Promise<responses.ConvertToSecondaryClusterResponse>;
777
+ /**
778
+ * Converts a secondary cluster into a standalone cluster so that it operates as an independent cluster.
779
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
780
+ * @param ConvertToStandaloneClusterRequest
781
+ * @return ConvertToStandaloneClusterResponse
782
+ * @throws OciError when an error occurs
783
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ConvertToStandaloneCluster.ts.html |here} to see how to use ConvertToStandaloneCluster API.
784
+ */
785
+ convertToStandaloneCluster(convertToStandaloneClusterRequest: requests.ConvertToStandaloneClusterRequest): Promise<responses.ConvertToStandaloneClusterResponse>;
768
786
  /**
769
787
  * Creates a new OCI Cache cluster. A cluster is a memory-based storage solution.
770
788
  * You can optionally initialize the cluster data by restoring from an OCI Cache Backup (backupId) or by importing from Object Storage RDB file(s) (importFromObjectStorageDetails).
@@ -904,6 +922,15 @@ export declare class RedisClusterClient {
904
922
  * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ListWorkRequests.ts.html |here} to see how to use ListWorkRequests API.
905
923
  */
906
924
  listWorkRequests(listWorkRequestsRequest: requests.ListWorkRequestsRequest): Promise<responses.ListWorkRequestsResponse>;
925
+ /**
926
+ * Switchover the roles between a secondary cluster and its primary cluster, making the secondary cluster the new primary and the original primary its secondary.
927
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
928
+ * @param SwitchoverRequest
929
+ * @return SwitchoverResponse
930
+ * @throws OciError when an error occurs
931
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/Switchover.ts.html |here} to see how to use Switchover API.
932
+ */
933
+ switchover(switchoverRequest: requests.SwitchoverRequest): Promise<responses.SwitchoverResponse>;
907
934
  /**
908
935
  * Updates the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.oracle.com/iaas/Content/ocicache/home.htm).
909
936
  * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
package/lib/client.js CHANGED
@@ -2790,6 +2790,129 @@ class RedisClusterClient {
2790
2790
  }
2791
2791
  });
2792
2792
  }
2793
+ /**
2794
+ * Converts an existing cluster into a secondary cluster by transforming it into a replica cache that replicates data from the specified primary cluster.
2795
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
2796
+ * @param ConvertToSecondaryClusterRequest
2797
+ * @return ConvertToSecondaryClusterResponse
2798
+ * @throws OciError when an error occurs
2799
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ConvertToSecondaryCluster.ts.html |here} to see how to use ConvertToSecondaryCluster API.
2800
+ */
2801
+ convertToSecondaryCluster(convertToSecondaryClusterRequest) {
2802
+ return __awaiter(this, void 0, void 0, function* () {
2803
+ if (this.logger)
2804
+ this.logger.debug("Calling operation RedisClusterClient#convertToSecondaryCluster.");
2805
+ const operationName = "convertToSecondaryCluster";
2806
+ const apiReferenceLink = "";
2807
+ const pathParams = {
2808
+ "{redisClusterId}": convertToSecondaryClusterRequest.redisClusterId
2809
+ };
2810
+ const queryParams = {};
2811
+ let headerParams = {
2812
+ "Content-Type": common.Constants.APPLICATION_JSON,
2813
+ "if-match": convertToSecondaryClusterRequest.ifMatch,
2814
+ "opc-retry-token": convertToSecondaryClusterRequest.opcRetryToken,
2815
+ "opc-request-id": convertToSecondaryClusterRequest.opcRequestId
2816
+ };
2817
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
2818
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, convertToSecondaryClusterRequest.retryConfiguration, specRetryConfiguration);
2819
+ if (this.logger)
2820
+ retrier.logger = this.logger;
2821
+ const request = yield oci_common_2.composeRequest({
2822
+ baseEndpoint: this._endpoint,
2823
+ defaultHeaders: this._defaultHeaders,
2824
+ path: "/redisClusters/{redisClusterId}/actions/convertToSecondaryCluster",
2825
+ method: "POST",
2826
+ bodyContent: common.ObjectSerializer.serialize(convertToSecondaryClusterRequest.convertToSecondaryClusterDetails, "ConvertToSecondaryClusterDetails", model.ConvertToSecondaryClusterDetails.getJsonObj),
2827
+ pathParams: pathParams,
2828
+ headerParams: headerParams,
2829
+ queryParams: queryParams
2830
+ });
2831
+ try {
2832
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
2833
+ const sdkResponse = oci_common_2.composeResponse({
2834
+ responseObject: {},
2835
+ responseHeaders: [
2836
+ {
2837
+ value: response.headers.get("opc-work-request-id"),
2838
+ key: "opcWorkRequestId",
2839
+ dataType: "string"
2840
+ },
2841
+ {
2842
+ value: response.headers.get("opc-request-id"),
2843
+ key: "opcRequestId",
2844
+ dataType: "string"
2845
+ }
2846
+ ]
2847
+ });
2848
+ return sdkResponse;
2849
+ }
2850
+ catch (err) {
2851
+ throw err;
2852
+ }
2853
+ });
2854
+ }
2855
+ /**
2856
+ * Converts a secondary cluster into a standalone cluster so that it operates as an independent cluster.
2857
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
2858
+ * @param ConvertToStandaloneClusterRequest
2859
+ * @return ConvertToStandaloneClusterResponse
2860
+ * @throws OciError when an error occurs
2861
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ConvertToStandaloneCluster.ts.html |here} to see how to use ConvertToStandaloneCluster API.
2862
+ */
2863
+ convertToStandaloneCluster(convertToStandaloneClusterRequest) {
2864
+ return __awaiter(this, void 0, void 0, function* () {
2865
+ if (this.logger)
2866
+ this.logger.debug("Calling operation RedisClusterClient#convertToStandaloneCluster.");
2867
+ const operationName = "convertToStandaloneCluster";
2868
+ const apiReferenceLink = "";
2869
+ const pathParams = {
2870
+ "{redisClusterId}": convertToStandaloneClusterRequest.redisClusterId
2871
+ };
2872
+ const queryParams = {};
2873
+ let headerParams = {
2874
+ "Content-Type": common.Constants.APPLICATION_JSON,
2875
+ "if-match": convertToStandaloneClusterRequest.ifMatch,
2876
+ "opc-retry-token": convertToStandaloneClusterRequest.opcRetryToken,
2877
+ "opc-request-id": convertToStandaloneClusterRequest.opcRequestId
2878
+ };
2879
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
2880
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, convertToStandaloneClusterRequest.retryConfiguration, specRetryConfiguration);
2881
+ if (this.logger)
2882
+ retrier.logger = this.logger;
2883
+ const request = yield oci_common_2.composeRequest({
2884
+ baseEndpoint: this._endpoint,
2885
+ defaultHeaders: this._defaultHeaders,
2886
+ path: "/redisClusters/{redisClusterId}/actions/convertToStandaloneCluster",
2887
+ method: "POST",
2888
+ pathParams: pathParams,
2889
+ headerParams: headerParams,
2890
+ queryParams: queryParams
2891
+ });
2892
+ try {
2893
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
2894
+ const sdkResponse = oci_common_2.composeResponse({
2895
+ responseObject: {},
2896
+ responseHeaders: [
2897
+ {
2898
+ value: response.headers.get("opc-work-request-id"),
2899
+ key: "opcWorkRequestId",
2900
+ dataType: "string"
2901
+ },
2902
+ {
2903
+ value: response.headers.get("opc-request-id"),
2904
+ key: "opcRequestId",
2905
+ dataType: "string"
2906
+ }
2907
+ ]
2908
+ });
2909
+ return sdkResponse;
2910
+ }
2911
+ catch (err) {
2912
+ throw err;
2913
+ }
2914
+ });
2915
+ }
2793
2916
  /**
2794
2917
  * Creates a new OCI Cache cluster. A cluster is a memory-based storage solution.
2795
2918
  * You can optionally initialize the cluster data by restoring from an OCI Cache Backup (backupId) or by importing from Object Storage RDB file(s) (importFromObjectStorageDetails).
@@ -3574,6 +3697,67 @@ class RedisClusterClient {
3574
3697
  }
3575
3698
  });
3576
3699
  }
3700
+ /**
3701
+ * Switchover the roles between a secondary cluster and its primary cluster, making the secondary cluster the new primary and the original primary its secondary.
3702
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
3703
+ * @param SwitchoverRequest
3704
+ * @return SwitchoverResponse
3705
+ * @throws OciError when an error occurs
3706
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/Switchover.ts.html |here} to see how to use Switchover API.
3707
+ */
3708
+ switchover(switchoverRequest) {
3709
+ return __awaiter(this, void 0, void 0, function* () {
3710
+ if (this.logger)
3711
+ this.logger.debug("Calling operation RedisClusterClient#switchover.");
3712
+ const operationName = "switchover";
3713
+ const apiReferenceLink = "";
3714
+ const pathParams = {
3715
+ "{redisClusterId}": switchoverRequest.redisClusterId
3716
+ };
3717
+ const queryParams = {};
3718
+ let headerParams = {
3719
+ "Content-Type": common.Constants.APPLICATION_JSON,
3720
+ "if-match": switchoverRequest.ifMatch,
3721
+ "opc-retry-token": switchoverRequest.opcRetryToken,
3722
+ "opc-request-id": switchoverRequest.opcRequestId
3723
+ };
3724
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
3725
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, switchoverRequest.retryConfiguration, specRetryConfiguration);
3726
+ if (this.logger)
3727
+ retrier.logger = this.logger;
3728
+ const request = yield oci_common_2.composeRequest({
3729
+ baseEndpoint: this._endpoint,
3730
+ defaultHeaders: this._defaultHeaders,
3731
+ path: "/redisClusters/{redisClusterId}/actions/switchover",
3732
+ method: "POST",
3733
+ pathParams: pathParams,
3734
+ headerParams: headerParams,
3735
+ queryParams: queryParams
3736
+ });
3737
+ try {
3738
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
3739
+ const sdkResponse = oci_common_2.composeResponse({
3740
+ responseObject: {},
3741
+ responseHeaders: [
3742
+ {
3743
+ value: response.headers.get("opc-work-request-id"),
3744
+ key: "opcWorkRequestId",
3745
+ dataType: "string"
3746
+ },
3747
+ {
3748
+ value: response.headers.get("opc-request-id"),
3749
+ key: "opcRequestId",
3750
+ dataType: "string"
3751
+ }
3752
+ ]
3753
+ });
3754
+ return sdkResponse;
3755
+ }
3756
+ catch (err) {
3757
+ throw err;
3758
+ }
3759
+ });
3760
+ }
3577
3761
  /**
3578
3762
  * Updates the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.oracle.com/iaas/Content/ocicache/home.htm).
3579
3763
  * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.