Class NetworkPeering (1.17.0)

NetworkPeering(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

NameDescription
auto_create_routes bool
This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. This field is a member of oneof_ _auto_create_routes.
exchange_subnet_routes bool
Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. This field is a member of oneof_ _exchange_subnet_routes.
export_custom_routes bool
Whether to export the custom routes to peer network. The default value is false. This field is a member of oneof_ _export_custom_routes.
export_subnet_routes_with_public_ip bool
Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field. This field is a member of oneof_ _export_subnet_routes_with_public_ip.
import_custom_routes bool
Whether to import the custom routes from peer network. The default value is false. This field is a member of oneof_ _import_custom_routes.
import_subnet_routes_with_public_ip bool
Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field. This field is a member of oneof_ _import_subnet_routes_with_public_ip.
name str
Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression [a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. This field is a member of oneof_ _name.
network str
The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network. This field is a member of oneof_ _network.
peer_mtu int
Maximum Transmission Unit in bytes. This field is a member of oneof_ _peer_mtu.
stack_type str
Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Check the StackType enum for the list of possible values. This field is a member of oneof_ _stack_type.
state str
[Output Only] State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there's a matching configuration in the peer network. Check the State enum for the list of possible values. This field is a member of oneof_ _state.
state_details str
[Output Only] Details about the current state of the peering. This field is a member of oneof_ _state_details.

Classes

StackType

StackType(value)

Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY.

Values: UNDEFINED_STACK_TYPE (0): A value indicating that the enum field is not set. IPV4_IPV6 (22197249): This Peering will allow IPv4 traffic and routes to be exchanged. Additionally if the matching peering is IPV4_IPV6, IPv6 traffic and routes will be exchanged as well. IPV4_ONLY (22373798): This Peering will only allow IPv4 traffic and routes to be exchanged, even if the matching peering is IPV4_IPV6.

State

State(value)

[Output Only] State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there's a matching configuration in the peer network.

Values: UNDEFINED_STATE (0): A value indicating that the enum field is not set. ACTIVE (314733318): Matching configuration exists on the peer. INACTIVE (270421099): There is no matching configuration on the peer, including the case when peer does not exist.