共用方式為


New-AzCosmosDBCassandraTable

建立新的 CosmosDB Cassandra 數據表。

語法

New-AzCosmosDBCassandraTable
   -ResourceGroupName <String>
   -AccountName <String>
   -KeyspaceName <String>
   -Name <String>
   [-Throughput <Int32>]
   [-AutoscaleMaxThroughput <Int32>]
   [-TtlInSeconds <Int32>]
   [-AnalyticalStorageTtl <Int32>]
   -Schema <PSCassandraSchema>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzCosmosDBCassandraTable
   -Name <String>
   [-Throughput <Int32>]
   [-AutoscaleMaxThroughput <Int32>]
   [-TtlInSeconds <Int32>]
   [-AnalyticalStorageTtl <Int32>]
   -Schema <PSCassandraSchema>
   -ParentObject <PSCassandraKeyspaceGetResults>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

建立新的 CosmosDB Cassandra 數據表。

範例

範例 1

$Column1 = New-AzCosmosDBCassandraColumn -Name "ColumnA" -Type "int"
$Column2 = New-AzCosmosDBCassandraColumn -Name "ColumnB" -Type "ascii"
$Column3 = New-AzCosmosDBCassandraColumn -Name "ColumnC" -Type "int"
$Column4 = New-AzCosmosDBCassandraColumn -Name "ColumnD" -Type "ascii"

$clusterkey1 = New-AzCosmosDBCassandraClusterKey -Name "ColumnB" -OrderBy "Asc"
$clusterkey2 = New-AzCosmosDBCassandraClusterKey -Name "ColumnA" -OrderBy "Asc"

$schema = New-AzCosmosDBCassandraSchema -Column $Column1,$Column2 -ClusterKey $clusterkey1 -PartitionKey "ColumnA"

New-AzCosmosDBCassandraTable -AccountName myAccountName -ResourceGroupName myRgName -KeyspaceName myKeyspaceName -Name myTableName -Schema $schema

Name     : myTable
Id       : /subscriptions/mySubId/resourceGroups/myRgName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/cassandraKeyspaces/myKeyspaceName/tables/myTableName
Location :
Tags     :
Resource : Microsoft.Azure.Commands.CosmosDB.Models.PSCassandraTableGetPropertiesResource

參數

-AccountName

Cosmos DB 資料庫帳戶的名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-AnalyticalStorageTtl

分析記憶體 TTL。

類型:Nullable<T>[Int32]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AutoscaleMaxThroughput

啟用自動調整時的最大輸送量值。

類型:Nullable<T>[Int32]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-KeyspaceName

Cassandra Keyspace 名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Name

Cassandra 數據表名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ParentObject

Cassandra Keyspace 物件。

類型:PSCassandraKeyspaceGetResults
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ResourceGroupName

資源組名。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Schema

PSCassandraSchema 物件。 使用 New-AzCosmosDBCassandraSchema 來建立這個物件。

類型:PSCassandraSchema
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Throughput

Cassandra Keyspace (RU/秒) 的輸送量。 預設值為 400。

類型:Nullable<T>[Int32]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-TtlInSeconds

預設 Ttl 以秒為單位。 如果值遺失或設定為 - 1,則專案不會過期。 如果值設定為 n,則專案會在上次修改時間之後的 n 秒到期。

類型:Nullable<T>[Int32]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

輸出