Skip to main content

pricings

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

Overview

Namepricings
TypeResource
Idazure.security.pricings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
deprecatedbooleanOptional. True if the plan is deprecated. If there are replacing plans they will appear in replacedBy property.
enablementTimestring (date-time)Optional. If pricingTier is Standard then this property holds the date of the last time the pricingTier was set to Standard, when available (e.g 2023-03-01T12:42:42.1921106Z).
enforcestringIf set to "False", it allows the descendants of this scope to override the pricing configuration set on this scope (allows setting inherited="False"). If set to "True", it prevents overrides and forces this pricing configuration on all the descendants of this scope. This field is only available for subscription-level pricing. Known values are: "False" and "True". (False, True)
extensionsarrayOptional. List of extensions offered under a plan.
freeTrialRemainingTimestringThe duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S).
inheritedstring"inherited" = "True" indicates that the current scope inherits its pricing configuration from its parent. The ID of the parent scope that provides the inherited configuration is displayed in the "inheritedFrom" field. On the other hand, "inherited" = "False" indicates that the current scope has its own pricing configuration explicitly set, and does not inherit from its parent. This field is read only and available only for resource-level pricing. Known values are: "True" and "False". (True, False)
inheritedFromstringThe id of the scope inherited from. "Null" if not inherited. This field is only available for resource-level pricing.
pricingTierstringIndicates whether the Defender plan is enabled on the selected scope. Microsoft Defender for Cloud is provided in two pricing tiers: free and standard. The standard tier offers advanced security capabilities, while the free tier offers basic security features. Required. Known values are: "Free" and "Standard". (Free, Standard)
replacedByarrayOptional. List of plans that replace this plan. This property exists only if this plan is deprecated.
resourcesCoverageStatusstringThis field is available for subscription-level only, and reflects the coverage status of the resources under the subscription. Please note: The "pricingTier" field reflects the plan status of the subscription. However, since the plan status can also be defined at the resource level, there might be misalignment between the subscription's plan status and the resource status. This field helps indicate the coverage status of the resources. Known values are: "FullyCovered", "PartiallyCovered", and "NotCovered". (FullyCovered, PartiallyCovered, NotCovered)
subPlanstringThe sub-plan selected for a Standard pricing configuration, when more than one sub-plan is available. Each sub-plan enables a set of security features. When not specified, full plan is applied. For VirtualMachines plan, available sub plans are 'P1' & 'P2', where for resource level only 'P1' sub plan is supported.
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
getselectscope_id, pricing_nameGet the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a subscription id). At the resource level, supported resource types are 'VirtualMachines, VMSS and ARC Machines'.
listselectscope_id$filterLists Microsoft Defender for Cloud pricing configurations of the scopeId, that match the optional given $filter. Valid scopes are: subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and ARC Machines'). Valid $filter is: 'name in ({planName1},{planName2},...)'. If $filter is not provided, the unfiltered list will be returned. If '$filter=name in (planName1,planName2)' is provided, the returned list includes the pricings set for 'planName1' and 'planName2' only.
updateupdatescope_id, pricing_nameUpdates a provided Microsoft Defender for Cloud pricing configuration in the scope. Valid scopes are: subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and ARC Machines' and only for plan='VirtualMachines' and subPlan='P1').
deletedeletescope_id, pricing_nameDeletes a provided Microsoft Defender for Cloud pricing configuration in a specific resource. Valid only for resource scope (Supported resources are: 'VirtualMachines, VMSS, ARC Machines, and Containers').

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
pricing_namestringname of the pricing configuration. Required.
scope_idstringThe fully qualified Azure Resource manager identifier of the resource. Required.
$filterstringOData filter. Optional. Default value is None.

SELECT examples

Get the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a subscription id). At the resource level, supported resource types are 'VirtualMachines, VMSS and ARC Machines'.

SELECT
id,
name,
deprecated,
enablementTime,
enforce,
extensions,
freeTrialRemainingTime,
inherited,
inheritedFrom,
pricingTier,
replacedBy,
resourcesCoverageStatus,
subPlan,
systemData,
type
FROM azure.security.pricings
WHERE scope_id = '{{ scope_id }}' -- required
AND pricing_name = '{{ pricing_name }}' -- required
;

UPDATE examples

Updates a provided Microsoft Defender for Cloud pricing configuration in the scope. Valid scopes are: subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and ARC Machines' and only for plan='VirtualMachines' and subPlan='P1').

UPDATE azure.security.pricings
SET
properties = '{{ properties }}'
WHERE
scope_id = '{{ scope_id }}' --required
AND pricing_name = '{{ pricing_name }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes a provided Microsoft Defender for Cloud pricing configuration in a specific resource. Valid only for resource scope (Supported resources are: 'VirtualMachines, VMSS, ARC Machines, and Containers').

DELETE FROM azure.security.pricings
WHERE scope_id = '{{ scope_id }}' --required
AND pricing_name = '{{ pricing_name }}' --required
;