Method SetTableTagsWithCompletionAsync
SetTableTagsWithCompletionAsync(String, IDictionary<String, IDictionary<String, String>>, IDictionary<String, String>, TableDDLOptions, CancellationToken)
Declaration
public Task<TableResult> SetTableTagsWithCompletionAsync(string tableName, IDictionary<string, IDictionary<string, string>> definedTags, IDictionary<string, string> freeFormTags = null, TableDDLOptions options = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
String | tableName | Name of the table. |
IDictionary<String, IDictionary<String, String>> | definedTags | Defined tags, see DefinedTags |
IDictionary<String, String> | freeFormTags | Free-form tags, see FreeFormTags |
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
defined or free-form tags, use definedTags and
freeFormTags parameters instead.
|
CancellationToken | cancellationToken | (Optional) Cancellation token. |
Returns
Type | Description |
---|---|
Task<TableResult> | Task returning TableResult. |
Remarks
This method is equivalent to calling SetTableTagsAsync(String, IDictionary<String, IDictionary<String, String>>, IDictionary<String, String>, TableDDLOptions, CancellationToken) and then calling WaitForCompletionAsync(Nullable<TimeSpan>, Nullable<TimeSpan>, CancellationToken) on the returned TableResult object. If the operation is successful, the table state in the resulting TableResult object should be Active.
Note: this method is supported with the Cloud Service and Cloud Simulator but is not supported with on-premise NoSQL database (see KVStore), where it is a no-op.
For this operation, Timeout covers the total time interval including waiting for the DDL operation completion. If not specified, separate default timeouts are used for issuing the DDL operation and waiting for its completion, with values of TableDDLTimeout and TablePollTimeout correspondingly (the latter defaults to no timeout if TablePollTimeout is not set). Note that as with WaitForCompletionAsync(Nullable<TimeSpan>, Nullable<TimeSpan>, CancellationToken) you may specify poll delay as PollDelay which otherwise defaults to TablePollDelay.
Exceptions
Type | Condition |
---|---|
ArgumentException | If
tableName is null or invalid or
both definedTags and
freeFormTags are 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. |