Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Add-AutoscaleSetting

Add-AutoscaleSetting

microsoft.azure.commands.insights.dll

Synopsis

Create an autoscale setting.

Syntax

Add-AutoscaleSetting [-SettingSpec] [-ResourceGroup] [-DisableSetting] [-AutoscaleProfiles] [-Profile] [<CommonParameters>]

Add-AutoscaleSetting [-Location] [-Name] [-ResourceGroup] [-DisableSetting] [-AutoscaleProfiles] [-TargetResourceId] [-Profile] [<CommonParameters>]

Detailed Description

Create an autoscale setting.

Parameters

-SettingSpec <AutoscaleSettingResource>

An object specifying an autoscale setting. This type of object can be obtained from the Get-AutoscaleSetting or it can be constructed in a PowerShell script.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ResourceGroup <String>

The resource group of the resource associated to the autoscale setting.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DisableSetting <SwitchParameter>

Flag to disable an existing autoscale setting.

Aliases

None

Required?

false

Position

named

Default value

False

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-AutoscaleProfiles <List`1[AutoscaleProfile]>

List of profiles to add to the autoscale setting or null if no profile should be added.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Profile <AzureProfile>

In-memory profile (AzureProfile).

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Location <String>

The location of the autoscale setting.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Name <String>

The name of the autoscale setting.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-TargetResourceId <String>

The resource Id of the resource to auto scale.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- Example 1: Create autoscale setting --------------------------

$rule1 = new-autoscaleRule -MetricName Requests -MetricResourceId "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/mywebsite" -Operator GreaterThan -MetricStatistic Average -Threshold 10 -TimeGrain 00:01:00 -ScaleActionCooldown 00:05:00 -ScaleActionDirection Increase -ScaleActionScaleType ChangeCount -ScaleActionValue "1" 

$rule2 = new-autoscaleRule -MetricName Requests -MetricResourceId "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/mywebsite" -Operator GreaterThan -MetricStatistic Average -Threshold 10 -TimeGrain 00:01:00 -ScaleActionCooldown 00:10:00 -ScaleActionDirection Increase -ScaleActionScaleType ChangeCount -ScaleActionValue "2"

$profile1 = new-autoscaleprofile -DefaultCapacity "1" -MaximumCapacity "10" -MinimumCapacity "1" -StartTimeWindow 2015-03-05T14:00:00 -EndTimeWindow 2015-03-05T14:30:00 -TimeWindowTimeZone GMT -Rules $rule1, $rule2 -Name "adios"

$profile2 = new-autoscaleprofile -DefaultCapacity "1" -MaximumCapacity "10" -MinimumCapacity "1" -Rules $rule1, $rule2 -Name "secondProfileName" -RecurrenceFrequency Minute -ScheduleDays "1", "2", "3" -ScheduleHours 5, 10, 15 -ScheduleMinutes 15, 30, 45 -ScheduleTimeZone GMT

add-autoscalesetting -Location "East US" -Name MySetting -ResourceGroup Default-Web-EastUS -TargetResourceId /subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm -AutoscaleProfiles $profile1, $profile2

Get-AutoscaleSetting
Remove-AutoscaleSetting
Get-AutoscaleHistory
Online Version