Compute V1 Client - Class Project (1.7.1)

Reference documentation and code samples for the Compute V1 Client class Project.

Represents a Project resource. A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy.

Generated from protobuf message google.cloud.compute.v1.Project

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ common_instance_metadataGoogle\Cloud\Compute\V1\Metadata

Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.

↳ creation_timestampstring

[Output Only] Creation timestamp in RFC3339 text format.

↳ default_network_tierstring

This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM. Check the DefaultNetworkTier enum for the list of possible values.

↳ default_service_accountstring

[Output Only] Default service account used by VMs running in this project.

↳ descriptionstring

An optional textual description of the resource.

↳ enabled_featuresarray

Restricted features enabled for use on this project.

↳ idint|string

[Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.

↳ kindstring

[Output Only] Type of the resource. Always compute#project for projects.

↳ namestring

The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.

↳ quotasarray<Google\Cloud\Compute\V1\Quota>

[Output Only] Quotas assigned to this project.

↳ self_linkstring

[Output Only] Server-defined URL for the resource.

↳ usage_export_locationGoogle\Cloud\Compute\V1\UsageExportLocation

The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored.

↳ vm_dns_settingstring

[Output Only] Default internal DNS setting used by VMs running in this project. Check the VmDnsSetting enum for the list of possible values.

↳ xpn_project_statusstring

[Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated. Check the XpnProjectStatus enum for the list of possible values.

getCommonInstanceMetadata

Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.

Returns
TypeDescription
Google\Cloud\Compute\V1\Metadata|null

hasCommonInstanceMetadata

clearCommonInstanceMetadata

setCommonInstanceMetadata

Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.

Parameter
NameDescription
varGoogle\Cloud\Compute\V1\Metadata
Returns
TypeDescription
$this

getCreationTimestamp

[Output Only] Creation timestamp in RFC3339 text format.

Returns
TypeDescription
string

hasCreationTimestamp

clearCreationTimestamp

setCreationTimestamp

[Output Only] Creation timestamp in RFC3339 text format.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getDefaultNetworkTier

This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.

Check the DefaultNetworkTier enum for the list of possible values.

Returns
TypeDescription
string

hasDefaultNetworkTier

clearDefaultNetworkTier

setDefaultNetworkTier

This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.

Check the DefaultNetworkTier enum for the list of possible values.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getDefaultServiceAccount

[Output Only] Default service account used by VMs running in this project.

Returns
TypeDescription
string

hasDefaultServiceAccount

clearDefaultServiceAccount

setDefaultServiceAccount

[Output Only] Default service account used by VMs running in this project.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getDescription

An optional textual description of the resource.

Returns
TypeDescription
string

hasDescription

clearDescription

setDescription

An optional textual description of the resource.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getEnabledFeatures

Restricted features enabled for use on this project.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setEnabledFeatures

Restricted features enabled for use on this project.

Parameter
NameDescription
varstring[]
Returns
TypeDescription
$this

getId

[Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.

Returns
TypeDescription
int|string

hasId

clearId

setId

[Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.

Parameter
NameDescription
varint|string
Returns
TypeDescription
$this

getKind

[Output Only] Type of the resource. Always compute#project for projects.

Returns
TypeDescription
string

hasKind

clearKind

setKind

[Output Only] Type of the resource. Always compute#project for projects.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getName

The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.

Returns
TypeDescription
string

hasName

clearName

setName

The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getQuotas

[Output Only] Quotas assigned to this project.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setQuotas

[Output Only] Quotas assigned to this project.

Parameter
NameDescription
vararray<Google\Cloud\Compute\V1\Quota>
Returns
TypeDescription
$this

[Output Only] Server-defined URL for the resource.

Returns
TypeDescription
string

[Output Only] Server-defined URL for the resource.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getUsageExportLocation

The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored.

Returns
TypeDescription
Google\Cloud\Compute\V1\UsageExportLocation|null

hasUsageExportLocation

clearUsageExportLocation

setUsageExportLocation

The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored.

Parameter
NameDescription
varGoogle\Cloud\Compute\V1\UsageExportLocation
Returns
TypeDescription
$this

getVmDnsSetting

[Output Only] Default internal DNS setting used by VMs running in this project.

Check the VmDnsSetting enum for the list of possible values.

Returns
TypeDescription
string

hasVmDnsSetting

clearVmDnsSetting

setVmDnsSetting

[Output Only] Default internal DNS setting used by VMs running in this project.

Check the VmDnsSetting enum for the list of possible values.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getXpnProjectStatus

[Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated.

Check the XpnProjectStatus enum for the list of possible values.

Returns
TypeDescription
string

hasXpnProjectStatus

clearXpnProjectStatus

setXpnProjectStatus

[Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated.

Check the XpnProjectStatus enum for the list of possible values.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this