Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: docs/source/elb_tut.rst

Issue 8386013: Merging in latest boto. (Closed) Base URL: svn://svn.chromium.org/boto
Patch Set: Redoing vendor drop by deleting and then merging. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « docs/source/autoscale_tut.rst ('k') | docs/source/index.rst » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/source/elb_tut.rst
diff --git a/docs/source/elb_tut.rst b/docs/source/elb_tut.rst
index b8735781f93eddec164d20e7131c75b9ff03b018..7440b08dde911e2e50da9993e9252eec3c48c674 100644
--- a/docs/source/elb_tut.rst
+++ b/docs/source/elb_tut.rst
@@ -54,14 +54,35 @@ A Note About Regions and Endpoints
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Like EC2 the ELB service has a different endpoint for each region. By default
the US endpoint is used. To choose a specific region, instantiate the
-ELBConnection object with that region's endpoint.
+ELBConnection object with that region's information.
->>> ec2 = boto.connect_elb(host='eu-west-1.elasticloadbalancing.amazonaws.com')
+>>> from boto.regioninfo import RegionInfo
+>>> reg = RegionInfo(name='eu-west-1', endpoint='elasticloadbalancing.eu-west-1.amazonaws.com')
+>>> elb = boto.connect_elb(region=reg)
+
+Another way to connect to an alternative region is like this:
+
+>>> import boto.ec2.elb
+>>> elb = boto.ec2.elb.connect_to_region('eu-west-1')
+
+Here's yet another way to discover what regions are available and then
+connect to one:
+
+>>> import boto.ec2.elb
+>>> regions = boto.ec2.elb.regions()
+>>> regions
+[RegionInfo:us-east-1,
+ RegionInfo:ap-northeast-1,
+ RegionInfo:us-west-1,
+ RegionInfo:ap-southeast-1,
+ RegionInfo:eu-west-1]
+>>> elb = regions[-1].connect()
Alternatively, edit your boto.cfg with the default ELB endpoint to use::
[Boto]
- elb_endpoint = eu-west-1.elasticloadbalancing.amazonaws.com
+ elb_region_name = eu-west-1
+ elb_region_endpoint = elasticloadbalancing.eu-west-1.amazonaws.com
Getting Existing Load Balancers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
« no previous file with comments | « docs/source/autoscale_tut.rst ('k') | docs/source/index.rst » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698