public final class InstanceId extends ResourceId
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object obj) | 
| String | getInstance()Returns the name of the instance. | 
| String | getSelfLink()Returns a fully qualified URL to the entity. | 
| String | getZone()Returns the name of the zone this instance belongs to. | 
| ZoneId | getZoneId()Returns the identity of the zone this instance belongs to. | 
| int | hashCode() | 
| static InstanceId | of(String zone,
  String instance)Returns an instance identity given the zone and instance names. | 
| static InstanceId | of(String project,
  String zone,
  String instance)Returns an instance identity given project, zone and instance names. | 
| static InstanceId | of(ZoneId zoneId,
  String instance)Returns an instance identity given the zone identity and the instance name. | 
getProject, toStringpublic String getInstance()
[a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all
 following characters must be a dash, lowercase letter, or digit, except the last character,
 which cannot be a dash.public String getZone()
public ZoneId getZoneId()
public String getSelfLink()
ResourceIdgetSelfLink in class ResourceIdpublic static InstanceId of(ZoneId zoneId, String instance)
[a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
 lowercase letter, and all following characters must be a dash, lowercase letter, or digit,
 except the last character, which cannot be a dash.public static InstanceId of(String zone, String instance)
[a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
 lowercase letter, and all following characters must be a dash, lowercase letter, or digit,
 except the last character, which cannot be a dash.public static InstanceId of(String project, String zone, String instance)
[a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
 lowercase letter, and all following characters must be a dash, lowercase letter, or digit,
 except the last character, which cannot be a dash.Copyright © 2019 Google LLC. All rights reserved.