Skip to main content

suppressions

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

Overview

Namesuppressions
TypeResource
Idazure.advisor.suppressions

Fields

The following fields are returned by SELECT queries:

OK. Successfully got suppression detail.

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
propertiesobjectThe properties of the suppression.
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
getselectresourceUri, recommendationId, nameObtains the details of a suppression.
listselectsubscriptionId$top, $skipTokenRetrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.
createinsertresourceUri, recommendationId, nameEnables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation.
deletedeleteresourceUri, recommendationId, nameEnables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.

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
namestringThe name of the suppression.
recommendationIdstringThe recommendation ID.
resourceUristringThe fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.
subscriptionIdstringThe Azure subscription ID.
$skipTokenstringThe page-continuation token to use with a paged version of this API.
$topinteger (int32)The number of suppressions per page if a paged version of this API is being used.

SELECT examples

Obtains the details of a suppression.

SELECT
id,
name,
properties,
systemData,
type
FROM azure.advisor.suppressions
WHERE resourceUri = '{{ resourceUri }}' -- required
AND recommendationId = '{{ recommendationId }}' -- required
AND name = '{{ name }}' -- required
;

INSERT examples

Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation.

INSERT INTO azure.advisor.suppressions (
data__properties,
resourceUri,
recommendationId,
name
)
SELECT
'{{ properties }}',
'{{ resourceUri }}',
'{{ recommendationId }}',
'{{ name }}'
RETURNING
id,
name,
properties,
systemData,
type
;

DELETE examples

Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.

DELETE FROM azure.advisor.suppressions
WHERE resourceUri = '{{ resourceUri }}' --required
AND recommendationId = '{{ recommendationId }}' --required
AND name = '{{ name }}' --required
;