Skip to main content

custom_recommendations

Creates, updates, deletes, gets or lists a custom_recommendations resource.

Overview

Namecustom_recommendations
TypeResource
Idazure.security.custom_recommendations

Fields

The following fields are returned by SELECT queries:

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 Custom Recommendation properties.
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
getselectscope, customRecommendationNameGet a specific custom recommendation for the requested scope by customRecommendationName
listselectscopeGet a list of all relevant custom recommendations over a scope
create_or_updateinsertscope, customRecommendationNameCreates or updates a custom recommendation over a given scope
deletedeletescope, customRecommendationNameDelete a custom recommendation over a given scope

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
customRecommendationNamestringName of the Custom Recommendation.
scopestringThe scope of the standard assignment. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'

SELECT examples

Get a specific custom recommendation for the requested scope by customRecommendationName

SELECT
id,
name,
properties,
systemData,
type
FROM azure.security.custom_recommendations
WHERE scope = '{{ scope }}' -- required
AND customRecommendationName = '{{ customRecommendationName }}' -- required
;

INSERT examples

Creates or updates a custom recommendation over a given scope

INSERT INTO azure.security.custom_recommendations (
data__properties,
scope,
customRecommendationName
)
SELECT
'{{ properties }}',
'{{ scope }}',
'{{ customRecommendationName }}'
RETURNING
id,
name,
properties,
systemData,
type
;

DELETE examples

Delete a custom recommendation over a given scope

DELETE FROM azure.security.custom_recommendations
WHERE scope = '{{ scope }}' --required
AND customRecommendationName = '{{ customRecommendationName }}' --required
;