Get-AzAksSnapshot
取得快照集。
語法
Get-AzAksSnapshot
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzAksSnapshot
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzAksSnapshot
-ResourceGroupName <String>
-ResourceName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzAksSnapshot
-InputObject <IAksIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
取得快照集。
範例
範例 1:列出所有 AKS 快照集
Get-AzAksSnapshot
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User
eastus snapshot2 3/30/2023 10:09:38 AM user1@microsoft.com User 3/30/2023 10:09:38 AM user1@microsoft.com User
eastus snapshot3 3/30/2023 10:11:24 AM user1@microsoft.com User 3/30/2023 10:11:24 AM user1@microsoft.com User
範例 2:列出資源群組中的所有 AKS 快照集
Get-AzAksSnapshot -ResourceGroupName mygroup
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User
eastus snapshot2 3/30/2023 10:09:38 AM user1@microsoft.com User 3/30/2023 10:09:38 AM user1@microsoft.com User
範例 3:取得 AKS 快照集
Get-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1'
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User
範例 4:透過身分識別取得 AKS 快照集
$pool = Get-AzAksNodePool -ResourceGroupName mygroup -ClusterName mycluster -Name default
$Snapshot = New-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' -Location eastus -SnapshotType 'NodePool' -CreationDataSourceResourceId $pool.Id
$Snapshot | Get-AzAksSnapshot
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User
參數
-DefaultProfile
DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。
類型: | PSObject |
別名: | AzureRMContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-InputObject
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
類型: | IAksIdentity |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ResourceGroupName
資源群組的名稱。 名稱不區分大小寫。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceName
受控叢集資源的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-SubscriptionId
目標訂用帳戶的標識碼。
類型: | String[] |
Position: | Named |
預設值: | (Get-AzContext).Subscription.Id |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |