public class ComputeClient extends Object
| Constructor and Description |
|---|
ComputeClient(com.google.api.services.compute.Compute compute)
Constructs a new
ComputeClient instance. |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableList<com.google.api.services.compute.model.Zone> |
getZones(String projectId)
Retrieves a list of
Zone objects representing the zones in the project. |
public ComputeClient(com.google.api.services.compute.Compute compute)
ComputeClient instance.compute - The Compute instance this class will utilize for interacting with the
GCE API.public com.google.common.collect.ImmutableList<com.google.api.services.compute.model.Zone> getZones(String projectId) throws IOException
Zone objects representing the zones in the project.projectId - The ID of the project that zone usage is needed for.Zone objects. This will not be null if the request was
successful.IOException - When an error occurred attempting to get the list of zones.Copyright © 2016–2019 Google. All rights reserved.