class Subnetworks extends Resource (View source)

The "subnetworks" collection of methods.

Typical usage is:

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

Methods

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

Retrieves an aggregated list of subnetworks. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

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

Deletes the specified subnetwork. (subnetworks.delete)

expandIpCidrRange(string $project, string $region, string $subnetwork, SubnetworksExpandIpCidrRangeRequest $postBody, array $optParams = [])

Expands the IP CIDR range of the subnetwork to a specified value.

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

Returns the specified subnetwork. (subnetworks.get)

getIamPolicy(string $project, string $region, string $resource, array $optParams = [])

Gets the access control policy for a resource. May be empty if no such policy or resource exists. (subnetworks.getIamPolicy)

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

Creates a subnetwork in the specified project using the data included in the request. (subnetworks.insert)

listSubnetworks(string $project, string $region, array $optParams = [])

Retrieves a list of subnetworks available to the specified project.

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

Retrieves an aggregated list of all usable subnetworks in the project.

patch(string $project, string $region, string $subnetwork, Subnetwork $postBody, array $optParams = [])

Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched. (subnetworks.patch)

setIamPolicy(string $project, string $region, string $resource, RegionSetPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. (subnetworks.setIamPolicy)

setPrivateIpGoogleAccess(string $project, string $region, string $subnetwork, SubnetworksSetPrivateIpGoogleAccessRequest $postBody, array $optParams = [])

Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.

testIamPermissions(string $project, string $region, string $resource, TestPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource.

Details

SubnetworkAggregatedList aggregatedList(string $project, array $optParams = [])

Retrieves an aggregated list of subnetworks. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

(subnetworks.aggregatedList)

Parameters

string $project

Project ID for this request.

array $optParams

Optional parameters.

Return Value

SubnetworkAggregatedList

Exceptions

Exception

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

Deletes the specified subnetwork. (subnetworks.delete)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

string $subnetwork

Name of the Subnetwork resource to delete.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation expandIpCidrRange(string $project, string $region, string $subnetwork, SubnetworksExpandIpCidrRangeRequest $postBody, array $optParams = [])

Expands the IP CIDR range of the subnetwork to a specified value.

(subnetworks.expandIpCidrRange)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

string $subnetwork

Name of the Subnetwork resource to update.

SubnetworksExpandIpCidrRangeRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Subnetwork get(string $project, string $region, string $subnetwork, array $optParams = [])

Returns the specified subnetwork. (subnetworks.get)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

string $subnetwork

Name of the Subnetwork resource to return.

array $optParams

Optional parameters.

Return Value

Subnetwork

Exceptions

Exception

Policy getIamPolicy(string $project, string $region, string $resource, array $optParams = [])

Gets the access control policy for a resource. May be empty if no such policy or resource exists. (subnetworks.getIamPolicy)

Parameters

string $project

Project ID for this request.

string $region

The name of the region for this request.

string $resource

Name or id of the resource for this request.

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

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

Creates a subnetwork in the specified project using the data included in the request. (subnetworks.insert)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

Subnetwork $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

SubnetworkList listSubnetworks(string $project, string $region, array $optParams = [])

Retrieves a list of subnetworks available to the specified project.

(subnetworks.listSubnetworks)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

array $optParams

Optional parameters.

Return Value

SubnetworkList

Exceptions

Exception

UsableSubnetworksAggregatedList listUsable(string $project, array $optParams = [])

Retrieves an aggregated list of all usable subnetworks in the project.

(subnetworks.listUsable)

Parameters

string $project

Project ID for this request.

array $optParams

Optional parameters.

Return Value

UsableSubnetworksAggregatedList

Exceptions

Exception

Operation patch(string $project, string $region, string $subnetwork, Subnetwork $postBody, array $optParams = [])

Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched. (subnetworks.patch)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

string $subnetwork

Name of the Subnetwork resource to patch.

Subnetwork $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Policy setIamPolicy(string $project, string $region, string $resource, RegionSetPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. (subnetworks.setIamPolicy)

Parameters

string $project

Project ID for this request.

string $region

The name of the region for this request.

string $resource

Name or id of the resource for this request.

RegionSetPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

Operation setPrivateIpGoogleAccess(string $project, string $region, string $subnetwork, SubnetworksSetPrivateIpGoogleAccessRequest $postBody, array $optParams = [])

Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.

(subnetworks.setPrivateIpGoogleAccess)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

string $subnetwork

Name of the Subnetwork resource.

SubnetworksSetPrivateIpGoogleAccessRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

TestPermissionsResponse testIamPermissions(string $project, string $region, string $resource, TestPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource.

(subnetworks.testIamPermissions)

Parameters

string $project

Project ID for this request.

string $region

The name of the region for this request.

string $resource

Name or id of the resource for this request.

TestPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestPermissionsResponse

Exceptions

Exception