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

Class: Aws::EC2::VpcPeeringConnection

Inherits:
Resources::Resource show all
Defined in:
(unknown)

Instance Attribute Summary collapse

Attributes inherited from Resources::Resource

#client, #identifiers

Instance Method Summary collapse

Methods inherited from Resources::Resource

add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until

Methods included from Resources::OperationMethods

#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations

Constructor Details

#initialize(id, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(id, options = {}) ⇒ Object

    Parameters:

    • id (String)

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :id (required, String)
    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

Instance Attribute Details

#accepter_vpc_infoTypes::VpcPeeringConnectionVpcInfo (readonly)

Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

Returns:

#expiration_timeTime (readonly)

The time that an unaccepted VPC peering connection will expire.

Returns:

  • (Time)

    The time that an unaccepted VPC peering connection will expire.

#idString (readonly)

Returns:

  • (String)

#requester_vpc_infoTypes::VpcPeeringConnectionVpcInfo (readonly)

Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

Returns:

#statusTypes::VpcPeeringConnectionStateReason (readonly)

The status of the VPC peering connection.

Returns:

#tagsArray<Types::Tag> (readonly)

Any tags assigned to the resource.

Returns:

  • (Array<Types::Tag>)

    Any tags assigned to the resource.

#vpc_peering_connection_idString (readonly)

The ID of the VPC peering connection.

Returns:

  • (String)

    The ID of the VPC peering connection.

Instance Method Details

#accept(options = {}) ⇒ Types::AcceptVpcPeeringConnectionResult

Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the pending-acceptance state, and you must be the owner of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding VPC peering connection requests.

For an inter-region VPC peering connection request, you must accept the VPC peering connection in the region of the accepter VPC.

Examples:

Request syntax example with placeholder values


vpcpeeringconnection.accept({
  dry_run: false,
})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Returns:

See Also:

#accepter_vpcVpc?

Returns:

See Also:

#delete(options = {}) ⇒ Types::DeleteVpcPeeringConnectionResult

Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the accepter VPC can delete the VPC peering connection if it's in the active state. The owner of the requester VPC can delete a VPC peering connection in the pending-acceptance state.

Examples:

Request syntax example with placeholder values


vpcpeeringconnection.delete({
  dry_run: false,
})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Returns:

See Also:

#exists?Boolean

Returns true if this VpcPeeringConnection exists. Returns false otherwise.

Returns:

  • (Boolean)

    Returns true if this VpcPeeringConnection exists. Returns false otherwise.

#reject(options = {}) ⇒ Types::RejectVpcPeeringConnectionResult

Rejects a VPC peering connection request. The VPC peering connection must be in the pending-acceptance state. Use the DescribeVpcPeeringConnections request to view your outstanding VPC peering connection requests. To delete an active VPC peering connection, or to delete a VPC peering connection request that you initiated, use DeleteVpcPeeringConnection.

Examples:

Request syntax example with placeholder values


vpcpeeringconnection.reject({
  dry_run: false,
})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Returns:

See Also:

#requester_vpcVpc?

Returns:

See Also:

#wait_until_exists {|waiter| ... } ⇒ VpcPeeringConnection

Waits until this VpcPeeringConnection is exists. This method waits by polling Client#describe_vpc_peering_connections until successful. An error is raised after a configurable number of failed checks.

This waiter uses the following defaults:

Configuration Default
#delay 15
#max_attempts 40

You can modify defaults and register callbacks by passing a block argument.

Examples:

Basic usage

vpcpeeringconnection.wait_until_exists

Yield Parameters:

Returns:

Raises:

See Also: