CosmosDBAccount Interface

Implements

public interface CosmosDBAccount
extends GroupableResource<CosmosManager,DatabaseAccountGetResultsInner>, Refreshable<CosmosDBAccount>, Updatable<Update>, SupportsUpdatingPrivateEndpointConnection

An immutable client-side representation of an Azure Cosmos DB.

Method Summary

Modifier and Type Method and Description
abstract List<Capability> capabilities()
abstract boolean cassandraConnectorEnabled()
abstract ConnectorOffer cassandraConnectorOffer()
abstract ConsistencyPolicy consistencyPolicy()
abstract DatabaseAccountOfferType databaseAccountOfferType()
abstract DefaultConsistencyLevel defaultConsistencyLevel()
abstract String documentEndpoint()
abstract PrivateEndpointConnection getPrivateEndpointConnection(String name)
abstract Mono<PrivateEndpointConnection> getPrivateEndpointConnectionAsync(String name)
abstract PrivateLinkResource getPrivateLinkResource(String groupName)
abstract Mono<PrivateLinkResource> getPrivateLinkResourceAsync(String groupName)
abstract String ipRangeFilter()

Deprecated

use ipRules()
abstract List<IpAddressOrRange> ipRules()
abstract boolean keyBasedMetadataWriteAccessDisabled()
abstract DatabaseAccountKind kind()
abstract DatabaseAccountListConnectionStringsResult listConnectionStrings()
abstract Mono<DatabaseAccountListConnectionStringsResult> listConnectionStringsAsync()
abstract DatabaseAccountListKeysResult listKeys()
abstract Mono<DatabaseAccountListKeysResult> listKeysAsync()
abstract Map<String,PrivateEndpointConnection> listPrivateEndpointConnection()
abstract Mono<Map<String,PrivateEndpointConnection>> listPrivateEndpointConnectionAsync()
abstract List<PrivateLinkResource> listPrivateLinkResources()
abstract PagedFlux<PrivateLinkResource> listPrivateLinkResourcesAsync()
abstract DatabaseAccountListReadOnlyKeysResult listReadOnlyKeys()
abstract Mono<DatabaseAccountListReadOnlyKeysResult> listReadOnlyKeysAsync()
abstract List<SqlDatabase> listSqlDatabases()
abstract PagedFlux<SqlDatabase> listSqlDatabasesAsync()
abstract boolean multipleWriteLocationsEnabled()
abstract void offlineRegion(Region region)

It takes offline the specified region for the current Azure Cosmos DB database account.

abstract Mono<Void> offlineRegionAsync(Region region)

Asynchronously it takes offline the specified region for the current Azure Cosmos DB database account.

abstract void onlineRegion(Region region)

It brings online the specified region for the current Azure Cosmos DB database account.

abstract Mono<Void> onlineRegionAsync(Region region)

Asynchronously it brings online the specified region for the current Azure Cosmos DB database account.

abstract PublicNetworkAccess publicNetworkAccess()

Whether the CosmosDB account can be accessed from public network.

abstract List<Location> readableReplications()
abstract void regenerateKey(KeyKind keyKind)
abstract Mono<Void> regenerateKeyAsync(KeyKind keyKind)
abstract List<VirtualNetworkRule> virtualNetworkRules()
abstract List<Location> writableReplications()

Method Details

capabilities

public abstract List capabilities()

Returns:

a list that contains the Cosmos DB capabilities

cassandraConnectorEnabled

public abstract boolean cassandraConnectorEnabled()

Returns:

whether cassandra connector is enabled or not.

cassandraConnectorOffer

public abstract ConnectorOffer cassandraConnectorOffer()

Returns:

the current cassandra connector offer.

consistencyPolicy

public abstract ConsistencyPolicy consistencyPolicy()

Returns:

the consistency policy for the CosmosDB database account

databaseAccountOfferType

public abstract DatabaseAccountOfferType databaseAccountOfferType()

Returns:

the offer type for the CosmosDB database account

defaultConsistencyLevel

public abstract DefaultConsistencyLevel defaultConsistencyLevel()

Returns:

the default consistency level for the CosmosDB database account

documentEndpoint

public abstract String documentEndpoint()

Returns:

the connection endpoint for the CosmosDB database account

getPrivateEndpointConnection

public abstract PrivateEndpointConnection getPrivateEndpointConnection(String name)

Parameters:

name - name of private endpoint connection

Returns:

the specific private endpoint connection

getPrivateEndpointConnectionAsync

public abstract Mono getPrivateEndpointConnectionAsync(String name)

Parameters:

name - name of private endpoint connection

Returns:

