你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzAutoscaleSetting
获取自动缩放设置。
语法
Get-AzAutoscaleSetting
-ResourceGroupName <String>
[-Name <String>]
[-DetailedOutput]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzAutoscaleSetting cmdlet 获取与资源组或指定的自动缩放设置关联的所有自动缩放设置。
示例
示例 1:获取自动缩放设置
PS C:\>Get-AzAutoscaleSetting -ResourceGroup "Default-Web-EastUS" -DetailedOutput
resourceId : /subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/microsoft.
insights/autoscalesettings/DefaultServerFarm-Default-Web-EastUS
Location : East US
Name : DefaultServerFarm-Default-Web-EastUS
Properties :
Enabled : True
Profiles :
Capacity :
Default : 1
Minimum : 3
Maximum : 1
FixedDate :
Name : No scheduled times
Recurrence :
Rules :
MetricTrigger :
MetricName : CpuPercentage
MetricResourceId : /subscriptions/a93fb07c-6c93-40be-bf3b-4f0deba10f4
b/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm
Operator : GreaterThanOrEqual
Statistic : Average
Threshold : 14
TimeAggregation : Average
TimeGrain : 00:01:00
TimeWindow : 00:45:00
ScaleAction :
Cooldown : 00:05:00
Direction : Increase
Type : ChangeCount
Value : 1
MetricTrigger :
MetricName : CpuPercentage
MetricResourceId : /subscriptions/a93fb07c-6c93-40be-bf3b-4f0deba10f4
b/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm
Operator : LessThanOrEqual
Statistic : Average
Threshold : 4
TimeAggregation : Average
TimeGrain : 00:01:00
TimeWindow : 00:45:00
ScaleAction :
Cooldown : 02:00:00
Direction : Decrease
Type : ChangeCount
Value : 1
MetricTrigger :
MetricName : BytesReceived
MetricResourceId : /subscriptions/a93fb07c-6c93-40be-bf3b-4f0deba10f4
b/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm
Operator : LessThanOrEqual
Statistic : Average
Threshold : 50
TimeAggregation : Average
TimeGrain : 00:01:00
TimeWindow : 00:10:00
ScaleAction :
Cooldown : 00:10:00
Direction : Decrease
Type : ChangeCount
Value : 1
MetricTrigger :
MetricName : BytesReceived
MetricResourceId : /subscriptions/a93fb07c-6c93-40be-bf3b-4f0deba10f4
b/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm
Operator : GreaterThanOrEqual
Statistic : Average
Threshold : 100
TimeAggregation : Average
TimeGrain : 00:01:00
TimeWindow : 00:05:00
ScaleAction :
Cooldown : 00:10:00
Direction : Increase
Type : ChangeCount
Value : 1
TargetResourceId : /subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/
providers/microsoft.web/serverFarms/DefaultServerFarm
Tags : {[$type, Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary,
Microsoft.WindowsAzure.Management.Common.Storage], [hidden-link:/subscriptions/a93fb07c-6c93-40be-bf3b-4f0
deba10f4b/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm,
Resource]}
此命令获取分配给资源组 Default-Web-EastUS 的自动缩放设置。
示例 2:按名称获取自动缩放设置
PS C:\>Get-AzAutoscaleSetting -ResourceGroupName "Default-Web-EastUS" -Name "DefaultServerFarm-Default-Web-EastUS" -DetailedOutput
resourceId : /subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/microsoft.
insights/autoscalesettings/DefaultServerFarm-Default-Web-EastUS
Location : East US
Name : DefaultServerFarm-Default-Web-EastUS
Properties :
Enabled : True
Profiles :
Capacity :
Default : 1
Minimum : 3
Maximum : 1
FixedDate :
Name : No scheduled times
Recurrence :
Rules :
MetricTrigger :
MetricName : CpuPercentage
MetricResourceId : /subscriptions/a93fb07c-6c93-40be-bf3b-4f0deba10f4
b/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm
Operator : GreaterThanOrEqual
Statistic : Average
Threshold : 14
TimeAggregation : Average
TimeGrain : 00:01:00
TimeWindow : 00:45:00
ScaleAction :
Cooldown : 00:05:00
Direction : Increase
Type : ChangeCount
Value : 1
MetricTrigger :
MetricName : CpuPercentage
MetricResourceId : /subscriptions/a93fb07c-6c93-40be-bf3b-4f0deba10f4
b/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm
Operator : LessThanOrEqual
Statistic : Average
Threshold : 4
TimeAggregation : Average
TimeGrain : 00:01:00
TimeWindow : 00:45:00
ScaleAction :
Cooldown : 02:00:00
Direction : Decrease
Type : ChangeCount
Value : 1
MetricTrigger :
MetricName : BytesReceived
MetricResourceId : /subscriptions/a93fb07c-6c93-40be-bf3b-4f0deba10f4
b/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm
Operator : LessThanOrEqual
Statistic : Average
Threshold : 50
TimeAggregation : Average
TimeGrain : 00:01:00
TimeWindow : 00:10:00
ScaleAction :
Cooldown : 00:10:00
Direction : Decrease
Type : ChangeCount
Value : 1
MetricTrigger :
MetricName : BytesReceived
MetricResourceId : /subscriptions/a93fb07c-6c93-40be-bf3b-4f0deba10f4
b/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm
Operator : GreaterThanOrEqual
Statistic : Average
Threshold : 100
TimeAggregation : Average
TimeGrain : 00:01:00
TimeWindow : 00:05:00
ScaleAction :
Cooldown : 00:10:00
Direction : Increase
Type : ChangeCount
Value : 1
TargetResourceId : /subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/
providers/microsoft.web/serverFarms/DefaultServerFarm
Tags : {[$type, Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary,
Microsoft.WindowsAzure.Management.Common.Storage], [hidden-link:/subscriptions/a93fb07c-6c93-40be-bf3b-4f0
deba10f4b/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm,
Resource]}
此命令获取名为 DefaultServerFarm-Default-Web-EastUS 的自动缩放设置。
参数
-DefaultProfile
用于与 azure 通信的凭据、帐户、租户和订阅
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DetailedOutput
指示此操作在输出中显示完整详细信息。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-Name
指定要获取的设置的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-ResourceGroupName
指定资源组的名称。
类型: | String |
别名: | ResourceGroup |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |