Recuperare le informazioni su una distribuzione di Servizi cloud di Azure (supporto "Extended")
Questi esempi illustrano vari modi per recuperare informazioni sulle distribuzioni di Servizi cloud di Azure (supporto "Extended") esistenti.
Recuperare tutti i servizi cloud in un gruppo di risorse
Get-AzCloudService -ResourceGroupName "ContosOrg"
ResourceGroupName Name Location ProvisioningState
----------------- ---- -------- -----------------
ContosOrg ContosoCS eastus2euap Succeeded
ContosOrg ContosoCSTest eastus2euap Failed
Recuperare un singolo servizio cloud
Get-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS"
ResourceGroupName Name Location ProvisioningState
----------------- ---- -------- -----------------
ContosOrg ContosoCS eastus2euap Succeeded
PS C:\> $cloudService = Get-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS"
PS C:\> $cloudService | Format-List
ResourceGroupName : ContosOrg
Configuration : xxxxxxxx
ConfigurationUrl :
ExtensionProfile : xxxxxxxx
Id : xxxxxxxx
Location : East US
Name : ContosoCS
NetworkProfile : xxxxxxxx
OSProfile : xxxxxxxx
PackageUrl : xxxxxxxx
ProvisioningState : Succeeded
RoleProfile : xxxxxxxx
StartCloudService :
Tag : {
"Owner": "Contos"
}
Type : Microsoft.Compute/cloudServices
UniqueId : xxxxxxxx
UpgradeMode : Auto
Recuperare la visualizzazione dell'istanza del servizio cloud
PS C:\>$cloudServiceInstanceView = Get-AzCloudServiceInstanceView -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS"
PS C:\>$cloudServiceInstanceView
RoleInstanceStatusesSummary Statuses
--------------------------- --------
{{ProvisioningState/succeeded : 4}, {PowerState/started : 4}} {Provisioning succeeded, Started, Current Upgrade Domain of cloud service is -1., Max Upgrade Domain of cloud service is 1.}
PS C:\>$cloudServiceInstanceView.ToJsonString()
{
"roleInstance": {
"statusesSummary": [
{
"code": "ProvisioningState/succeeded",
"count": 4
},
{
"code": "PowerState/started",
"count": 4
}
]
},
"statuses": [
{
"code": "ProvisioningState/succeeded",
"displayStatus": "Provisioning succeeded",
"level": "Info",
"time": "2020-10-28T13:26:48.8109686Z"
},
{
"code": "PowerState/started",
"displayStatus": "Started",
"level": "Info",
"time": "2020-10-28T13:26:48.8109686Z"
},
{
"code": "CurrentUpgradeDomain/-1",
"displayStatus": "Current Upgrade Domain of cloud service is -1.",
"level": "Info"
},
{
"code": "MaxUpgradeDomain/1",
"displayStatus": "Max Upgrade Domain of cloud service is 1.",
"level": "Info"
}
]
}
Passaggi successivi
- Per altre informazioni su Servizi cloud di Azure (supporto "Extended"), vedere Panoramica di Servizi cloud di Azure (supporto "Extended").
- Visitare il repository di esempi di Servizi cloud (supporto "Extended")