Seçili kapsamın Defender planları fiyatlandırma yapılandırmalarını alın (geçerli kapsamlar kaynak kimliği veya abonelik kimliğidir). Kaynak düzeyinde desteklenen kaynak türleri 'VirtualMachines, VMSS ve ARC Makineleri'dir.
GET https://management.azure.com/{scopeId}/providers/Microsoft.Security/pricings/{pricingName}?api-version=2024-01-01
URI Parametreleri
Name |
İçinde |
Gerekli |
Tür |
Description |
pricingName
|
path |
True
|
string
|
fiyatlandırma yapılandırmasının adı
|
scopeId
|
path |
True
|
string
|
Fiyatlandırmanın kapsam kimliği. Geçerli kapsamlar şunlardır: abonelik (biçim: 'subscriptions/{subscriptionId}') veya belirli bir kaynak (biçim: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) - Desteklenen kaynaklar şunlardır (VirtualMachines)
|
api-version
|
query |
True
|
string
|
İşlem için API sürümü
|
Yanıtlar
Name |
Tür |
Description |
200 OK
|
Pricing
|
Tamam
|
Other Status Codes
|
CloudError
|
İşlemin neden başarısız olduğunu açıklayan hata yanıtı.
|
Güvenlik
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
|
kullanıcı hesabınızın kimliğine bürünme
|
Örnekler
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"
}
]
}
}
Tanımlar
Name |
Description |
CloudError
|
Başarısız işlemlerin hata ayrıntılarını döndürmek için tüm Azure Resource Manager API'leri için genel hata yanıtı. (Bu, OData hata yanıtı biçimini de izler.).
|
CloudErrorBody
|
Hata ayrıntısı.
|
code
|
İşlem durum kodu.
|
enforce
|
"False" olarak ayarlanırsa, bu kapsamın alt öğelerine bu kapsamda ayarlanan fiyatlandırma yapılandırmasının geçersiz kılınmasına izin verir ("inherited="False ayarına izin verir"). "True" olarak ayarlanırsa geçersiz kılmaları engeller ve bu fiyatlandırma yapılandırmasını bu kapsamın tüm alt öğelerinde zorlar. Bu alan yalnızca abonelik düzeyinde fiyatlandırma için kullanılabilir.
|
ErrorAdditionalInfo
|
Kaynak yönetimi hatası ek bilgileri.
|
Extension
|
Planın uzantı özellikleri
|
inherited
|
"inherited" = "True" geçerli kapsamın fiyatlandırma yapılandırmasını üst öğesinden devraldığını gösterir. Devralınan yapılandırmayı sağlayan üst kapsamın kimliği "inheritedFrom" alanında görüntülenir. Öte yandan, "inherited" = "False" geçerli kapsamın açıkça ayarlanmış kendi fiyatlandırma yapılandırmasına sahip olduğunu ve üst öğesinden devralmadığını gösterir. Bu alan salt okunurdur ve yalnızca kaynak düzeyinde fiyatlandırma için kullanılabilir.
|
isEnabled
|
Uzantının etkinleştirilip etkinleştirilmediğini gösterir.
|
OperationStatus
|
Uzantının etkinleştirme/devre dışı bırakma işleminin başarısını/başarısızlığını açıklayan durum.
|
Pricing
|
Bulut için Microsoft Defender iki fiyatlandırma katmanında sağlanır: ücretsiz ve standart. Standart katman gelişmiş güvenlik özellikleri sunarken ücretsiz katmanı temel güvenlik özellikleri sunar.
|
pricingTier
|
Defender planının seçili kapsamda etkinleştirilip etkinleştirilmediğini gösterir. Bulut için Microsoft Defender iki fiyatlandırma katmanında sağlanır: ücretsiz ve standart. Standart katman gelişmiş güvenlik özellikleri sunarken ücretsiz katmanı temel güvenlik özellikleri sunar.
|
resourcesCoverageStatus
|
Bu alan yalnızca abonelik düzeyinde kullanılabilir ve abonelik altındaki kaynakların kapsam durumunu yansıtır. Lütfen unutmayın: "pricingTier" alanı aboneliğin plan durumunu yansıtır. Ancak, plan durumu kaynak düzeyinde de tanımlanabildiği için aboneliğin plan durumu ile kaynak durumu arasında yanlış hizalama olabilir. Bu alan, kaynakların kapsam durumunun gösterilmesine yardımcı olur.
|
CloudError
Başarısız işlemlerin hata ayrıntılarını döndürmek için tüm Azure Resource Manager API'leri için genel hata yanıtı. (Bu, OData hata yanıtı biçimini de izler.).
Name |
Tür |
Description |
error.additionalInfo
|
ErrorAdditionalInfo[]
|
Hata ek bilgileri.
|
error.code
|
string
|
Hata kodu.
|
error.details
|
CloudErrorBody[]
|
Hata ayrıntıları.
|
error.message
|
string
|
Hata iletisi.
|
error.target
|
string
|
Hata hedefi.
|
CloudErrorBody
Hata ayrıntısı.
Name |
Tür |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
Hata ek bilgileri.
|
code
|
string
|
Hata kodu.
|
details
|
CloudErrorBody[]
|
Hata ayrıntıları.
|
message
|
string
|
Hata iletisi.
|
target
|
string
|
Hata hedefi.
|
code
İşlem durum kodu.
Name |
Tür |
Description |
Failed
|
string
|
Uzantı başarıyla oluşturulmadı/güncelleştirilmedi. Diğer ayrıntılar için işlem durumu iletisine bakın.
|
Succeeded
|
string
|
Uzantı başarıyla oluşturuldu/güncelleştirildi.
|
enforce
"False" olarak ayarlanırsa, bu kapsamın alt öğelerine bu kapsamda ayarlanan fiyatlandırma yapılandırmasının geçersiz kılınmasına izin verir ("inherited="False ayarına izin verir"). "True" olarak ayarlanırsa geçersiz kılmaları engeller ve bu fiyatlandırma yapılandırmasını bu kapsamın tüm alt öğelerinde zorlar. Bu alan yalnızca abonelik düzeyinde fiyatlandırma için kullanılabilir.
Name |
Tür |
Description |
False
|
string
|
Bu kapsamın alt öğelerine bu kapsamda ayarlanan fiyatlandırma yapılandırmasının geçersiz kılınmasına izin verir (inherited="False ayarına izin verir")
|
True
|
string
|
Geçersiz kılmaları engeller ve geçerli kapsamın fiyatlandırma yapılandırmasını tüm alt öğelere zorlar
|
ErrorAdditionalInfo
Kaynak yönetimi hatası ek bilgileri.
Name |
Tür |
Description |
info
|
object
|
Ek bilgiler.
|
type
|
string
|
Ek bilgi türü.
|
Extension
Planın uzantı özellikleri
Name |
Tür |
Description |
additionalExtensionProperties
|
|
Uzantıyla ilişkili özellik değerleri.
|
isEnabled
|
isEnabled
|
Uzantının etkinleştirilip etkinleştirilmediğini gösterir.
|
name
|
string
|
Uzantı adı. Desteklenen değerler şunlardır:
AgentlessDiscoveryForKubernetes - Kubernetes küme mimarisi, iş yükü nesneleri ve kurulum hakkındaki bilgilerin API tabanlı keşfi. Bulut güvenlik gezgininin bir parçası olarak Kubernetes envanteri, kimlik ve ağ pozlaması algılama, saldırı yolu analizi ve risk avcılığı için gereklidir.
CloudPosture planı için kullanılabilir.
OnUploadMalwareScanning - Abonelik içindeki her depolama hesabı için aylık olarak taranacak GB'ı sınırlar. Belirli bir depolama hesabında bu sınıra ulaşıldıktan sonra Bloblar geçerli takvim ayı boyunca taranmayacak.
StorageAccounts planı için kullanılabilir.
SensitiveDataDiscovery - Hassas veri bulma, güvenlik olaylarının önceliğini belirlemeye ve araştırmaya yardımcı olmak için kimlik bilgileri, kredi kartları ve daha fazlası gibi hassas verilere sahip Blob depolama kapsayıcısını tanımlar.
StorageAccounts ve CloudPosture planları için kullanılabilir.
ContainerRegistriesVulnerabilityAssessments - Kapsayıcı kayıt defterlerinizde depolanan görüntüler için güvenlik açığı yönetimi sağlar.
CloudPosture ve Kapsayıcılar planları için kullanılabilir.
|
operationStatus
|
OperationStatus
|
İsteğe bağlı. Uzantının etkinleştirme/devre dışı bırakma işleminin başarısını/başarısızlığını açıklayan durum.
|
inherited
"inherited" = "True" geçerli kapsamın fiyatlandırma yapılandırmasını üst öğesinden devraldığını gösterir. Devralınan yapılandırmayı sağlayan üst kapsamın kimliği "inheritedFrom" alanında görüntülenir. Öte yandan, "inherited" = "False" geçerli kapsamın açıkça ayarlanmış kendi fiyatlandırma yapılandırmasına sahip olduğunu ve üst öğesinden devralmadığını gösterir. Bu alan salt okunurdur ve yalnızca kaynak düzeyinde fiyatlandırma için kullanılabilir.
Name |
Tür |
Description |
False
|
string
|
Geçerli kapsamın kendi fiyatlandırma yapılandırmasını ayarladığını ve üst öğesinden devralmadığını gösterir
|
True
|
string
|
Geçerli kapsamın fiyatlandırma yapılandırmasını üst öğesinden devraldığını gösterir
|
isEnabled
Uzantının etkinleştirilip etkinleştirilmediğini gösterir.
Name |
Tür |
Description |
False
|
string
|
Uzantının devre dışı olduğunu gösterir
|
True
|
string
|
Uzantının etkinleştirildiğini gösterir
|
OperationStatus
Uzantının etkinleştirme/devre dışı bırakma işleminin başarısını/başarısızlığını açıklayan durum.
Name |
Tür |
Description |
code
|
code
|
İşlem durum kodu.
|
message
|
string
|
İşlemin başarısı/başarısızlığı ile ilgili ek bilgiler.
|
Pricing
Bulut için Microsoft Defender iki fiyatlandırma katmanında sağlanır: ücretsiz ve standart. Standart katman gelişmiş güvenlik özellikleri sunarken ücretsiz katmanı temel güvenlik özellikleri sunar.
Name |
Tür |
Description |
id
|
string
|
Kaynak Kimliği
|
name
|
string
|
Kaynak adı
|
properties.deprecated
|
boolean
|
İsteğe bağlı. Plan kullanım dışı bırakıldıysa True. Değiştirme planları varsa, bunlar özelliğinde replacedBy görünür
|
properties.enablementTime
|
string
|
İsteğe bağlı. Bu pricingTier Standard durumda bu özellik, kullanılabilir olduğunda değerinin en son pricingTier olarak ayarlandığı Standard tarihi tutar (örneğin, 2023-03-01T12:42:42.1921106Z).
|
properties.enforce
|
enforce
|
"False" olarak ayarlanırsa, bu kapsamın alt öğelerine bu kapsamda ayarlanan fiyatlandırma yapılandırmasının geçersiz kılınmasına izin verir ("inherited="False ayarına izin verir"). "True" olarak ayarlanırsa geçersiz kılmaları engeller ve bu fiyatlandırma yapılandırmasını bu kapsamın tüm alt öğelerinde zorlar. Bu alan yalnızca abonelik düzeyinde fiyatlandırma için kullanılabilir.
|
properties.extensions
|
Extension[]
|
İsteğe bağlı. Bir plan kapsamında sunulan uzantıların listesi.
|
properties.freeTrialRemainingTime
|
string
|
Aboneliklerin ücretsiz deneme süresi için kalan süre - ISO 8601 biçiminde (örneğin P3Y6M4DT12H30M5S).
|
properties.inherited
|
inherited
|
"inherited" = "True" geçerli kapsamın fiyatlandırma yapılandırmasını üst öğesinden devraldığını gösterir. Devralınan yapılandırmayı sağlayan üst kapsamın kimliği "inheritedFrom" alanında görüntülenir. Öte yandan, "inherited" = "False" geçerli kapsamın açıkça ayarlanmış kendi fiyatlandırma yapılandırmasına sahip olduğunu ve üst öğesinden devralmadığını gösterir. Bu alan salt okunurdur ve yalnızca kaynak düzeyinde fiyatlandırma için kullanılabilir.
|
properties.inheritedFrom
|
string
|
Devralınan kapsamın kimliği. Devralınmadıysa "Null" olur. Bu alan yalnızca kaynak düzeyinde fiyatlandırma için kullanılabilir.
|
properties.pricingTier
|
pricingTier
|
Defender planının seçili kapsamda etkinleştirilip etkinleştirilmediğini gösterir. Bulut için Microsoft Defender iki fiyatlandırma katmanında sağlanır: ücretsiz ve standart. Standart katman gelişmiş güvenlik özellikleri sunarken ücretsiz katmanı temel güvenlik özellikleri sunar.
|
properties.replacedBy
|
string[]
|
İsteğe bağlı. Bu planın yerini alan planların listesi. Bu özellik yalnızca bu plan kullanım dışı bırakıldığında var olur.
|
properties.resourcesCoverageStatus
|
resourcesCoverageStatus
|
Bu alan yalnızca abonelik düzeyinde kullanılabilir ve abonelik altındaki kaynakların kapsam durumunu yansıtır. Lütfen unutmayın: "pricingTier" alanı aboneliğin plan durumunu yansıtır. Ancak, plan durumu kaynak düzeyinde de tanımlanabildiği için aboneliğin plan durumu ile kaynak durumu arasında yanlış hizalama olabilir. Bu alan, kaynakların kapsam durumunun gösterilmesine yardımcı olur.
|
properties.subPlan
|
string
|
Birden fazla alt plan kullanılabilir olduğunda Standart fiyatlandırma yapılandırması için seçilen alt plan. Her alt plan, bir dizi güvenlik özelliği sağlar. Belirtilmediğinde tam plan uygulanır. VirtualMachines planı için kullanılabilir alt planlar 'P1' & 'P2'dir; burada kaynak düzeyinde yalnızca 'P1' alt planı desteklenir.
|
type
|
string
|
Kaynak türü
|
pricingTier
Defender planının seçili kapsamda etkinleştirilip etkinleştirilmediğini gösterir. Bulut için Microsoft Defender iki fiyatlandırma katmanında sağlanır: ücretsiz ve standart. Standart katman gelişmiş güvenlik özellikleri sunarken ücretsiz katmanı temel güvenlik özellikleri sunar.
Name |
Tür |
Description |
Free
|
string
|
Temel güvenlik özellikleriyle Bulut deneyimi için ücretsiz Microsoft Defender edinin
|
Standard
|
string
|
Gelişmiş güvenlik özellikleriyle Bulut deneyimi için standart Microsoft Defender edinin
|
resourcesCoverageStatus
Bu alan yalnızca abonelik düzeyinde kullanılabilir ve abonelik altındaki kaynakların kapsam durumunu yansıtır. Lütfen unutmayın: "pricingTier" alanı aboneliğin plan durumunu yansıtır. Ancak, plan durumu kaynak düzeyinde de tanımlanabildiği için aboneliğin plan durumu ile kaynak durumu arasında yanlış hizalama olabilir. Bu alan, kaynakların kapsam durumunun gösterilmesine yardımcı olur.
Name |
Tür |
Description |
FullyCovered
|
string
|
Bu değer, abonelikle ilişkili tüm kaynaklarda Defender planının etkinleştirildiğini gösterir.
|
NotCovered
|
string
|
Bu değer, Defender planının abonelik altındaki tüm kaynaklar için devre dışı bırakıldığını gösterir. Kaynakların hiçbiri Defender planı tarafından korunmaz.
|
PartiallyCovered
|
string
|
Bu değer, aboneliğin altındaki bazı kaynakların Defender planının etkinleştirildiğini, bazılarının ise devre dışı bırakıldığını gösterir. Kaynaklar arasında karma kapsam durumu vardır.
|