Method SetTableTagsAsync
SetTableTagsAsync(String, IDictionary<String, IDictionary<String, String>>, IDictionary<String, String>, TableDDLOptions, CancellationToken)
Cloud Service Only.
Sets defined and free-form tags on existing table.
Declaration
public Task<TableResult> SetTableTagsAsync(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
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.
See DefinedTags and FreeFormTags for more information on tagging.
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(Nullable<TimeSpan>, Nullable<TimeSpan>, CancellationToken) to asynchronously wait for operation completion.
To set only free-form tags, you may pass null
for
definedTags
parameter. At least one of
definedTags
and freeFormTags
must not be null
.
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. |