Projects
class Projects extends Resource (View source)
The "projects" collection of methods.
Typical usage is:
$computeService = new Google\Service\Compute(...);
$projects = $computeService->projects;
Methods
Disable this project as a shared VPC host project. (projects.disableXpnHost)
Disable a service resource (also known as service project) associated with this host project. (projects.disableXpnResource)
Enable this project as a shared VPC host project. (projects.enableXpnHost)
Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
Returns the specified Project resource. To decrease latency for this method,
you can optionally omit any unneeded information from the response by using a
field mask. This practice is especially recommended for unused quota
information (the quotas
field). To exclude one or more fields, set your
request's fields
query parameter to only include the fields you need. For
example, to only include the id
and selfLink
fields, add the query
parameter ?fields=id,selfLink
to your request. (projects.get)
Gets the shared VPC host project that this project links to. May be empty if no link exists. (projects.getXpnHost)
Gets service resources (a.k.a service project) associated with this host project. (projects.getXpnResources)
Lists all shared VPC host projects visible to the user in an organization.
Moves a persistent disk from one zone to another. (projects.moveDisk)
Moves an instance and its attached persistent disks from one zone to another.
Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise.
Sets metadata common to all instances within the specified project using the data included in the request. (projects.setCommonInstanceMetadata)
Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. (projects.setDefaultNetworkTier)
Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. (projects.setUsageExportBucket)
Details
Operation
disableXpnHost(string $project, array $optParams = [])
Disable this project as a shared VPC host project. (projects.disableXpnHost)
Operation
disableXpnResource(string $project, ProjectsDisableXpnResourceRequest $postBody, array $optParams = [])
Disable a service resource (also known as service project) associated with this host project. (projects.disableXpnResource)
Operation
enableXpnHost(string $project, array $optParams = [])
Enable this project as a shared VPC host project. (projects.enableXpnHost)
Operation
enableXpnResource(string $project, ProjectsEnableXpnResourceRequest $postBody, array $optParams = [])
Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
(projects.enableXpnResource)
Project
get(string $project, array $optParams = [])
Returns the specified Project resource. To decrease latency for this method,
you can optionally omit any unneeded information from the response by using a
field mask. This practice is especially recommended for unused quota
information (the quotas
field). To exclude one or more fields, set your
request's fields
query parameter to only include the fields you need. For
example, to only include the id
and selfLink
fields, add the query
parameter ?fields=id,selfLink
to your request. (projects.get)
Project
getXpnHost(string $project, array $optParams = [])
Gets the shared VPC host project that this project links to. May be empty if no link exists. (projects.getXpnHost)
ProjectsGetXpnResources
getXpnResources(string $project, array $optParams = [])
Gets service resources (a.k.a service project) associated with this host project. (projects.getXpnResources)
XpnHostList
listXpnHosts(string $project, ProjectsListXpnHostsRequest $postBody, array $optParams = [])
Lists all shared VPC host projects visible to the user in an organization.
(projects.listXpnHosts)
Operation
moveDisk(string $project, DiskMoveRequest $postBody, array $optParams = [])
Moves a persistent disk from one zone to another. (projects.moveDisk)
Operation
moveInstance(string $project, InstanceMoveRequest $postBody, array $optParams = [])
Moves an instance and its attached persistent disks from one zone to another.
Note: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue. [Deprecated] This method is deprecated. See moving instance across zones instead. (projects.moveInstance)
Operation
setCloudArmorTier(string $project, ProjectsSetCloudArmorTierRequest $postBody, array $optParams = [])
Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise.
See Subscribing to Cloud Armor Enterprise for more information. (projects.setCloudArmorTier)
Operation
setCommonInstanceMetadata(string $project, Metadata $postBody, array $optParams = [])
Sets metadata common to all instances within the specified project using the data included in the request. (projects.setCommonInstanceMetadata)
Operation
setDefaultNetworkTier(string $project, ProjectsSetDefaultNetworkTierRequest $postBody, array $optParams = [])
Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. (projects.setDefaultNetworkTier)
Operation
setUsageExportBucket(string $project, UsageExportLocation $postBody, array $optParams = [])
Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. (projects.setUsageExportBucket)