title: How to query AWS CloudSearch domain using Python boto3 library?
body: <p>I'm trying to use boto3 to query my CloudSearch domain using the docs as a guide: <a href="http://boto3.readthedocs.io/en/latest/reference/services/cloudsearchdomain.html#client" rel="nofollow noreferrer">http://boto3.readthedocs.io/en/latest/reference/services/cloudsearchdomain.html#client</a>  </p>
  
  <pre><code>import boto3
  import json
  
  boto3.setup_default_session(profile_name='myprofile')
  cloudsearch = boto3.client('cloudsearchdomain')
  
  response = cloudsearch.search(
      query="(and name:'foobar')",
      queryParser='structured',
      returnFields='address',
      size=10
  )
  print( json.dumps(response) )
  </code></pre>
  
  <p>...but it fails with:</p>
  
  <blockquote>
    <p>botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "<a href="https://cloudsearchdomain.eu-west-1.amazonaws.com/2013-01-01/search" rel="nofollow noreferrer">https://cloudsearchdomain.eu-west-1.amazonaws.com/2013-01-01/search</a>"</p>
  </blockquote>
  
  <p>But how am I supposed to set or configure the endpoint or domain that I want to connect to? I tried adding an <code>endpoint</code> parameter to the request, thinking maybe it was an accidental omission from the docs, but I got this error response:</p>
  
  <blockquote>
    <p>Unknown parameter in input: "endpoint", must be one of: cursor, expr, facet, filterQuery, highlight, partial, query, queryOptions, queryParser, return, size, sort, start, stats</p>
  </blockquote>
  
  <p>The docs say:</p>
  
  <blockquote>
    <p>The endpoint for submitting Search requests is domain-specific. You submit search requests to a domain's search endpoint. To get the search endpoint for your domain, use the Amazon CloudSearch configuration service DescribeDomains action. A domain's endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console.</p>
  </blockquote>
  
  <p>I know what my search endpoint is, but how do I supply it?</p>