你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
CloudTable.CreateIfNotExistsAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
CreateIfNotExistsAsync() |
启动异步操作以创建表(如果表尚不存在)。 |
CreateIfNotExistsAsync(CancellationToken) |
启动异步操作以创建表(如果表尚不存在)。 |
CreateIfNotExistsAsync(TableRequestOptions, OperationContext) |
启动异步操作以创建表(如果表尚不存在)。 |
CreateIfNotExistsAsync(IndexingMode, Nullable<Int32>, CancellationToken) |
启动异步操作以创建表(如果表尚不存在)。 |
CreateIfNotExistsAsync(TableRequestOptions, OperationContext, CancellationToken) |
启动异步操作以创建表(如果表尚不存在)。 |
CreateIfNotExistsAsync(IndexingMode, Nullable<Int32>, Nullable<Int32>, CancellationToken) |
启动异步操作以创建表(如果表尚不存在)。 |
CreateIfNotExistsAsync(TableRequestOptions, OperationContext, Nullable<IndexingMode>, Nullable<Int32>, CancellationToken) | |
CreateIfNotExistsAsync(TableRequestOptions, OperationContext, String, Nullable<Int32>, Nullable<Int32>, CancellationToken) |
启动异步操作以创建表(如果表尚不存在)。 |
CreateIfNotExistsAsync()
启动异步操作以创建表(如果表尚不存在)。
public virtual System.Threading.Tasks.Task<bool> CreateIfNotExistsAsync ();
abstract member CreateIfNotExistsAsync : unit -> System.Threading.Tasks.Task<bool>
override this.CreateIfNotExistsAsync : unit -> System.Threading.Tasks.Task<bool>
Public Overridable Function CreateIfNotExistsAsync () As Task(Of Boolean)
返回
表示异步操作的 bool
类型的 Task<TResult> 对象。
注解
此 API 执行存在检查因此需要列表权限。
适用于
CreateIfNotExistsAsync(CancellationToken)
启动异步操作以创建表(如果表尚不存在)。
public virtual System.Threading.Tasks.Task<bool> CreateIfNotExistsAsync (System.Threading.CancellationToken cancellationToken);
abstract member CreateIfNotExistsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.CreateIfNotExistsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function CreateIfNotExistsAsync (cancellationToken As CancellationToken) As Task(Of Boolean)
参数
- cancellationToken
- CancellationToken
等待任务完成期间要观察的 CancellationToken。
返回
表示异步操作的 bool
类型的 Task<TResult> 对象。
注解
此 API 执行存在检查因此需要列表权限。
适用于
CreateIfNotExistsAsync(TableRequestOptions, OperationContext)
启动异步操作以创建表(如果表尚不存在)。
public virtual System.Threading.Tasks.Task<bool> CreateIfNotExistsAsync (Microsoft.Azure.Cosmos.Table.TableRequestOptions requestOptions, Microsoft.Azure.Cosmos.Table.OperationContext operationContext);
abstract member CreateIfNotExistsAsync : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext -> System.Threading.Tasks.Task<bool>
override this.CreateIfNotExistsAsync : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext -> System.Threading.Tasks.Task<bool>
Public Overridable Function CreateIfNotExistsAsync (requestOptions As TableRequestOptions, operationContext As OperationContext) As Task(Of Boolean)
参数
- requestOptions
- TableRequestOptions
一个 TableRequestOptions 对象,它指定请求的其他选项。
- operationContext
- OperationContext
一个 OperationContext 对象,它一个表示当前操作的上下文。
返回
表示异步操作的 bool
类型的 Task<TResult> 对象。
注解
此 API 执行存在检查因此需要列表权限。
适用于
CreateIfNotExistsAsync(IndexingMode, Nullable<Int32>, CancellationToken)
启动异步操作以创建表(如果表尚不存在)。
public virtual System.Threading.Tasks.Task<bool> CreateIfNotExistsAsync (Microsoft.Azure.Cosmos.IndexingMode indexingMode, int? throughput, System.Threading.CancellationToken cancellationToken);
abstract member CreateIfNotExistsAsync : Microsoft.Azure.Cosmos.IndexingMode * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.CreateIfNotExistsAsync : Microsoft.Azure.Cosmos.IndexingMode * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function CreateIfNotExistsAsync (indexingMode As IndexingMode, throughput As Nullable(Of Integer), cancellationToken As CancellationToken) As Task(Of Boolean)
参数
- indexingMode
- IndexingMode
CosmosDB 表索引模式
- cancellationToken
- CancellationToken
等待任务完成期间要观察的 CancellationToken。
返回
表示异步操作的 bool
类型的 Task<TResult> 对象。
注解
此 API 执行存在检查因此需要列表权限。
适用于
CreateIfNotExistsAsync(TableRequestOptions, OperationContext, CancellationToken)
启动异步操作以创建表(如果表尚不存在)。
public virtual System.Threading.Tasks.Task<bool> CreateIfNotExistsAsync (Microsoft.Azure.Cosmos.Table.TableRequestOptions requestOptions, Microsoft.Azure.Cosmos.Table.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
abstract member CreateIfNotExistsAsync : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.CreateIfNotExistsAsync : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function CreateIfNotExistsAsync (requestOptions As TableRequestOptions, operationContext As OperationContext, cancellationToken As CancellationToken) As Task(Of Boolean)
参数
- requestOptions
- TableRequestOptions
一个 TableRequestOptions 对象,它指定请求的其他选项。
- operationContext
- OperationContext
一个 OperationContext 对象,它一个表示当前操作的上下文。
- cancellationToken
- CancellationToken
等待任务完成期间要观察的 CancellationToken。
返回
表示异步操作的 bool
类型的 Task<TResult> 对象。
注解
此 API 执行存在检查因此需要列表权限。
适用于
CreateIfNotExistsAsync(IndexingMode, Nullable<Int32>, Nullable<Int32>, CancellationToken)
启动异步操作以创建表(如果表尚不存在)。
public virtual System.Threading.Tasks.Task<bool> CreateIfNotExistsAsync (Microsoft.Azure.Cosmos.IndexingMode indexingMode, int? throughput, int? defaultTimeToLive, System.Threading.CancellationToken cancellationToken);
abstract member CreateIfNotExistsAsync : Microsoft.Azure.Cosmos.IndexingMode * Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.CreateIfNotExistsAsync : Microsoft.Azure.Cosmos.IndexingMode * Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function CreateIfNotExistsAsync (indexingMode As IndexingMode, throughput As Nullable(Of Integer), defaultTimeToLive As Nullable(Of Integer), cancellationToken As CancellationToken) As Task(Of Boolean)
参数
- indexingMode
- IndexingMode
CosmosDB 表索引模式
CosmosDB 表生存时间(以秒为单位)。 Null 表示 TTL 已关闭,-1 等于 TTL 处于打开状态并无限期保留行,任何其他值设置 TTL。
- cancellationToken
- CancellationToken
等待任务完成期间要观察的 CancellationToken。
返回
表示异步操作的 bool
类型的 Task<TResult> 对象。
注解
此 API 执行存在检查因此需要列表权限。
适用于
CreateIfNotExistsAsync(TableRequestOptions, OperationContext, Nullable<IndexingMode>, Nullable<Int32>, CancellationToken)
public virtual System.Threading.Tasks.Task<bool> CreateIfNotExistsAsync (Microsoft.Azure.Cosmos.Table.TableRequestOptions requestOptions, Microsoft.Azure.Cosmos.Table.OperationContext operationContext, Microsoft.Azure.Cosmos.IndexingMode? indexingMode, int? throughput, System.Threading.CancellationToken cancellationToken);
abstract member CreateIfNotExistsAsync : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext * Nullable<Microsoft.Azure.Cosmos.IndexingMode> * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.CreateIfNotExistsAsync : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext * Nullable<Microsoft.Azure.Cosmos.IndexingMode> * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function CreateIfNotExistsAsync (requestOptions As TableRequestOptions, operationContext As OperationContext, indexingMode As Nullable(Of IndexingMode), throughput As Nullable(Of Integer), cancellationToken As CancellationToken) As Task(Of Boolean)
参数
- requestOptions
- TableRequestOptions
- operationContext
- OperationContext
- indexingMode
- Nullable<IndexingMode>
- cancellationToken
- CancellationToken
返回
适用于
CreateIfNotExistsAsync(TableRequestOptions, OperationContext, String, Nullable<Int32>, Nullable<Int32>, CancellationToken)
启动异步操作以创建表(如果表尚不存在)。
public virtual System.Threading.Tasks.Task<bool> CreateIfNotExistsAsync (Microsoft.Azure.Cosmos.Table.TableRequestOptions requestOptions, Microsoft.Azure.Cosmos.Table.OperationContext operationContext, string serializedIndexingPolicy, int? throughput, int? defaultTimeToLive, System.Threading.CancellationToken cancellationToken);
abstract member CreateIfNotExistsAsync : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext * string * Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.CreateIfNotExistsAsync : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext * string * Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function CreateIfNotExistsAsync (requestOptions As TableRequestOptions, operationContext As OperationContext, serializedIndexingPolicy As String, throughput As Nullable(Of Integer), defaultTimeToLive As Nullable(Of Integer), cancellationToken As CancellationToken) As Task(Of Boolean)
参数
- requestOptions
- TableRequestOptions
一个 TableRequestOptions 对象,它指定请求的其他选项。
- operationContext
- OperationContext
一个 OperationContext 对象,它一个表示当前操作的上下文。
- serializedIndexingPolicy
- String
CosmosDB 表索引策略。
CosmosDB 表生存时间(以秒为单位)。 Null 表示 TTL 已关闭,-1 等于 TTL 处于打开状态并无限期保留行,任何其他值设置 TTL。
- cancellationToken
- CancellationToken
等待任务完成期间要观察的 CancellationToken。
返回
表示异步操作的 bool
类型的 Task<TResult> 对象。
注解
此 API 执行存在检查因此需要列表权限。