你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzApiManagementProduct
获取列表或特定产品。
语法
Get-AzApiManagementProduct
-Context <PsApiManagementContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzApiManagementProduct
-Context <PsApiManagementContext>
-ProductId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzApiManagementProduct
-Context <PsApiManagementContext>
[-Title <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzApiManagementProduct
-Context <PsApiManagementContext>
-ApiId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzApiManagementProduct cmdlet 获取列表或特定产品。
示例
示例 1:获取所有产品
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementProduct -Context $apimContext
此命令获取所有 API 管理产品。
示例 2:按 ID 获取产品
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementProduct -Context $apimContext -ProductId "0123456789"
此命令按 ID 获取 API 管理产品。
示例 2:按游戏获取产品
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
$product = Get-AzApiManagementProduct -Context $apimContext -Title 'Starter'
$product | Select-Object -First 1
此命令按标题选择第一个 API 管理产品。
参数
-ApiId
用于查找相关产品的 ApiId。 此参数是可选的。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Context
指定 PsApiManagementContext 对象的实例。
类型: | PsApiManagementContext |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ProductId
指定要搜索的产品的标识符。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Title
指定要查找的产品标题。 如果指定,cmdlet 会尝试按游戏获取产品。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |