suppressions
Creates, updates, deletes, gets or lists a suppressions
resource.
Overview
Name | suppressions |
Type | Resource |
Id | azure.advisor.suppressions |
Fields
- vw_suppressions
- suppressions
Name | Datatype | Description |
---|---|---|
id | text | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | text | The name of the resource |
expiration_time_stamp | text | field from the properties object |
recommendationId | text | field from the properties object |
resourceUri | text | field from the properties object |
subscriptionId | text | field from the properties object |
suppression_id | text | field from the properties object |
system_data | text | field from the properties object |
ttl | text | field from the properties object |
type | text | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
properties | object | The properties of the suppression. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | name, recommendationId, resourceUri | Obtains the details of a suppression. |
list | SELECT | subscriptionId | 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 | name, recommendationId, resourceUri | 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 | name, recommendationId, resourceUri | Enables 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.
- vw_suppressions
- suppressions
SELECT
id,
name,
expiration_time_stamp,
recommendationId,
resourceUri,
subscriptionId,
suppression_id,
system_data,
ttl,
type
FROM azure.advisor.vw_suppressions
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
properties,
systemData,
type
FROM azure.advisor.suppressions
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new suppressions
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.advisor.suppressions (
name,
recommendationId,
resourceUri,
properties
)
SELECT
'{{ name }}',
'{{ recommendationId }}',
'{{ resourceUri }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: properties
value:
- name: suppressionId
value: string
- name: ttl
value: string
- name: expirationTimeStamp
value: string
DELETE
example
Deletes the specified suppressions
resource.
/*+ delete */
DELETE FROM azure.advisor.suppressions
WHERE name = '{{ name }}'
AND recommendationId = '{{ recommendationId }}'
AND resourceUri = '{{ resourceUri }}';