Method SetTableLimitsAsync
SetTableLimitsAsync(string, TableLimits, TableDDLOptions, CancellationToken)
Cloud Service Only.
Sets new limits of throughput and storage for existing table.
Declaration
public Task<TableResult> SetTableLimitsAsync(string tableName, TableLimits tableLimits, TableDDLOptions options = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Name of the table. |
| TableLimits | tableLimits | The new table limits. |
| TableDDLOptions | options | (Optional) Options for the operation.
If not specified or null, appropriate defaults
will be used. This parameter should not be used to specify table
limits, use tableLimits parameter instead. |
| CancellationToken | cancellationToken | (Optional) Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<TableResult> | Task returning TableResult. |
Remarks
Note: this method is supported with the Cloud Service and Cloud Simulator but is not supported with on-premise NoSQL database (see ServiceType.KVStore), where it is a no-op.
This method is similar to ExecuteTableDDLAsync(string, TableDDLOptions, CancellationToken), so all considerations discussed apply here, including long running DDL operations and the need to use WaitForCompletionAsync(TimeSpan?, TimeSpan?, CancellationToken) to asynchronously wait for operation completion.
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If
tableName is null or invalid
or options contains invalid values. |
| TimeoutException | Operation has timed out. |
| InvalidOperationException | The table or the service is not in a valid state to perform this operation. |
| NoSQLException | NoSQLException or one of its subclasses is thrown if operation cannot be performed for any other reason. See documentation for corresponding subclass of NoSQLException. |