你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzApiManagementLogger
获取 API 管理记录器对象。
语法
Get-AzApiManagementLogger
-Context <PsApiManagementContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzApiManagementLogger
-Context <PsApiManagementContext>
-LoggerId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzApiManagementLogger cmdlet 获取 Azure API 管理 记录器 或所有记录器。
示例
示例 1:获取所有记录器
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementLogger -Context $apimContext
此命令获取指定上下文的所有记录器。
示例 2:获取特定记录器
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementLogger -Context $apimContext -LoggerId "Logger123"
此命令删除 ID 为 Logger123 的记录器。
参数
-Context
指定 PsApiManagementContext 对象。
类型: | PsApiManagementContext |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-LoggerId
指定要获取的特定记录器 ID。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |