Skip to content

Corrected docs for Get-AzSecurityPricing & Set-AzSecurityPricing #13159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Security/Security/help/Az.Security.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Gets security contacts that were configured on this subscription
Gets the location where Azure Security Center will automatically save data for the specific subscription

### [Get-AzSecurityPricing](Get-AzSecurityPricing.md)
Gets the pricing tier data for Azure Security Center for a scope.
Gets the pricing data for the Azure Defender plans enabled in Azure Security Center for a subscription.

### [Get-AzSecurityTask](Get-AzSecurityTask.md)
Gets the security tasks that Azure Security Center recommends you to do in order to strengthen your security posture.
Expand Down Expand Up @@ -135,7 +135,7 @@ Updates automatic provisioning setting
Updates a security contact for a subscription.

### [Set-AzSecurityPricing](Set-AzSecurityPricing.md)
Sets the pricing of Azure Security Center tier for a scope.
Sets the pricing data for the Azure Defender plans enabled in Azure Security Center for a subscription.

### [Set-AzSecurityWorkspaceSetting](Set-AzSecurityWorkspaceSetting.md)
Updates the workspace settings for the subscription.
Expand Down
70 changes: 43 additions & 27 deletions src/Security/Security/help/Get-AzSecurityPricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,65 +8,78 @@ schema: 2.0.0
# Get-AzSecurityPricing

## SYNOPSIS
Gets the pricing tier data for Azure Security Center for a scope.

Gets the Azure Defender plans for a subscription in Azure Security Center.

## SYNTAX

### SubscriptionScope (Default)
```

```powershell
Get-AzSecurityPricing [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
```

### SubscriptionLevelResource
```

```powershell
Get-AzSecurityPricing -Name <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
```

### ResourceId
```

```powershell
Get-AzSecurityPricing -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
```

## DESCRIPTION
Azure Security Center pricing tier is decided per scope, with this cmdlet you can get the configured pricing tiers.
Subscription pricing tier include all the resource groups under it.
Resource Group pricing tier will override the subscription pricing tier.

You can view each Azure Defender plan, per subscription, using this cmdlet.

For details about Azure Defender and the available plans, see [Introduction to Azure Defender](https://docs.microsoft.com/azure/security-center/azure-defender).

## EXAMPLES

### Example 1

```powershell
PS C:\> Get-AzSecurityPricing
Id Name PricingTier
-- ---- -----------
Id--/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/VirtualMachines
-- ---- -----------
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/SqlServers
/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/providers/Microsoft.Security/pricings/default default Standard
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/AppServices
/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/myService1/providers/Microsoft.Security/pricings/myService1 myService1 Standard
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/StorageAccounts
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/SqlServerVirtualMachin…
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/KubernetesService
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/ContainerRegistry
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/KeyVaults
Id Name PricingTier FreeTrialRemainingTime
-- ---- ----------- ----------------------
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/VirtualMachines VirtualMachines Free 00:00:00
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/Sqlservers SqlServers Standard 00:00:00
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/AppServices AppServices Free 00:00:00
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/StorageAccounts StorageAccounts Free 00:00:00
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/SqlserverVirtualMachines SqlservervirtualMachines Free 00:00:00
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/KubernetesService KubernetesService Free 00:00:00
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/ContainerRegistry ContainerRegistry Free 00:00:00
/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/KeyVaults KeyVaults Free 00:00:00
```

Gets all the configured pricing tiers for the subscription and the resource groups under it.
Gets the status of each Azure Defender plan for the subscription.



### Example 2

```powershell
PS C:\> Get-AzSecurityPricing -ResourceGroupName "myService1"
Id Name PricingTier
-- ---- -----------
/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/myService1/providers/Microsoft.Security/pricings/myService1 myService1 Standard
PS C:\> Get-AzSecurityPricing -ResourceId
```

Gets the configured pricing tier for the "myService1" resource group.
Gets pricing details of the specific resource ID. Where ResourceId is one of the IDs returned by `Get-AzSecurityPricing`.

### Example 3

```powershell
PS C:\> Get-AzSecurityPricing -Name
```

Gets pricing details of the named Azure Defender plan. Where `name` is one of the names returned by `Get-AzSecurityPricing`.


## PARAMETERS

### -DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

```yaml
Expand All @@ -82,6 +95,7 @@ Accept wildcard characters: False
```

### -Name

Resource name.

```yaml
Expand All @@ -97,6 +111,7 @@ Accept wildcard characters: False
```

### -ResourceId

Resource ID.

```yaml
Expand All @@ -112,7 +127,8 @@ Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
26 changes: 21 additions & 5 deletions src/Security/Security/help/Set-AzSecurityPricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,48 @@ schema: 2.0.0
# Set-AzSecurityPricing

## SYNOPSIS
Sets the pricing of Azure Security Center tier for a scope.

Enables or disables Azure Defender plans for a subscription in Azure Security Center.

## SYNTAX

### SubscriptionLevelResource (Default)
```

```powershell
Set-AzSecurityPricing -Name <String> -PricingTier <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```

### InputObject
```

```powershell
Set-AzSecurityPricing -InputObject <PSSecurityPricing> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Sets the pricing of Azure Security Center tier for a scope.

Enable or disable any of the Azure Defender plans for a subscription.

For details about Azure Defender and the available plans, see [Introduction to Azure Defender](https://docs.microsoft.com/azure/security-center/azure-defender).

## EXAMPLES

### Example 1

```powershell
PS C:\> Set-AzSecurityPricing -Name "virtualmachines" -PricingTier "Standard"
```

Sets the subscription Azure Security Center pricing tier to "Standard"
Enables **Azure Defender for servers** for the subscription.

"Standard" refers to the "On" state for an Azure Defender plan as shown in Azure Security Center's pricing and settings area of the Azure portal.


## PARAMETERS

### -DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

```yaml
Expand All @@ -55,6 +65,7 @@ Accept wildcard characters: False
```

### -InputObject

Input Object.

```yaml
Expand All @@ -70,6 +81,7 @@ Accept wildcard characters: False
```

### -Name

Resource name.

```yaml
Expand All @@ -85,6 +97,7 @@ Accept wildcard characters: False
```

### -PricingTier

Pricing Tier.

```yaml
Expand All @@ -100,6 +113,7 @@ Accept wildcard characters: False
```

### -Confirm

Prompts you for confirmation before running the cmdlet.

```yaml
Expand All @@ -115,6 +129,7 @@ Accept wildcard characters: False
```

### -WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

```yaml
Expand All @@ -130,6 +145,7 @@ Accept wildcard characters: False
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS
Expand Down