Share via


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CloudTable.CreateIfNotExists 方法

定义

重载

CreateIfNotExists(TableRequestOptions, OperationContext, String, Nullable<Int32>, Nullable<Int32>)

如果表不存在,则创建表。

CreateIfNotExists(IndexingMode, Nullable<Int32>, Nullable<Int32>)

如果表不存在,则创建表。

CreateIfNotExists(TableRequestOptions, OperationContext, Nullable<IndexingMode>, Nullable<Int32>)
CreateIfNotExists(TableRequestOptions, OperationContext)
CreateIfNotExists()
CreateIfNotExists(Nullable<IndexingMode>, Nullable<Int32>)

CreateIfNotExists(TableRequestOptions, OperationContext, String, Nullable<Int32>, Nullable<Int32>)

如果表不存在,则创建表。

public virtual bool CreateIfNotExists (Microsoft.Azure.Cosmos.Table.TableRequestOptions requestOptions = default, Microsoft.Azure.Cosmos.Table.OperationContext operationContext = default, string serializedIndexingPolicy = default, int? throughput = default, int? defaultTimeToLive = default);
abstract member CreateIfNotExists : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext * string * Nullable<int> * Nullable<int> -> bool
override this.CreateIfNotExists : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext * string * Nullable<int> * Nullable<int> -> bool
Public Overridable Function CreateIfNotExists (Optional requestOptions As TableRequestOptions = Nothing, Optional operationContext As OperationContext = Nothing, Optional serializedIndexingPolicy As String = Nothing, Optional throughput As Nullable(Of Integer) = Nothing, Optional defaultTimeToLive As Nullable(Of Integer) = Nothing) As Boolean

参数

requestOptions
TableRequestOptions

一个 TableRequestOptions 对象,它指定请求的其他选项。

operationContext
OperationContext

一个 OperationContext 对象,它一个表示当前操作的上下文。

serializedIndexingPolicy
String

CosmosDB 表索引策略。

throughput
Nullable<Int32>

CosmosDB 表吞吐量。

defaultTimeToLive
Nullable<Int32>

CosmosDB 表生存时间(以秒为单位)。 Null 表示 TTL 处于关闭状态,-1 等于 TTL 处于打开状态并无限期保留行,任何其他值设置 TTL。

返回

如果表已创建,则为 true;否则为 false

注解

此 API 执行存在检查,因此需要列表权限。

适用于

CreateIfNotExists(IndexingMode, Nullable<Int32>, Nullable<Int32>)

如果表不存在,则创建表。

public virtual bool CreateIfNotExists (Microsoft.Azure.Cosmos.IndexingMode indexingMode, int? throughput = default, int? defaultTimeToLive = default);
abstract member CreateIfNotExists : Microsoft.Azure.Cosmos.IndexingMode * Nullable<int> * Nullable<int> -> bool
override this.CreateIfNotExists : Microsoft.Azure.Cosmos.IndexingMode * Nullable<int> * Nullable<int> -> bool
Public Overridable Function CreateIfNotExists (indexingMode As IndexingMode, Optional throughput As Nullable(Of Integer) = Nothing, Optional defaultTimeToLive As Nullable(Of Integer) = Nothing) As Boolean

参数

indexingMode
IndexingMode

CosmosDB 表索引模式

throughput
Nullable<Int32>

CosmosDB 表吞吐量。

defaultTimeToLive
Nullable<Int32>

CosmosDB 表生存时间(以秒为单位)。 Null 表示 TTL 处于关闭状态,-1 等于 TTL 处于打开状态并无限期保留行,任何其他值设置 TTL。

返回

如果表已创建,则为 true;否则为 false

注解

此 API 执行存在检查,因此需要列表权限。

适用于

CreateIfNotExists(TableRequestOptions, OperationContext, Nullable<IndexingMode>, Nullable<Int32>)

public virtual bool CreateIfNotExists (Microsoft.Azure.Cosmos.Table.TableRequestOptions requestOptions, Microsoft.Azure.Cosmos.Table.OperationContext operationContext, Microsoft.Azure.Cosmos.IndexingMode? indexingMode, int? throughput);
abstract member CreateIfNotExists : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext * Nullable<Microsoft.Azure.Cosmos.IndexingMode> * Nullable<int> -> bool
override this.CreateIfNotExists : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext * Nullable<Microsoft.Azure.Cosmos.IndexingMode> * Nullable<int> -> bool
Public Overridable Function CreateIfNotExists (requestOptions As TableRequestOptions, operationContext As OperationContext, indexingMode As Nullable(Of IndexingMode), throughput As Nullable(Of Integer)) As Boolean

参数

requestOptions
TableRequestOptions
operationContext
OperationContext
indexingMode
Nullable<IndexingMode>
throughput
Nullable<Int32>

返回

适用于

CreateIfNotExists(TableRequestOptions, OperationContext)

public virtual bool CreateIfNotExists (Microsoft.Azure.Cosmos.Table.TableRequestOptions requestOptions, Microsoft.Azure.Cosmos.Table.OperationContext operationContext);
abstract member CreateIfNotExists : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext -> bool
override this.CreateIfNotExists : Microsoft.Azure.Cosmos.Table.TableRequestOptions * Microsoft.Azure.Cosmos.Table.OperationContext -> bool
Public Overridable Function CreateIfNotExists (requestOptions As TableRequestOptions, operationContext As OperationContext) As Boolean

参数

requestOptions
TableRequestOptions
operationContext
OperationContext

返回

适用于

CreateIfNotExists()

public virtual bool CreateIfNotExists ();
abstract member CreateIfNotExists : unit -> bool
override this.CreateIfNotExists : unit -> bool
Public Overridable Function CreateIfNotExists () As Boolean

返回

适用于

CreateIfNotExists(Nullable<IndexingMode>, Nullable<Int32>)

public virtual bool CreateIfNotExists (Microsoft.Azure.Cosmos.IndexingMode? indexingMode, int? throughput = default);
abstract member CreateIfNotExists : Nullable<Microsoft.Azure.Cosmos.IndexingMode> * Nullable<int> -> bool
override this.CreateIfNotExists : Nullable<Microsoft.Azure.Cosmos.IndexingMode> * Nullable<int> -> bool
Public Overridable Function CreateIfNotExists (indexingMode As Nullable(Of IndexingMode), Optional throughput As Nullable(Of Integer) = Nothing) As Boolean

参数

indexingMode
Nullable<IndexingMode>
throughput
Nullable<Int32>

返回

适用于