diff --git a/docs/index.rst b/docs/index.rst index a928dce0f8..f4abf44320 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -53,9 +53,6 @@ Contents :doc:`scylla-cloud` Connect to ScyllaDB Cloud -:doc:`scylla-cloud-serverless` - Connect to ScyllaDB Cloud Serverless - :doc:`faq` A collection of Frequently Asked Questions @@ -79,7 +76,6 @@ Contents object-mapper dates-and-times scylla-cloud - scylla-cloud-serverless faq Getting Help diff --git a/docs/scylla-cloud-serverless.rst b/docs/scylla-cloud-serverless.rst deleted file mode 100644 index 4e0bafd1b8..0000000000 --- a/docs/scylla-cloud-serverless.rst +++ /dev/null @@ -1,49 +0,0 @@ -ScyllaDB Cloud Serverless -------------------------- - -With ScyllaDB Cloud, you can deploy `serverless databases `_. -The Python driver allows you to connect to a serverless database by utilizing the connection bundle you can download via the **Connect>Python** tab in the Cloud application. -The connection bundle is a YAML file with connection and credential information for your cluster. - -Connecting to a ScyllaDB Cloud serverless database is very similar to a standard connection to a ScyllaDB database. - -Here’s a short program that connects to a ScyllaDB Cloud serverless database and prints metadata about the cluster: - -.. code-block:: python - - from cassandra.cluster import Cluster, ExecutionProfile, EXEC_PROFILE_DEFAULT - from cassandra.policies import DCAwareRoundRobinPolicy, TokenAwarePolicy - - PATH_TO_BUNDLE_YAML = '/file/downloaded/from/cloud/connect-bundle.yaml' - - - def get_cluster(): - profile = ExecutionProfile( - load_balancing_policy=TokenAwarePolicy( - DCAwareRoundRobinPolicy(local_dc='us-east-1') - ) - ) - - return Cluster( - execution_profiles={EXEC_PROFILE_DEFAULT: profile}, - scylla_cloud=PATH_TO_BUNDLE_YAML, - ) - - - print('Connecting to cluster') - cluster = get_cluster() - session = cluster.connect() - - print('Connected to cluster', cluster.metadata.cluster_name) - - print('Getting metadata') - for host in cluster.metadata.all_hosts(): - print('Datacenter: {}; Host: {}; Rack: {}'.format( - host.datacenter, host.address, host.rack) - ) - - cluster.shutdown() - -By providing the ``scylla_cloud`` parameter to the :class:`~.Cluster` constructor, -the driver can set up the connection based on the endpoint and credential information -stored in your downloaded ScyllaDB Cloud Serverless connection bundle. \ No newline at end of file