suppressions
Creates, updates, deletes, gets or lists a suppressions resource.
Overview
| Name | suppressions |
| Type | Resource |
| Id | azure.advisor.suppressions |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The resource ID. |
name | string | The name of the resource. |
expirationTimeStamp | string (date-time) | Gets or sets the expiration time stamp. |
suppressionId | string | The GUID of the suppression. |
ttl | string | The duration for which the suppression is valid. |
type | string | The type of the resource. |
| Name | Datatype | Description |
|---|---|---|
id | string | The resource ID. |
name | string | The name of the resource. |
expirationTimeStamp | string (date-time) | Gets or sets the expiration time stamp. |
suppressionId | string | The GUID of the suppression. |
ttl | string | The duration for which the suppression is valid. |
type | string | The type of the resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_uri, recommendation_id, name | Obtains the details of a suppression. | |
list | select | subscription_id | $top, $skipToken | 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. |
create | insert | resource_uri, recommendation_id, name | 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. | |
delete | delete | resource_uri, recommendation_id, name | Enables 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.
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the suppression. Required. |
recommendation_id | string | The recommendation ID. Required. |
resource_uri | string | The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. Required. |
subscription_id | string | |
$skipToken | string | The page-continuation token to use with a paged version of this API. Default value is None. |
$top | integer | The number of suppressions per page if a paged version of this API is being used. Default value is None. |
SELECT examples
- get
- list
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
;
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,
expirationTimeStamp,
suppressionId,
ttl,
type
FROM azure.advisor.suppressions
WHERE subscription_id = '{{ subscription_id }}' -- required
AND $top = '{{ $top }}'
AND $skipToken = '{{ $skipToken }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: suppressions
props:
- name: resource_uri
value: "{{ resource_uri }}"
description: Required parameter for the suppressions resource.
- name: recommendation_id
value: "{{ recommendation_id }}"
description: Required parameter for the suppressions resource.
- name: name
value: "{{ name }}"
description: Required parameter for the suppressions resource.
- name: properties
value:
suppressionId: "{{ suppressionId }}"
ttl: "{{ ttl }}"
DELETE examples
- delete
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
;