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:

NameDatatypeDescription
idstringThe resource ID.
namestringThe name of the resource.
expirationTimeStampstring (date-time)Gets or sets the expiration time stamp.
suppressionIdstringThe GUID of the suppression.
ttlstringThe duration for which the suppression is valid.
typestringThe type of the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_uri, recommendation_id, nameObtains the details of a suppression.
listselectsubscription_id$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.
createinsertresource_uri, recommendation_id, 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.
deletedeleteresource_uri, recommendation_id, 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. Required.
recommendation_idstringThe recommendation ID. Required.
resource_uristringThe fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. Required.
subscription_idstring
$skipTokenstringThe page-continuation token to use with a paged version of this API. Default value is None.
$topintegerThe number of suppressions per page if a paged version of this API is being used. Default value is None.

SELECT examples

Obtains the details of a suppression.

SELECT
id,
name,
expirationTimeStamp,
suppressionId,
ttl,
type
FROM azure.advisor.suppressions
WHERE resource_uri = '{{ resource_uri }}' -- required
AND recommendation_id = '{{ recommendation_id }}' -- 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 (
properties,
resource_uri,
recommendation_id,
name
)
SELECT
'{{ properties }}',
'{{ resource_uri }}',
'{{ recommendation_id }}',
'{{ name }}'
RETURNING
id,
name,
properties,
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 resource_uri = '{{ resource_uri }}' --required
AND recommendation_id = '{{ recommendation_id }}' --required
AND name = '{{ name }}' --required
;