Skip to main content

api_collections

Creates, updates, deletes, gets or lists an api_collections resource.

Overview

Nameapi_collections
TypeResource
Idazure.security.api_collections

Fields

The following fields are returned by SELECT queries:

This indicates a successful response. The response contains the properties of the API collection.

NameDatatypeDescription
idstring (arm-id)Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
propertiesobjectDescribes the properties of an API collection.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_azure_api_management_serviceselectsubscriptionId, resourceGroupName, serviceName, apiIdGets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.
list_by_azure_api_management_serviceselectsubscriptionId, resourceGroupName, serviceNameGets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.
list_by_resource_groupselectsubscriptionId, resourceGroupNameGets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs.
list_by_subscriptionselectsubscriptionIdGets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs.
onboard_azure_api_management_apiexecsubscriptionId, resourceGroupName, serviceName, apiIdOnboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected.
offboard_azure_api_management_apiexecsubscriptionId, resourceGroupName, serviceName, apiIdOffboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the operations within the Azure API Management API for intrusive behaviors.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
apiIdstringAPI revision identifier. Must be unique in the API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.

SELECT
id,
name,
properties,
systemData,
type
FROM azure.security.api_collections
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND apiId = '{{ apiId }}' -- required
;

Lifecycle Methods

Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected.

EXEC azure.security.api_collections.onboard_azure_api_management_api 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@apiId='{{ apiId }}' --required
;