New-AzDiskPurchasePlanConfig
Creates a PurchasePlan Object
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzDiskPurchasePlanConfig
[-Publisher <String>]
[-Name <String>]
[-Product <String>]
[-PromotionCode <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Creates a PurchasePlan Object
Examples
Example 1
$diskPurchasePlan = New-AzDiskPurchasePlanConfig -Name “planName” -Publisher “planPublisher” -Product “planPorduct” -PromotionCode “planPromotionCode”
$diskConfig = New-AzDiskConfig -Location 'eastus2euap' -AccountType 'Premium_LRS' -CreateOption 'Empty' -DiskSizeGB 32 -PurchasePlan $diskPurchasePlan
New-AzDisk -ResourceGroupName 'ResourceGroup02' -DiskName 'Disk02' -Disk $diskConfig
$disk = Get-AzDisk -ResourceGroupName 'ResourceGroup02' -DiskName 'Disk02'
Customers can set the PurchasePlan on the Managed Disks.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
-Name
Name of Config
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
-Product
Name of Product
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
-PromotionCode
PromotionCode for Purchase Plan
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
-Publisher
Name of Publisher
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |