New-​Azure​RM​Plan

The New-AzureRmPlan cmdlet creates a new plan composing the various quotas of the resource provider

Syntax

New-AzureRMPlan
   -ArmLocation <String>
   [-DisplayName <String>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   -Name <String>
   [-PipelineVariable <String>]
   [-QuotaIds <String[]>]
   -ResourceGroup <String>
   [-SkuIds <String[]>]
   [<CommonParameters>]

Examples

Example 1:

New-AzureRMPlan -Name $PlanName -DisplayName "ComputePlan" -ArmLocation "local" -ResourceGroup $ResourceGroupName -QuotaIds $quotaIds

Description

-----------

The following example creates a plan. Note that quota creation cmdlets are not available yet and will be added in a future release

$quotaIds = @() $computeQuota = New-ComputeQuota -QuotaName "Basic" -Location "local" $quotaIds += $computeQuota.Id

Add other resource provider quotas if needed

New-AzureRMPlan -Name $PlanName -DisplayName "ComputePlan" -ArmLocation "local" -ResourceGroup $ResourceGroupName -QuotaIds $quotaIds

        function New-ComputeQuota
        {
        param
        (
        \[parameter(Mandatory=$true)\]
        \[string\] $QuotaName,<br /><br />            \[parameter(Mandatory=$true)\]
        \[string\] $Location,<br /><br />            \[int\] $VirtualMachineCount = 2,<br /><br />            \[int\] $MemoryLimitMB = 2048,<br /><br />            \[int\] $CoresLimit = 2,<br /><br />            \[string\] $ApiVersion = "2015-12-01-preview"
        )<br /><br />            Write-Verbose "Creating compute quota named $QuotaName"<br /><br />            $uri = "{0}subscriptions/{1}/providers/Microsoft.Compute.Admin/locations/{2}/quotas/{3}?api-version={4}" -f $AdminUri, $SubscriptionId, $Location, $QuotaName, $ApiVersion<br /><br />            $RequestBody = @"
        {
        "name":"$quotaName",
        "type":"Microsoft.Compute.Admin/quotas",
        "location":"$Location",
        "properties":{
        "virtualMachineCount":$VirtualMachineCount,
        "memoryLimitMB":$MemoryLimitMB,
        "coresLimit":$CoresLimit
        }
        }
        "@<br /><br />            # Get the $Token with Get-AzureStackToken cmdlet
        $headers = @{ "Authorization" = "Bearer "+ $Token }<br /><br />            $quota = Invoke-RestMethod -Method Put -Uri $uri -Body $RequestBody -ContentType 'application/json' -Headers $headers<br /><br />            Write-Output $quota
        }

Required Parameters

-ArmLocation

Specifies the location of the Azurestack resource manager. The parameter will be deprecated in future

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of the plan

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroup

The resource group name under which the plan resource is created

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-DisplayName

Specifies the display name of the plan

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationAction

Not SpecifiedThe following values are permitted for this object type.

Type:ActionPreference
Aliases:infa
Parameter Sets:SilentlyContinue, Stop, Continue, Inquire
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Not Specified

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PipelineVariable

Not Specified

Type:String
Aliases:pv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-QuotaIds

Specifies an array of quota ids. The resource providers create the quotas and provide the quota ids. The cmdlets for CRUD operations on quotas are not available yet and will be added in a future release

Type:String[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SkuIds

An array of SkuIds from the resource provider

Type:String[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

Microsoft.AzureStack.Management.Models.AdminPlanModel