scaling_plans
Creates, updates, deletes, gets or lists a scaling_plans resource.
Overview
| Name | scaling_plans |
| Type | Resource |
| Id | azure.desktop_virtualization.scaling_plans |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_host_pool
- list_by_resource_group
- list_by_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
description | string | Description of scaling plan. |
etag | string | The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
exclusionTag | string | Exclusion tag for scaling plan. |
friendlyName | string | User friendly name of scaling plan. |
hostPoolReferences | array | List of ScalingHostPoolReference definitions. |
hostPoolType | string | HostPool type for desktop. "Pooled" |
identity | object | :vartype identity: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity |
kind | string | Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. |
location | string | The geo-location where the resource lives. Required. |
managedBy | string | The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. |
objectId | string | ObjectId of scaling plan. (internal use). |
plan | object | :vartype plan: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan |
schedules | array | List of ScalingPlanPooledSchedule definitions. |
sku | object | :vartype sku: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeZone | string | Timezone of the scaling plan. Required. |
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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
description | string | Description of scaling plan. |
etag | string | The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
exclusionTag | string | Exclusion tag for scaling plan. |
friendlyName | string | User friendly name of scaling plan. |
hostPoolReferences | array | List of ScalingHostPoolReference definitions. |
hostPoolType | string | HostPool type for desktop. "Pooled" |
identity | object | :vartype identity: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity |
kind | string | Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. |
location | string | The geo-location where the resource lives. Required. |
managedBy | string | The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. |
objectId | string | ObjectId of scaling plan. (internal use). |
plan | object | :vartype plan: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan |
schedules | array | List of ScalingPlanPooledSchedule definitions. |
sku | object | :vartype sku: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeZone | string | Timezone of the scaling plan. Required. |
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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
description | string | Description of scaling plan. |
etag | string | The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
exclusionTag | string | Exclusion tag for scaling plan. |
friendlyName | string | User friendly name of scaling plan. |
hostPoolReferences | array | List of ScalingHostPoolReference definitions. |
hostPoolType | string | HostPool type for desktop. "Pooled" |
identity | object | :vartype identity: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity |
kind | string | Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. |
location | string | The geo-location where the resource lives. Required. |
managedBy | string | The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. |
objectId | string | ObjectId of scaling plan. (internal use). |
plan | object | :vartype plan: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan |
schedules | array | List of ScalingPlanPooledSchedule definitions. |
sku | object | :vartype sku: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeZone | string | Timezone of the scaling plan. Required. |
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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
description | string | Description of scaling plan. |
etag | string | The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
exclusionTag | string | Exclusion tag for scaling plan. |
friendlyName | string | User friendly name of scaling plan. |
hostPoolReferences | array | List of ScalingHostPoolReference definitions. |
hostPoolType | string | HostPool type for desktop. "Pooled" |
identity | object | :vartype identity: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity |
kind | string | Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. |
location | string | The geo-location where the resource lives. Required. |
managedBy | string | The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. |
objectId | string | ObjectId of scaling plan. (internal use). |
plan | object | :vartype plan: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan |
schedules | array | List of ScalingPlanPooledSchedule definitions. |
sku | object | :vartype sku: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeZone | string | Timezone of the scaling plan. Required. |
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, scaling_plan_name, subscription_id | Get a scaling plan. | |
list_by_host_pool | select | resource_group_name, host_pool_name, subscription_id | pageSize, isDescending, initialSkip | List scaling plan associated with hostpool. |
list_by_resource_group | select | resource_group_name, subscription_id | pageSize, isDescending, initialSkip | List scaling plans. |
list_by_subscription | select | subscription_id | pageSize, isDescending, initialSkip | List scaling plans in subscription. |
create | insert | resource_group_name, scaling_plan_name, subscription_id, location, properties | Create or update a scaling plan. | |
update | update | resource_group_name, scaling_plan_name, subscription_id | Update a scaling plan. | |
delete | delete | resource_group_name, scaling_plan_name, subscription_id | Remove a scaling plan. |
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 |
|---|---|---|
host_pool_name | string | The name of the host pool within the specified resource group. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
scaling_plan_name | string | The name of the scaling plan. Required. |
subscription_id | string | |
initialSkip | integer | Initial number of items to skip. Default value is None. |
isDescending | boolean | Indicates whether the collection is descending. Default value is None. |
pageSize | integer | Number of items per page. Default value is None. |
SELECT examples
- get
- list_by_host_pool
- list_by_resource_group
- list_by_subscription
Get a scaling plan.
SELECT
id,
name,
description,
etag,
exclusionTag,
friendlyName,
hostPoolReferences,
hostPoolType,
identity,
kind,
location,
managedBy,
objectId,
plan,
schedules,
sku,
systemData,
tags,
timeZone,
type
FROM azure.desktop_virtualization.scaling_plans
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND scaling_plan_name = '{{ scaling_plan_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List scaling plan associated with hostpool.
SELECT
id,
name,
description,
etag,
exclusionTag,
friendlyName,
hostPoolReferences,
hostPoolType,
identity,
kind,
location,
managedBy,
objectId,
plan,
schedules,
sku,
systemData,
tags,
timeZone,
type
FROM azure.desktop_virtualization.scaling_plans
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND host_pool_name = '{{ host_pool_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND pageSize = '{{ pageSize }}'
AND isDescending = '{{ isDescending }}'
AND initialSkip = '{{ initialSkip }}'
;
List scaling plans.
SELECT
id,
name,
description,
etag,
exclusionTag,
friendlyName,
hostPoolReferences,
hostPoolType,
identity,
kind,
location,
managedBy,
objectId,
plan,
schedules,
sku,
systemData,
tags,
timeZone,
type
FROM azure.desktop_virtualization.scaling_plans
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND pageSize = '{{ pageSize }}'
AND isDescending = '{{ isDescending }}'
AND initialSkip = '{{ initialSkip }}'
;
List scaling plans in subscription.
SELECT
id,
name,
description,
etag,
exclusionTag,
friendlyName,
hostPoolReferences,
hostPoolType,
identity,
kind,
location,
managedBy,
objectId,
plan,
schedules,
sku,
systemData,
tags,
timeZone,
type
FROM azure.desktop_virtualization.scaling_plans
WHERE subscription_id = '{{ subscription_id }}' -- required
AND pageSize = '{{ pageSize }}'
AND isDescending = '{{ isDescending }}'
AND initialSkip = '{{ initialSkip }}'
;
INSERT examples
- create
- Manifest
Create or update a scaling plan.
INSERT INTO azure.desktop_virtualization.scaling_plans (
tags,
location,
managedBy,
kind,
identity,
sku,
plan,
properties,
resource_group_name,
scaling_plan_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ managedBy }}',
'{{ kind }}',
'{{ identity }}',
'{{ sku }}',
'{{ plan }}',
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ scaling_plan_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
identity,
kind,
location,
managedBy,
plan,
properties,
sku,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: scaling_plans
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the scaling_plans resource.
- name: scaling_plan_name
value: "{{ scaling_plan_name }}"
description: Required parameter for the scaling_plans resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the scaling_plans resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: managedBy
value: "{{ managedBy }}"
description: |
The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.
- name: kind
value: "{{ kind }}"
description: |
Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
- name: identity
description: |
:vartype identity: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
- name: sku
description: |
:vartype sku: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku
value:
name: "{{ name }}"
tier: "{{ tier }}"
size: "{{ size }}"
family: "{{ family }}"
capacity: {{ capacity }}
- name: plan
description: |
:vartype plan: ~azure.mgmt.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan
value:
name: "{{ name }}"
publisher: "{{ publisher }}"
product: "{{ product }}"
promotionCode: "{{ promotionCode }}"
version: "{{ version }}"
- name: properties
value:
description: "{{ description }}"
friendlyName: "{{ friendlyName }}"
timeZone: "{{ timeZone }}"
hostPoolType: "{{ hostPoolType }}"
exclusionTag: "{{ exclusionTag }}"
schedules:
- name: "{{ name }}"
daysOfWeek: "{{ daysOfWeek }}"
rampUpStartTime:
hour: {{ hour }}
minute: {{ minute }}
rampUpLoadBalancingAlgorithm: "{{ rampUpLoadBalancingAlgorithm }}"
rampUpMinimumHostsPct: {{ rampUpMinimumHostsPct }}
rampUpCapacityThresholdPct: {{ rampUpCapacityThresholdPct }}
peakStartTime:
hour: {{ hour }}
minute: {{ minute }}
peakLoadBalancingAlgorithm: "{{ peakLoadBalancingAlgorithm }}"
rampDownStartTime:
hour: {{ hour }}
minute: {{ minute }}
rampDownLoadBalancingAlgorithm: "{{ rampDownLoadBalancingAlgorithm }}"
rampDownMinimumHostsPct: {{ rampDownMinimumHostsPct }}
rampDownCapacityThresholdPct: {{ rampDownCapacityThresholdPct }}
rampDownForceLogoffUsers: {{ rampDownForceLogoffUsers }}
rampDownStopHostsWhen: "{{ rampDownStopHostsWhen }}"
rampDownWaitTimeMinutes: {{ rampDownWaitTimeMinutes }}
rampDownNotificationMessage: "{{ rampDownNotificationMessage }}"
offPeakStartTime:
hour: {{ hour }}
minute: {{ minute }}
offPeakLoadBalancingAlgorithm: "{{ offPeakLoadBalancingAlgorithm }}"
hostPoolReferences:
- hostPoolArmPath: "{{ hostPoolArmPath }}"
scalingPlanEnabled: {{ scalingPlanEnabled }}
UPDATE examples
- update
Update a scaling plan.
UPDATE azure.desktop_virtualization.scaling_plans
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND scaling_plan_name = '{{ scaling_plan_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
identity,
kind,
location,
managedBy,
plan,
properties,
sku,
systemData,
tags,
type;
DELETE examples
- delete
Remove a scaling plan.
DELETE FROM azure.desktop_virtualization.scaling_plans
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND scaling_plan_name = '{{ scaling_plan_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;