€cdocutils.nodes document q)q}q(U nametypesq}q(X to accept vpc peering connectionqNXto create a subnetqNXvpc_tutqˆX2releasing an elastic ip attached to a vpc instanceq NXto create a vpcq NXto get all vpn connectionsq NX to create vpc peering connectionq NX attaching a vpn gateway to a vpcq NXcreating a vpc connectionqNX to reject vpc peering connectionqNX-associating an elastic ip with a vpc instanceqNX'an introduction to boto's vpc interfaceqNXto create a customer gatewayqNXto create a vpn gatewayqNuUsubstitution_defsq}qUparse_messagesq]qUcurrent_sourceqNU decorationqNUautofootnote_startqKUnameidsq}q(hU to-accept-vpc-peering-connectionqhUto-create-a-subnetqhUvpc-tutqh U2releasing-an-elastic-ip-attached-to-a-vpc-instanceq h Uto-create-a-vpcq!h Uto-get-all-vpn-connectionsq"h U to-create-vpc-peering-connectionq#h U attaching-a-vpn-gateway-to-a-vpcq$hUcreating-a-vpc-connectionq%hU to-reject-vpc-peering-connectionq&hU-associating-an-elastic-ip-with-a-vpc-instanceq'hU'an-introduction-to-boto-s-vpc-interfaceq(hUto-create-a-customer-gatewayq)hUto-create-a-vpn-gatewayq*uUchildrenq+]q,(cdocutils.nodes target q-)q.}q/(U rawsourceq0X .. _vpc_tut:Uparentq1hUsourceq2X=/Users/kyleknap/Documents/GitHub/boto/docs/source/vpc_tut.rstq3Utagnameq4Utargetq5U attributesq6}q7(Uidsq8]Ubackrefsq9]Udupnamesq:]Uclassesq;]Unamesq<]Urefidq=huUlineq>KUdocumentq?hh+]ubcdocutils.nodes section q@)qA}qB(h0Uh1hh2h3Uexpect_referenced_by_nameqC}qDhh.sh4UsectionqEh6}qF(h:]h;]h9]h8]qG(h(heh<]qH(hheuh>Kh?hUexpect_referenced_by_idqI}qJhh.sh+]qK(cdocutils.nodes title qL)qM}qN(h0X'An Introduction to boto's VPC interfaceqOh1hAh2h3h4UtitleqPh6}qQ(h:]h;]h9]h8]h<]uh>Kh?hh+]qRcdocutils.nodes Text qSX'An Introduction to boto's VPC interfaceqT…qU}qV(h0hOh1hMubaubcdocutils.nodes paragraph qW)qX}qY(h0X This tutorial is based on the examples in the Amazon Virtual Private Cloud Getting Started Guide (http://docs.amazonwebservices.com/AmazonVPC/latest/GettingStartedGuide/). In each example, it tries to show the boto request that correspond to the AWS command line tools.h1hAh2h3h4U paragraphqZh6}q[(h:]h;]h9]h8]h<]uh>Kh?hh+]q\(hSXbThis tutorial is based on the examples in the Amazon Virtual Private Cloud Getting Started Guide (q]…q^}q_(h0XbThis tutorial is based on the examples in the Amazon Virtual Private Cloud Getting Started Guide (h1hXubcdocutils.nodes reference q`)qa}qb(h0XGhttp://docs.amazonwebservices.com/AmazonVPC/latest/GettingStartedGuide/qch6}qd(Urefurihch8]h9]h:]h;]h<]uh1hXh+]qehSXGhttp://docs.amazonwebservices.com/AmazonVPC/latest/GettingStartedGuide/qf…qg}qh(h0Uh1haubah4U referenceqiubhSXd). In each example, it tries to show the boto request that correspond to the AWS command line tools.qj…qk}ql(h0Xd). In each example, it tries to show the boto request that correspond to the AWS command line tools.h1hXubeubh@)qm}qn(h0Uh1hAh2h3h4hEh6}qo(h:]h;]h9]h8]qph%ah<]qqhauh>K h?hh+]qr(hL)qs}qt(h0XCreating a VPC connectionquh1hmh2h3h4hPh6}qv(h:]h;]h9]h8]h<]uh>K h?hh+]qwhSXCreating a VPC connectionqx…qy}qz(h0huh1hsubaubhW)q{}q|(h0X.First, we need to create a new VPC connection:q}h1hmh2h3h4hZh6}q~(h:]h;]h9]h8]h<]uh>Kh?hh+]qhSX.First, we need to create a new VPC connection:q€…q}q‚(h0h}h1h{ubaubcdocutils.nodes doctest_block qƒ)q„}q…(h0X>>>> from boto.vpc import VPCConnection >>> c = VPCConnection()h1hmh2h3h4U doctest_blockq†h6}q‡(U xml:spaceqˆUpreserveq‰h8]h9]h:]h;]h<]uh>Kh?hh+]qŠhSX>>>> from boto.vpc import VPCConnection >>> c = VPCConnection()q‹…qŒ}q(h0Uh1h„ubaubeubh@)qŽ}q(h0Uh1hAh2h3h4hEh6}q(h:]h;]h9]h8]q‘h!ah<]q’h auh>Kh?hh+]q“(hL)q”}q•(h0XTo create a VPCq–h1hŽh2h3h4hPh6}q—(h:]h;]h9]h8]h<]uh>Kh?hh+]q˜hSXTo create a VPCq™…qš}q›(h0h–h1h”ubaubhW)qœ}q(h0X?Now that we have a VPC connection, we can create our first VPC.qžh1hŽh2h3h4hZh6}qŸ(h:]h;]h9]h8]h<]uh>Kh?hh+]q hSX?Now that we have a VPC connection, we can create our first VPC.q¡…q¢}q£(h0hžh1hœubaubhƒ)q¤}q¥(h0X»>>> vpc = c.create_vpc('10.0.0.0/24') >>> vpc VPC:vpc-6b1fe402 >>> vpc.id u'vpc-6b1fe402' >>> vpc.state u'pending' >>> vpc.cidr_block u'10.0.0.0/24' >>> vpc.dhcp_options_id u'default' >>>h1hŽh2h3h4h†h6}q¦(hˆh‰h8]h9]h:]h;]h<]uh>K"h?hh+]q§hSX»>>> vpc = c.create_vpc('10.0.0.0/24') >>> vpc VPC:vpc-6b1fe402 >>> vpc.id u'vpc-6b1fe402' >>> vpc.state u'pending' >>> vpc.cidr_block u'10.0.0.0/24' >>> vpc.dhcp_options_id u'default' >>>q¨…q©}qª(h0Uh1h¤ubaubeubh@)q«}q¬(h0Uh1hAh2h3h4hEh6}q­(h:]h;]h9]h8]q®hah<]q¯hauh>K%h?hh+]q°(hL)q±}q²(h0XTo create a subnetq³h1h«h2h3h4hPh6}q´(h:]h;]h9]h8]h<]uh>K%h?hh+]qµhSXTo create a subnetq¶…q·}q¸(h0h³h1h±ubaubhW)q¹}qº(h0X?The next step is to create a subnet to associate with your VPC.q»h1h«h2h3h4hZh6}q¼(h:]h;]h9]h8]h<]uh>K&h?hh+]q½hSX?The next step is to create a subnet to associate with your VPC.q¾…q¿}qÀ(h0h»h1h¹ubaubhƒ)qÁ}qÂ(h0Xî>>> subnet = c.create_subnet(vpc.id, '10.0.0.0/25') >>> subnet.id u'subnet-6a1fe403' >>> subnet.state u'pending' >>> subnet.cidr_block u'10.0.0.0/25' >>> subnet.available_ip_address_count 123 >>> subnet.availability_zone u'us-east-1b' >>>h1h«h2h3h4h†h6}qÃ(hˆh‰h8]h9]h:]h;]h<]uh>K3h?hh+]qÄhSXî>>> subnet = c.create_subnet(vpc.id, '10.0.0.0/25') >>> subnet.id u'subnet-6a1fe403' >>> subnet.state u'pending' >>> subnet.cidr_block u'10.0.0.0/25' >>> subnet.available_ip_address_count 123 >>> subnet.availability_zone u'us-east-1b' >>>qÅ…qÆ}qÇ(h0Uh1hÁubaubeubh@)qÈ}qÉ(h0Uh1hAh2h3h4hEh6}qÊ(h:]h;]h9]h8]qËh)ah<]qÌhauh>K6h?hh+]qÍ(hL)qÎ}qÏ(h0XTo create a customer gatewayqÐh1hÈh2h3h4hPh6}qÑ(h:]h;]h9]h8]h<]uh>K6h?hh+]qÒhSXTo create a customer gatewayqÓ…qÔ}qÕ(h0hÐh1hÎubaubhW)qÖ}q×(h0X#Next, we create a customer gateway.qØh1hÈh2h3h4hZh6}qÙ(h:]h;]h9]h8]h<]uh>K7h?hh+]qÚhSX#Next, we create a customer gateway.qÛ…qÜ}qÝ(h0hØh1hÖubaubhƒ)qÞ}qß(h0XÅ>>> cg = c.create_customer_gateway('ipsec.1', '12.1.2.3', 65534) >>> cg.id u'cgw-b6a247df' >>> cg.type u'ipsec.1' >>> cg.state u'available' >>> cg.ip_address u'12.1.2.3' >>> cg.bgp_asn u'65534' >>>h1hÈh2h3h4h†h6}qà(hˆh‰h8]h9]h:]h;]h<]uh>KDh?hh+]qáhSXÅ>>> cg = c.create_customer_gateway('ipsec.1', '12.1.2.3', 65534) >>> cg.id u'cgw-b6a247df' >>> cg.type u'ipsec.1' >>> cg.state u'available' >>> cg.ip_address u'12.1.2.3' >>> cg.bgp_asn u'65534' >>>qâ…qã}qä(h0Uh1hÞubaubeubh@)qå}qæ(h0Uh1hAh2h3h4hEh6}qç(h:]h;]h9]h8]qèh*ah<]qéhauh>KGh?hh+]qê(hL)që}qì(h0XTo create a VPN gatewayqíh1håh2h3h4hPh6}qî(h:]h;]h9]h8]h<]uh>KGh?hh+]qïhSXTo create a VPN gatewayqð…qñ}qò(h0híh1hëubaubhƒ)qó}qô(h0Xœ>>> vg = c.create_vpn_gateway('ipsec.1') >>> vg.id u'vgw-44ad482d' >>> vg.type u'ipsec.1' >>> vg.state u'pending' >>> vg.availability_zone u'us-east-1b' >>>h1håh2h3h4h†h6}qõ(hˆh‰h8]h9]h:]h;]h<]uh>KRh?hh+]qöhSXœ>>> vg = c.create_vpn_gateway('ipsec.1') >>> vg.id u'vgw-44ad482d' >>> vg.type u'ipsec.1' >>> vg.state u'pending' >>> vg.availability_zone u'us-east-1b' >>>q÷…qø}qù(h0Uh1hóubaubeubh@)qú}qû(h0Uh1hAh2h3h4hEh6}qü(h:]h;]h9]h8]qýh$ah<]qþh auh>KUh?hh+]qÿ(hL)r}r(h0X Attaching a VPN Gateway to a VPCrh1húh2h3h4hPh6}r(h:]h;]h9]h8]h<]uh>KUh?hh+]rhSX Attaching a VPN Gateway to a VPCr…r}r(h0jh1jubaubhƒ)r}r (h0X>>> vg.attach(vpc.id) >>>h1húh2h3h4h†h6}r (hˆh‰h8]h9]h:]h;]h<]uh>KXh?hh+]r hSX>>> vg.attach(vpc.id) >>>r …r }r(h0Uh1jubaubeubh@)r}r(h0Uh1hAh2h3h4hEh6}r(h:]h;]h9]h8]rh'ah<]rhauh>K[h?hh+]r(hL)r}r(h0X-Associating an Elastic IP with a VPC Instancerh1jh2h3h4hPh6}r(h:]h;]h9]h8]h<]uh>K[h?hh+]rhSX-Associating an Elastic IP with a VPC Instancer…r}r(h0jh1jubaubhƒ)r}r(h0XQ>>> ec2.connection.associate_address('i-71b2f60b', None, 'eipalloc-35cf685d') >>>h1jh2h3h4h†h6}r(hˆh‰h8]h9]h:]h;]h<]uh>K^h?hh+]r hSXQ>>> ec2.connection.associate_address('i-71b2f60b', None, 'eipalloc-35cf685d') >>>r!…r"}r#(h0Uh1jubaubeubh@)r$}r%(h0Uh1hAh2h3h4hEh6}r&(h:]h;]h9]h8]r'h ah<]r(h auh>Kah?hh+]r)(hL)r*}r+(h0X2Releasing an Elastic IP Attached to a VPC Instancer,h1j$h2h3h4hPh6}r-(h:]h;]h9]h8]h<]uh>Kah?hh+]r.hSX2Releasing an Elastic IP Attached to a VPC Instancer/…r0}r1(h0j,h1j*ubaubhƒ)r2}r3(h0XA>>> ec2.connection.release_address(None, 'eipalloc-35cf685d') >>>h1j$h2h3h4h†h6}r4(hˆh‰h8]h9]h:]h;]h<]uh>Kdh?hh+]r5hSXA>>> ec2.connection.release_address(None, 'eipalloc-35cf685d') >>>r6…r7}r8(h0Uh1j2ubaubeubh@)r9}r:(h0Uh1hAh2h3h4hEh6}r;(h:]h;]h9]h8]r<h"ah<]r=h auh>Kgh?hh+]r>(hL)r?}r@(h0XTo Get All VPN ConnectionsrAh1j9h2h3h4hPh6}rB(h:]h;]h9]h8]h<]uh>Kgh?hh+]rChSXTo Get All VPN ConnectionsrD…rE}rF(h0jAh1j?ubaubhƒ)rG}rH(h0X¢>>> vpns = c.get_all_vpn_connections() >>> vpns[0].id u'vpn-12ef67bv' >>> tunnels = vpns[0].tunnels >>> tunnels [VpnTunnel: 177.12.34.56, VpnTunnel: 177.12.34.57]h1j9h2h3h4h†h6}rI(hˆh‰h8]h9]h:]h;]h<]uh>Kmh?hh+]rJhSX¢>>> vpns = c.get_all_vpn_connections() >>> vpns[0].id u'vpn-12ef67bv' >>> tunnels = vpns[0].tunnels >>> tunnels [VpnTunnel: 177.12.34.56, VpnTunnel: 177.12.34.57]rK…rL}rM(h0Uh1jGubaubeubh@)rN}rO(h0Uh1hAh2h3h4hEh6}rP(h:]h;]h9]h8]rQh#ah<]rRh auh>Kqh?hh+]rS(hL)rT}rU(h0X To Create VPC Peering ConnectionrVh1jNh2h3h4hPh6}rW(h:]h;]h9]h8]h<]uh>Kqh?hh+]rXhSX To Create VPC Peering ConnectionrY…rZ}r[(h0jVh1jTubaubhƒ)r\}r](h0X­>>> vpcs = c.get_all_vpcs() >>> vpc_peering_connection = c.create_vpc_peering_connection(vpcs[0].id, vpcs[1].id) >>> vpc_peering_connection VpcPeeringConnection:pcx-18987471h1jNh2h3h4h†h6}r^(hˆh‰h8]h9]h:]h;]h<]uh>Kuh?hh+]r_hSX­>>> vpcs = c.get_all_vpcs() >>> vpc_peering_connection = c.create_vpc_peering_connection(vpcs[0].id, vpcs[1].id) >>> vpc_peering_connection VpcPeeringConnection:pcx-18987471r`…ra}rb(h0Uh1j\ubaubeubh@)rc}rd(h0Uh1hAh2h3h4hEh6}re(h:]h;]h9]h8]rfhah<]rghauh>Kxh?hh+]rh(hL)ri}rj(h0X To Accept VPC Peering Connectionrkh1jch2h3h4hPh6}rl(h:]h;]h9]h8]h<]uh>Kxh?hh+]rmhSX To Accept VPC Peering Connectionrn…ro}rp(h0jkh1jiubaubhƒ)rq}rr(h0X<>>> vpc_peering_connections = c.get_all_vpc_peering_connections() >>> vpc_peering_connection = vpc_peering_connections[0] >>> vpc_peering_connection.status_code u'pending-acceptance' >>> vpc_peering_connection = c.accept_vpc_peering_connection(vpc_peering_connection.id) >>> vpc_peering_connection.update() u'active'h1jch2h3h4h†h6}rs(hˆh‰h8]h9]h:]h;]h<]uh>Kh?hh+]rthSX<>>> vpc_peering_connections = c.get_all_vpc_peering_connections() >>> vpc_peering_connection = vpc_peering_connections[0] >>> vpc_peering_connection.status_code u'pending-acceptance' >>> vpc_peering_connection = c.accept_vpc_peering_connection(vpc_peering_connection.id) >>> vpc_peering_connection.update() u'active'ru…rv}rw(h0Uh1jqubaubeubh@)rx}ry(h0Uh1hAh2h3h4hEh6}rz(h:]h;]h9]h8]r{h&ah<]r|hauh>K‚h?hh+]r}(hL)r~}r(h0X To Reject VPC Peering Connectionr€h1jxh2h3h4hPh6}r(h:]h;]h9]h8]h<]uh>K‚h?hh+]r‚hSX To Reject VPC Peering Connectionrƒ…r„}r…(h0j€h1j~ubaubhƒ)r†}r‡(h0X$>>> vpc_peering_connections = c.get_all_vpc_peering_connections() >>> vpc_peering_connection = vpc_peering_connections[0] >>> vpc_peering_connection.status_code u'pending-acceptance >>> c.reject_vpc_peering_connection(vpc_peering_connection.id) >>> vpc_peering_connection.update() u'rejected'h1jxh2h3h4h†h6}rˆ(hˆh‰h8]h9]h:]h;]h<]uh>K‰h?hh+]r‰hSX$>>> vpc_peering_connections = c.get_all_vpc_peering_connections() >>> vpc_peering_connection = vpc_peering_connections[0] >>> vpc_peering_connection.status_code u'pending-acceptance >>> c.reject_vpc_peering_connection(vpc_peering_connection.id) >>> vpc_peering_connection.update() u'rejected'rŠ…r‹}rŒ(h0Uh1j†ubaubeubeubeh0UU transformerrNU footnote_refsrŽ}rUrefnamesr}r‘Usymbol_footnotesr’]r“Uautofootnote_refsr”]r•Usymbol_footnote_refsr–]r—U citationsr˜]r™h?hU current_lineršNUtransform_messagesr›]rœcdocutils.nodes system_message r)rž}rŸ(h0Uh6}r (h:]UlevelKh8]h9]Usourceh3h;]h<]UlineKUtypeUINFOr¡uh+]r¢hW)r£}r¤(h0Uh6}r¥(h:]h;]h9]h8]h<]uh1jžh+]r¦hSX-Hyperlink target "vpc-tut" is not referenced.r§…r¨}r©(h0Uh1j£ubah4hZubah4Usystem_messagerªubaUreporterr«NUid_startr¬KU autofootnotesr­]r®U citation_refsr¯}r°Uindirect_targetsr±]r²Usettingsr³(cdocutils.frontend Values r´orµ}r¶(Ufootnote_backlinksr·KUrecord_dependenciesr¸NU rfc_base_urlr¹Uhttp://tools.ietf.org/html/rºU tracebackr»ˆUpep_referencesr¼NUstrip_commentsr½NU toc_backlinksr¾Uentryr¿U language_coderÀUenrÁU datestamprÂNU report_levelrÃKU _destinationrÄNU halt_levelrÅKU strip_classesrÆNhPNUerror_encoding_error_handlerrÇUbackslashreplacerÈUdebugrÉNUembed_stylesheetrʉUoutput_encoding_error_handlerrËUstrictrÌU sectnum_xformrÍKUdump_transformsrÎNU docinfo_xformrÏKUwarning_streamrÐNUpep_file_url_templaterÑUpep-%04drÒUexit_status_levelrÓKUconfigrÔNUstrict_visitorrÕNUcloak_email_addressesrÖˆUtrim_footnote_reference_spacer׉UenvrØNUdump_pseudo_xmlrÙNUexpose_internalsrÚNUsectsubtitle_xformrÛ‰U source_linkrÜNUrfc_referencesrÝNUoutput_encodingrÞUutf-8rßU source_urlràNUinput_encodingráU utf-8-sigrâU_disable_configrãNU id_prefixräUU tab_widthråKUerror_encodingræUUTF-8rçU_sourcerèh3Ugettext_compactréˆU generatorrêNUdump_internalsrëNU smart_quotesrì‰U pep_base_urlríUhttp://www.python.org/dev/peps/rîUsyntax_highlightrïUlongrðUinput_encoding_error_handlerrñjÌUauto_id_prefixròUidróUdoctitle_xformrô‰Ustrip_elements_with_classesrõNU _config_filesrö]Ufile_insertion_enabledr÷ˆU raw_enabledrøKU dump_settingsrùNubUsymbol_footnote_startrúKUidsrû}rü(h#jNh"j9hjch!hŽhhAh$húh'jh*håh&jxh)hÈh j$h(hAhh«h%hmuUsubstitution_namesrý}rþh4h?h6}rÿ(h:]h8]h9]Usourceh3h;]h<]uU footnotesr]rUrefidsr}rh]rh.asub.