Did I find the right examples for you? yes no

All Samples(22)  |  Call(22)  |  Derive(0)  |  Import(0)
:type aws_access_key_id: string
:param aws_access_key_id: Your AWS Access Key ID

:type aws_secret_access_key: string
:param aws_secret_access_key: Your AWS Secret Access Key

:rtype: :class:`boto.vpc.VPCConnection`
:return: A connection to VPC

        def connect_vpc(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):
    """
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.vpc.VPCConnection`
    :return: A connection to VPC
    """
    from boto.vpc import VPCConnection
    return VPCConnection(aws_access_key_id, aws_secret_access_key, **kwargs)
        


src/a/w/aws_vpc_py-HEAD/aws.py   aws_vpc_py(Download)
    ec2_conn = boto.ec2.connect_to_region(vpc_region, aws_access_key_id=access_key, aws_secret_access_key=secret_key)
    region = boto.ec2.get_region(vpc_region, aws_access_key_id=access_key, aws_secret_access_key=secret_key)
    vpc_conn = boto.connect_vpc(access_key, secret_key, region=region)
    return Connections(ec2_conn, vpc_conn, s3_conn)
 

src/c/o/configuration-HEAD/util/vpc-tools/vpcutil.py   configuration(Download)
def stack_name_for_vpc(vpc_name, aws_id, aws_secret):
    vpc = boto.connect_vpc(aws_id, aws_secret)
    resource = vpc.get_all_vpcs(vpc_ids=[vpc_name])[0]
    if CFN_TAG_KEY in resource.tags:
        return resource.tags[CFN_TAG_KEY]
def all_stack_names(region='us-east-1', aws_id=None, aws_secret=None):
    vpc_conn = boto.connect_vpc(aws_id, aws_secret)
    return [vpc.tags[CFN_TAG_KEY] for vpc in vpc_conn.get_all_vpcs()
            if CFN_TAG_KEY in vpc.tags.keys()]
 

src/c/o/configuration-HEAD/util/vpc-tools/vpc-tools.py   configuration(Download)
      raise Exception("No vpc_id or stack_name provided.")
 
    vpc = boto.connect_vpc()
 
    identity_file = args.get("<identity_file>", None)

src/m/o/moto-HEAD/tests/test_ec2/test_dhcp_options.py   moto(Download)
def test_dhcp_options_associate():
    """ associate dhcp option """
    conn = boto.connect_vpc('the_key', 'the_secret')
    dhcp_options = conn.create_dhcp_options(SAMPLE_DOMAIN_NAME, SAMPLE_NAME_SERVERS)
    vpc = conn.create_vpc("10.0.0.0/16")
def test_dhcp_options_associate_invalid_dhcp_id():
    """ associate dhcp option bad dhcp options id """
    conn = boto.connect_vpc('the_key', 'the_secret')
    vpc = conn.create_vpc("10.0.0.0/16")
 
def test_dhcp_options_associate_invalid_vpc_id():
    """ associate dhcp option invalid vpc id """
    conn = boto.connect_vpc('the_key', 'the_secret')
    dhcp_options = conn.create_dhcp_options(SAMPLE_DOMAIN_NAME, SAMPLE_NAME_SERVERS)
 
def test_dhcp_options_delete_with_vpc():
    """Test deletion of dhcp options with vpc"""
    conn = boto.connect_vpc('the_key', 'the_secret')
    dhcp_options = conn.create_dhcp_options(SAMPLE_DOMAIN_NAME, SAMPLE_NAME_SERVERS)
    dhcp_options_id = dhcp_options.id
def test_create_dhcp_options():
    """Create most basic dhcp option"""
    conn = boto.connect_vpc('the_key', 'the_secret')
 
    dhcp_option = conn.create_dhcp_options(SAMPLE_DOMAIN_NAME, SAMPLE_NAME_SERVERS)

src/m/o/moto-HEAD/tests/test_ec2/test_amis.py   moto(Download)
def test_ami_tagging():
    conn = boto.connect_vpc('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd')
    instance = reservation.instances[0]
    conn.create_image(instance.id, "test-ami", "this is a test ami")

src/m/o/moto-HEAD/tests/test_ec2/test_vpcs.py   moto(Download)
def test_vpcs():
    conn = boto.connect_vpc('the_key', 'the_secret')
    vpc = conn.create_vpc("10.0.0.0/16")
    vpc.cidr_block.should.equal('10.0.0.0/16')
 
def test_vpc_tagging():
    conn = boto.connect_vpc()
    vpc = conn.create_vpc("10.0.0.0/16")
 
    vpc.add_tag("a key", "some value")

src/m/o/moto-HEAD/tests/test_ec2/test_subnets.py   moto(Download)
def test_subnets():
    conn = boto.connect_vpc('the_key', 'the_secret')
    vpc = conn.create_vpc("10.0.0.0/16")
    subnet = conn.create_subnet(vpc.id, "10.0.0.0/18")
 
def test_subnet_tagging():
    conn = boto.connect_vpc('the_key', 'the_secret')
    vpc = conn.create_vpc("10.0.0.0/16")
    subnet = conn.create_subnet(vpc.id, "10.0.0.0/18")
 

src/m/o/moto-HEAD/tests/test_cloudformation/test_cloudformation_stack_integration.py   moto(Download)
    )
 
    vpc_conn = boto.connect_vpc()
    vpc = vpc_conn.get_all_vpcs()[0]
    vpc.cidr_block.should.equal("10.0.0.0/16")

src/b/o/boto-2.27.0/tests/integration/ec2/vpc/test_connection.py   boto(Download)
        self.post_terminate_cleanups = []
 
        self.api = boto.connect_vpc()
        self.vpc = self.api.create_vpc('10.0.0.0/16')