the specific private endpoint connection

getPrivateLinkResource

public abstract PrivateLinkResource getPrivateLinkResource(String groupName)

Parameters:

groupName - group name of private link resource

Returns:

the specific private link resource group

getPrivateLinkResourceAsync

public abstract Mono getPrivateLinkResourceAsync(String groupName)

Parameters:

groupName - group name of private link resource

Returns:

the specific private link resource group

ipRangeFilter

@Deprecated
public abstract String ipRangeFilter()

Deprecated

use ipRules()

Returns:

specifies the set of IP addresses or IP address ranges in CIDR form.

ipRules

public abstract List ipRules()

Returns:

specifies the set of IP addresses or IP address ranges in CIDR form.

keyBasedMetadataWriteAccessDisabled

public abstract boolean keyBasedMetadataWriteAccessDisabled()

Returns:

whether metadata write access is disabled or not.

kind

public abstract DatabaseAccountKind kind()

Returns:

indicates the type of database account

listConnectionStrings

public abstract DatabaseAccountListConnectionStringsResult listConnectionStrings()

Returns:

the connection strings for the specified Azure CosmosDB database account

listConnectionStringsAsync

public abstract Mono listConnectionStringsAsync()

Returns:

the connection strings for the specified Azure CosmosDB database account

listKeys

public abstract DatabaseAccountListKeysResult listKeys()

Returns:

the access keys for the specified Azure CosmosDB database account

listKeysAsync

public abstract Mono listKeysAsync()

Returns:

the access keys for the specified Azure CosmosDB database account

listPrivateEndpointConnection

public abstract Map listPrivateEndpointConnection()

Returns:

all private endpoint connection in the account.

listPrivateEndpointConnectionAsync

public abstract Mono> listPrivateEndpointConnectionAsync()

Returns:

all private endpoint connection in the account.

listPrivateLinkResources

public abstract List listPrivateLinkResources()

Returns:

all private link resources in the account.

listPrivateLinkResourcesAsync

public abstract PagedFlux listPrivateLinkResourcesAsync()

Returns:

all private link resources in the account.

listReadOnlyKeys

public abstract DatabaseAccountListReadOnlyKeysResult listReadOnlyKeys()

Returns:

the read-only access keys for the specified Azure CosmosDB database account

listReadOnlyKeysAsync

public abstract Mono listReadOnlyKeysAsync()

Returns:

the read-only access keys for the specified Azure CosmosDB database account

listSqlDatabases

public abstract List listSqlDatabases()

Returns:

the list of Azure Cosmos DB SQL databases

listSqlDatabasesAsync

public abstract PagedFlux listSqlDatabasesAsync()

Returns:

the list of Azure Cosmos DB SQL databases

multipleWriteLocationsEnabled

public abstract boolean multipleWriteLocationsEnabled()

Returns:

whether write is enabled for multiple locations or not

offlineRegion

public abstract void offlineRegion(Region region)

It takes offline the specified region for the current Azure Cosmos DB database account.

Parameters:

region - Cosmos DB region

offlineRegionAsync

public abstract Mono offlineRegionAsync(Region region)

Asynchronously it takes offline the specified region for the current Azure Cosmos DB database account.

Parameters:

region - Cosmos DB region

Returns:

a representation of the deferred computation of this call

onlineRegion

public abstract void onlineRegion(Region region)

It brings online the specified region for the current Azure Cosmos DB database account.

Parameters:

region - Cosmos DB region

onlineRegionAsync

public abstract Mono onlineRegionAsync(Region region)

Asynchronously it brings online the specified region for the current Azure Cosmos DB database account.

Parameters:

region - Cosmos DB region

Returns:

a representation of the deferred computation of this call

publicNetworkAccess

public abstract PublicNetworkAccess publicNetworkAccess()

Whether the CosmosDB account can be accessed from public network.

Returns:

whether the CosmosDB account can be accessed from public network.

readableReplications

public abstract List readableReplications()

Returns:

an array that contains the readable georeplication locations enabled for the CosmosDB account

regenerateKey

public abstract void regenerateKey(KeyKind keyKind)

Parameters:

keyKind - the key kind

regenerateKeyAsync

public abstract Mono regenerateKeyAsync(KeyKind keyKind)

Parameters:

keyKind - the key kind

Returns:

a representation of the deferred computation of this call

virtualNetworkRules

public abstract List virtualNetworkRules()

Returns:

a list that contains the Cosmos DB Virtual Network ACL Rules (empty list if none is set)

writableReplications

public abstract List writableReplications()

Returns:

an array that contains the writable georeplication locations enabled for the CosmosDB account

Applies to