|
|
@ -202,7 +202,7 @@ author:
|
|
|
|
EXAMPLES = '''
|
|
|
|
EXAMPLES = '''
|
|
|
|
- name: Create an auto scale
|
|
|
|
- name: Create an auto scale
|
|
|
|
azure_rm_autoscale:
|
|
|
|
azure_rm_autoscale:
|
|
|
|
target: "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/Microsoft.Compute/virtualMachineScaleSets/vmss"
|
|
|
|
target: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"
|
|
|
|
enabled: true
|
|
|
|
enabled: true
|
|
|
|
profiles:
|
|
|
|
profiles:
|
|
|
|
- count: '1'
|
|
|
|
- count: '1'
|
|
|
@ -222,7 +222,8 @@ EXAMPLES = '''
|
|
|
|
|
|
|
|
|
|
|
|
- name: Create an auto scale with compicated profile
|
|
|
|
- name: Create an auto scale with compicated profile
|
|
|
|
azure_rm_autoscale:
|
|
|
|
azure_rm_autoscale:
|
|
|
|
target: "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/Microsoft.Compute/virtualMachineScaleSets/vmss"
|
|
|
|
target: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets
|
|
|
|
|
|
|
|
/myVmss"
|
|
|
|
enabled: true
|
|
|
|
enabled: true
|
|
|
|
profiles:
|
|
|
|
profiles:
|
|
|
|
- count: '1'
|
|
|
|
- count: '1'
|
|
|
@ -234,7 +235,8 @@ EXAMPLES = '''
|
|
|
|
time_window: 10
|
|
|
|
time_window: 10
|
|
|
|
direction: Increase
|
|
|
|
direction: Increase
|
|
|
|
metric_name: Percentage CPU
|
|
|
|
metric_name: Percentage CPU
|
|
|
|
metric_resource_uri: "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/Microsoft.Compute/virtualMachineScaleSets/vmss"
|
|
|
|
metric_resource_uri: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtua
|
|
|
|
|
|
|
|
lMachineScaleSets/vmss"
|
|
|
|
value: '1'
|
|
|
|
value: '1'
|
|
|
|
threshold: 70
|
|
|
|
threshold: 70
|
|
|
|
cooldown: 5
|
|
|
|
cooldown: 5
|
|
|
@ -273,7 +275,7 @@ state:
|
|
|
|
sample: {
|
|
|
|
sample: {
|
|
|
|
"changed": false,
|
|
|
|
"changed": false,
|
|
|
|
"enabled": true,
|
|
|
|
"enabled": true,
|
|
|
|
"id": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/microsoft.insights/autoscalesettings/scale",
|
|
|
|
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/microsoft.insights/autoscalesettings/scale",
|
|
|
|
"location": "eastus",
|
|
|
|
"location": "eastus",
|
|
|
|
"name": "scale",
|
|
|
|
"name": "scale",
|
|
|
|
"notifications": [
|
|
|
|
"notifications": [
|
|
|
@ -308,7 +310,8 @@ state:
|
|
|
|
"cooldown": 5.0,
|
|
|
|
"cooldown": 5.0,
|
|
|
|
"direction": "Increase",
|
|
|
|
"direction": "Increase",
|
|
|
|
"metric_name": "Percentage CPU",
|
|
|
|
"metric_name": "Percentage CPU",
|
|
|
|
"metric_resource_uri": "/subscriptions/X/resourceGroups/foo/providers/Microsoft.Compute/virtualMachineScaleSets/vmss",
|
|
|
|
"metric_resource_uri": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsof
|
|
|
|
|
|
|
|
t.Compute/virtualMachineScaleSets/MyVmss",
|
|
|
|
"operator": "GreaterThan",
|
|
|
|
"operator": "GreaterThan",
|
|
|
|
"statistic": "Average",
|
|
|
|
"statistic": "Average",
|
|
|
|
"threshold": 70.0,
|
|
|
|
"threshold": 70.0,
|
|
|
@ -321,7 +324,8 @@ state:
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
"target": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/Microsoft.Compute/virtualMachineScaleSets/vmss"
|
|
|
|
"target": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScale
|
|
|
|
|
|
|
|
Sets/myVmss"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
''' # NOQA
|
|
|
|
''' # NOQA
|
|
|
|
|
|
|
|
|
|
|
|