anchor.diff:  [[connect-ec]]
   === Connecting to Elastic Cloud
   
  -https://www.elastic.co/guide/en/cloud/current/ec-getting-started.html[Elastic Cloud] is the easiest way to get started with Elasticsearch. When connecting to Elastic Cloud with the Python Elasticsearch client you should always use the `cloud_id` parameter to connect. You can find this value within the "Manage Deployment" page after you've created a cluster (look in the top-left if you're in Kibana).
  -
  -We recommend using a Cloud ID whenever possible because your client will be automatically configured for optimal use with Elastic Cloud including HTTPS and HTTP compression.
  +https://www.elastic.co/guide/en/cloud/current/ec-getting-started.html[Elastic Cloud] 
  +is the easiest way to get started with {es}. When connecting to Elastic Cloud 
  +with the Python {es} client you should always use the `cloud_id` 
  +parameter to connect. You can find this value within the "Manage Deployment" 
  +page after you've created a cluster (look in the top-left if you're in Kibana).
  +
  +We recommend using a Cloud ID whenever possible because your client will be 
  +automatically configured for optimal use with Elastic Cloud including HTTPS and 
  +HTTP compression.
   
   [source,python]
   ----
  
positive.code: 
  You can configure the client to use {es}'s API Key for connecting to your 
  cluster. Note that you need the values of `id` and `api_key` to
  [authenticate via an API Key](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html).
  
  [source,python]
  ----
  
negative.code: [[auth-basic]]
  ==== HTTP Basic authentication (Username and Password)
  
  HTTP Basic authentication uses the `basic_auth` parameter by passing in a 
  username and password within a tuple:
  
  [source,python]
  ----
  