Get-AzSecurityApiCollection
获取已载入 Microsoft Defender for API 的 Azure API 管理 API。
如果 Azure API 管理 API 已加入 Microsoft Defender for API,则系统将监视 Azure API 管理 API 中的作,以获取侵入性行为,并为检测到的攻击提供警报。
语法
List (默认值)
Get-AzSecurityApiCollection
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get
Get-AzSecurityApiCollection
-ApiId <String>
-ResourceGroupName <String>
-ServiceName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
List2
Get-AzSecurityApiCollection
-ResourceGroupName <String>
-ServiceName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
List1
Get-AzSecurityApiCollection
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
GetViaIdentity
Get-AzSecurityApiCollection
-InputObject <ISecurityIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
说明
获取已载入 Microsoft Defender for API 的 Azure API 管理 API。
如果 Azure API 管理 API 已加入 Microsoft Defender for API,则系统将监视 Azure API 管理 API 中的作,以获取侵入性行为,并为检测到的攻击提供警报。
示例
示例 1:获取特定的载入 API 集合资源
Get-AzSecurityApiCollection -ResourceGroupName apicollectionstests -ServiceName "demoapimservice2" -ApiId "echo-api"
BaseUrl : https://demoapimservice2.azure-api.net/echo
DiscoveredVia : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapim
service2
DisplayName : Echo API
Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapim
service2/providers/Microsoft.Security/apiCollections/echo-api
Name : echo-api
NumberOfApiEndpoint : 6
NumberOfApiEndpointsWithSensitiveDataExposed : 0
NumberOfExternalApiEndpoint : 0
NumberOfInactiveApiEndpoint : 6
NumberOfUnauthenticatedApiEndpoint : 0
ProvisioningState : Succeeded
ResourceGroupName : apicollectionstests
SensitivityLabel :
Type : microsoft.security/apicollections
示例 2:按服务名称列出载入的 API 集合
Get-AzSecurityApiCollection -ResourceGroupName "apicollectionstests" -ServiceName "demoapimservice2"
Name ResourceGroupName
---- -----------------
echo-api apicollectionstests
echo-api-2 apicollectionstests
示例 3:按订阅列出已加入的 API 集合
Get-AzSecurityApiCollection
Name ResourceGroupName
---- -----------------
echo-api apicollectionstests
echo-api-2 apicollectionstests
参数
-ApiId
API 修订标识符。
在 API 管理服务实例中必须是唯一的。
非当前修订版有 ;rev=n 作为后缀,其中 n 是修订号。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
Get
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DefaultProfile
DefaultProfile 参数不起作用。
如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
参数属性
类型: PSObject
默认值: None
支持通配符: False
不显示: False
别名: AzureRMContext, AzureCredential
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
标识参数
GetViaIdentity
Position: Named
必需: True
来自管道的值: True
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ResourceGroupName
资源组的名称。
此名称不区分大小写。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
Get
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
List2
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
List1
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ServiceName
API 管理服务的名称。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
Get
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
List2
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-SubscriptionId
Azure 订阅 ID
参数属性
类型: String [ ]
默认值: (Get-AzContext).Subscription.Id
支持通配符: False
不显示: False
参数集
List
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
Get
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
List2
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
List1
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters 。
输出