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
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
assessmentKeystringThe assessment metadata key used when an assessment is generated for this Recommendation.
cloudProvidersarrayList of all standard supported clouds.
descriptionstringThe description to relate to the assessments generated by this Recommendation.
displayNamestringThe display name of the assessments generated by this Recommendation.
querystringKQL query representing the Recommendation results required.
remediationDescriptionstringThe remediation description to relate to the assessments generated by this Recommendation.
securityIssuestringThe severity to relate to the assessments generated by this Recommendation. Known values are: "Vulnerability", "ExcessivePermissions", "AnonymousAccess", "NetworkExposure", "TrafficEncryption", and "BestPractices". (Vulnerability, ExcessivePermissions, AnonymousAccess, NetworkExposure, TrafficEncryption, BestPractices)
severitystringThe severity to relate to the assessments generated by this Recommendation. Known values are: "High", "Medium", and "Low". (High, Medium, Low)
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, custom_recommendation_nameGet a specific custom recommendation for the requested scope by customRecommendationName.
listselectscopeGet a list of all relevant custom recommendations over a scope.
create_or_updateinsertscope, custom_recommendation_nameCreates or updates a custom recommendation over a given scope.
create_or_updatereplacescope, custom_recommendation_nameCreates or updates a custom recommendation over a given scope.
deletedeletescope, custom_recommendation_nameDelete 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
custom_recommendation_namestringName of the Custom Recommendation. Required.
scopestringThe fully qualified Azure Resource manager identifier of the resource. Required.

SELECT examples​

Get a specific custom recommendation for the requested scope by customRecommendationName.

SELECT
id,
name,
assessmentKey,
cloudProviders,
description,
displayName,
query,
remediationDescription,
securityIssue,
severity,
systemData,
type
FROM azure.security.custom_recommendations
WHERE scope = '{{ scope }}' -- required
AND custom_recommendation_name = '{{ custom_recommendation_name }}' -- required
;

INSERT examples​

Creates or updates a custom recommendation over a given scope.

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

REPLACE examples​

Creates or updates a custom recommendation over a given scope.

REPLACE azure.security.custom_recommendations
SET
properties = '{{ properties }}'
WHERE
scope = '{{ scope }}' --required
AND custom_recommendation_name = '{{ custom_recommendation_name }}' --required
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 custom_recommendation_name = '{{ custom_recommendation_name }}' --required
;