共用方式為


Get-AzCosmosDBMongoDBRestorableCollection

列出特定資料庫可用的所有可還原 Azure Cosmos DB MongoDB 集合。

語法

Get-AzCosmosDBMongoDBRestorableCollection
   -Location <String>
   -DatabaseAccountInstanceId <String>
   -DatabaseRId <String>
   [-StartTime <String>]
   [-EndTime <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzCosmosDBMongoDBRestorableCollection
   -InputObject <PSRestorableSqlDatabaseGetResult>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

列出特定資料庫可用的所有可還原 Azure Cosmos DB MongoDB 集合。 此清單會有對應專案,以在特定資料庫下建立、取代和刪除所有即時和已刪除集合的事件。 此清單很適合根據集合中的變更來識別還原時間戳。 例如,如果使用者想要在刪除特定集合時將資料庫帳戶還原至時間戳,則使用者可以從此清單中找到對應的集合刪除事件,並在刪除事件之前選擇時間戳進行還原。

範例

範例 1

Get-AzCosmosDBMongoDBRestorableCollection -Location "location" -DatabaseAccountInstanceId "DatabaseAccountInstanceId" -DatabaseRId "DatabaseRId"

Id              : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts
                    /{DatabaseAccountInstanceId}/restorableMongoDBCollections/6a0cb3e4-7d2b-4363-b585-04a3b14ada8c
Name            : 6a0cb3e4-7d2b-4363-b585-04a3b14ada8c
Type            : Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongoDBCollections
_rid            : qsLuzwAAAA==
OperationType   : Create
EventTimestamp  : 01/20/2021 18:44:07
OwnerId         : foo-collection2
OwnerResourceId : Ts0YAPGKTvw=

Id              : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts
                    /{DatabaseAccountInstanceId}/restorableMongoDBCollections/ff36d1d3-f9dc-40a0-a003-60fe349abcfb
Name            : ff36d1d3-f9dc-40a0-a003-60fe349abcfb
Type            : Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongoDBCollections
_rid            : Ngu72QAAAA==
OperationType   : Replace
EventTimestamp  : 01/20/2021 18:44:07
OwnerId         : foo-collection1
OwnerResourceId : Ts0YAP+RbG0=

Id              : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts
                    /{DatabaseAccountInstanceId}/restorableMongoDBCollections/2afb35ba-1755-4fbc-85be-ae175dd0668f
Name            : 2afb35ba-1755-4fbc-85be-ae175dd0668f
Type            : Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongoDBCollections
_rid            : lSuf5gAAAA==
OperationType   : Create
EventTimestamp  : 01/20/2021 18:42:43
OwnerId         : foo-collection1
OwnerResourceId : Ts0YAP+RbG0=

資源物件包含集合資源的屬性

參數

-DatabaseAccountInstanceId

CosmosDB 資料庫帳戶的實例標識碼。 (這是作為資料庫帳戶屬性的一部分傳回)。

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

-DatabaseRId

資料庫的 ResourceId。

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

-DefaultProfile

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

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

-EndTime

可還原的 MongoDB 集合事件摘要結束時間。

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

-InputObject

CosmosDB 可還原的 MongoDB 資料庫物件

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

-Location

字串中Location的名稱。

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

-StartTime

可還原的 MongoDB 集合事件摘要開始時間。

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

輸入

None

輸出

PSRestorableMongodbCollectionGetResult