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
stringThe group name.
accountName
stringThe 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
stringThe group name.
accountName
stringThe account name.
failoverPolicies
IList<Location>The list of failover policies.
cancellationToken
CancellationToken
Returns
ListConnectionStrings(string, string)
Lists the connection strings for the specified Azure CosmosDB database account.
IDatabaseAccountListConnectionStringsResult ListConnectionStrings(string groupName, string accountName)
Parameters
Returns
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
stringThe group name.
accountName
stringThe account name.
cancellationToken
CancellationToken
Returns
ListKeys(string, string)
Lists the access keys for the specified Azure CosmosDB database account.
IDatabaseAccountListKeysResult ListKeys(string groupName, string accountName)
Parameters
Returns
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
stringThe group name.
accountName
stringThe account name.
cancellationToken
CancellationToken
Returns
ListReadOnlyKeys(string, string)
Lists the read-only access keys for the specified Azure CosmosDB database account.
IDatabaseAccountListReadOnlyKeysResult ListReadOnlyKeys(string groupName, string accountName)
Parameters
Returns
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
stringThe group name.
accountName
stringThe account name.
cancellationToken
CancellationToken
Returns
RegenerateKey(string, string, string)
Regenerates an access key for the specified Azure CosmosDB database account.
void RegenerateKey(string groupName, string accountName, string keyKind)
Parameters
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
stringThe group name.
accountName
stringThe account name.
keyKind
stringThe key kind.
cancellationToken
CancellationToken