Skip to main content

suppressions

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

Overview

Namesuppressions
TypeResource
Idazure.advisor.suppressions

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
nametextThe name of the resource
expiration_time_stamptextfield from the properties object
recommendationIdtextfield from the properties object
resourceUritextfield from the properties object
subscriptionIdtextfield from the properties object
suppression_idtextfield from the properties object
system_datatextfield from the properties object
ttltextfield from the properties object
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTname, recommendationId, resourceUriObtains the details of a suppression.
listSELECTsubscriptionIdRetrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.
createINSERTname, recommendationId, resourceUriEnables 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.
deleteDELETEname, recommendationId, resourceUriEnables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.

SELECT examples

Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.

SELECT
id,
name,
expiration_time_stamp,
recommendationId,
resourceUri,
subscriptionId,
suppression_id,
system_data,
ttl,
type
FROM azure.advisor.vw_suppressions
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new suppressions resource.

/*+ create */
INSERT INTO azure.advisor.suppressions (
name,
recommendationId,
resourceUri,
properties
)
SELECT
'{{ name }}',
'{{ recommendationId }}',
'{{ resourceUri }}',
'{{ properties }}'
;

DELETE example

Deletes the specified suppressions resource.

/*+ delete */
DELETE FROM azure.advisor.suppressions
WHERE name = '{{ name }}'
AND recommendationId = '{{ recommendationId }}'
AND resourceUri = '{{ resourceUri }}';