You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/operate/rc/api/examples/manage-cloud-accounts.md
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,10 @@ description: Cloud accounts specify which account to use when creating and modif
9
9
infrastructure resources.
10
10
linkTitle: Manage cloud accounts
11
11
weight: 80
12
+
draft: true
12
13
---
14
+
<!-- This article is removed since it was duplicated with the REST API reference. I decided to keep it as a draft just in case. -->
15
+
13
16
You can use the Redis Cloud REST API to create and manage cloud accounts.
14
17
15
18
These examples use the [`cURL` utility]({{< relref "/operate/rc/api/get-started/use-rest-api#use-the-curl-http-client" >}}); you can use any REST client to work with the Redis Cloud REST API.
description: This article describes how to create and manage a subscription using
9
-
`cURL`commands.
8
+
description: Describes how to create and manage a subscription using the Redis Cloud API.
10
9
weight: 10
11
10
---
12
11
13
-
The Redis Cloud REST API lets you create and manage all kinds of subscriptions. The examples in this article refer to Redis Cloud Pro subscriptions.
12
+
The Redis Cloud REST API lets you create and manage all kinds of subscriptions.
14
13
15
-
## Create a subscription
14
+
## Redis Cloud Essentials
16
15
17
-
Use `POST /v1/subscriptions` to create a subscription.
16
+
### Create an Essentials subscription
17
+
18
+
Use [`POST /v1/fixed/subscriptions`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/createSubscription_1" >}}) to create an Essentials subscription.
18
19
19
20
```sh
20
-
POST "https://[host]/v1/subscriptions"
21
+
POST "https://[host]/v1/fixed/subscriptions"
21
22
{
22
-
"name": "Basic subscription example",
23
-
"paymentMethodId": <payment_id>,
24
-
"cloudProviders": [
25
-
{
26
-
"cloudAccountId": <account_id>,
27
-
"regions": [
28
-
{
29
-
"region": "us-east-1",
30
-
"networking": {
31
-
"deploymentCIDR": "10.0.0.0/24"
32
-
}
33
-
}
34
-
]
35
-
}
36
-
],
37
-
"databases": [
38
-
{
39
-
"name": "Redis-database-example",
40
-
"memoryLimitInGb": 1.1
41
-
}
42
-
]
23
+
"name": "My new subscription",
24
+
"planId": <plan_id>,
25
+
"paymentMethodId": <payment_id>
43
26
}
44
27
```
45
28
46
29
Modify the following parameters in the sample JSON document to create a subscription on your own account:
47
30
48
31
-**`paymentMethodId`** - Specify a payment method connected to your account.
49
32
50
-
Use `GET /payment-methods` to find a payment method ID.
51
-
52
-
You don't need to pass this field in your API request if you subscribed to Redis Cloud through Google Cloud Marketplace.
33
+
Use [`GET /v1/payment-methods`]({{< relref "/operate/rc/api/api-reference#tag/Account/operation/getAccountPaymentMethods" >}}) to find a payment method ID.
53
34
54
-
-**`cloudAccountId`** - Set a cloud account ID connected to your account.
35
+
You don't need to pass this field in your API request if you subscribed to Redis Cloud through a marketplace integration.
55
36
56
-
To list cloud account IDs, use `GET /cloud-accounts`. To use internal resources, set it to `"cloudAccountId": 1`.
37
+
-**`planId`** - Specify an essentials plan to create.
57
38
58
-
If you subscribed to Redis Cloud through Google Cloud Marketplace, use `1` for this field.
39
+
Use [`GET /v1/fixed/plans`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/getAllFixedSubscriptionsPlans" >}}) to get a list of plan IDs.
59
40
60
-
The request JSON body contains two primary segments: subscription specification and databases specification. When you create a subscription, you must specify one or more databases in the "`databases`" array.
41
+
After you create an Essentials subscription, you must use the [`POST /v1/fixed/subscriptions/{subscriptionId}/databases`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/createFixedDatabase" >}}) endpoint to create the database.
61
42
62
-
You can include the contents of the JSON document in the `POST /subscriptions` operation in the [Swagger UI](https://api.redislabs.com/v1/swagger-ui.html). See [Swagger user interface]({{< relref "/operate/rc/api/get-started/use-rest-api#swagger-user-interface" >}}) for more details.
43
+
You can include the contents of the JSON document in the `POST /v1/fixed/subscriptions` operation in the [Swagger UI](https://api.redislabs.com/v1/swagger-ui.html). See [Swagger user interface]({{< relref "/operate/rc/api/get-started/use-rest-api#swagger-user-interface" >}}) for more details.
63
44
64
45
{{< note >}}
65
46
The Swagger UI generates default JSON examples for `POST` and `PUT` operations. You can reference these examples and modify them to fit your specific needs and account settings. The examples will fail if used as-is.
66
47
{{< /note >}}
67
48
68
-
The response body contains the `taskId` for the task that creates the subscription. You can use `GET /v1/tasks/<taskId>` to track the task's status.
49
+
The response body contains the `taskId` for the task that creates the subscription. You can use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to track the task's status.
50
+
51
+
### Update an Essentials subscription
52
+
53
+
Use [`PUT /v1/fixed/subscriptions/{subscriptionId}`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/updateSubscription_1" >}}) to update an Essentials subscription.
54
+
55
+
```sh
56
+
PUT "https://[host]/v1/fixed/subscriptions/{subscriptionId}"
57
+
{
58
+
"name": "new-subscription-name",
59
+
"planId": <plan_id>,
60
+
"paymentMethodId": <payment_id>
61
+
}
62
+
```
63
+
64
+
You can only change the following settings with this endpoint:
65
+
-**`name`** - Specify a new name for your subscription.
66
+
67
+
-**`planId`** - Specify a new Essentials plan to change to.
68
+
69
+
Use [`GET /v1/fixed/plans`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/getAllFixedSubscriptionsPlans" >}}) to get a list of plan IDs.
70
+
71
+
You can only change to a plan that:
72
+
- Is in the same cloud provider and region of your current plan.
73
+
- Has a compatible [High-availability option]({{< relref "/operate/rc/databases/configuration/high-availability" >}}) to your current plan. For example, if your current plan has single-zone replication, you cannot switch to a plan with multi-zone replication, but you can switch to a plan with no replication. If your current plan has multi-zone replication, you must switch to a plan with multi-zone replication.
74
+
75
+
-**`paymentMethodId`** - Specify a different payment method connected to your account.
76
+
77
+
Use [`GET /v1/payment-methods`]({{< relref "/operate/rc/api/api-reference#tag/Account/operation/getAccountPaymentMethods" >}}) to find a payment method ID.
78
+
79
+
The response body contains the `taskId` for the task that updates the subscription. You can use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to track the task's status.
80
+
81
+
### Delete an Essentials subscription
82
+
83
+
Use [`DELETE /v1/fixed/subscriptions/{subscriptionId}`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/deleteSubscriptionById_1" >}}) to delete a subscription.
The response body contains the `taskId` for the task that deletes the subscription. You can use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to track the task's status.
89
+
90
+
## Redis Cloud Pro
91
+
92
+
### Create a Pro subscription
93
+
94
+
Use [`POST /v1/subscriptions`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Pro/operation/createSubscription" >}}) to create a Pro subscription.
95
+
96
+
```sh
97
+
POST "https://[host]/v1/subscriptions"
98
+
{
99
+
"name": "Basic Subscription Example",
100
+
"paymentMethodId": <payment_id>,
101
+
"cloudProviders": [
102
+
{
103
+
"provider": "AWS",
104
+
"regions": [
105
+
{
106
+
"region": "us-east-1",
107
+
"networking": {
108
+
"deploymentCIDR": "10.0.1.0/24"
109
+
}
110
+
}
111
+
]
112
+
}
113
+
],
114
+
"databases": [
115
+
{
116
+
"name": "Redis-database-example",
117
+
"protocol": "redis",
118
+
"datasetSizeInGb": 1
119
+
}
120
+
]
121
+
}
122
+
```
123
+
124
+
Modify the following parameters in the sample JSON document to create a subscription on your own account:
125
+
126
+
-**`paymentMethodId`** - Specify a payment method connected to your account.
127
+
128
+
Use [`GET /v1/payment-methods`]({{< relref "/operate/rc/api/api-reference#tag/Account/operation/getAccountPaymentMethods" >}}) to find a payment method ID.
129
+
130
+
You don't need to pass this field in your API request if you subscribed to Redis Cloud through a marketplace integration.
131
+
132
+
The request JSON body contains two primary segments: subscription specification and databases specification. When you create a subscription, you must specify one or more databases in the "`databases`" array.
133
+
134
+
There are many additional parameters and settings that can be defined on subscription and database creation. Review the subscription parameters and options in the [Full API documentation]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Pro/operation/createSubscription" >}}).
135
+
136
+
The response body contains the `taskId` for the task that creates the subscription. You can use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to track the task's status.
69
137
70
-
## Update a subscription
138
+
###Update a Pro subscription
71
139
72
-
Use `PUT /v1/subscriptions/<subscriptionId>`to update a subscription.
140
+
Use [`PUT /v1/subscriptions/{subscriptionId}`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Pro/operation/updateSubscription" >}}) to update a Pro subscription.
73
141
74
142
```sh
75
-
PUT "https://[host]/v1/subscriptions/<subscriptionId>"
143
+
PUT "https://[host]/v1/subscriptions/{subscriptionId}"
76
144
{
77
145
"name": "new-subscription-name",
78
146
"paymentMethodId": <payment_id>
@@ -84,15 +152,15 @@ You can only change the following settings with this endpoint:
84
152
85
153
-**`paymentMethodId`** - Specify a different payment method connected to your account.
86
154
87
-
Use `GET /payment-methods` to find a payment method ID.
155
+
Use [`GET /v1/payment-methods`]({{< relref "/operate/rc/api/api-reference#tag/Account/operation/getAccountPaymentMethods" >}}) to find a payment method ID.
88
156
89
-
The response body contains the `taskId` for the task that updates the subscription. You can use `GET /v1/tasks/<taskId>` to track the task's status.
157
+
The response body contains the `taskId` for the task that updates the subscription. You can use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to track the task's status.
90
158
91
-
## Delete a subscription
159
+
###Delete a Pro subscription
92
160
93
-
Use `DELETE /v1/subscriptions/<subscriptionId>` to delete a subscription.
161
+
Use [`DELETE /v1/subscriptions/{subscriptionId}`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Pro/operation/deleteSubscriptionById" >}}) to delete a subscription.
The response body contains the `taskId` for the task that deletes the subscription. You can use `GET /v1/tasks/<taskId>` to track the task's status.
166
+
The response body contains the `taskId` for the task that deletes the subscription. You can use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to track the task's status.
Copy file name to clipboardExpand all lines: content/operate/rc/api/examples/view-account-information.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,9 @@ categories:
7
7
- rc
8
8
description: Get initial information on account parameters
9
9
weight: 70
10
+
draft: true
10
11
---
12
+
<!-- This article is removed since it was duplicated with the REST API reference. I decided to keep it as a draft just in case. -->
11
13
12
14
The root API operation returns information about the current account, user, and API Key (as identified by the set of API Keys provided in the API request).
0 commit comments