Table of Contents

Interface ICosmosDBAccounts

Namespace
Microsoft.Azure.Management.CosmosDB.Fluent
Assembly
Microsoft.Azure.Management.CosmosDB.Fluent.dll

Entry point to Cosmos DB management API.

public interface ICosmosDBAccounts : IBeta, ISupportsCreating<IBlank>, IHasManager<ICosmosDBManager>, IHasInner<IDatabaseAccountsOperations>, ISupportsBatchCreation<ICosmosDBAccount>, ISupportsGettingById<ICosmosDBAccount>, ISupportsDeletingById, ISupportsDeletingByResourceGroup, ISupportsListing<ICosmosDBAccount>, ISupportsListingByResourceGroup<ICosmosDBAccount>, ISupportsGettingByResourceGroup<ICosmosDBAccount>

Remarks

(Beta: This functionality is in preview and as such is subject to change in non-backwards compatible ways in future releases, including removal, regardless of any compatibility expectations set by the containing library version number.).

Methods

FailoverPriorityChange(string, string, IList<Location>)

Changes the failover priority for the Azure CosmosDB database account. 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.

void FailoverPriorityChange(string groupName, string accountName, IList<Location> failoverPolicies)

Parameters

groupName string

The group name.

accountName string

The account name.

failoverPolicies IList<Location>

The list of failover policies.

FailoverPriorityChangeAsync(string, string, IList<Location>, CancellationToken)

Changes the failover priority for the Azure CosmosDB database account. 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.

Task FailoverPriorityChangeAsync(string groupName, string accountName, IList<Location> failoverPolicies, CancellationToken cancellationToken = default)

Parameters

groupName string

The group name.

accountName string

The account name.

failoverPolicies IList<Location>

The list of failover policies.

cancellationToken CancellationToken

Returns

Task

ListConnectionStrings(string, string)

Lists the connection strings for the specified Azure CosmosDB database account.

IDatabaseAccountListConnectionStringsResult ListConnectionStrings(string groupName, string accountName)

Parameters

groupName string

The group name.

accountName string

The account name.

Returns

IDatabaseAccountListConnectionStringsResult

ListConnectionStringsAsync(string, string, CancellationToken)

Lists the connection strings for the specified Azure CosmosDB database account.

Task<IDatabaseAccountListConnectionStringsResult> ListConnectionStringsAsync(string groupName, string accountName, CancellationToken cancellationToken = default)

Parameters

groupName string

The group name.

accountName string

The account name.

cancellationToken CancellationToken

Returns

Task<IDatabaseAccountListConnectionStringsResult>

ListKeys(string, string)

Lists the access keys for the specified Azure CosmosDB database account.

IDatabaseAccountListKeysResult ListKeys(string groupName, string accountName)

Parameters

groupName string

The group name.

accountName string

The account name.

Returns

IDatabaseAccountListKeysResult

ListKeysAsync(string, string, CancellationToken)

Lists the access keys for the specified Azure CosmosDB database account.

Task<IDatabaseAccountListKeysResult> ListKeysAsync(string groupName, string accountName, CancellationToken cancellationToken = default)

Parameters

groupName string

The group name.

accountName string

The account name.

cancellationToken CancellationToken

Returns

Task<IDatabaseAccountListKeysResult>

ListReadOnlyKeys(string, string)

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

IDatabaseAccountListReadOnlyKeysResult ListReadOnlyKeys(string groupName, string accountName)

Parameters

groupName string

The group name.

accountName string

The account name.

Returns

IDatabaseAccountListReadOnlyKeysResult

ListReadOnlyKeysAsync(string, string, CancellationToken)

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

Task<IDatabaseAccountListReadOnlyKeysResult> ListReadOnlyKeysAsync(string groupName, string accountName, CancellationToken cancellationToken = default)

Parameters

groupName string

The group name.

accountName string

The account name.

cancellationToken CancellationToken

Returns

Task<IDatabaseAccountListReadOnlyKeysResult>

RegenerateKey(string, string, string)

Regenerates an access key for the specified Azure CosmosDB database account.

void RegenerateKey(string groupName, string accountName, string keyKind)

Parameters

groupName string

The group name.

accountName string

The account name.

keyKind string

The key kind.

RegenerateKeyAsync(string, string, string, CancellationToken)

Regenerates an access key for the specified Azure CosmosDB database account.

Task RegenerateKeyAsync(string groupName, string accountName, string keyKind, CancellationToken cancellationToken = default)

Parameters

groupName string

The group name.

accountName string

The account name.

keyKind string

The key kind.

cancellationToken CancellationToken

Returns

Task