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').
PUT https://management.azure.com/{scopeId}/providers/Microsoft.Security/pricings/{pricingName}?api-version=2024-01-01
URI Parameters
| Name |
In |
Required |
Type |
Description |
|
pricingName
|
path |
True
|
string
|
name of the pricing configuration
|
|
scopeId
|
path |
True
|
string
|
The scope id of the pricing. Valid scopes are: subscription (format: 'subscriptions/{subscriptionId}'), or a specific resource (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) - Supported resources are (VirtualMachines)
|
|
api-version
|
query |
True
|
string
|
API version for the operation
|
Request Body
| Name |
Required |
Type |
Description |
|
properties.pricingTier
|
True
|
pricingTier
|
Indicates 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.
|
|
properties.enforce
|
|
enforce
|
If 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.
|
|
properties.extensions
|
|
Extension[]
|
Optional. List of extensions offered under a plan.
|
|
properties.subPlan
|
|
string
|
The 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.
|
Responses
| Name |
Type |
Description |
|
200 OK
|
Pricing
|
Successfully updated
|
|
201 Created
|
Pricing
|
Successfully created.
|
|
Other Status Codes
|
CloudError
|
Error response describing why the operation failed.
|
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name |
Description |
|
user_impersonation
|
impersonate your user account
|
Examples
Update pricing on resource (example for Containers plan)
Sample request
PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/demo-containers-rg/providers/Microsoft.ContainerService/managedClusters/demo-aks-cluster/providers/Microsoft.Security/pricings/Containers?api-version=2024-01-01
{
"properties": {
"pricingTier": "Standard",
"extensions": [
{
"name": "ContainerRegistriesVulnerabilityAssessments",
"isEnabled": "True"
},
{
"name": "ContainerSensor",
"isEnabled": "True"
},
{
"name": "AgentlessDiscoveryForKubernetes",
"isEnabled": "True"
},
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"additionalExtensionProperties": {
"ExclusionTags": "[]"
}
},
{
"name": "ContainerIntegrityContribution",
"isEnabled": "True"
}
]
}
}
Sample response
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/demo-containers-rg/providers/Microsoft.ContainerService/managedClusters/demo-aks-cluster/providers/Microsoft.Security/pricings/Containers",
"name": "Containers",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"freeTrialRemainingTime": "P29DT23H55M",
"enablementTime": "2025-01-14T16:35:12.4567890Z",
"inherited": "False",
"inheritedFrom": null,
"extensions": [
{
"name": "ContainerRegistriesVulnerabilityAssessments",
"isEnabled": "True"
},
{
"name": "ContainerSensor",
"isEnabled": "True"
},
{
"name": "AgentlessDiscoveryForKubernetes",
"isEnabled": "True"
},
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"additionalExtensionProperties": {
"ExclusionTags": "[]"
}
},
{
"name": "ContainerIntegrityContribution",
"isEnabled": "True"
}
]
}
}
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/demo-containers-rg/providers/Microsoft.ContainerService/managedClusters/demo-aks-cluster/providers/Microsoft.Security/pricings/Containers",
"name": "Containers",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"freeTrialRemainingTime": "P30DT0H0M",
"enablementTime": "2025-01-14T16:35:12.4567890Z",
"inherited": "False",
"inheritedFrom": null,
"extensions": [
{
"name": "ContainerRegistriesVulnerabilityAssessments",
"isEnabled": "True"
},
{
"name": "ContainerSensor",
"isEnabled": "True"
},
{
"name": "AgentlessDiscoveryForKubernetes",
"isEnabled": "True"
},
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"additionalExtensionProperties": {
"ExclusionTags": "[]"
}
},
{
"name": "ContainerIntegrityContribution",
"isEnabled": "True"
}
]
}
}
Update pricing on resource (example for VirtualMachines plan)
Sample request
PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1/providers/Microsoft.Security/pricings/virtualMachines?api-version=2024-01-01
{
"properties": {
"pricingTier": "Standard",
"subPlan": "P1"
}
}
import com.azure.resourcemanager.security.fluent.models.PricingInner;
import com.azure.resourcemanager.security.models.PricingTier;
/**
* Samples for Pricings Update.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/
* PutResourcePricingByNameVirtualMachines_example.json
*/
/**
* Sample code: Update pricing on resource (example for VirtualMachines plan).
*
* @param manager Entry point to SecurityManager.
*/
public static void updatePricingOnResourceExampleForVirtualMachinesPlan(
com.azure.resourcemanager.security.SecurityManager manager) {
manager.pricings().updateWithResponse(
"subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1",
"virtualMachines", new PricingInner().withPricingTier(PricingTier.STANDARD).withSubPlan("P1"),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.security import SecurityCenter
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-security
# USAGE
python put_resource_pricing_by_name_virtual_machines_example.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = SecurityCenter(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pricings.update(
scope_id="subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1",
pricing_name="virtualMachines",
pricing={"properties": {"pricingTier": "Standard", "subPlan": "P1"}},
)
print(response)
# x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutResourcePricingByNameVirtualMachines_example.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armsecurity_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutResourcePricingByNameVirtualMachines_example.json
func ExamplePricingsClient_Update_updatePricingOnResourceExampleForVirtualMachinesPlan() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPricingsClient().Update(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1", "virtualMachines", armsecurity.Pricing{
Properties: &armsecurity.PricingProperties{
PricingTier: to.Ptr(armsecurity.PricingTierStandard),
SubPlan: to.Ptr("P1"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Pricing = armsecurity.Pricing{
// Name: to.Ptr("virtualMachines"),
// Type: to.Ptr("Microsoft.Security/pricings"),
// ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1/providers/Microsoft.Security/pricings/virtualMachines"),
// Properties: &armsecurity.PricingProperties{
// EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
// FreeTrialRemainingTime: to.Ptr("PT0S"),
// Inherited: to.Ptr(armsecurity.InheritedFalse),
// PricingTier: to.Ptr(armsecurity.PricingTierStandard),
// SubPlan: to.Ptr("P1"),
// Extensions: []*armsecurity.Extension{
// {
// Name: to.Ptr("MdeDesignatedSubscription"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledFalse),
// },
// {
// Name: to.Ptr("AgentlessVmScanning"),
// AdditionalExtensionProperties: map[string]any{
// "ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]",
// },
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// }},
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SecurityCenter } = require("@azure/arm-security");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to 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').
*
* @summary 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').
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutResourcePricingByNameVirtualMachines_example.json
*/
async function updatePricingOnResourceExampleForVirtualMachinesPlan() {
const scopeId =
"subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1";
const pricingName = "virtualMachines";
const pricing = { pricingTier: "Standard", subPlan: "P1" };
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.pricings.update(scopeId, pricingName, pricing);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1/providers/Microsoft.Security/pricings/virtualMachines",
"name": "virtualMachines",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"subPlan": "P1",
"freeTrialRemainingTime": "PT0S",
"enablementTime": "2023-03-01T12:42:42.1921106Z",
"inherited": "False",
"inheritedFrom": null,
"extensions": [
{
"name": "MdeDesignatedSubscription",
"isEnabled": "False"
},
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"additionalExtensionProperties": {
"ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]"
}
}
]
}
}
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1/providers/Microsoft.Security/pricings/virtualMachines",
"name": "virtualMachines",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"subPlan": "P1",
"freeTrialRemainingTime": "PT0S",
"enablementTime": "2023-03-01T12:42:42.1921106Z",
"inherited": "False",
"inheritedFrom": null,
"extensions": [
{
"name": "MdeDesignatedSubscription",
"isEnabled": "False"
},
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"additionalExtensionProperties": {
"ExclusionTags": "[{'Key':'TestKey1','Value':'TestValue1'},{'Key':'TestKey2','Value':'TestValue2'}]"
}
}
]
}
}
Update pricing on subscription (example for CloudPosture plan)
Sample request
PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture?api-version=2024-01-01
{
"properties": {
"pricingTier": "Standard"
}
}
import com.azure.resourcemanager.security.fluent.models.PricingInner;
import com.azure.resourcemanager.security.models.PricingTier;
/**
* Samples for Pricings Update.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/
* PutPricingByName_example.json
*/
/**
* Sample code: Update pricing on subscription (example for CloudPosture plan).
*
* @param manager Entry point to SecurityManager.
*/
public static void updatePricingOnSubscriptionExampleForCloudPosturePlan(
com.azure.resourcemanager.security.SecurityManager manager) {
manager.pricings().updateWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "CloudPosture",
new PricingInner().withPricingTier(PricingTier.STANDARD), com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.security import SecurityCenter
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-security
# USAGE
python put_pricing_by_name_example.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = SecurityCenter(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pricings.update(
scope_id="subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23",
pricing_name="CloudPosture",
pricing={"properties": {"pricingTier": "Standard"}},
)
print(response)
# x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutPricingByName_example.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armsecurity_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutPricingByName_example.json
func ExamplePricingsClient_Update_updatePricingOnSubscriptionExampleForCloudPosturePlan() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPricingsClient().Update(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "CloudPosture", armsecurity.Pricing{
Properties: &armsecurity.PricingProperties{
PricingTier: to.Ptr(armsecurity.PricingTierStandard),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Pricing = armsecurity.Pricing{
// Name: to.Ptr("CloudPosture"),
// Type: to.Ptr("Microsoft.Security/pricings"),
// ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture"),
// Properties: &armsecurity.PricingProperties{
// EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
// Enforce: to.Ptr(armsecurity.EnforceFalse),
// FreeTrialRemainingTime: to.Ptr("PT0S"),
// PricingTier: to.Ptr(armsecurity.PricingTierStandard),
// ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
// Extensions: []*armsecurity.Extension{
// {
// Name: to.Ptr("AgentlessVmScanning"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// OperationStatus: &armsecurity.OperationStatusAutoGenerated{
// Code: to.Ptr(armsecurity.CodeSucceeded),
// Message: to.Ptr("Successfully enabled extension"),
// },
// },
// {
// Name: to.Ptr("AgentlessDiscoveryForKubernetes"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// OperationStatus: &armsecurity.OperationStatusAutoGenerated{
// Code: to.Ptr(armsecurity.CodeSucceeded),
// Message: to.Ptr("Successfully enabled extension"),
// },
// },
// {
// Name: to.Ptr("SensitiveDataDiscovery"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// OperationStatus: &armsecurity.OperationStatusAutoGenerated{
// Code: to.Ptr(armsecurity.CodeSucceeded),
// Message: to.Ptr("Successfully enabled extension"),
// },
// },
// {
// Name: to.Ptr("ContainerRegistriesVulnerabilityAssessments"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// OperationStatus: &armsecurity.OperationStatusAutoGenerated{
// Code: to.Ptr(armsecurity.CodeSucceeded),
// Message: to.Ptr("Successfully enabled extension"),
// },
// },
// {
// Name: to.Ptr("EntraPermissionsManagement"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// OperationStatus: &armsecurity.OperationStatusAutoGenerated{
// Code: to.Ptr(armsecurity.CodeSucceeded),
// Message: to.Ptr("Successfully enabled extension"),
// },
// }},
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SecurityCenter } = require("@azure/arm-security");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to 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').
*
* @summary 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').
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutPricingByName_example.json
*/
async function updatePricingOnSubscriptionExampleForCloudPosturePlan() {
const scopeId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23";
const pricingName = "CloudPosture";
const pricing = { pricingTier: "Standard" };
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.pricings.update(scopeId, pricingName, pricing);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture",
"name": "CloudPosture",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"freeTrialRemainingTime": "PT0S",
"enablementTime": "2023-03-01T12:42:42.1921106Z",
"enforce": "False",
"resourcesCoverageStatus": "FullyCovered",
"extensions": [
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"name": "AgentlessDiscoveryForKubernetes",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"name": "SensitiveDataDiscovery",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"name": "ContainerRegistriesVulnerabilityAssessments",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"name": "EntraPermissionsManagement",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
}
]
}
}
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture",
"name": "CloudPosture",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"freeTrialRemainingTime": "PT0S",
"enablementTime": "2023-03-01T12:42:42.1921106Z",
"enforce": "False",
"resourcesCoverageStatus": "FullyCovered",
"extensions": [
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"name": "AgentlessDiscoveryForKubernetes",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"name": "SensitiveDataDiscovery",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"name": "ContainerRegistriesVulnerabilityAssessments",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"name": "EntraPermissionsManagement",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
}
]
}
}
Update pricing on subscription (example for CloudPosture plan) - partial success
Sample request
PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture?api-version=2024-01-01
{
"properties": {
"pricingTier": "Standard"
}
}
import com.azure.resourcemanager.security.fluent.models.PricingInner;
import com.azure.resourcemanager.security.models.PricingTier;
/**
* Samples for Pricings Update.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/
* PutPricingByNamePartialSuccess_example.json
*/
/**
* Sample code: Update pricing on subscription (example for CloudPosture plan) - partial success.
*
* @param manager Entry point to SecurityManager.
*/
public static void updatePricingOnSubscriptionExampleForCloudPosturePlanPartialSuccess(
com.azure.resourcemanager.security.SecurityManager manager) {
manager.pricings().updateWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "CloudPosture",
new PricingInner().withPricingTier(PricingTier.STANDARD), com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.security import SecurityCenter
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-security
# USAGE
python put_pricing_by_name_partial_success_example.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = SecurityCenter(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pricings.update(
scope_id="subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23",
pricing_name="CloudPosture",
pricing={"properties": {"pricingTier": "Standard"}},
)
print(response)
# x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutPricingByNamePartialSuccess_example.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armsecurity_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutPricingByNamePartialSuccess_example.json
func ExamplePricingsClient_Update_updatePricingOnSubscriptionExampleForCloudPosturePlanPartialSuccess() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPricingsClient().Update(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "CloudPosture", armsecurity.Pricing{
Properties: &armsecurity.PricingProperties{
PricingTier: to.Ptr(armsecurity.PricingTierStandard),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Pricing = armsecurity.Pricing{
// Name: to.Ptr("CloudPosture"),
// Type: to.Ptr("Microsoft.Security/pricings"),
// ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture"),
// Properties: &armsecurity.PricingProperties{
// EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
// Enforce: to.Ptr(armsecurity.EnforceFalse),
// FreeTrialRemainingTime: to.Ptr("PT0S"),
// PricingTier: to.Ptr(armsecurity.PricingTierStandard),
// ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
// Extensions: []*armsecurity.Extension{
// {
// Name: to.Ptr("AgentlessVmScanning"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// OperationStatus: &armsecurity.OperationStatusAutoGenerated{
// Code: to.Ptr(armsecurity.CodeFailed),
// Message: to.Ptr("Failed find dedicated first party application client ID for extension"),
// },
// },
// {
// Name: to.Ptr("AgentlessDiscoveryForKubernetes"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// OperationStatus: &armsecurity.OperationStatusAutoGenerated{
// Code: to.Ptr(armsecurity.CodeFailed),
// Message: to.Ptr("Failed assigning roles {d5a2ae44-610b-4500-93be-660a0c5f5ca6} to {identityName} for plan"),
// },
// },
// {
// Name: to.Ptr("SensitiveDataDiscovery"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// OperationStatus: &armsecurity.OperationStatusAutoGenerated{
// Code: to.Ptr(armsecurity.CodeFailed),
// Message: to.Ptr("Failed assigning roles {f58310d9-a9f6-439a-9e8d-f62e7b41a168} to {identityName} for plan"),
// },
// },
// {
// Name: to.Ptr("ContainerRegistriesVulnerabilityAssessments"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// OperationStatus: &armsecurity.OperationStatusAutoGenerated{
// Code: to.Ptr(armsecurity.CodeSucceeded),
// Message: to.Ptr("Successfully enabled extension"),
// },
// },
// {
// Name: to.Ptr("EntraPermissionsManagement"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// OperationStatus: &armsecurity.OperationStatusAutoGenerated{
// Code: to.Ptr(armsecurity.CodeSucceeded),
// Message: to.Ptr("Successfully enabled extension"),
// },
// }},
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SecurityCenter } = require("@azure/arm-security");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to 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').
*
* @summary 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').
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutPricingByNamePartialSuccess_example.json
*/
async function updatePricingOnSubscriptionExampleForCloudPosturePlanPartialSuccess() {
const scopeId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23";
const pricingName = "CloudPosture";
const pricing = { pricingTier: "Standard" };
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.pricings.update(scopeId, pricingName, pricing);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture",
"name": "CloudPosture",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"freeTrialRemainingTime": "PT0S",
"enablementTime": "2023-03-01T12:42:42.1921106Z",
"enforce": "False",
"resourcesCoverageStatus": "FullyCovered",
"extensions": [
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"operationStatus": {
"code": "Failed",
"message": "Failed find dedicated first party application client ID for extension"
}
},
{
"name": "AgentlessDiscoveryForKubernetes",
"isEnabled": "True",
"operationStatus": {
"code": "Failed",
"message": "Failed assigning roles {d5a2ae44-610b-4500-93be-660a0c5f5ca6} to {identityName} for plan"
}
},
{
"name": "SensitiveDataDiscovery",
"isEnabled": "True",
"operationStatus": {
"code": "Failed",
"message": "Failed assigning roles {f58310d9-a9f6-439a-9e8d-f62e7b41a168} to {identityName} for plan"
}
},
{
"name": "ContainerRegistriesVulnerabilityAssessments",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"name": "EntraPermissionsManagement",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
}
]
}
}
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture",
"name": "CloudPosture",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"freeTrialRemainingTime": "PT0S",
"enablementTime": "2023-03-01T12:42:42.1921106Z",
"enforce": "False",
"resourcesCoverageStatus": "FullyCovered",
"extensions": [
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"operationStatus": {
"code": "Failed",
"message": "Failed find dedicated first party application client ID for extension"
}
},
{
"name": "AgentlessDiscoveryForKubernetes",
"isEnabled": "True",
"operationStatus": {
"code": "Failed",
"message": "Failed assigning roles {d5a2ae44-610b-4500-93be-660a0c5f5ca6} to {identityName} for plan"
}
},
{
"name": "SensitiveDataDiscovery",
"isEnabled": "True",
"operationStatus": {
"code": "Failed",
"message": "Failed assigning roles {f58310d9-a9f6-439a-9e8d-f62e7b41a168} to {identityName} for plan"
}
},
{
"name": "ContainerRegistriesVulnerabilityAssessments",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"name": "EntraPermissionsManagement",
"isEnabled": "True",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
}
]
}
}
Update pricing on subscription (example for VirtualMachines plan)
Sample request
PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines?api-version=2024-01-01
{
"properties": {
"pricingTier": "Standard",
"subPlan": "P2",
"enforce": "True"
}
}
import com.azure.resourcemanager.security.fluent.models.PricingInner;
import com.azure.resourcemanager.security.models.Enforce;
import com.azure.resourcemanager.security.models.PricingTier;
/**
* Samples for Pricings Update.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/
* PutPricingVMsByName_example.json
*/
/**
* Sample code: Update pricing on subscription (example for VirtualMachines plan).
*
* @param manager Entry point to SecurityManager.
*/
public static void updatePricingOnSubscriptionExampleForVirtualMachinesPlan(
com.azure.resourcemanager.security.SecurityManager manager) {
manager.pricings().updateWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "VirtualMachines",
new PricingInner().withPricingTier(PricingTier.STANDARD).withSubPlan("P2").withEnforce(Enforce.TRUE),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.security import SecurityCenter
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-security
# USAGE
python put_pricing_vms_by_name_example.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = SecurityCenter(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pricings.update(
scope_id="subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23",
pricing_name="VirtualMachines",
pricing={"properties": {"enforce": "True", "pricingTier": "Standard", "subPlan": "P2"}},
)
print(response)
# x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutPricingVMsByName_example.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armsecurity_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutPricingVMsByName_example.json
func ExamplePricingsClient_Update_updatePricingOnSubscriptionExampleForVirtualMachinesPlan() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPricingsClient().Update(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "VirtualMachines", armsecurity.Pricing{
Properties: &armsecurity.PricingProperties{
Enforce: to.Ptr(armsecurity.EnforceTrue),
PricingTier: to.Ptr(armsecurity.PricingTierStandard),
SubPlan: to.Ptr("P2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Pricing = armsecurity.Pricing{
// Name: to.Ptr("VirtualMachines"),
// Type: to.Ptr("Microsoft.Security/pricings"),
// ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines"),
// Properties: &armsecurity.PricingProperties{
// EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
// Enforce: to.Ptr(armsecurity.EnforceTrue),
// FreeTrialRemainingTime: to.Ptr("PT0S"),
// PricingTier: to.Ptr(armsecurity.PricingTierStandard),
// ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
// SubPlan: to.Ptr("P2"),
// Extensions: []*armsecurity.Extension{
// {
// Name: to.Ptr("MdeDesignatedSubscription"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledFalse),
// },
// {
// Name: to.Ptr("AgentlessVmScanning"),
// AdditionalExtensionProperties: map[string]any{
// "ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]",
// },
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// OperationStatus: &armsecurity.OperationStatusAutoGenerated{
// Code: to.Ptr(armsecurity.CodeSucceeded),
// Message: to.Ptr("Successfully enabled extension"),
// },
// }},
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SecurityCenter } = require("@azure/arm-security");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to 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').
*
* @summary 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').
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutPricingVMsByName_example.json
*/
async function updatePricingOnSubscriptionExampleForVirtualMachinesPlan() {
const scopeId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23";
const pricingName = "VirtualMachines";
const pricing = {
enforce: "True",
pricingTier: "Standard",
subPlan: "P2",
};
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.pricings.update(scopeId, pricingName, pricing);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines",
"name": "VirtualMachines",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"subPlan": "P2",
"freeTrialRemainingTime": "PT0S",
"enablementTime": "2023-03-01T12:42:42.1921106Z",
"enforce": "True",
"resourcesCoverageStatus": "FullyCovered",
"extensions": [
{
"name": "MdeDesignatedSubscription",
"isEnabled": "False"
},
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"additionalExtensionProperties": {
"ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]"
},
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
}
]
}
}
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines",
"name": "VirtualMachines",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"subPlan": "P2",
"freeTrialRemainingTime": "PT0S",
"enablementTime": "2023-03-01T12:42:42.1921106Z",
"enforce": "True",
"resourcesCoverageStatus": "FullyCovered",
"extensions": [
{
"name": "MdeDesignatedSubscription",
"isEnabled": "False"
},
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"additionalExtensionProperties": {
"ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]"
},
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
}
]
}
}
Definitions
| Name |
Description |
|
CloudError
|
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
|
|
CloudErrorBody
|
The error detail.
|
|
code
|
The operation status code.
|
|
enforce
|
If 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.
|
|
ErrorAdditionalInfo
|
The resource management error additional info.
|
|
Extension
|
A plan's extension properties
|
|
inherited
|
"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.
|
|
isEnabled
|
Indicates whether the extension is enabled.
|
|
OperationStatus
|
A status describing the success/failure of the extension's enablement/disablement operation.
|
|
Pricing
|
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.
|
|
pricingTier
|
Indicates 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.
|
|
resourcesCoverageStatus
|
This 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.
|
CloudError
Object
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
| Name |
Type |
Description |
|
error.additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
|
error.code
|
string
|
The error code.
|
|
error.details
|
CloudErrorBody[]
|
The error details.
|
|
error.message
|
string
|
The error message.
|
|
error.target
|
string
|
The error target.
|
CloudErrorBody
Object
The error detail.
| Name |
Type |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
|
code
|
string
|
The error code.
|
|
details
|
CloudErrorBody[]
|
The error details.
|
|
message
|
string
|
The error message.
|
|
target
|
string
|
The error target.
|
code
Enumeration
The operation status code.
| Value |
Description |
|
Succeeded
|
Extension was created/updated successfully.
|
|
Failed
|
Extension was not created/updated successfully. See operation status message for more details.
|
enforce
Enumeration
If 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.
| Value |
Description |
|
False
|
Allows the descendants of this scope to override the pricing configuration set on this scope (allows setting inherited="False")
|
|
True
|
Prevents overrides and forces the current scope's pricing configuration to all descendants
|
ErrorAdditionalInfo
Object
The resource management error additional info.
| Name |
Type |
Description |
|
info
|
object
|
The additional info.
|
|
type
|
string
|
The additional info type.
|
Extension
Object
A plan's extension properties
| Name |
Type |
Description |
|
additionalExtensionProperties
|
|
Property values associated with the extension.
|
|
isEnabled
|
isEnabled
|
Indicates whether the extension is enabled.
|
|
name
|
string
|
The extension name. Supported values are:
AgentlessDiscoveryForKubernetes - Provides zero footprint, API-based discovery of Kubernetes clusters, their configurations and deployments. The collected data is used to create a contextualized security graph for Kubernetes clusters, provide risk hunting capabilities, and visualize risks and threats to Kubernetes environments and workloads. Available for CloudPosture plan and Containers plan.
OnUploadMalwareScanning - Limits the GB to be scanned per month for each storage account within the subscription. Once this limit reached on a given storage account, Blobs won't be scanned during current calendar month. Available for StorageAccounts plan (DefenderForStorageV2 sub plans).
SensitiveDataDiscovery - Sensitive data discovery identifies Blob storage container with sensitive data such as credentials, credit cards, and more, to help prioritize and investigate security events. Available for StorageAccounts plan (DefenderForStorageV2 sub plan) and CloudPosture plan.
ContainerRegistriesVulnerabilityAssessments - Provides vulnerability management for images stored in your container registries. Available for CloudPosture plan and Containers plan.
MdeDesignatedSubscription - Direct onboarding is a seamless integration between Defender for Endpoint and Defender for Cloud that doesn’t require extra software deployment on your servers. The onboarded resources will be presented under a designated Azure Subscription you configure Available for VirtualMachines plan (P1 and P2 sub plans).
AgentlessVmScanning - Scans your machines for installed software, vulnerabilities, malware and secret scanning without relying on agents or impacting machine performance. Learn more here https://learn.microsoft.com/en-us/azure/defender-for-cloud/concept-agentless-data-collection. Available for CloudPosture plan, VirtualMachines plan (P2 sub plan) and Containers plan.
EntraPermissionsManagement - Permissions Management provides Cloud Infrastructure Entitlement Management (CIEM) capabilities that helps organizations to manage and control user access and entitlements in their cloud infrastructure - important attack vector for cloud environments. Permissions Management analyzes all permissions and active usage, and suggests recommendations to reduce permissions to enforce the principle of least privilege. Learn more here https://learn.microsoft.com/en-us/azure/defender-for-cloud/permissions-management. Available for CloudPosture plan.
FileIntegrityMonitoring - File integrity monitoring (FIM), examines operating system files. Windows registries, Linux system files, in real time, for changes that might indicate an attack. Available for VirtualMachines plan (P2 sub plan).
ContainerSensor - The sensor is based on IG and provides a rich threat detection suite for Kubernetes clusters, nodes, and workloads, powered by Microsoft leading threat intelligence, provides mapping to MITRE ATT&CK framework. Available for Containers plan.
AIPromptEvidence - Exposes the prompts passed between the user and the AI model as alert evidence. This helps classify and triage the alerts with relevant user context. The prompt snippets will include only segments of the user prompt or model response that were deemed suspicious and relevant for security classifications. The prompt evidence will be available through Defender portal as part of each alert. Available for AI plan.
|
|
operationStatus
|
OperationStatus
|
Optional. A status describing the success/failure of the extension's enablement/disablement operation.
|
inherited
Enumeration
"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.
| Value |
Description |
|
True
|
Indicates that the current scope is inheriting its pricing configuration from its parent
|
|
False
|
Indicates that the current scope sets its own pricing configuration and does not inherit it from its parent
|
isEnabled
Enumeration
Indicates whether the extension is enabled.
| Value |
Description |
|
True
|
Indicates the extension is enabled
|
|
False
|
Indicates the extension is disabled
|
OperationStatus
Object
A status describing the success/failure of the extension's enablement/disablement operation.
| Name |
Type |
Description |
|
code
|
code
|
The operation status code.
|
|
message
|
string
|
Additional information regarding the success/failure of the operation.
|
Pricing
Object
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.
| Name |
Type |
Description |
|
id
|
string
|
Resource Id
|
|
name
|
string
|
Resource name
|
|
properties.deprecated
|
boolean
|
Optional. True if the plan is deprecated. If there are replacing plans they will appear in replacedBy property
|
|
properties.enablementTime
|
string
(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).
|
|
properties.enforce
|
enforce
|
If 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.
|
|
properties.extensions
|
Extension[]
|
Optional. List of extensions offered under a plan.
|
|
properties.freeTrialRemainingTime
|
string
(duration)
|
The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S).
|
|
properties.inherited
|
inherited
|
"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.
|
|
properties.inheritedFrom
|
string
|
The id of the scope inherited from. "Null" if not inherited. This field is only available for resource-level pricing.
|
|
properties.pricingTier
|
pricingTier
|
Indicates 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.
|
|
properties.replacedBy
|
string[]
|
Optional. List of plans that replace this plan. This property exists only if this plan is deprecated.
|
|
properties.resourcesCoverageStatus
|
resourcesCoverageStatus
|
This 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.
|
|
properties.subPlan
|
string
|
The 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.
|
|
type
|
string
|
Resource type
|
pricingTier
Enumeration
Indicates 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.
| Value |
Description |
|
Free
|
Get free Microsoft Defender for Cloud experience with basic security features
|
|
Standard
|
Get the standard Microsoft Defender for Cloud experience with advanced security features
|
resourcesCoverageStatus
Enumeration
This 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.
| Value |
Description |
|
FullyCovered
|
This value indicates that all resources associated with the subscription have the Defender plan enabled.
|
|
PartiallyCovered
|
This value indicates that some resources under the subscription have the Defender plan enabled, while others have it disabled. There is a mixed coverage status among resources.
|
|
NotCovered
|
This value indicates that the Defender plan is disabled for all resources under the subscription. None of the resources are protected by the Defender plan.
|