Haal de prijsconfiguraties van de Defender-abonnementen van het geselecteerde bereik op (geldige bereiken zijn resource-id of abonnements-id). Op resourceniveau zijn ondersteunde resourcetypen 'VirtualMachines, VMSS en ARC-machines'.
GET https://management.azure.com/{scopeId}/providers/Microsoft.Security/pricings/{pricingName}?api-version=2024-01-01
URI-parameters
Name |
In |
Vereist |
Type |
Description |
pricingName
|
path |
True
|
string
|
naam van de prijsconfiguratie
|
scopeId
|
path |
True
|
string
|
De bereik-id van de prijzen. Geldige bereiken zijn: abonnement (indeling: 'subscriptions/{subscriptionId}') of een specifieke resource (indeling: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) - Ondersteunde resources zijn (VirtualMachines)
|
api-version
|
query |
True
|
string
|
API-versie voor de bewerking
|
Antwoorden
Name |
Type |
Description |
200 OK
|
Pricing
|
OK
|
Other Status Codes
|
CloudError
|
Foutreactie waarin wordt beschreven waarom de bewerking is mislukt.
|
Beveiliging
azure_auth
Azure Active Directory OAuth2-stroom
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
uw gebruikersaccount imiteren
|
Voorbeelden
Get pricings on resource - VirtualMachines plan
Sample Request
GET 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
package armsecurity_test
import (
"context"
"log"
"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/GetResourcePricingByNameVirtualMachines_example.json
func ExamplePricingsClient_Get_getPricingsOnResourceVirtualMachinesPlan() {
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().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1", "VirtualMachines", 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.InheritedTrue),
// InheritedFrom: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
// PricingTier: to.Ptr(armsecurity.PricingTierStandard),
// SubPlan: to.Ptr("P2"),
// Extensions: []*armsecurity.Extension{
// {
// Name: to.Ptr("AgentlessVmScanning"),
// AdditionalExtensionProperties: map[string]any{
// "ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]",
// },
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// },
// {
// Name: to.Ptr("MdeDesignatedSubscription"),
// 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 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'.
*
* @summary 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'.
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/GetResourcePricingByNameVirtualMachines_example.json
*/
async function getPricingsOnResourceVirtualMachinesPlan() {
const scopeId =
"subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1";
const pricingName = "VirtualMachines";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.pricings.get(scopeId, pricingName);
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": "P2",
"freeTrialRemainingTime": "PT0S",
"enablementTime": "2023-03-01T12:42:42.1921106Z",
"inherited": "True",
"inheritedFrom": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23",
"extensions": [
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"additionalExtensionProperties": {
"ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]"
}
},
{
"name": "MdeDesignatedSubscription",
"isEnabled": "True"
}
]
}
}
Get pricings on subscription - CloudPosture plan
Sample Request
GET https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture?api-version=2024-01-01
package armsecurity_test
import (
"context"
"log"
"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/GetPricingByNameCloudPosture_example.json
func ExamplePricingsClient_Get_getPricingsOnSubscriptionCloudPosturePlan() {
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().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "CloudPosture", 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"),
// AdditionalExtensionProperties: map[string]any{
// "ExclusionTags": "[]",
// },
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// },
// {
// Name: to.Ptr("AgentlessDiscoveryForKubernetes"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// },
// {
// Name: to.Ptr("SensitiveDataDiscovery"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// },
// {
// Name: to.Ptr("ContainerRegistriesVulnerabilityAssessments"),
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// },
// {
// Name: to.Ptr("EntraPermissionsManagement"),
// 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 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'.
*
* @summary 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'.
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/GetPricingByNameCloudPosture_example.json
*/
async function getPricingsOnSubscriptionCloudPosturePlan() {
const scopeId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23";
const pricingName = "CloudPosture";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.pricings.get(scopeId, pricingName);
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",
"additionalExtensionProperties": {
"ExclusionTags": "[]"
}
},
{
"name": "AgentlessDiscoveryForKubernetes",
"isEnabled": "True"
},
{
"name": "SensitiveDataDiscovery",
"isEnabled": "True"
},
{
"name": "ContainerRegistriesVulnerabilityAssessments",
"isEnabled": "True"
},
{
"name": "EntraPermissionsManagement",
"isEnabled": "True"
}
]
}
}
Get pricings on subscription - Containers plan
Sample Request
GET https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/Containers?api-version=2024-01-01
package armsecurity_test
import (
"context"
"log"
"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/GetPricingByNameContainers_example.json
func ExamplePricingsClient_Get_getPricingsOnSubscriptionContainersPlan() {
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().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "Containers", 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("Containers"),
// Type: to.Ptr("Microsoft.Security/pricings"),
// ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/Containers"),
// 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("ContainerRegistriesVulnerabilityAssessments"),
// 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 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'.
*
* @summary 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'.
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/GetPricingByNameContainers_example.json
*/
async function getPricingsOnSubscriptionContainersPlan() {
const scopeId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23";
const pricingName = "Containers";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.pricings.get(scopeId, pricingName);
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/Containers",
"name": "Containers",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"freeTrialRemainingTime": "PT0S",
"enablementTime": "2023-03-01T12:42:42.1921106Z",
"enforce": "False",
"resourcesCoverageStatus": "FullyCovered",
"extensions": [
{
"name": "ContainerRegistriesVulnerabilityAssessments",
"isEnabled": "True"
}
]
}
}
Get pricings on subscription - Dns plan
Sample Request
GET https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/Dns?api-version=2024-01-01
package armsecurity_test
import (
"context"
"log"
"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/GetPricingByNameDns_example.json
func ExamplePricingsClient_Get_getPricingsOnSubscriptionDnsPlan() {
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().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "Dns", 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("Dns"),
// Type: to.Ptr("Microsoft.Security/pricings"),
// ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/Dns"),
// Properties: &armsecurity.PricingProperties{
// Deprecated: to.Ptr(true),
// 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),
// ReplacedBy: []*string{
// to.Ptr("VirtualMachines")},
// ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
// },
// }
}
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 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'.
*
* @summary 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'.
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/GetPricingByNameDns_example.json
*/
async function getPricingsOnSubscriptionDnsPlan() {
const scopeId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23";
const pricingName = "Dns";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.pricings.get(scopeId, pricingName);
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/Dns",
"name": "Dns",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"freeTrialRemainingTime": "PT0S",
"enablementTime": "2023-03-01T12:42:42.1921106Z",
"deprecated": true,
"replacedBy": [
"VirtualMachines"
],
"enforce": "False",
"resourcesCoverageStatus": "FullyCovered"
}
}
Get pricings on subscription - StorageAccounts plan
Sample Request
GET https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/StorageAccounts?api-version=2024-01-01
package armsecurity_test
import (
"context"
"log"
"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/GetPricingByNameStorageAccounts_example.json
func ExamplePricingsClient_Get_getPricingsOnSubscriptionStorageAccountsPlan() {
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().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "StorageAccounts", 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("StorageAccounts"),
// Type: to.Ptr("Microsoft.Security/pricings"),
// ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/StorageAccounts"),
// 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),
// SubPlan: to.Ptr("PerStorageAccount"),
// Extensions: []*armsecurity.Extension{
// {
// Name: to.Ptr("OnUploadMalwareScanning"),
// AdditionalExtensionProperties: map[string]any{
// "capGBPerMonthPerStorageAccount": float64(10),
// },
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// },
// {
// Name: to.Ptr("SensitiveDataDiscovery"),
// 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 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'.
*
* @summary 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'.
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/GetPricingByNameStorageAccounts_example.json
*/
async function getPricingsOnSubscriptionStorageAccountsPlan() {
const scopeId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23";
const pricingName = "StorageAccounts";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.pricings.get(scopeId, pricingName);
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/StorageAccounts",
"name": "StorageAccounts",
"type": "Microsoft.Security/pricings",
"properties": {
"pricingTier": "Standard",
"subPlan": "PerStorageAccount",
"freeTrialRemainingTime": "PT0S",
"enablementTime": "2023-03-01T12:42:42.1921106Z",
"enforce": "False",
"resourcesCoverageStatus": "FullyCovered",
"extensions": [
{
"name": "OnUploadMalwareScanning",
"isEnabled": "True",
"additionalExtensionProperties": {
"capGBPerMonthPerStorageAccount": 10
}
},
{
"name": "SensitiveDataDiscovery",
"isEnabled": "True"
}
]
}
}
Get pricings on subscription - VirtualMachines plan
Sample Request
GET https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines?api-version=2024-01-01
package armsecurity_test
import (
"context"
"log"
"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/GetPricingByNameVirtualMachines_example.json
func ExamplePricingsClient_Get_getPricingsOnSubscriptionVirtualMachinesPlan() {
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().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "VirtualMachines", 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.EnforceFalse),
// FreeTrialRemainingTime: to.Ptr("PT0S"),
// PricingTier: to.Ptr(armsecurity.PricingTierStandard),
// ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusPartiallyCovered),
// SubPlan: to.Ptr("P2"),
// Extensions: []*armsecurity.Extension{
// {
// Name: to.Ptr("AgentlessVmScanning"),
// AdditionalExtensionProperties: map[string]any{
// "ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]",
// },
// IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
// },
// {
// Name: to.Ptr("MdeDesignatedSubscription"),
// 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 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'.
*
* @summary 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'.
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/GetPricingByNameVirtualMachines_example.json
*/
async function getPricingsOnSubscriptionVirtualMachinesPlan() {
const scopeId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23";
const pricingName = "VirtualMachines";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.pricings.get(scopeId, pricingName);
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": "False",
"resourcesCoverageStatus": "PartiallyCovered",
"extensions": [
{
"name": "AgentlessVmScanning",
"isEnabled": "True",
"additionalExtensionProperties": {
"ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]"
}
},
{
"name": "MdeDesignatedSubscription",
"isEnabled": "True"
}
]
}
}
Definities
Name |
Description |
CloudError
|
Algemene foutreactie voor alle Azure Resource Manager-API's om foutdetails voor mislukte bewerkingen te retourneren. (Dit volgt ook de indeling van de OData-foutreactie.)
|
CloudErrorBody
|
De foutdetails.
|
code
|
De statuscode van de bewerking.
|
enforce
|
Als deze optie is ingesteld op 'False', kunnen de onderliggende personen van dit bereik de prijsconfiguratie voor dit bereik overschrijven (staat instelling overgenomen="Onwaar" toe). Als deze optie is ingesteld op 'True', worden onderdrukkingen voorkomen en wordt deze prijsconfiguratie voor alle onderliggende exemplaren van dit bereik gedwongen. Dit veld is alleen beschikbaar voor prijzen op abonnementsniveau.
|
ErrorAdditionalInfo
|
Aanvullende informatie over de resourcebeheerfout.
|
Extension
|
De extensie-eigenschappen van een plan
|
inherited
|
'overgenomen' = 'Waar' geeft aan dat het huidige bereik de prijsconfiguratie van het bovenliggende bereik overneemt. De id van het bovenliggende bereik dat de overgenomen configuratie biedt, wordt weergegeven in het veld 'overgenomenVan'. Aan de andere kant geeft 'overgenomen' = 'Onwaar' aan dat voor het huidige bereik een eigen prijsconfiguratie expliciet is ingesteld en niet wordt overgenomen van het bovenliggende bereik. Dit veld is alleen-lezen en alleen beschikbaar voor prijzen op resourceniveau.
|
isEnabled
|
Geeft aan of de extensie is ingeschakeld.
|
OperationStatus
|
Een status die het slagen/mislukken van de activerings-/uitschakelingsbewerking van de extensie beschrijft.
|
Pricing
|
Microsoft Defender voor Cloud wordt aangeboden in twee prijscategorieën: gratis en standaard. De standard-laag biedt geavanceerde beveiligingsmogelijkheden, terwijl de gratis laag basisbeveiligingsfuncties biedt.
|
pricingTier
|
Geeft aan of het Defender-abonnement is ingeschakeld voor het geselecteerde bereik. Microsoft Defender voor Cloud wordt aangeboden in twee prijscategorieën: gratis en standaard. De standard-laag biedt geavanceerde beveiligingsmogelijkheden, terwijl de gratis laag basisbeveiligingsfuncties biedt.
|
resourcesCoverageStatus
|
Dit veld is alleen beschikbaar voor abonnementsniveau en geeft de dekkingsstatus weer van de resources onder het abonnement. Let op: het veld pricingTier geeft de abonnementsstatus van het abonnement weer. Omdat de planstatus echter ook kan worden gedefinieerd op resourceniveau, is er mogelijk een onjuiste uitlijning tussen de planstatus van het abonnement en de resourcestatus. Dit veld helpt de dekkingsstatus van de resources aan te geven.
|
CloudError
Algemene foutreactie voor alle Azure Resource Manager-API's om foutdetails voor mislukte bewerkingen te retourneren. (Dit volgt ook de indeling van de OData-foutreactie.)
Name |
Type |
Description |
error.additionalInfo
|
ErrorAdditionalInfo[]
|
De fout aanvullende informatie.
|
error.code
|
string
|
De foutcode.
|
error.details
|
CloudErrorBody[]
|
De foutdetails.
|
error.message
|
string
|
Het foutbericht.
|
error.target
|
string
|
Het foutdoel.
|
CloudErrorBody
De foutdetails.
Name |
Type |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
De fout aanvullende informatie.
|
code
|
string
|
De foutcode.
|
details
|
CloudErrorBody[]
|
De foutdetails.
|
message
|
string
|
Het foutbericht.
|
target
|
string
|
Het foutdoel.
|
code
De statuscode van de bewerking.
Name |
Type |
Description |
Failed
|
string
|
De extensie is niet gemaakt/bijgewerkt. Zie het bericht over de bewerkingsstatus voor meer informatie.
|
Succeeded
|
string
|
De extensie is gemaakt/bijgewerkt.
|
enforce
Als deze optie is ingesteld op 'False', kunnen de onderliggende personen van dit bereik de prijsconfiguratie voor dit bereik overschrijven (staat instelling overgenomen="Onwaar" toe). Als deze optie is ingesteld op 'True', worden onderdrukkingen voorkomen en wordt deze prijsconfiguratie voor alle onderliggende exemplaren van dit bereik gedwongen. Dit veld is alleen beschikbaar voor prijzen op abonnementsniveau.
Name |
Type |
Description |
False
|
string
|
Hiermee kunnen de onderliggenden van dit bereik de prijsconfiguratie die is ingesteld voor dit bereik overschrijven (staat instelling overgenomen="Onwaar") toe
|
True
|
string
|
Hiermee voorkomt u onderdrukkingen en dwingt u de prijsconfiguratie van het huidige bereik af op alle onderliggende gegevens
|
ErrorAdditionalInfo
Aanvullende informatie over de resourcebeheerfout.
Name |
Type |
Description |
info
|
object
|
De aanvullende informatie.
|
type
|
string
|
Het type aanvullende informatie.
|
Extension
De extensie-eigenschappen van een plan
Name |
Type |
Description |
additionalExtensionProperties
|
|
Eigenschapswaarden die zijn gekoppeld aan de extensie.
|
isEnabled
|
isEnabled
|
Geeft aan of de extensie is ingeschakeld.
|
name
|
string
|
De extensienaam. Ondersteunde waarden zijn:
AgentlessDiscoveryForKubernetes : op API gebaseerde detectie van informatie over kubernetes-clusterarchitectuur, workloadobjecten en installatie. Vereist voor Kubernetes-inventarisatie, detectie van identiteits- en netwerkblootstelling, analyse van aanvalspaden en opsporing van risico's als onderdeel van de Cloud Security Explorer.
Beschikbaar voor CloudPosture-abonnement.
OnUploadMalwareScanning : beperkt de GB die per maand moet worden gescand voor elk opslagaccount binnen het abonnement. Zodra deze limiet voor een bepaald opslagaccount is bereikt, worden blobs niet meer gescand tijdens de huidige kalendermaand.
Beschikbaar voor het StorageAccounts-abonnement.
SensitiveDataDiscovery - Detectie van gevoelige gegevens identificeert de Blob Storage-container met gevoelige gegevens, zoals referenties, creditcards en meer, om prioriteit te geven aan en beveiligingsgebeurtenissen te onderzoeken.
Beschikbaar voor StorageAccounts- en CloudPosture-abonnementen.
ContainerRegistriesVulnerabilityAssessments : biedt beheer van beveiligingsproblemen voor installatiekopieën die zijn opgeslagen in uw containerregisters.
Beschikbaar voor CloudPosture- en Containers-abonnementen.
|
operationStatus
|
OperationStatus
|
Optioneel. Een status die het slagen/mislukken van de activerings-/uitschakelingsbewerking van de extensie beschrijft.
|
inherited
'overgenomen' = 'Waar' geeft aan dat het huidige bereik de prijsconfiguratie van het bovenliggende bereik overneemt. De id van het bovenliggende bereik dat de overgenomen configuratie biedt, wordt weergegeven in het veld 'overgenomenVan'. Aan de andere kant geeft 'overgenomen' = 'Onwaar' aan dat voor het huidige bereik een eigen prijsconfiguratie expliciet is ingesteld en niet wordt overgenomen van het bovenliggende bereik. Dit veld is alleen-lezen en alleen beschikbaar voor prijzen op resourceniveau.
Name |
Type |
Description |
False
|
string
|
Geeft aan dat het huidige bereik een eigen prijsconfiguratie instelt en deze niet overneemt van het bovenliggende bereik
|
True
|
string
|
Geeft aan dat het huidige bereik de prijsconfiguratie overneemt van het bovenliggende bereik
|
isEnabled
Geeft aan of de extensie is ingeschakeld.
Name |
Type |
Description |
False
|
string
|
Geeft aan dat de extensie is uitgeschakeld
|
True
|
string
|
Geeft aan dat de extensie is ingeschakeld
|
OperationStatus
Een status die het slagen/mislukken van de activerings-/uitschakelingsbewerking van de extensie beschrijft.
Name |
Type |
Description |
code
|
code
|
De statuscode van de bewerking.
|
message
|
string
|
Aanvullende informatie over het slagen/mislukken van de bewerking.
|
Pricing
Microsoft Defender voor Cloud wordt aangeboden in twee prijscategorieën: gratis en standaard. De standard-laag biedt geavanceerde beveiligingsmogelijkheden, terwijl de gratis laag basisbeveiligingsfuncties biedt.
Name |
Type |
Description |
id
|
string
|
Resource-id
|
name
|
string
|
Resourcenaam
|
properties.deprecated
|
boolean
|
Optioneel. True als het plan is afgeschaft. Als er vervangende plannen zijn, worden deze weergegeven in replacedBy de eigenschap
|
properties.enablementTime
|
string
|
Optioneel. Als pricingTier is Standard , bevat deze eigenschap de datum van de laatste keer dat de pricingTier is ingesteld op Standard , indien beschikbaar (bijvoorbeeld 2023-03-01T12:42:42.1921106Z).
|
properties.enforce
|
enforce
|
Als deze optie is ingesteld op 'False', kunnen de onderliggende personen van dit bereik de prijsconfiguratie voor dit bereik overschrijven (staat instelling overgenomen="Onwaar" toe). Als deze optie is ingesteld op 'True', worden onderdrukkingen voorkomen en wordt deze prijsconfiguratie voor alle onderliggende exemplaren van dit bereik gedwongen. Dit veld is alleen beschikbaar voor prijzen op abonnementsniveau.
|
properties.extensions
|
Extension[]
|
Optioneel. Lijst met extensies die worden aangeboden onder een abonnement.
|
properties.freeTrialRemainingTime
|
string
|
De duur die resteert voor de gratis proefperiode van het abonnement - in ISO 8601-indeling (bijvoorbeeld P3Y6M4DT12H30M5S).
|
properties.inherited
|
inherited
|
'overgenomen' = 'Waar' geeft aan dat het huidige bereik de prijsconfiguratie van het bovenliggende bereik overneemt. De id van het bovenliggende bereik dat de overgenomen configuratie biedt, wordt weergegeven in het veld 'overgenomenVan'. Aan de andere kant geeft 'overgenomen' = 'Onwaar' aan dat voor het huidige bereik een eigen prijsconfiguratie expliciet is ingesteld en niet wordt overgenomen van het bovenliggende bereik. Dit veld is alleen-lezen en alleen beschikbaar voor prijzen op resourceniveau.
|
properties.inheritedFrom
|
string
|
De id van het bereik dat is overgenomen van. 'Null' indien niet overgenomen. Dit veld is alleen beschikbaar voor prijzen op resourceniveau.
|
properties.pricingTier
|
pricingTier
|
Geeft aan of het Defender-abonnement is ingeschakeld voor het geselecteerde bereik. Microsoft Defender voor Cloud wordt aangeboden in twee prijscategorieën: gratis en standaard. De standard-laag biedt geavanceerde beveiligingsmogelijkheden, terwijl de gratis laag basisbeveiligingsfuncties biedt.
|
properties.replacedBy
|
string[]
|
Optioneel. Lijst met plannen die dit plan vervangen. Deze eigenschap bestaat alleen als dit plan is afgeschaft.
|
properties.resourcesCoverageStatus
|
resourcesCoverageStatus
|
Dit veld is alleen beschikbaar voor abonnementsniveau en geeft de dekkingsstatus weer van de resources onder het abonnement. Let op: het veld pricingTier geeft de abonnementsstatus van het abonnement weer. Omdat de planstatus echter ook kan worden gedefinieerd op resourceniveau, is er mogelijk een onjuiste uitlijning tussen de planstatus van het abonnement en de resourcestatus. Dit veld helpt de dekkingsstatus van de resources aan te geven.
|
properties.subPlan
|
string
|
Het subabonnement dat is geselecteerd voor een standaardprijsconfiguratie, wanneer er meer dan één subabonnement beschikbaar is. Elk subplan maakt een set beveiligingsfuncties mogelijk. Wanneer dit niet is opgegeven, wordt het volledige plan toegepast. Voor het VirtualMachines-abonnement zijn de beschikbare subplannen 'P1' & 'P2', waarbij voor het resourceniveau alleen het subplan 'P1' wordt ondersteund.
|
type
|
string
|
Resourcetype
|
pricingTier
Geeft aan of het Defender-abonnement is ingeschakeld voor het geselecteerde bereik. Microsoft Defender voor Cloud wordt aangeboden in twee prijscategorieën: gratis en standaard. De standard-laag biedt geavanceerde beveiligingsmogelijkheden, terwijl de gratis laag basisbeveiligingsfuncties biedt.
Name |
Type |
Description |
Free
|
string
|
Krijg gratis Microsoft Defender voor cloudervaring met basisbeveiligingsfuncties
|
Standard
|
string
|
Krijg de standaard Microsoft Defender voor cloudervaring met geavanceerde beveiligingsfuncties
|
resourcesCoverageStatus
Dit veld is alleen beschikbaar voor abonnementsniveau en geeft de dekkingsstatus weer van de resources onder het abonnement. Let op: het veld pricingTier geeft de abonnementsstatus van het abonnement weer. Omdat de planstatus echter ook kan worden gedefinieerd op resourceniveau, is er mogelijk een onjuiste uitlijning tussen de planstatus van het abonnement en de resourcestatus. Dit veld helpt de dekkingsstatus van de resources aan te geven.
Name |
Type |
Description |
FullyCovered
|
string
|
Deze waarde geeft aan dat het Defender-abonnement is ingeschakeld voor alle resources die zijn gekoppeld aan het abonnement.
|
NotCovered
|
string
|
Deze waarde geeft aan dat het Defender-abonnement is uitgeschakeld voor alle resources onder het abonnement. Geen van de resources wordt beveiligd door het Defender-plan.
|
PartiallyCovered
|
string
|
Deze waarde geeft aan dat voor sommige resources onder het abonnement het Defender-abonnement is ingeschakeld, terwijl voor andere resources het is uitgeschakeld. Er is een gemengde dekkingsstatus tussen resources.
|