class Networks extends Resource (View source)

The "networks" collection of methods.

Typical usage is:

 $computeService = new Google\Service\Compute(...);
 $networks = $computeService->networks;

Methods

addPeering(string $project, string $network, NetworksAddPeeringRequest $postBody, array $optParams = [])

Adds a peering to the specified network. (networks.addPeering)

delete(string $project, string $network, array $optParams = [])

Deletes the specified network. (networks.delete)

get(string $project, string $network, array $optParams = [])

Returns the specified network. (networks.get)

getEffectiveFirewalls(string $project, string $network, array $optParams = [])

Returns the effective firewalls on a given network.

insert(string $project, Network $postBody, array $optParams = [])

Creates a network in the specified project using the data included in the request. (networks.insert)

listNetworks(string $project, array $optParams = [])

Retrieves the list of networks available to the specified project.

listPeeringRoutes(string $project, string $network, array $optParams = [])

Lists the peering routes exchanged over peering connection.

patch(string $project, string $network, Network $postBody, array $optParams = [])

Patches the specified network with the data included in the request. Only routingConfig can be modified. (networks.patch)

removePeering(string $project, string $network, NetworksRemovePeeringRequest $postBody, array $optParams = [])

Removes a peering from the specified network. (networks.removePeering)

switchToCustomMode(string $project, string $network, array $optParams = [])

Switches the network mode from auto subnet mode to custom subnet mode.

updatePeering(string $project, string $network, NetworksUpdatePeeringRequest $postBody, array $optParams = [])

Updates the specified network peering with the data included in the request.

Details

Operation addPeering(string $project, string $network, NetworksAddPeeringRequest $postBody, array $optParams = [])

Adds a peering to the specified network. (networks.addPeering)

Parameters

string $project

Project ID for this request.

string $network

Name of the network resource to add peering to.

NetworksAddPeeringRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation delete(string $project, string $network, array $optParams = [])

Deletes the specified network. (networks.delete)

Parameters

string $project

Project ID for this request.

string $network

Name of the network to delete.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Network get(string $project, string $network, array $optParams = [])

Returns the specified network. (networks.get)

Parameters

string $project

Project ID for this request.

string $network

Name of the network to return.

array $optParams

Optional parameters.

Return Value

Network

Exceptions

Exception

NetworksGetEffectiveFirewallsResponse getEffectiveFirewalls(string $project, string $network, array $optParams = [])

Returns the effective firewalls on a given network.

(networks.getEffectiveFirewalls)

Parameters

string $project

Project ID for this request.

string $network

Name of the network for this request.

array $optParams

Optional parameters.

Return Value

NetworksGetEffectiveFirewallsResponse

Exceptions

Exception

Operation insert(string $project, Network $postBody, array $optParams = [])

Creates a network in the specified project using the data included in the request. (networks.insert)

Parameters

string $project

Project ID for this request.

Network $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

NetworkList listNetworks(string $project, array $optParams = [])

Retrieves the list of networks available to the specified project.

(networks.listNetworks)

Parameters

string $project

Project ID for this request.

array $optParams

Optional parameters.

Return Value

NetworkList

Exceptions

Exception

ExchangedPeeringRoutesList listPeeringRoutes(string $project, string $network, array $optParams = [])

Lists the peering routes exchanged over peering connection.

(networks.listPeeringRoutes)

Parameters

string $project

Project ID for this request.

string $network

Name of the network for this request.

array $optParams

Optional parameters.

Return Value

ExchangedPeeringRoutesList

Exceptions

Exception

Operation patch(string $project, string $network, Network $postBody, array $optParams = [])

Patches the specified network with the data included in the request. Only routingConfig can be modified. (networks.patch)

Parameters

string $project

Project ID for this request.

string $network

Name of the network to update.

Network $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation removePeering(string $project, string $network, NetworksRemovePeeringRequest $postBody, array $optParams = [])

Removes a peering from the specified network. (networks.removePeering)

Parameters

string $project

Project ID for this request.

string $network

Name of the network resource to remove peering from.

NetworksRemovePeeringRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation switchToCustomMode(string $project, string $network, array $optParams = [])

Switches the network mode from auto subnet mode to custom subnet mode.

(networks.switchToCustomMode)

Parameters

string $project

Project ID for this request.

string $network

Name of the network to be updated.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation updatePeering(string $project, string $network, NetworksUpdatePeeringRequest $postBody, array $optParams = [])

Updates the specified network peering with the data included in the request.

You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field. (networks.updatePeering)

Parameters

string $project

Project ID for this request.

string $network

Name of the network resource which the updated peering is belonging to.

NetworksUpdatePeeringRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception