Get-AzWebPubSub
获取资源及其属性。
语法
Get-AzWebPubSub
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzWebPubSub
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzWebPubSub
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzWebPubSub
-InputObject <IWebPubSubIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
说明
获取资源及其属性。
示例
示例 1:列出订阅中的所有 Web PubSub 资源
Get-AzWebPubSub -SubscriptionId ef72249e-9785-4799-a76b-7cdd80e1b1d0
Name Location SkuName
---- -------- -------
demo1 eastus Standard_S1
demo2 eastus Free_F1
示例 2:列出资源组中的所有 Web PubSub 资源
Get-AzWebPubSub -ResourceGroupName psdemo
Name Location SkuName
---- -------- -------
psdemo-wps eastus Standard_S1
示例 3:获取特定的 Web PubSub 资源
Get-AzWebPubSub -ResourceGroupName psdemo -Name psdemo-wps
Name Location SkuName
---- -------- -------
psdemo-wps eastus Standard_S1
示例 4:通过标识对象获取特定的 Web PubSub 资源
$identity = @{ ResourceGroupName = 'psdemo'
ResourceName = 'psdemo-wps'
SubscriptionId = $(Get-AzContext).Subscription.Id }
$identity | Get-AzWebPubSub
Name Location SkuName
---- -------- -------
psdemo-wps eastus Standard_S1
参数
-DefaultProfile
DefaultProfile 参数不起作用。 如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
类型: | PSObject |
别名: | AzureRMContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
要构造的标识参数,请参阅 INPUTOBJECT 属性的 NOTES 部分并创建哈希表。
类型: | IWebPubSubIdentity |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Name
资源的名称。
类型: | String |
别名: | ResourceName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
包含该资源的资源组名称。 可以从 Azure 资源管理器 API 或门户获取此值。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-SubscriptionId
获取唯一标识 Azure 订阅Microsoft的订阅 ID。 此订阅 ID 是每个服务调用的 URI 的一部分。
类型: | String[] |
Position: | Named |
默认值: | (Get-AzContext).Subscription.Id |
必需: | False |
接受管道输入: | False |
接受通配符: | False |