Location Class
- java.
lang. Object - com.
azure. resourcemanager. cosmos. models. Location
- com.
Implements
public final class Location
implements JsonSerializable<Location>
A region in which the Azure Cosmos DB database account is deployed.
Constructor Summary
| Constructor | Description |
|---|---|
| Location() |
Creates an instance of Location class. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| String |
documentEndpoint()
Get the document |
| Integer |
failoverPriority()
Get the failover |
| static Location |
fromJson(JsonReader jsonReader)
Reads an instance of Location from the Json |
| String |
id()
Get the id property: The unique identifier of the region within the database account. |
| Boolean |
isZoneRedundant()
Get the is |
| String |
locationName()
Get the location |
| String |
provisioningState()
Get the provisioning |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
| Location |
withFailoverPriority(Integer failoverPriority)
Set the failover |
| Location |
withIsZoneRedundant(Boolean isZoneRedundant)
Set the is |
| Location |
withLocationName(String locationName)
Set the location |
Methods inherited from java.lang.Object
Constructor Details
Location
public Location()
Creates an instance of Location class.
Method Details
documentEndpoint
public String documentEndpoint()
Get the documentEndpoint property: The connection endpoint for the specific region. Example: https://<accountName>-<locationName>.documents.azure.com:443/.
Returns:
failoverPriority
public Integer failoverPriority()
Get the failoverPriority property: The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.
Returns:
fromJson
public static Location fromJson(JsonReader jsonReader)
Reads an instance of Location from the JsonReader.
Parameters:
Returns:
Throws:
id
public String id()
Get the id property: The unique identifier of the region within the database account. Example: <accountName>-<locationName>.
Returns:
isZoneRedundant
public Boolean isZoneRedundant()
Get the isZoneRedundant property: Flag to indicate whether or not this region is an AvailabilityZone region.
Returns:
locationName
public String locationName()
Get the locationName property: The name of the region.
Returns:
provisioningState
public String provisioningState()
Get the provisioningState property: The provisioning state of the resource.
Returns:
toJson
validate
public void validate()
Validates the instance.
withFailoverPriority
public Location withFailoverPriority(Integer failoverPriority)
Set the failoverPriority property: The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.
Parameters:
Returns:
withIsZoneRedundant
public Location withIsZoneRedundant(Boolean isZoneRedundant)
Set the isZoneRedundant property: Flag to indicate whether or not this region is an AvailabilityZone region.
Parameters:
Returns:
withLocationName
public Location withLocationName(String locationName)
Set the locationName property: The name of the region.
Parameters:
Returns: