Projects class final

The Projects API.

Implementers

Constructors

Projects({required Client client, Uri? endPoint, String? gcclVersion})
Creates a Projects using client for transport.
Projects.fromApiKey([String? apiKey])
Creates a Projects that does authentication through an API key.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Closes the client and cleans up any resources associated with it.
disableXpnHost(DisableXpnHostProjectRequest request) Future<Operation>
Disable this project as a shared VPC host project.
disableXpnResource(DisableXpnResourceProjectRequest request) Future<Operation>
Disable a service resource (also known as service project) associated with this host project.
enableXpnHost(EnableXpnHostProjectRequest request) Future<Operation>
Enable this project as a shared VPC host project.
enableXpnResource(EnableXpnResourceProjectRequest request) Future<Operation>
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.
get(GetProjectRequest request) Future<Project>
Returns the specified Project resource.
getXpnHost(GetXpnHostProjectRequest request) Future<Project>
Gets the shared VPC host project that this project links to. May be empty if no link exists.
getXpnResources(GetXpnResourcesProjectsRequest request) Future<ProjectsGetXpnResources>
Gets service resources (a.k.a service project) associated with this host project.
listXpnHosts(ListXpnHostsProjectsRequest request) Future<XpnHostList>
Lists all shared VPC host projects visible to the user in an organization.
moveDisk(MoveDiskProjectRequest request) Future<Operation>
Moves a persistent disk from one zone to another. Note: The moveDisk API will be deprecated on September 29, 2026.
moveInstance(MoveInstanceProjectRequest request) Future<Operation>
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setCloudArmorTier(SetCloudArmorTierProjectRequest request) Future<Operation>
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.
setCommonInstanceMetadata(SetCommonInstanceMetadataProjectRequest request) Future<Operation>
Sets metadata common to all instances within the specified project using the data included in the request.
setDefaultNetworkTier(SetDefaultNetworkTierProjectRequest request) Future<Operation>
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.
setUsageExportBucket(SetUsageExportBucketProjectRequest request) Future<Operation>
Enables the usage export feature and sets theusage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited