You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: AWS::EC2::VPCPeeringConnection

Inherits:
Resource
  • Object
show all
Includes:
TaggedItem
Defined in:
lib/aws/ec2/vpc_peering_connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from TaggedItem

#add_tag, #clear_tags, #tags

Instance Attribute Details

#vpc_peering_connection_idObject (readonly) Also known as: id

Returns the value of attribute vpc_peering_connection_id



25
26
27
# File 'lib/aws/ec2/vpc_peering_connection.rb', line 25

def vpc_peering_connection_id
  @vpc_peering_connection_id
end

Instance Method Details

#acceptObject

Accept a requested VPC peering connection



30
31
32
33
34
# File 'lib/aws/ec2/vpc_peering_connection.rb', line 30

def accept
  client_opts = {}
  client_opts[:vpc_peering_connection_id] = vpc_peering_connection_id
  resp = client.accept_vpc_peering_connection(client_opts)
end

#deletenil

Deletes this VPC peering connection.

Returns:

  • (nil)


38
39
40
41
42
43
# File 'lib/aws/ec2/vpc_peering_connection.rb', line 38

def delete
  client_opts = {}
  client_opts[:vpc_peering_connection_id] = vpc_peering_connection_id
  client.delete_vpc_peering_connection(client_opts)
  nil
end