Custom Recommendations - Delete

Delete a custom recommendation over a given scope

DELETE https://management.azure.com/{scope}/providers/Microsoft.Security/customRecommendations/{customRecommendationName}?api-version=2024-08-01

URI Parameters

Name In Required Type Description
customRecommendationName
path True

string

Name of the Custom Recommendation.

Regex pattern: [{]?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$

scope
path True

string

The scope of the custom recommendation. 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})'

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

OK - custom recommendation was deleted

204 No Content

No Content - custom recommendation does not exist

Other Status Codes

ErrorResponse

Error response that describes why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Delete a custom recommendation over management group scope
Delete a custom recommendation over security connector scope
Delete a custom recommendation over subscription scope

Delete a custom recommendation over management group scope

Sample request

DELETE https://management.azure.com/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Security/customRecommendations/ad9a8e26-29d9-4829-bb30-e597a58cdbb8?api-version=2024-08-01

Sample response

Delete a custom recommendation over security connector scope

Sample request

DELETE https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/providers/Microsoft.Security/customRecommendations/ad9a8e26-29d9-4829-bb30-e597a58cdbb8?api-version=2024-08-01

Sample response

Delete a custom recommendation over subscription scope

Sample request

DELETE https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/customRecommendations/1f3afdf9-d0c9-4c3d-847f-89da613e70a8?api-version=2024-08-01

Sample response

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.