autoscale_settings
Creates, updates, deletes, gets or lists an autoscale_settings resource.
Overview
| Name | autoscale_settings |
| Type | Resource |
| Id | azure.monitor.autoscale_settings |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list_by_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
enabled | boolean | the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. |
location | string | The geo-location where the resource lives. Required. |
notifications | array | the collection of notifications. |
predictiveAutoscalePolicy | object | the predictive autoscale policy mode. |
profiles | array | the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
targetResourceLocation | string | the location of the resource that the autoscale setting should be added to. |
targetResourceUri | string | the resource identifier of the resource that the autoscale setting should be added to. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
enabled | boolean | the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. |
location | string | The geo-location where the resource lives. Required. |
notifications | array | the collection of notifications. |
predictiveAutoscalePolicy | object | the predictive autoscale policy mode. |
profiles | array | the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
targetResourceLocation | string | the location of the resource that the autoscale setting should be added to. |
targetResourceUri | string | the resource identifier of the resource that the autoscale setting should be added to. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
enabled | boolean | the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. |
location | string | The geo-location where the resource lives. Required. |
notifications | array | the collection of notifications. |
predictiveAutoscalePolicy | object | the predictive autoscale policy mode. |
profiles | array | the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
targetResourceLocation | string | the location of the resource that the autoscale setting should be added to. |
targetResourceUri | string | the resource identifier of the resource that the autoscale setting should be added to. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, autoscale_setting_name, subscription_id | Gets an autoscale setting. | |
list_by_resource_group | select | resource_group_name, subscription_id | Lists the autoscale settings for a resource group. | |
list_by_subscription | select | subscription_id | Lists the autoscale settings for a subscription. | |
create_or_update | insert | resource_group_name, autoscale_setting_name, subscription_id, location, properties | Creates or updates an autoscale setting. | |
update | update | resource_group_name, autoscale_setting_name, subscription_id | Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. | |
create_or_update | replace | resource_group_name, autoscale_setting_name, subscription_id, location, properties | Creates or updates an autoscale setting. | |
delete | delete | resource_group_name, autoscale_setting_name, subscription_id | Deletes and autoscale setting. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
autoscale_setting_name | string | The autoscale setting name. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_resource_group
- list_by_subscription
Gets an autoscale setting.
SELECT
id,
name,
enabled,
location,
notifications,
predictiveAutoscalePolicy,
profiles,
systemData,
tags,
targetResourceLocation,
targetResourceUri,
type
FROM azure.monitor.autoscale_settings
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND autoscale_setting_name = '{{ autoscale_setting_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists the autoscale settings for a resource group.
SELECT
id,
name,
enabled,
location,
notifications,
predictiveAutoscalePolicy,
profiles,
systemData,
tags,
targetResourceLocation,
targetResourceUri,
type
FROM azure.monitor.autoscale_settings
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists the autoscale settings for a subscription.
SELECT
id,
name,
enabled,
location,
notifications,
predictiveAutoscalePolicy,
profiles,
systemData,
tags,
targetResourceLocation,
targetResourceUri,
type
FROM azure.monitor.autoscale_settings
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates an autoscale setting.
INSERT INTO azure.monitor.autoscale_settings (
tags,
location,
properties,
resource_group_name,
autoscale_setting_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ autoscale_setting_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: autoscale_settings
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the autoscale_settings resource.
- name: autoscale_setting_name
value: "{{ autoscale_setting_name }}"
description: Required parameter for the autoscale_settings resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the autoscale_settings resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
The autoscale setting of the resource. Required.
value:
profiles:
- name: "{{ name }}"
capacity:
minimum: "{{ minimum }}"
maximum: "{{ maximum }}"
default: "{{ default }}"
rules: "{{ rules }}"
fixedDate:
timeZone: "{{ timeZone }}"
start: "{{ start }}"
end: "{{ end }}"
recurrence:
frequency: "{{ frequency }}"
schedule:
timeZone: "{{ timeZone }}"
days:
- "{{ days }}"
hours:
- {{ hours }}
minutes:
- {{ minutes }}
notifications:
- operation: "{{ operation }}"
email:
sendToSubscriptionAdministrator: {{ sendToSubscriptionAdministrator }}
sendToSubscriptionCoAdministrators: {{ sendToSubscriptionCoAdministrators }}
customEmails:
- "{{ customEmails }}"
webhooks: "{{ webhooks }}"
enabled: {{ enabled }}
predictiveAutoscalePolicy:
scaleMode: "{{ scaleMode }}"
scaleLookAheadTime: "{{ scaleLookAheadTime }}"
name: "{{ name }}"
targetResourceUri: "{{ targetResourceUri }}"
targetResourceLocation: "{{ targetResourceLocation }}"
UPDATE examples
- update
Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method.
UPDATE azure.monitor.autoscale_settings
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND autoscale_setting_name = '{{ autoscale_setting_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;
REPLACE examples
- create_or_update
Creates or updates an autoscale setting.
REPLACE azure.monitor.autoscale_settings
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND autoscale_setting_name = '{{ autoscale_setting_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Deletes and autoscale setting.
DELETE FROM azure.monitor.autoscale_settings
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND autoscale_setting_name = '{{ autoscale_setting_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;