Skip to content

Commit 6672e2c

Browse files
cloudant-sdks-automationricellis
authored andcommitted
docs(generated): Gen 2 compatibility notes
Generated SDK source code using: - Generator version 3.114.4 - Specification version 1.0.0-dev0.1.39 - Automation (cloudant-sdks) version d586e4c
1 parent 72c3734 commit 6672e2c

2 files changed

Lines changed: 56 additions & 1 deletion

File tree

‎KNOWN_ISSUES.md‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,60 @@
22

33
## All Cloudant SDKs
44

5+
### Cloudant (Gen 2) Compatibility
6+
7+
Cloudant Gen 2 is compatible with IAM authentication only.
8+
The SDK authentication types `BASIC` and `COUCHDB_SESSION` do not work with Cloudant Gen 2 instances.
9+
10+
Instances of Cloudant Gen 2 do not provide some configuration and monitoring APIs that were available in Gen 1.
11+
12+
Migrating an application using this SDK from Cloudant Gen 1 to Cloudant Gen 2 requires either removing calls to these operations
13+
or replacing them with alternatives.
14+
15+
This table summarizes the SDK operations that are incompatible with Cloudant Gen 2 instances and the recommended replacement operations.
16+
17+
| Gen 1 operation | Summary | Gen 1 Endpoint | API docs link | Replacement operation for Gen 2 |
18+
|---|---|---|---|---|
19+
| **Authentication and authorization** | | | | |
20+
| `post_api_keys` | Generates API keys for apps or persons to enable database access | `POST /_api/v2/api_keys` | [API docs link](https://cloud.ibm.com/apidocs/cloudant/cloudant-gen1?code=python#postapikeys) | Use IAM authentication |
21+
| `put_cloudant_security_configuration` | Modify only Cloudant related database permissions | `PUT /_api/v2/db/{db}/_security` | [API docs link](https://cloud.ibm.com/apidocs/cloudant/cloudant-gen1?code=python#putcloudantsecurity) | Use [database level IAM policies](https://cloud.ibm.com/docs/cloudant-gen2?topic=cloudant-gen2-managing-access-for-cloudant#database-level-iam-policies) |
22+
| **Audit events configuration** | | | | |
23+
`get_activity_tracker_events` | Retrieve activity tracking events information | `GET /_api/v2/user/activity_tracker/events` | [API docs link](https://cloud.ibm.com/apidocs/cloudant/cloudant-gen1?code=python#getactivitytrackerevents) | `management` events are always enabled, `data` events are not currently available in Gen 2 |
24+
`post_activity_tracker_events` | Modify activity tracking events configuration | `POST /_api/v2/user/activity_tracker/events` | [API docs link](https://cloud.ibm.com/apidocs/cloudant/cloudant-gen1?code=python#postactivitytrackerevents) | `management` events are always enabled, `data` events are not currently available in Gen 2 |
25+
| **CORS configuration** | | | | |
26+
| `get_cors_information` | Retrieve CORS configuration information | `GET /_api/v2/user/config/cors` | [API docs link](https://cloud.ibm.com/apidocs/cloudant/cloudant-gen1?code=python#getcorsinformation) | Use the [Platform Services SDK](#using-the-platform-services-sdk)
27+
| `put_cors_configuration` | Modify CORS configuration | `PUT /_api/v2/user/config/cors` | [API docs link](https://cloud.ibm.com/apidocs/cloudant/cloudant-gen1?code=python#putcorsconfiguration) | Use the [Platform Services SDK](#using-the-platform-services-sdk)
28+
| **Capacity configuration** | | | | |
29+
| `get_capacity_databases_information` | Retrieve maximum allowed database count | `GET /_api/v2/user/capacity/databases` | [API docs link](https://cloud.ibm.com/apidocs/cloudant/cloudant-gen1?code=python#getcapacitydatabasesinformation) | Use the [Platform Services SDK](#using-the-platform-services-sdk)
30+
| `get_capacity_throughput_information` | Retrieve provisioned throughput capacity information | `GET /_api/v2/user/capacity/throughput` | [API docs link](https://cloud.ibm.com/apidocs/cloudant/cloudant-gen1?code=python#getcapacitythroughputinformation) | Use the [Platform Services SDK](#using-the-platform-services-sdk)
31+
| `put_capacity_throughput_configuration` | Update the target provisioned throughput capacity | `PUT /_api/v2/user/capacity/throughput` | [API docs link](https://cloud.ibm.com/apidocs/cloudant/cloudant-gen1?code=python#putcapacitythroughputconfiguration) | Use the [Platform Services SDK](#using-the-platform-services-sdk)
32+
| **Capacity monitoring** | | | | |
33+
| `get_current_databases_information` | Retrieve current database count | `GET /_api/v2/user/current/databases` | [API docs link](https://cloud.ibm.com/apidocs/cloudant/cloudant-gen1?code=python#getcurrentdatabasesinformation) | Use the length of the list returned from the `get_all_dbs` operation.
34+
| `get_current_throughput_information` | Retrieve the current provisioned throughput capacity consumption | `GET /_api/v2/user/current/throughput` | [API docs link](https://cloud.ibm.com/apidocs/cloudant/cloudant-gen1?code=python#getcurrentthroughputinformation) | Use a Prometheus instant query with IBM Cloud Monitoring APIs. For example to get the capacity consumption rate over the last minute use a query like `rate(ibm_cloudant_permitted_operations_total[1m])`. See the [IBM Cloud Monitoring docs for an example](https://cloud.ibm.com/docs/monitoring?topic=monitoring-metrics_api#metrics-api-sample-prom).
35+
36+
#### Using the Platform Services SDK
37+
38+
Use the [IBM Cloud Platform Services Python SDK](https://github.com/IBM/platform-services-python-sdk) Resource Controller APIs to programmatically configure your Cloudant Gen 2 instance.
39+
40+
Update the configuration values in the `parameters` mapping of key-value pairs.
41+
Read the current values from the `extensions` mapping of key-value pairs.
42+
43+
| Key path in `parameters` or `extensions` | Value description |
44+
| --- | --- |
45+
`dataservices.cloudant.capacity_units` | The provisioned throughput capacity of the instance in [units](https://cloud.ibm.com/docs/cloudant-gen2?topic=cloudant-gen2-usage-and-charges#provisioned-throughput-capacity-units)
46+
`dataservices.cloudant.configuration.cors` | The CORS configuration object of the instance with booleans for `enabled` and `allowCredentials` and a string array of `origins`
47+
`dataservices.cloudant.configuration.db_count_limit` | Read only value of the maximum number of databases allowed on the instance
48+
49+
##### Viewing configuration
50+
51+
Use [Get a resource instance](https://cloud.ibm.com/apidocs/resource-controller/resource-controller?code=python#get-resource-instance) to retrieve the resource instance configuration.
52+
53+
##### Modifying configuration
54+
55+
For a new instance use [Create (provision) a new resource instance](https://cloud.ibm.com/apidocs/resource-controller/resource-controller?code=python#create-resource-instance).
56+
For a pre-existing instance use [Update a resource instance](https://cloud.ibm.com/apidocs/resource-controller/resource-controller?code=python#update-resource-instance).
57+
58+
559
### Path elements containing the `+` character
660

761
Path elements containing the `+` character in the SDKs are not interoperable with:

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ project:
5959

6060
- Supported by IBM Cloudant.
6161
- Server compatibility with:
62-
- IBM Cloudant.
62+
- IBM Cloudant (Gen 1).
63+
- IBM Cloudant (Gen 2) - see [compatibility notes](https://github.com/IBM/cloudant-python-sdk/tree/v0.11.8/KNOWN_ISSUES.md#cloudant-gen-2-compatibility).
6364
- [Apache CouchDB 3.x](https://docs.couchdb.org/en/stable/) for data operations.
6465
- Includes all the most popular and latest supported endpoints for
6566
applications.

0 commit comments

Comments
 (0)