Package com.azure.data.cosmos
Class DatabaseAccount
- java.lang.Object
-
- com.azure.data.cosmos.JsonSerializable
-
- com.azure.data.cosmos.Resource
-
- com.azure.data.cosmos.DatabaseAccount
-
public class DatabaseAccount extends Resource
Represents a database account in the Azure Cosmos DB database service.
-
-
Constructor Summary
Constructors Constructor Description DatabaseAccount()
Constructor.DatabaseAccount(String jsonString)
Initialize a database account object from json string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
enableMultipleWriteLocations()
Iterable<DatabaseAccountLocation>
readableLocations()
Gets the list of readable locations for this database account.String
toJson()
Converts to a JSON string.Iterable<DatabaseAccountLocation>
writableLocations()
Gets the list of writable locations for this database account.-
Methods inherited from class com.azure.data.cosmos.Resource
etag, id, id, resourceId, resourceId, selfLink, timestamp
-
Methods inherited from class com.azure.data.cosmos.JsonSerializable
get, getBoolean, getCollection, getDouble, getInt, getList, getLogger, getLong, getMap, getObject, getObjectByPath, getString, has, toJson, toObject, toString
-
-
-
-
Constructor Detail
-
DatabaseAccount
public DatabaseAccount()
Constructor.
-
DatabaseAccount
public DatabaseAccount(String jsonString)
Initialize a database account object from json string.- Parameters:
jsonString
- the json string that represents the database account.
-
-
Method Detail
-
writableLocations
public Iterable<DatabaseAccountLocation> writableLocations()
Gets the list of writable locations for this database account.- Returns:
- the list of writable locations.
-
readableLocations
public Iterable<DatabaseAccountLocation> readableLocations()
Gets the list of readable locations for this database account.- Returns:
- the list of readable locations.
-
enableMultipleWriteLocations
public boolean enableMultipleWriteLocations()
-
toJson
public String toJson()
Description copied from class:JsonSerializable
Converts to a JSON string.- Overrides:
toJson
in classJsonSerializable
- Returns:
- the JSON string.
-
-