Reference documentation and code samples for the Compute V1 Client class NetworkPeering.
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.
Generated from protobuf message google.cloud.compute.v1.NetworkPeering
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ 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. |
↳ 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. |
↳ export_custom_routes |
bool
Whether to export the custom routes to peer network. The default value is false. |
↳ 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. |
↳ import_custom_routes |
bool
Whether to import the custom routes from peer network. The default value is false. |
↳ 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. |
↳ name |
string
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 |
↳ network |
string
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. |
↳ peer_mtu |
int
Maximum Transmission Unit in bytes. |
↳ stack_type |
string
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. |
↳ state |
string
[Output Only] State for the peering, either |
↳ state_details |
string
[Output Only] Details about the current state of the peering. |
getAutoCreateRoutes
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.
Generated from protobuf field optional bool auto_create_routes = 57454941;
Returns | |
---|---|
Type | Description |
bool |
hasAutoCreateRoutes
clearAutoCreateRoutes
setAutoCreateRoutes
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.
Generated from protobuf field optional bool auto_create_routes = 57454941;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getExchangeSubnetRoutes
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.
Generated from protobuf field optional bool exchange_subnet_routes = 26322256;
Returns | |
---|---|
Type | Description |
bool |
hasExchangeSubnetRoutes
clearExchangeSubnetRoutes
setExchangeSubnetRoutes
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.
Generated from protobuf field optional bool exchange_subnet_routes = 26322256;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getExportCustomRoutes
Whether to export the custom routes to peer network. The default value is false.
Generated from protobuf field optional bool export_custom_routes = 60281485;
Returns | |
---|---|
Type | Description |
bool |
hasExportCustomRoutes
clearExportCustomRoutes
setExportCustomRoutes
Whether to export the custom routes to peer network. The default value is false.
Generated from protobuf field optional bool export_custom_routes = 60281485;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getExportSubnetRoutesWithPublicIp
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.
Generated from protobuf field optional bool export_subnet_routes_with_public_ip = 97940834;
Returns | |
---|---|
Type | Description |
bool |
hasExportSubnetRoutesWithPublicIp
clearExportSubnetRoutesWithPublicIp
setExportSubnetRoutesWithPublicIp
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.
Generated from protobuf field optional bool export_subnet_routes_with_public_ip = 97940834;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getImportCustomRoutes
Whether to import the custom routes from peer network. The default value is false.
Generated from protobuf field optional bool import_custom_routes = 197982398;
Returns | |
---|---|
Type | Description |
bool |
hasImportCustomRoutes
clearImportCustomRoutes
setImportCustomRoutes
Whether to import the custom routes from peer network. The default value is false.
Generated from protobuf field optional bool import_custom_routes = 197982398;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getImportSubnetRoutesWithPublicIp
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.
Generated from protobuf field optional bool import_subnet_routes_with_public_ip = 14419729;
Returns | |
---|---|
Type | Description |
bool |
hasImportSubnetRoutesWithPublicIp
clearImportSubnetRoutesWithPublicIp
setImportSubnetRoutesWithPublicIp
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.
Generated from protobuf field optional bool import_subnet_routes_with_public_ip = 14419729;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getName
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.
Generated from protobuf field optional string name = 3373707;
Returns | |
---|---|
Type | Description |
string |
hasName
clearName
setName
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.
Generated from protobuf field optional string name = 3373707;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getNetwork
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.
Generated from protobuf field optional string network = 232872494;
Returns | |
---|---|
Type | Description |
string |
hasNetwork
clearNetwork
setNetwork
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.
Generated from protobuf field optional string network = 232872494;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getPeerMtu
Maximum Transmission Unit in bytes.
Generated from protobuf field optional int32 peer_mtu = 69584721;
Returns | |
---|---|
Type | Description |
int |
hasPeerMtu
clearPeerMtu
setPeerMtu
Maximum Transmission Unit in bytes.
Generated from protobuf field optional int32 peer_mtu = 69584721;
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getStackType
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.
Generated from protobuf field optional string stack_type = 425908881;
Returns | |
---|---|
Type | Description |
string |
hasStackType
clearStackType
setStackType
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.
Generated from protobuf field optional string stack_type = 425908881;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getState
[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.
Generated from protobuf field optional string state = 109757585;
Returns | |
---|---|
Type | Description |
string |
hasState
clearState
setState
[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.
Generated from protobuf field optional string state = 109757585;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getStateDetails
[Output Only] Details about the current state of the peering.
Generated from protobuf field optional string state_details = 95566996;
Returns | |
---|---|
Type | Description |
string |
hasStateDetails
clearStateDetails
setStateDetails
[Output Only] Details about the current state of the peering.
Generated from protobuf field optional string state_details = 95566996;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |