diff --git a/src/desktopvirtualization/azext_desktopvirtualization/__init__.py b/src/desktopvirtualization/azext_desktopvirtualization/__init__.py
index abb688f1d18..9ce6b976062 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/__init__.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/__init__.py
@@ -10,6 +10,10 @@
from azure.cli.core import AzCommandsLoader
from azext_desktopvirtualization.generated._help import helps # pylint: disable=unused-import
+try:
+ from azext_desktopvirtualization.manual._help import helps # pylint: disable=reimported
+except ImportError:
+ pass
class DesktopVirtualizationAPIClientCommandsLoader(AzCommandsLoader):
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/azext_metadata.json b/src/desktopvirtualization/azext_desktopvirtualization/azext_metadata.json
index 13025150393..4f48fa652a5 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/azext_metadata.json
+++ b/src/desktopvirtualization/azext_desktopvirtualization/azext_metadata.json
@@ -1,4 +1,4 @@
{
"azext.isExperimental": true,
- "azext.minCliCoreVersion": "2.3.1"
+ "azext.minCliCoreVersion": "2.11.0"
}
\ No newline at end of file
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/generated/_client_factory.py b/src/desktopvirtualization/azext_desktopvirtualization/generated/_client_factory.py
index c2eaaf78da0..a5f89768aea 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/generated/_client_factory.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/generated/_client_factory.py
@@ -12,16 +12,29 @@
def cf_desktopvirtualization_cl(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from ..vendored_sdks.desktopvirtualization import DesktopVirtualizationAPIClient
- return get_mgmt_service_client(cli_ctx, DesktopVirtualizationAPIClient)
+ return get_mgmt_service_client(cli_ctx,
+ DesktopVirtualizationAPIClient)
def cf_workspace(cli_ctx, *_):
return cf_desktopvirtualization_cl(cli_ctx).workspace
+def cf_scaling_plan(cli_ctx, *_):
+ return cf_desktopvirtualization_cl(cli_ctx).scaling_plan
+
+
def cf_application_group(cli_ctx, *_):
return cf_desktopvirtualization_cl(cli_ctx).application_group
def cf_host_pool(cli_ctx, *_):
return cf_desktopvirtualization_cl(cli_ctx).host_pool
+
+
+def cf_msix_package(cli_ctx, *_):
+ return cf_desktopvirtualization_cl(cli_ctx).msix_package
+
+
+def cf_msix_image(cli_ctx, *_):
+ return cf_desktopvirtualization_cl(cli_ctx).msix_image
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/generated/_help.py b/src/desktopvirtualization/azext_desktopvirtualization/generated/_help.py
index f83a14c0562..31812dbb9d2 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/generated/_help.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/generated/_help.py
@@ -19,49 +19,210 @@
helps['desktopvirtualization workspace list'] = """
type: command
- short-summary: List workspaces in subscription.
+ short-summary: "List workspaces. And List workspaces in subscription."
examples:
- name: Workspace_ListByResourceGroup
text: |-
- az desktopvirtualization workspace list --resource-group "MyResourceGroup"
+ az desktopvirtualization workspace list --resource-group "resourceGroup1"
+ - name: Workspace_ListBySubscription
+ text: |-
+ az desktopvirtualization workspace list
"""
helps['desktopvirtualization workspace show'] = """
type: command
- short-summary: Get a workspace.
+ short-summary: "Get a workspace."
examples:
- name: Workspace_Get
text: |-
- az desktopvirtualization workspace show --resource-group "MyResourceGroup" --name "MyWorkspace"
+ az desktopvirtualization workspace show --resource-group "resourceGroup1" --name "workspace1"
"""
helps['desktopvirtualization workspace create'] = """
type: command
- short-summary: Create or update a workspace.
+ short-summary: "Create a workspace."
examples:
- name: Workspace_Create
text: |-
- az desktopvirtualization workspace create --resource-group "MyResourceGroup" --location "centralus" \
---description "des1" --friendly-name "friendly" --tags tag1="value1" tag2="value2" --name "MyWorkspace"
+ az desktopvirtualization workspace create --resource-group "resourceGroup1" --location "centralus" \
+--description "des1" --friendly-name "friendly" --tags tag1="value1" tag2="value2" --name "workspace1"
"""
helps['desktopvirtualization workspace update'] = """
type: command
- short-summary: Update a workspace.
+ short-summary: "Update a workspace."
examples:
- name: Workspace_Update
text: |-
- az desktopvirtualization workspace update --resource-group "MyResourceGroup" --description "des1" \
---friendly-name "friendly" --tags tag1="value1" tag2="value2" --name "MyWorkspace"
+ az desktopvirtualization workspace update --resource-group "resourceGroup1" --description "des1" \
+--friendly-name "friendly" --tags tag1="value1" tag2="value2" --name "workspace1"
"""
helps['desktopvirtualization workspace delete'] = """
type: command
- short-summary: Remove a workspace.
+ short-summary: "Remove a workspace."
examples:
- name: Workspace_Delete
text: |-
- az desktopvirtualization workspace delete --resource-group "MyResourceGroup" --name "MyWorkspace"
+ az desktopvirtualization workspace delete --resource-group "resourceGroup1" --name "workspace1"
+"""
+
+helps['desktopvirtualization scaling-plan'] = """
+ type: group
+ short-summary: desktopvirtualization scaling-plan
+"""
+
+helps['desktopvirtualization scaling-plan list'] = """
+ type: command
+ short-summary: "List scaling plan associated with hostpool. And List scaling plans. And List scaling plans in \
+subscription."
+ examples:
+ - name: UserSession_SendMessage_Post
+ text: |-
+ az desktopvirtualization scaling-plan list --host-pool-name "hostPool1" --resource-group \
+"resourceGroup1"
+ - name: ScalingPlans_ListByResourceGroup
+ text: |-
+ az desktopvirtualization scaling-plan list --resource-group "resourceGroup1"
+ - name: ScalingPlans_ListBySubscription
+ text: |-
+ az desktopvirtualization scaling-plan list
+"""
+
+helps['desktopvirtualization scaling-plan show'] = """
+ type: command
+ short-summary: "Get a scaling plan."
+ examples:
+ - name: ScalingPlans_Get
+ text: |-
+ az desktopvirtualization scaling-plan show --resource-group "resourceGroup1" --name "scalingPlan1"
+"""
+
+helps['desktopvirtualization scaling-plan create'] = """
+ type: command
+ short-summary: "Create or update a scaling plan."
+ parameters:
+ - name: --schedules
+ short-summary: "List of ScalingSchedule definitions."
+ long-summary: |
+ Usage: --schedules name=XX days-of-week=XX ramp-up-start-time=XX ramp-up-algorithm=XX \
+ramp-up-minimum-host-pct=XX ramp-up-capacity-threshold-pct=XX peak-start-time=XX peak-load-balancing-algorithm=XX \
+ramp-down-start-time=XX ramp-down-load-balancing-algorithm=XX ramp-down-minimum-hosts-pct=XX \
+ramp-down-capacity-threshold-pct=XX ramp-down-force-logoff-users=XX ramp-down-stop-hosts-when=XX \
+ramp-down-notification-minutes=XX ramp-down-notification-message=XX off-peak-start-time=XX \
+off-peak-load-balancing-algorithm=XX
+
+ name: Name of the scaling schedule.
+ days-of-week: Set of days of the week on which this schedule is active.
+ ramp-up-start-time: Starting time for ramp up period.
+ ramp-up-algorithm: Load balancing algorithm for ramp up period.
+ ramp-up-minimum-host-pct: Minimum host percentage for ramp up period.
+ ramp-up-capacity-threshold-pct: Capacity threshold for ramp up period.
+ peak-start-time: Starting time for peak period.
+ peak-load-balancing-algorithm: Load balancing algorithm for peak period.
+ ramp-down-start-time: Starting time for ramp down period.
+ ramp-down-load-balancing-algorithm: Load balancing algorithm for ramp down period.
+ ramp-down-minimum-hosts-pct: Minimum host percentage for ramp down period.
+ ramp-down-capacity-threshold-pct: Capacity threshold for ramp down period.
+ ramp-down-force-logoff-users: Should users be logged off forcefully from hosts.
+ ramp-down-stop-hosts-when: Specifies when to stop hosts during ramp down period.
+ ramp-down-notification-minutes: Number of minutes to wait to stop hosts during ramp down period.
+ ramp-down-notification-message: Notification message for users during ramp down period.
+ off-peak-start-time: Starting time for off-peak period.
+ off-peak-load-balancing-algorithm: Load balancing algorithm for off-peak period.
+
+ Multiple actions can be specified by using more than one --schedules argument.
+ - name: --host-pool-references
+ short-summary: "List of ScalingHostPoolReference definitions."
+ long-summary: |
+ Usage: --host-pool-references host-pool-arm-path=XX scaling-plan-enabled=XX
+
+ host-pool-arm-path: Arm path of referenced hostpool.
+ scaling-plan-enabled: Is the scaling plan enabled for this hostpool.
+
+ Multiple actions can be specified by using more than one --host-pool-references argument.
+ examples:
+ - name: ScalingPlans_Create
+ text: |-
+ az desktopvirtualization scaling-plan create --resource-group "resourceGroup1" --location "centralus" \
+--description "des1" --exclusion-tag "value" --friendly-name "friendly" --host-pool-references \
+host-pool-arm-path="/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microso\
+ft.DesktopVirtualization/hostPools/hostPool1" scaling-plan-enabled=true --host-pool-type "Personal" --schedules \
+name="schedule1" days-of-week="Monday" days-of-week="Tuesday" days-of-week="Wednesday" days-of-week="Thursday" \
+days-of-week="Friday" off-peak-load-balancing-algorithm="DepthFirst" off-peak-start-time="2020-11-10T20:00:00.000Z" \
+peak-load-balancing-algorithm="BreadthFirst" peak-start-time="2020-11-10T08:00:00.000Z" ramp-down-capacity-threshold-pc\
+t=50 ramp-down-force-logoff-users=true ramp-down-load-balancing-algorithm="DepthFirst" ramp-down-minimum-hosts-pct=20 \
+ramp-down-notification-message="message" ramp-down-notification-minutes=30 ramp-down-start-time="2020-11-10T18:00:00.00\
+0Z" ramp-up-algorithm="DepthFirst" ramp-up-capacity-threshold-pct=80 ramp-up-minimum-host-pct=20 \
+ramp-up-start-time="2020-11-10T06:00:00.000Z" --time-zone "" --tags tag1="value1" tag2="value2" --name "scalingPlan1"
+"""
+
+helps['desktopvirtualization scaling-plan update'] = """
+ type: command
+ short-summary: "Update a scaling plan."
+ parameters:
+ - name: --schedules
+ short-summary: "List of ScalingSchedule definitions."
+ long-summary: |
+ Usage: --schedules name=XX days-of-week=XX ramp-up-start-time=XX ramp-up-algorithm=XX \
+ramp-up-minimum-host-pct=XX ramp-up-capacity-threshold-pct=XX peak-start-time=XX peak-load-balancing-algorithm=XX \
+ramp-down-start-time=XX ramp-down-load-balancing-algorithm=XX ramp-down-minimum-hosts-pct=XX \
+ramp-down-capacity-threshold-pct=XX ramp-down-force-logoff-users=XX ramp-down-stop-hosts-when=XX \
+ramp-down-notification-minutes=XX ramp-down-notification-message=XX off-peak-start-time=XX \
+off-peak-load-balancing-algorithm=XX
+
+ name: Name of the scaling schedule.
+ days-of-week: Set of days of the week on which this schedule is active.
+ ramp-up-start-time: Starting time for ramp up period.
+ ramp-up-algorithm: Load balancing algorithm for ramp up period.
+ ramp-up-minimum-host-pct: Minimum host percentage for ramp up period.
+ ramp-up-capacity-threshold-pct: Capacity threshold for ramp up period.
+ peak-start-time: Starting time for peak period.
+ peak-load-balancing-algorithm: Load balancing algorithm for peak period.
+ ramp-down-start-time: Starting time for ramp down period.
+ ramp-down-load-balancing-algorithm: Load balancing algorithm for ramp down period.
+ ramp-down-minimum-hosts-pct: Minimum host percentage for ramp down period.
+ ramp-down-capacity-threshold-pct: Capacity threshold for ramp down period.
+ ramp-down-force-logoff-users: Should users be logged off forcefully from hosts.
+ ramp-down-stop-hosts-when: Specifies when to stop hosts during ramp down period.
+ ramp-down-notification-minutes: Number of minutes to wait to stop hosts during ramp down period.
+ ramp-down-notification-message: Notification message for users during ramp down period.
+ off-peak-start-time: Starting time for off-peak period.
+ off-peak-load-balancing-algorithm: Load balancing algorithm for off-peak period.
+
+ Multiple actions can be specified by using more than one --schedules argument.
+ - name: --host-pool-references
+ short-summary: "List of ScalingHostPoolReference definitions."
+ long-summary: |
+ Usage: --host-pool-references host-pool-arm-path=XX scaling-plan-enabled=XX
+
+ host-pool-arm-path: Arm path of referenced hostpool.
+ scaling-plan-enabled: Is the scaling plan enabled for this hostpool.
+
+ Multiple actions can be specified by using more than one --host-pool-references argument.
+ examples:
+ - name: ScalingPlans_Update
+ text: |-
+ az desktopvirtualization scaling-plan update --resource-group "resourceGroup1" --name "scalingPlan1" \
+--description "des1" --exclusion-tag "value" --friendly-name "friendly" --host-pool-references \
+host-pool-arm-path="/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microso\
+ft.DesktopVirtualization/hostPools/hostPool1" scaling-plan-enabled=true --host-pool-type "Personal" --schedules \
+name="schedule1" days-of-week="Monday" days-of-week="Tuesday" days-of-week="Wednesday" days-of-week="Thursday" \
+days-of-week="Friday" off-peak-load-balancing-algorithm="DepthFirst" off-peak-start-time="2020-11-10T20:00:00.000Z" \
+peak-load-balancing-algorithm="BreadthFirst" peak-start-time="2020-11-10T08:00:00.000Z" ramp-down-capacity-threshold-pc\
+t=50 ramp-down-force-logoff-users=true ramp-down-load-balancing-algorithm="DepthFirst" ramp-down-minimum-hosts-pct=20 \
+ramp-down-notification-message="message" ramp-down-notification-minutes=30 ramp-down-start-time="2020-11-10T18:00:00.00\
+0Z" ramp-up-algorithm="DepthFirst" ramp-up-capacity-threshold-pct=80 ramp-up-minimum-host-pct=20 \
+ramp-up-start-time="2020-11-10T06:00:00.000Z" --time-zone "" --tags tag1="value1" tag2="value2"
+"""
+
+helps['desktopvirtualization scaling-plan delete'] = """
+ type: command
+ short-summary: "Remove a scaling plan."
+ examples:
+ - name: ScalingPlans_Delete
+ text: |-
+ az desktopvirtualization scaling-plan delete --resource-group "resourceGroup1" --name "scalingPlan1"
"""
helps['desktopvirtualization applicationgroup'] = """
@@ -71,54 +232,57 @@
helps['desktopvirtualization applicationgroup list'] = """
type: command
- short-summary: List applicationGroups in subscription.
+ short-summary: "List applicationGroups. And List applicationGroups in subscription."
examples:
- name: ApplicationGroup_ListByResourceGroup
text: |-
az desktopvirtualization applicationgroup list --filter "applicationGroupType eq \'RailApplication\'" \
---resource-group "MyResourceGroup"
+--resource-group "resourceGroup1"
+ - name: ApplicationGroup_List
+ text: |-
+ az desktopvirtualization applicationgroup list --filter "applicationGroupType eq \'RailApplication\'"
"""
helps['desktopvirtualization applicationgroup show'] = """
type: command
- short-summary: Get an application group.
+ short-summary: "Get an application group."
examples:
- name: ApplicationGroup_Get
text: |-
- az desktopvirtualization applicationgroup show --name "MyApplicationGroup" --resource-group \
-"MyResourceGroup"
+ az desktopvirtualization applicationgroup show --name "applicationGroup1" --resource-group \
+"resourceGroup1"
"""
helps['desktopvirtualization applicationgroup create'] = """
type: command
- short-summary: Create or update an applicationGroup.
+ short-summary: "Create an applicationGroup."
examples:
- name: ApplicationGroup_Create
text: |-
az desktopvirtualization applicationgroup create --location "centralus" --description "des1" \
--application-group-type "RemoteApp" --friendly-name "friendly" --host-pool-arm-path "/subscriptions/daefabc0-95b4-48b3\
--b645-8a753a63c4fa/resourceGroups/MyResourceGroup/providers/Microsoft.DesktopVirtualization/hostPools/MyHostPool" \
---tags tag1="value1" tag2="value2" --name "MyApplicationGroup" --resource-group "MyResourceGroup"
+-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1" --tags \
+tag1="value1" tag2="value2" --name "applicationGroup1" --resource-group "resourceGroup1"
"""
helps['desktopvirtualization applicationgroup update'] = """
type: command
- short-summary: Update an applicationGroup.
+ short-summary: "Update an applicationGroup."
examples:
- name: ApplicationGroups_Update
text: |-
az desktopvirtualization applicationgroup update --description "des1" --friendly-name "friendly" --tags \
-tag1="value1" tag2="value2" --name "MyApplicationGroup" --resource-group "MyResourceGroup"
+tag1="value1" tag2="value2" --name "applicationGroup1" --resource-group "resourceGroup1"
"""
helps['desktopvirtualization applicationgroup delete'] = """
type: command
- short-summary: Remove an applicationGroup.
+ short-summary: "Remove an applicationGroup."
examples:
- name: ApplicationGroup_Delete
text: |-
- az desktopvirtualization applicationgroup delete --name "MyApplicationGroup" --resource-group \
-"MyResourceGroup"
+ az desktopvirtualization applicationgroup delete --name "applicationGroup1" --resource-group \
+"resourceGroup1"
"""
helps['desktopvirtualization hostpool'] = """
@@ -128,28 +292,31 @@
helps['desktopvirtualization hostpool list'] = """
type: command
- short-summary: List hostPools in subscription.
+ short-summary: "List hostPools. And List hostPools in subscription."
examples:
- name: HostPool_ListByResourceGroup
text: |-
- az desktopvirtualization hostpool list --resource-group "MyResourceGroup"
+ az desktopvirtualization hostpool list --resource-group "resourceGroup1"
+ - name: HostPool_List
+ text: |-
+ az desktopvirtualization hostpool list
"""
helps['desktopvirtualization hostpool show'] = """
type: command
- short-summary: Get a host pool.
+ short-summary: "Get a host pool."
examples:
- name: HostPool_Get
text: |-
- az desktopvirtualization hostpool show --name "MyHostPool" --resource-group "MyResourceGroup"
+ az desktopvirtualization hostpool show --name "hostPool1" --resource-group "resourceGroup1"
"""
helps['desktopvirtualization hostpool create'] = """
type: command
- short-summary: Create or update a host pool.
+ short-summary: "Create a host pool."
parameters:
- name: --registration-info
- short-summary: The registration info of HostPool.
+ short-summary: "The registration info of HostPool."
long-summary: |
Usage: --registration-info expiration-time=XX token=XX registration-token-operation=XX
@@ -161,17 +328,19 @@
text: |-
az desktopvirtualization hostpool create --location "centralus" --description "des1" --friendly-name \
"friendly" --host-pool-type "Pooled" --load-balancer-type "BreadthFirst" --max-session-limit 999999 \
---personal-desktop-assignment-type "Automatic" --registration-info expiration-time="2020-10-01T14:01:54.9571247Z" \
-registration-token-operation="Update" --sso-context "KeyVaultPath" --tags tag1="value1" tag2="value2" --name \
-"MyHostPool" --resource-group "MyResourceGroup"
+--personal-desktop-assignment-type "Automatic" --preferred-app-group-type "Desktop" --registration-info \
+expiration-time="2020-10-01T14:01:54.9571247Z" registration-token-operation="Update" --sso-client-id "client" \
+--sso-client-secret-key-vault-path "https://keyvault/secret" --sso-context "KeyVaultPath" --sso-secret-type \
+"SharedKey" --ssoadfs-authority "https://adfs" --start-vm-on-connect false --vm-template "{json:json}" --tags \
+tag1="value1" tag2="value2" --name "hostPool1" --resource-group "resourceGroup1"
"""
helps['desktopvirtualization hostpool update'] = """
type: command
- short-summary: Update a host pool.
+ short-summary: "Update a host pool."
parameters:
- name: --registration-info
- short-summary: The registration info of HostPool.
+ short-summary: "The registration info of HostPool."
long-summary: |
Usage: --registration-info expiration-time=XX registration-token-operation=XX
@@ -182,16 +351,122 @@
text: |-
az desktopvirtualization hostpool update --description "des1" --friendly-name "friendly" \
--load-balancer-type "BreadthFirst" --max-session-limit 999999 --personal-desktop-assignment-type "Automatic" \
---registration-info expiration-time="2020-10-01T15:01:54.9571247Z" registration-token-operation="Update" --sso-context \
-"KeyVaultPath" --tags tag1="value1" tag2="value2" --name "MyHostPool" --resource-group "MyResourceGroup"
+--registration-info expiration-time="2020-10-01T15:01:54.9571247Z" registration-token-operation="Update" \
+--sso-client-id "client" --sso-client-secret-key-vault-path "https://keyvault/secret" --sso-context "KeyVaultPath" \
+--sso-secret-type "SharedKey" --ssoadfs-authority "https://adfs" --start-vm-on-connect false --vm-template \
+"{json:json}" --tags tag1="value1" tag2="value2" --name "hostPool1" --resource-group "resourceGroup1"
"""
helps['desktopvirtualization hostpool delete'] = """
type: command
- short-summary: Remove a host pool.
+ short-summary: "Remove a host pool."
examples:
- name: HostPool_Delete
text: |-
- az desktopvirtualization hostpool delete --force true --name "MyHostPool" --resource-group \
-"MyResourceGroup"
+ az desktopvirtualization hostpool delete --force true --name "hostPool1" --resource-group \
+"resourceGroup1"
+"""
+
+helps['desktopvirtualization msix-package'] = """
+ type: group
+ short-summary: desktopvirtualization msix-package
+"""
+
+helps['desktopvirtualization msix-package list'] = """
+ type: command
+ short-summary: "List MSIX packages in hostpool."
+ examples:
+ - name: MSIXPackage_List
+ text: |-
+ az desktopvirtualization msix-package list --host-pool-name "hostpool1" --resource-group \
+"resourceGroup1"
+"""
+
+helps['desktopvirtualization msix-package show'] = """
+ type: command
+ short-summary: "Get a msixpackage."
+ examples:
+ - name: MSIXPackage_Get
+ text: |-
+ az desktopvirtualization msix-package show --host-pool-name "hostpool1" --msix-package-full-name \
+"packagefullname" --resource-group "resourceGroup1"
+"""
+
+helps['desktopvirtualization msix-package create'] = """
+ type: command
+ short-summary: "Create a MSIX package."
+ parameters:
+ - name: --package-dependencies
+ short-summary: "List of package dependencies."
+ long-summary: |
+ Usage: --package-dependencies dependency-name=XX publisher=XX min-version=XX
+
+ dependency-name: Name of package dependency.
+ publisher: Name of dependency publisher.
+ min-version: Dependency version required.
+
+ Multiple actions can be specified by using more than one --package-dependencies argument.
+ - name: --package-applications
+ short-summary: "List of package applications."
+ long-summary: |
+ Usage: --package-applications app-id=XX description=XX app-user-model-id=XX friendly-name=XX \
+icon-image-name=XX raw-icon=XX raw-png=XX
+
+ app-id: Package Application Id, found in appxmanifest.xml.
+ description: Description of Package Application.
+ app-user-model-id: Used to activate Package Application. Consists of Package Name and ApplicationID. Found \
+in appxmanifest.xml.
+ friendly-name: User friendly name.
+ icon-image-name: User friendly name.
+ raw-icon: the icon a 64 bit string as a byte array.
+ raw-png: the icon a 64 bit string as a byte array.
+
+ Multiple actions can be specified by using more than one --package-applications argument.
+ examples:
+ - name: MSIXPackage_Create
+ text: |-
+ az desktopvirtualization msix-package create --host-pool-name "hostpool1" --display-name "displayname" \
+--image-path "imagepath" --is-active false --is-regular-registration false --last-updated \
+"2008-09-22T14:01:54.9571247Z" --package-applications description="application-desc" app-id="ApplicationId" \
+app-user-model-id="AppUserModelId" friendly-name="friendlyname" icon-image-name="Apptile" \
+raw-icon="VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo" raw-png="VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo" --package-dependencies \
+dependency-name="MsixTest_Dependency_Name" min-version="version" publisher="PublishedName" --package-family-name \
+"MsixPackage_FamilyName" --package-name "MsixPackage_name" --package-relative-path "packagerelativepath" --version \
+"version" --msix-package-full-name "msixpackagefullname" --resource-group "resourceGroup1"
+"""
+
+helps['desktopvirtualization msix-package update'] = """
+ type: command
+ short-summary: "Update an MSIX Package."
+ examples:
+ - name: MSIXPackage_Update
+ text: |-
+ az desktopvirtualization msix-package update --host-pool-name "hostpool1" --display-name "displayname" \
+--is-active true --is-regular-registration false --msix-package-full-name "msixpackagefullname" --resource-group \
+"resourceGroup1"
+"""
+
+helps['desktopvirtualization msix-package delete'] = """
+ type: command
+ short-summary: "Remove an MSIX Package."
+ examples:
+ - name: MSIXPackage_Delete
+ text: |-
+ az desktopvirtualization msix-package delete --host-pool-name "hostpool1" --msix-package-full-name \
+"packagefullname" --resource-group "resourceGroup1"
+"""
+
+helps['desktopvirtualization msix-image'] = """
+ type: group
+ short-summary: desktopvirtualization msix-image
+"""
+
+helps['desktopvirtualization msix-image expand'] = """
+ type: command
+ short-summary: "Expands and Lists MSIX packages in an Image, given the Image Path."
+ examples:
+ - name: MsixImage_Expand
+ text: |-
+ az desktopvirtualization msix-image expand --host-pool-name "hostpool1" --uri "imagepath" \
+--resource-group "resourceGroup1"
"""
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/generated/_params.py b/src/desktopvirtualization/azext_desktopvirtualization/generated/_params.py
index 378f640e374..d82f9ef2f23 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/generated/_params.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/generated/_params.py
@@ -19,8 +19,14 @@
)
from azure.cli.core.commands.validators import get_default_location_from_resource_group
from azext_desktopvirtualization.action import (
+ AddDesktopvirtualizationScalingPlanCreateSchedules,
+ AddDesktopvirtualizationScalingPlanCreateHostPoolReferences,
+ AddDesktopvirtualizationScalingPlanUpdateSchedules,
+ AddDesktopvirtualizationScalingPlanUpdateHostPoolReferences,
AddDesktopvirtualizationHostpoolCreateRegistrationInfo,
- AddDesktopvirtualizationHostpoolUpdateRegistrationInfo
+ AddDesktopvirtualizationHostpoolUpdateRegistrationInfo,
+ AddPackageDependencies,
+ AddPackageApplications
)
@@ -31,117 +37,253 @@ def load_arguments(self, _):
with self.argument_context('desktopvirtualization workspace show') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('workspace_name', options_list=['--name', '-n'], help='The name of the workspace', id_part='name')
+ c.argument('workspace_name', options_list=['--name', '-n', '--workspace-name'], type=str, help='The name of '
+ 'the workspace', id_part='name')
with self.argument_context('desktopvirtualization workspace create') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('workspace_name', options_list=['--name', '-n'], help='The name of the workspace')
+ c.argument('workspace_name', options_list=['--name', '-n', '--workspace-name'], type=str, help='The name of '
+ 'the workspace')
c.argument('tags', tags_type)
c.argument('location', arg_type=get_location_type(self.cli_ctx),
validator=get_default_location_from_resource_group)
- c.argument('description', help='Description of Workspace.')
- c.argument('friendly_name', help='Friendly name of Workspace.')
- c.argument('application_group_references', nargs='+', help='List of applicationGroup resource Ids.')
+ c.argument('description', type=str, help='Description of Workspace.')
+ c.argument('friendly_name', type=str, help='Friendly name of Workspace.')
+ c.argument('application_group_references', nargs='*', help='List of applicationGroup resource Ids.')
with self.argument_context('desktopvirtualization workspace update') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('workspace_name', options_list=['--name', '-n'], help='The name of the workspace', id_part='name')
+ c.argument('workspace_name', options_list=['--name', '-n', '--workspace-name'], type=str, help='The name of '
+ 'the workspace', id_part='name')
c.argument('tags', tags_type)
- c.argument('description', help='Description of Workspace.')
- c.argument('friendly_name', help='Friendly name of Workspace.')
- c.argument('application_group_references', nargs='+', help='List of applicationGroup links.')
+ c.argument('description', type=str, help='Description of Workspace.')
+ c.argument('friendly_name', type=str, help='Friendly name of Workspace.')
+ c.argument('application_group_references', nargs='*', help='List of applicationGroup links.')
with self.argument_context('desktopvirtualization workspace delete') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('workspace_name', options_list=['--name', '-n'], help='The name of the workspace', id_part='name')
+ c.argument('workspace_name', options_list=['--name', '-n', '--workspace-name'], type=str, help='The name of '
+ 'the workspace', id_part='name')
+
+ with self.argument_context('desktopvirtualization scaling-plan list') as c:
+ c.argument('resource_group_name', resource_group_name_type)
+ c.argument('host_pool_name', type=str, help='The name of the host pool within the specified resource group')
+
+ with self.argument_context('desktopvirtualization scaling-plan show') as c:
+ c.argument('resource_group_name', resource_group_name_type)
+ c.argument('scaling_plan_name', options_list=['--name', '-n', '--scaling-plan-name'], type=str, help='The name '
+ 'of the scaling plan.', id_part='name')
+
+ with self.argument_context('desktopvirtualization scaling-plan create') as c:
+ c.argument('resource_group_name', resource_group_name_type)
+ c.argument('scaling_plan_name', options_list=['--name', '-n', '--scaling-plan-name'], type=str, help='The name '
+ 'of the scaling plan.')
+ c.argument('tags', tags_type)
+ c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ validator=get_default_location_from_resource_group)
+ c.argument('description', type=str, help='Description of scaling plan.')
+ c.argument('friendly_name', type=str, help='User friendly name of scaling plan.')
+ c.argument('time_zone', type=str, help='Timezone of the scaling plan.')
+ c.argument('host_pool_type', arg_type=get_enum_type(['Personal', 'Pooled']), help='HostPool type for scaling '
+ 'plan.')
+ c.argument('exclusion_tag', type=str, help='Exclusion tag for scaling plan.')
+ c.argument('schedules', action=AddDesktopvirtualizationScalingPlanCreateSchedules, nargs='*', help='List of '
+ 'ScalingSchedule definitions.')
+ c.argument('host_pool_references', action=AddDesktopvirtualizationScalingPlanCreateHostPoolReferences, nargs=''
+ '*', help='List of ScalingHostPoolReference definitions.')
+
+ with self.argument_context('desktopvirtualization scaling-plan update') as c:
+ c.argument('resource_group_name', resource_group_name_type)
+ c.argument('scaling_plan_name', options_list=['--name', '-n', '--scaling-plan-name'], type=str, help='The name '
+ 'of the scaling plan.', id_part='name')
+ c.argument('tags', tags_type)
+ c.argument('description', type=str, help='Description of scaling plan.')
+ c.argument('friendly_name', type=str, help='User friendly name of scaling plan.')
+ c.argument('time_zone', type=str, help='Timezone of the scaling plan.')
+ c.argument('host_pool_type', arg_type=get_enum_type(['Personal', 'Pooled']), help='HostPool type for scaling '
+ 'plan.')
+ c.argument('exclusion_tag', type=str, help='Exclusion tag for scaling plan.')
+ c.argument('schedules', action=AddDesktopvirtualizationScalingPlanUpdateSchedules, nargs='*', help='List of '
+ 'ScalingSchedule definitions.')
+ c.argument('host_pool_references', action=AddDesktopvirtualizationScalingPlanUpdateHostPoolReferences, nargs=''
+ '*', help='List of ScalingHostPoolReference definitions.')
+
+ with self.argument_context('desktopvirtualization scaling-plan delete') as c:
+ c.argument('resource_group_name', resource_group_name_type)
+ c.argument('scaling_plan_name', options_list=['--name', '-n', '--scaling-plan-name'], type=str, help='The name '
+ 'of the scaling plan.', id_part='name')
with self.argument_context('desktopvirtualization applicationgroup list') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('filter', help='OData filter expression. Valid properties for filtering are applicationGroupType.')
+ c.argument('filter_', options_list=['--filter'], type=str, help='OData filter expression. Valid properties for '
+ 'filtering are applicationGroupType.')
with self.argument_context('desktopvirtualization applicationgroup show') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('application_group_name', options_list=['--name', '-n'], help='The name of the application group',
- id_part='name')
+ c.argument('application_group_name', options_list=['--name', '-n', '--application-group-name'], type=str,
+ help='The name of the application group', id_part='name')
with self.argument_context('desktopvirtualization applicationgroup create') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('application_group_name', options_list=['--name', '-n'], help='The name of the application group')
+ c.argument('application_group_name', options_list=['--name', '-n', '--application-group-name'], type=str,
+ help='The name of the application group')
c.argument('tags', tags_type)
c.argument('location', arg_type=get_location_type(self.cli_ctx),
validator=get_default_location_from_resource_group)
- c.argument('description', help='Description of ApplicationGroup.')
- c.argument('friendly_name', help='Friendly name of ApplicationGroup.')
- c.argument('host_pool_arm_path', help='HostPool arm path of ApplicationGroup.')
+ c.argument('description', type=str, help='Description of ApplicationGroup.')
+ c.argument('friendly_name', type=str, help='Friendly name of ApplicationGroup.')
+ c.argument('host_pool_arm_path', type=str, help='HostPool arm path of ApplicationGroup.')
c.argument('application_group_type', arg_type=get_enum_type(['RemoteApp', 'Desktop']), help='Resource Type of '
'ApplicationGroup.')
with self.argument_context('desktopvirtualization applicationgroup update') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('application_group_name', options_list=['--name', '-n'], help='The name of the application group',
- id_part='name')
+ c.argument('application_group_name', options_list=['--name', '-n', '--application-group-name'], type=str,
+ help='The name of the application group', id_part='name')
c.argument('tags', tags_type)
- c.argument('description', help='Description of ApplicationGroup.')
- c.argument('friendly_name', help='Friendly name of ApplicationGroup.')
+ c.argument('description', type=str, help='Description of ApplicationGroup.')
+ c.argument('friendly_name', type=str, help='Friendly name of ApplicationGroup.')
with self.argument_context('desktopvirtualization applicationgroup delete') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('application_group_name', options_list=['--name', '-n'], help='The name of the application group',
- id_part='name')
+ c.argument('application_group_name', options_list=['--name', '-n', '--application-group-name'], type=str,
+ help='The name of the application group', id_part='name')
with self.argument_context('desktopvirtualization hostpool list') as c:
c.argument('resource_group_name', resource_group_name_type)
with self.argument_context('desktopvirtualization hostpool show') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('host_pool_name', options_list=['--name', '-n'], help='The name of the host pool within the '
- 'specified resource group', id_part='name')
+ c.argument('host_pool_name', options_list=['--name', '-n', '--host-pool-name'], type=str, help='The name of '
+ 'the host pool within the specified resource group', id_part='name')
with self.argument_context('desktopvirtualization hostpool create') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('host_pool_name', options_list=['--name', '-n'], help='The name of the host pool within the '
- 'specified resource group')
+ c.argument('host_pool_name', options_list=['--name', '-n', '--host-pool-name'], type=str, help='The name of '
+ 'the host pool within the specified resource group')
c.argument('tags', tags_type)
c.argument('location', arg_type=get_location_type(self.cli_ctx),
validator=get_default_location_from_resource_group)
- c.argument('friendly_name', help='Friendly name of HostPool.')
- c.argument('description', help='Description of HostPool.')
+ c.argument('friendly_name', type=str, help='Friendly name of HostPool.')
+ c.argument('description', type=str, help='Description of HostPool.')
c.argument('host_pool_type', arg_type=get_enum_type(['Personal', 'Pooled']),
help='HostPool type for desktop.')
c.argument('personal_desktop_assignment_type', arg_type=get_enum_type(['Automatic', 'Direct']), help=''
'PersonalDesktopAssignment type for HostPool.')
- c.argument('custom_rdp_property', help='Custom rdp property of HostPool.')
- c.argument('max_session_limit', help='The max session limit of HostPool.')
+ c.argument('custom_rdp_property', type=str, help='Custom rdp property of HostPool.')
+ c.argument('max_session_limit', type=int, help='The max session limit of HostPool.')
c.argument('load_balancer_type', arg_type=get_enum_type(['BreadthFirst', 'DepthFirst', 'Persistent']), help=''
'The type of the load balancer.')
- c.argument('ring', help='The ring number of HostPool.')
+ c.argument('ring', type=int, help='The ring number of HostPool.')
c.argument('validation_environment', arg_type=get_three_state_flag(), help='Is validation environment.')
- c.argument('registration_info', action=AddDesktopvirtualizationHostpoolCreateRegistrationInfo, nargs='+',
+ c.argument('registration_info', action=AddDesktopvirtualizationHostpoolCreateRegistrationInfo, nargs='*',
help='The registration info of HostPool.')
- c.argument('vm_template', help='VM template for sessionhosts configuration within hostpool.')
- c.argument('sso_context', help='Path to keyvault containing ssoContext secret.')
+ c.argument('vm_template', type=str, help='VM template for sessionhosts configuration within hostpool.')
+ c.argument('sso_context', type=str, help='Path to keyvault containing ssoContext secret.')
+ c.argument('ssoadfs_authority', type=str,
+ help='URL to customer ADFS server for signing WVD SSO certificates.')
+ c.argument('sso_client_id', type=str, help='ClientId for the registered Relying Party used to issue WVD SSO '
+ 'certificates.')
+ c.argument('sso_client_secret_key_vault_path', type=str, help='Path to Azure KeyVault storing the secret used '
+ 'for communication to ADFS.')
+ c.argument('sso_secret_type', arg_type=get_enum_type(['SharedKey', 'Certificate', 'SharedKeyInKeyVault', ''
+ 'CertificateInKeyVault']), help='The type of single sign '
+ 'on Secret Type.')
+ c.argument('preferred_app_group_type', arg_type=get_enum_type(['None', 'Desktop', 'RailApplications']), help=''
+ 'The type of preferred application group type, default to Desktop Application Group')
+ c.argument('start_vm_on_connect', arg_type=get_three_state_flag(), help='The flag to turn on/off '
+ 'StartVMOnConnect feature.')
with self.argument_context('desktopvirtualization hostpool update') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('host_pool_name', options_list=['--name', '-n'], help='The name of the host pool within the '
- 'specified resource group', id_part='name')
+ c.argument('host_pool_name', options_list=['--name', '-n', '--host-pool-name'], type=str, help='The name of '
+ 'the host pool within the specified resource group', id_part='name')
c.argument('tags', tags_type)
- c.argument('friendly_name', help='Friendly name of HostPool.')
- c.argument('description', help='Description of HostPool.')
- c.argument('custom_rdp_property', help='Custom rdp property of HostPool.')
- c.argument('max_session_limit', help='The max session limit of HostPool.')
+ c.argument('friendly_name', type=str, help='Friendly name of HostPool.')
+ c.argument('description', type=str, help='Description of HostPool.')
+ c.argument('custom_rdp_property', type=str, help='Custom rdp property of HostPool.')
+ c.argument('max_session_limit', type=int, help='The max session limit of HostPool.')
c.argument('personal_desktop_assignment_type', arg_type=get_enum_type(['Automatic', 'Direct']), help=''
'PersonalDesktopAssignment type for HostPool.')
c.argument('load_balancer_type', arg_type=get_enum_type(['BreadthFirst', 'DepthFirst', 'Persistent']), help=''
'The type of the load balancer.')
- c.argument('ring', help='The ring number of HostPool.')
+ c.argument('ring', type=int, help='The ring number of HostPool.')
c.argument('validation_environment', arg_type=get_three_state_flag(), help='Is validation environment.')
- c.argument('registration_info', action=AddDesktopvirtualizationHostpoolUpdateRegistrationInfo, nargs='+',
+ c.argument('registration_info', action=AddDesktopvirtualizationHostpoolUpdateRegistrationInfo, nargs='*',
help='The registration info of HostPool.')
- c.argument('sso_context', help='Path to keyvault containing ssoContext secret.')
+ c.argument('vm_template', type=str, help='VM template for sessionhosts configuration within hostpool.')
+ c.argument('sso_context', type=str, help='Path to keyvault containing ssoContext secret.')
+ c.argument('ssoadfs_authority', type=str,
+ help='URL to customer ADFS server for signing WVD SSO certificates.')
+ c.argument('sso_client_id', type=str, help='ClientId for the registered Relying Party used to issue WVD SSO '
+ 'certificates.')
+ c.argument('sso_client_secret_key_vault_path', type=str, help='Path to Azure KeyVault storing the secret used '
+ 'for communication to ADFS.')
+ c.argument('sso_secret_type', arg_type=get_enum_type(['SharedKey', 'Certificate', 'SharedKeyInKeyVault', ''
+ 'CertificateInKeyVault']), help='The type of single sign '
+ 'on Secret Type.')
+ c.argument('preferred_app_group_type', arg_type=get_enum_type(['None', 'Desktop', 'RailApplications']), help=''
+ 'The type of preferred application group type, default to Desktop Application Group')
+ c.argument('start_vm_on_connect', arg_type=get_three_state_flag(), help='The flag to turn on/off '
+ 'StartVMOnConnect feature.')
with self.argument_context('desktopvirtualization hostpool delete') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('host_pool_name', options_list=['--name', '-n'], help='The name of the host pool within the '
- 'specified resource group', id_part='name')
+ c.argument('host_pool_name', options_list=['--name', '-n', '--host-pool-name'], type=str, help='The name of '
+ 'the host pool within the specified resource group', id_part='name')
c.argument('force', arg_type=get_three_state_flag(), help='Force flag to delete sessionHost.')
+
+ with self.argument_context('desktopvirtualization msix-package list') as c:
+ c.argument('resource_group_name', resource_group_name_type)
+ c.argument('host_pool_name', type=str, help='The name of the host pool within the specified resource group')
+
+ with self.argument_context('desktopvirtualization msix-package show') as c:
+ c.argument('resource_group_name', resource_group_name_type)
+ c.argument('host_pool_name', type=str, help='The name of the host pool within the specified resource group')
+ c.argument('msix_package_full_name', type=str, help='The version specific package full name of the MSIX '
+ 'package within specified hostpool')
+
+ with self.argument_context('desktopvirtualization msix-package create') as c:
+ c.argument('resource_group_name', resource_group_name_type)
+ c.argument('host_pool_name', type=str, help='The name of the host pool within the specified resource group')
+ c.argument('msix_package_full_name', type=str, help='The version specific package full name of the MSIX '
+ 'package within specified hostpool')
+ c.argument('image_path', type=str, help='VHD/CIM image path on Network Share.')
+ c.argument('package_name', type=str, help='Package Name from appxmanifest.xml.')
+ c.argument('package_family_name', type=str, help='Package Family Name from appxmanifest.xml. Contains Package '
+ 'Name and Publisher name.')
+ c.argument('display_name', type=str, help='User friendly Name to be displayed in the portal.')
+ c.argument('package_relative_path', type=str, help='Relative Path to the package inside the image.')
+ c.argument('is_regular_registration', arg_type=get_three_state_flag(), help='Specifies how to register Package '
+ 'in feed.')
+ c.argument('is_active', arg_type=get_three_state_flag(), help='Make this version of the package the active one '
+ 'across the hostpool.')
+ c.argument('package_dependencies', action=AddPackageDependencies, nargs='*', help='List of package '
+ 'dependencies.')
+ c.argument('version', type=str, help='Package Version found in the appxmanifest.xml.')
+ c.argument('last_updated', help='Date Package was last updated, found in the appxmanifest.xml.')
+ c.argument('package_applications', action=AddPackageApplications, nargs='*', help='List of package '
+ 'applications.')
+
+ with self.argument_context('desktopvirtualization msix-package update') as c:
+ c.argument('resource_group_name', resource_group_name_type)
+ c.argument('host_pool_name', type=str, help='The name of the host pool within the specified resource group')
+ c.argument('msix_package_full_name', type=str, help='The version specific package full name of the MSIX '
+ 'package within specified hostpool')
+ c.argument('is_active', arg_type=get_three_state_flag(), help='Set a version of the package to be active '
+ 'across hostpool.')
+ c.argument('is_regular_registration', arg_type=get_three_state_flag(), help='Set Registration mode. Regular or '
+ 'Delayed.')
+ c.argument('display_name', type=str, help='Display name for MSIX Package.')
+
+ with self.argument_context('desktopvirtualization msix-package delete') as c:
+ c.argument('resource_group_name', resource_group_name_type)
+ c.argument('host_pool_name', type=str, help='The name of the host pool within the specified resource group')
+ c.argument('msix_package_full_name', type=str, help='The version specific package full name of the MSIX '
+ 'package within specified hostpool')
+
+ with self.argument_context('desktopvirtualization msix-image expand') as c:
+ c.argument('resource_group_name', resource_group_name_type)
+ c.argument('host_pool_name', type=str, help='The name of the host pool within the specified resource group',
+ id_part='name')
+ c.argument('uri', type=str, help='URI to Image')
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/generated/action.py b/src/desktopvirtualization/azext_desktopvirtualization/generated/action.py
index b28cf5edb10..f1d94e6b807 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/generated/action.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/generated/action.py
@@ -10,8 +10,168 @@
# pylint: disable=protected-access
import argparse
-from knack.util import CLIError
from collections import defaultdict
+from knack.util import CLIError
+
+
+class AddDesktopvirtualizationScalingPlanCreateSchedules(argparse._AppendAction):
+ def __call__(self, parser, namespace, values, option_string=None):
+ action = self.get_action(values, option_string)
+ super(AddDesktopvirtualizationScalingPlanCreateSchedules, self).__call__(parser, namespace, action, option_string)
+
+ def get_action(self, values, option_string): # pylint: disable=no-self-use
+ try:
+ properties = defaultdict(list)
+ for (k, v) in (x.split('=', 1) for x in values):
+ properties[k].append(v)
+ properties = dict(properties)
+ except ValueError:
+ raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string))
+ d = {}
+ for k in properties:
+ kl = k.lower()
+ v = properties[k]
+ if kl == 'name':
+ d['name'] = v[0]
+ elif kl == 'days-of-week':
+ d['days_of_week'] = v
+ elif kl == 'ramp-up-start-time':
+ d['ramp_up_start_time'] = v[0]
+ elif kl == 'ramp-up-algorithm':
+ d['ramp_up_algorithm'] = v[0]
+ elif kl == 'ramp-up-minimum-host-pct':
+ d['ramp_up_minimum_host_pct'] = v[0]
+ elif kl == 'ramp-up-capacity-threshold-pct':
+ d['ramp_up_capacity_threshold_pct'] = v[0]
+ elif kl == 'peak-start-time':
+ d['peak_start_time'] = v[0]
+ elif kl == 'peak-load-balancing-algorithm':
+ d['peak_load_balancing_algorithm'] = v[0]
+ elif kl == 'ramp-down-start-time':
+ d['ramp_down_start_time'] = v[0]
+ elif kl == 'ramp-down-load-balancing-algorithm':
+ d['ramp_down_load_balancing_algorithm'] = v[0]
+ elif kl == 'ramp-down-minimum-hosts-pct':
+ d['ramp_down_minimum_hosts_pct'] = v[0]
+ elif kl == 'ramp-down-capacity-threshold-pct':
+ d['ramp_down_capacity_threshold_pct'] = v[0]
+ elif kl == 'ramp-down-force-logoff-users':
+ d['ramp_down_force_logoff_users'] = v[0]
+ elif kl == 'ramp-down-stop-hosts-when':
+ d['ramp_down_stop_hosts_when'] = v[0]
+ elif kl == 'ramp-down-notification-minutes':
+ d['ramp_down_notification_minutes'] = v[0]
+ elif kl == 'ramp-down-notification-message':
+ d['ramp_down_notification_message'] = v[0]
+ elif kl == 'off-peak-start-time':
+ d['off_peak_start_time'] = v[0]
+ elif kl == 'off-peak-load-balancing-algorithm':
+ d['off_peak_load_balancing_algorithm'] = v[0]
+ return d
+
+
+class AddDesktopvirtualizationScalingPlanCreateHostPoolReferences(argparse._AppendAction):
+ def __call__(self, parser, namespace, values, option_string=None):
+ action = self.get_action(values, option_string)
+ super(AddDesktopvirtualizationScalingPlanCreateHostPoolReferences, self).__call__(parser, namespace, action, option_string)
+
+ def get_action(self, values, option_string): # pylint: disable=no-self-use
+ try:
+ properties = defaultdict(list)
+ for (k, v) in (x.split('=', 1) for x in values):
+ properties[k].append(v)
+ properties = dict(properties)
+ except ValueError:
+ raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string))
+ d = {}
+ for k in properties:
+ kl = k.lower()
+ v = properties[k]
+ if kl == 'host-pool-arm-path':
+ d['host_pool_arm_path'] = v[0]
+ elif kl == 'scaling-plan-enabled':
+ d['scaling_plan_enabled'] = v[0]
+ return d
+
+
+class AddDesktopvirtualizationScalingPlanUpdateSchedules(argparse._AppendAction):
+ def __call__(self, parser, namespace, values, option_string=None):
+ action = self.get_action(values, option_string)
+ super(AddDesktopvirtualizationScalingPlanUpdateSchedules, self).__call__(parser, namespace, action, option_string)
+
+ def get_action(self, values, option_string): # pylint: disable=no-self-use
+ try:
+ properties = defaultdict(list)
+ for (k, v) in (x.split('=', 1) for x in values):
+ properties[k].append(v)
+ properties = dict(properties)
+ except ValueError:
+ raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string))
+ d = {}
+ for k in properties:
+ kl = k.lower()
+ v = properties[k]
+ if kl == 'name':
+ d['name'] = v[0]
+ elif kl == 'days-of-week':
+ d['days_of_week'] = v
+ elif kl == 'ramp-up-start-time':
+ d['ramp_up_start_time'] = v[0]
+ elif kl == 'ramp-up-algorithm':
+ d['ramp_up_algorithm'] = v[0]
+ elif kl == 'ramp-up-minimum-host-pct':
+ d['ramp_up_minimum_host_pct'] = v[0]
+ elif kl == 'ramp-up-capacity-threshold-pct':
+ d['ramp_up_capacity_threshold_pct'] = v[0]
+ elif kl == 'peak-start-time':
+ d['peak_start_time'] = v[0]
+ elif kl == 'peak-load-balancing-algorithm':
+ d['peak_load_balancing_algorithm'] = v[0]
+ elif kl == 'ramp-down-start-time':
+ d['ramp_down_start_time'] = v[0]
+ elif kl == 'ramp-down-load-balancing-algorithm':
+ d['ramp_down_load_balancing_algorithm'] = v[0]
+ elif kl == 'ramp-down-minimum-hosts-pct':
+ d['ramp_down_minimum_hosts_pct'] = v[0]
+ elif kl == 'ramp-down-capacity-threshold-pct':
+ d['ramp_down_capacity_threshold_pct'] = v[0]
+ elif kl == 'ramp-down-force-logoff-users':
+ d['ramp_down_force_logoff_users'] = v[0]
+ elif kl == 'ramp-down-stop-hosts-when':
+ d['ramp_down_stop_hosts_when'] = v[0]
+ elif kl == 'ramp-down-notification-minutes':
+ d['ramp_down_notification_minutes'] = v[0]
+ elif kl == 'ramp-down-notification-message':
+ d['ramp_down_notification_message'] = v[0]
+ elif kl == 'off-peak-start-time':
+ d['off_peak_start_time'] = v[0]
+ elif kl == 'off-peak-load-balancing-algorithm':
+ d['off_peak_load_balancing_algorithm'] = v[0]
+ return d
+
+
+class AddDesktopvirtualizationScalingPlanUpdateHostPoolReferences(argparse._AppendAction):
+ def __call__(self, parser, namespace, values, option_string=None):
+ action = self.get_action(values, option_string)
+ super(AddDesktopvirtualizationScalingPlanUpdateHostPoolReferences, self).__call__(parser, namespace, action, option_string)
+
+ def get_action(self, values, option_string): # pylint: disable=no-self-use
+ try:
+ properties = defaultdict(list)
+ for (k, v) in (x.split('=', 1) for x in values):
+ properties[k].append(v)
+ properties = dict(properties)
+ except ValueError:
+ raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string))
+ d = {}
+ for k in properties:
+ kl = k.lower()
+ v = properties[k]
+ if kl == 'host-pool-arm-path':
+ d['host_pool_arm_path'] = v[0]
+ elif kl == 'scaling-plan-enabled':
+ d['scaling_plan_enabled'] = v[0]
+ return d
class AddDesktopvirtualizationHostpoolCreateRegistrationInfo(argparse.Action):
@@ -62,3 +222,63 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
elif kl == 'registration-token-operation':
d['registration_token_operation'] = v[0]
return d
+
+
+class AddPackageDependencies(argparse._AppendAction):
+ def __call__(self, parser, namespace, values, option_string=None):
+ action = self.get_action(values, option_string)
+ super(AddPackageDependencies, self).__call__(parser, namespace, action, option_string)
+
+ def get_action(self, values, option_string): # pylint: disable=no-self-use
+ try:
+ properties = defaultdict(list)
+ for (k, v) in (x.split('=', 1) for x in values):
+ properties[k].append(v)
+ properties = dict(properties)
+ except ValueError:
+ raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string))
+ d = {}
+ for k in properties:
+ kl = k.lower()
+ v = properties[k]
+ if kl == 'dependency-name':
+ d['dependency_name'] = v[0]
+ elif kl == 'publisher':
+ d['publisher'] = v[0]
+ elif kl == 'min-version':
+ d['min_version'] = v[0]
+ return d
+
+
+class AddPackageApplications(argparse._AppendAction):
+ def __call__(self, parser, namespace, values, option_string=None):
+ action = self.get_action(values, option_string)
+ super(AddPackageApplications, self).__call__(parser, namespace, action, option_string)
+
+ def get_action(self, values, option_string): # pylint: disable=no-self-use
+ try:
+ properties = defaultdict(list)
+ for (k, v) in (x.split('=', 1) for x in values):
+ properties[k].append(v)
+ properties = dict(properties)
+ except ValueError:
+ raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string))
+ d = {}
+ for k in properties:
+ kl = k.lower()
+ v = properties[k]
+ if kl == 'app-id':
+ d['app_id'] = v[0]
+ elif kl == 'description':
+ d['description'] = v[0]
+ elif kl == 'app-user-model-id':
+ d['app_user_model_id'] = v[0]
+ elif kl == 'friendly-name':
+ d['friendly_name'] = v[0]
+ elif kl == 'icon-image-name':
+ d['icon_image_name'] = v[0]
+ elif kl == 'raw-icon':
+ d['raw_icon'] = v[0]
+ elif kl == 'raw-png':
+ d['raw_png'] = v[0]
+ return d
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/generated/commands.py b/src/desktopvirtualization/azext_desktopvirtualization/generated/commands.py
index 213f6a8306c..d877fe2a283 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/generated/commands.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/generated/commands.py
@@ -26,7 +26,20 @@ def load_command_table(self, _):
g.custom_show_command('show', 'desktopvirtualization_workspace_show')
g.custom_command('create', 'desktopvirtualization_workspace_create')
g.custom_command('update', 'desktopvirtualization_workspace_update')
- g.custom_command('delete', 'desktopvirtualization_workspace_delete')
+ g.custom_command('delete', 'desktopvirtualization_workspace_delete', confirmation=True)
+
+ from azext_desktopvirtualization.generated._client_factory import cf_scaling_plan
+ desktopvirtualization_scaling_plan = CliCommandType(
+ operations_tmpl='azext_desktopvirtualization.vendored_sdks.desktopvirtualization.operations._scaling_plan_opera'
+ 'tions#ScalingPlanOperations.{}',
+ client_factory=cf_scaling_plan)
+ with self.command_group('desktopvirtualization scaling-plan', desktopvirtualization_scaling_plan,
+ client_factory=cf_scaling_plan, is_experimental=True) as g:
+ g.custom_command('list', 'desktopvirtualization_scaling_plan_list')
+ g.custom_show_command('show', 'desktopvirtualization_scaling_plan_show')
+ g.custom_command('create', 'desktopvirtualization_scaling_plan_create')
+ g.custom_command('update', 'desktopvirtualization_scaling_plan_update')
+ g.custom_command('delete', 'desktopvirtualization_scaling_plan_delete', confirmation=True)
from azext_desktopvirtualization.generated._client_factory import cf_application_group
desktopvirtualization_application_group = CliCommandType(
@@ -39,7 +52,7 @@ def load_command_table(self, _):
g.custom_show_command('show', 'desktopvirtualization_applicationgroup_show')
g.custom_command('create', 'desktopvirtualization_applicationgroup_create')
g.custom_command('update', 'desktopvirtualization_applicationgroup_update')
- g.custom_command('delete', 'desktopvirtualization_applicationgroup_delete')
+ g.custom_command('delete', 'desktopvirtualization_applicationgroup_delete', confirmation=True)
from azext_desktopvirtualization.generated._client_factory import cf_host_pool
desktopvirtualization_host_pool = CliCommandType(
@@ -52,4 +65,26 @@ def load_command_table(self, _):
g.custom_show_command('show', 'desktopvirtualization_hostpool_show')
g.custom_command('create', 'desktopvirtualization_hostpool_create')
g.custom_command('update', 'desktopvirtualization_hostpool_update')
- g.custom_command('delete', 'desktopvirtualization_hostpool_delete')
+ g.custom_command('delete', 'desktopvirtualization_hostpool_delete', confirmation=True)
+
+ from azext_desktopvirtualization.generated._client_factory import cf_msix_package
+ desktopvirtualization_msix_package = CliCommandType(
+ operations_tmpl='azext_desktopvirtualization.vendored_sdks.desktopvirtualization.operations._msix_package_opera'
+ 'tions#MsixPackageOperations.{}',
+ client_factory=cf_msix_package)
+ with self.command_group('desktopvirtualization msix-package', desktopvirtualization_msix_package,
+ client_factory=cf_msix_package, is_experimental=True) as g:
+ g.custom_command('list', 'desktopvirtualization_msix_package_list')
+ g.custom_show_command('show', 'desktopvirtualization_msix_package_show')
+ g.custom_command('create', 'desktopvirtualization_msix_package_create')
+ g.custom_command('update', 'desktopvirtualization_msix_package_update')
+ g.custom_command('delete', 'desktopvirtualization_msix_package_delete', confirmation=True)
+
+ from azext_desktopvirtualization.generated._client_factory import cf_msix_image
+ desktopvirtualization_msix_image = CliCommandType(
+ operations_tmpl='azext_desktopvirtualization.vendored_sdks.desktopvirtualization.operations._msix_image_operati'
+ 'ons#MsixImageOperations.{}',
+ client_factory=cf_msix_image)
+ with self.command_group('desktopvirtualization msix-image', desktopvirtualization_msix_image,
+ client_factory=cf_msix_image, is_experimental=True) as g:
+ g.custom_command('expand', 'desktopvirtualization_msix_image_expand')
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/generated/custom.py b/src/desktopvirtualization/azext_desktopvirtualization/generated/custom.py
index 703318cf2ce..12a396b91b3 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/generated/custom.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/generated/custom.py
@@ -8,7 +8,6 @@
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=too-many-lines
-# pylint: disable=unused-argument
def desktopvirtualization_workspace_list(client,
@@ -64,13 +63,86 @@ def desktopvirtualization_workspace_delete(client,
workspace_name=workspace_name)
+def desktopvirtualization_scaling_plan_list(client,
+ resource_group_name=None,
+ host_pool_name=None):
+ if resource_group_name and host_pool_name is not None:
+ return client.list_by_host_pool(resource_group_name=resource_group_name,
+ host_pool_name=host_pool_name)
+ elif resource_group_name:
+ return client.list_by_resource_group(resource_group_name=resource_group_name)
+ return client.list_by_subscription()
+
+
+def desktopvirtualization_scaling_plan_show(client,
+ resource_group_name,
+ scaling_plan_name):
+ return client.get(resource_group_name=resource_group_name,
+ scaling_plan_name=scaling_plan_name)
+
+
+def desktopvirtualization_scaling_plan_create(client,
+ resource_group_name,
+ scaling_plan_name,
+ location,
+ tags=None,
+ description=None,
+ friendly_name=None,
+ time_zone=None,
+ host_pool_type=None,
+ exclusion_tag=None,
+ schedules=None,
+ host_pool_references=None):
+ return client.create(resource_group_name=resource_group_name,
+ scaling_plan_name=scaling_plan_name,
+ tags=tags,
+ location=location,
+ description=description,
+ friendly_name=friendly_name,
+ time_zone=time_zone,
+ host_pool_type=host_pool_type,
+ exclusion_tag=exclusion_tag,
+ schedules=schedules,
+ host_pool_references=host_pool_references)
+
+
+def desktopvirtualization_scaling_plan_update(client,
+ resource_group_name,
+ scaling_plan_name,
+ tags=None,
+ description=None,
+ friendly_name=None,
+ time_zone=None,
+ host_pool_type=None,
+ exclusion_tag=None,
+ schedules=None,
+ host_pool_references=None):
+ return client.update(resource_group_name=resource_group_name,
+ scaling_plan_name=scaling_plan_name,
+ tags=tags,
+ description=description,
+ friendly_name=friendly_name,
+ time_zone=time_zone,
+ host_pool_type=host_pool_type,
+ exclusion_tag=exclusion_tag,
+ schedules=schedules,
+ host_pool_references=host_pool_references)
+
+
+def desktopvirtualization_scaling_plan_delete(client,
+ resource_group_name,
+ scaling_plan_name):
+ return client.delete(resource_group_name=resource_group_name,
+ scaling_plan_name=scaling_plan_name)
+
+
def desktopvirtualization_applicationgroup_list(client,
resource_group_name=None,
- filter=None):
+ filter_=None):
if resource_group_name:
return client.list_by_resource_group(resource_group_name=resource_group_name,
- filter=filter)
- return client.list_by_subscription(filter=filter)
+ filter=filter_)
+ return client.list_by_subscription(filter=filter_)
def desktopvirtualization_applicationgroup_show(client,
@@ -138,18 +210,24 @@ def desktopvirtualization_hostpool_create(client,
host_pool_name,
location,
host_pool_type,
- personal_desktop_assignment_type,
load_balancer_type,
+ preferred_app_group_type,
tags=None,
friendly_name=None,
description=None,
+ personal_desktop_assignment_type=None,
custom_rdp_property=None,
max_session_limit=None,
ring=None,
validation_environment=None,
registration_info=None,
vm_template=None,
- sso_context=None):
+ sso_context=None,
+ ssoadfs_authority=None,
+ sso_client_id=None,
+ sso_client_secret_key_vault_path=None,
+ sso_secret_type=None,
+ start_vm_on_connect=None):
return client.create_or_update(resource_group_name=resource_group_name,
host_pool_name=host_pool_name,
tags=tags,
@@ -165,7 +243,13 @@ def desktopvirtualization_hostpool_create(client,
validation_environment=validation_environment,
registration_info=registration_info,
vm_template=vm_template,
- sso_context=sso_context)
+ sso_context=sso_context,
+ ssoadfs_authority=ssoadfs_authority,
+ sso_client_id=sso_client_id,
+ sso_client_secret_key_vault_path=sso_client_secret_key_vault_path,
+ sso_secret_type=sso_secret_type,
+ preferred_app_group_type=preferred_app_group_type,
+ start_vm_on_connect=start_vm_on_connect)
def desktopvirtualization_hostpool_update(client,
@@ -181,7 +265,14 @@ def desktopvirtualization_hostpool_update(client,
ring=None,
validation_environment=None,
registration_info=None,
- sso_context=None):
+ vm_template=None,
+ sso_context=None,
+ ssoadfs_authority=None,
+ sso_client_id=None,
+ sso_client_secret_key_vault_path=None,
+ sso_secret_type=None,
+ preferred_app_group_type=None,
+ start_vm_on_connect=None):
return client.update(resource_group_name=resource_group_name,
host_pool_name=host_pool_name,
tags=tags,
@@ -194,7 +285,14 @@ def desktopvirtualization_hostpool_update(client,
ring=ring,
validation_environment=validation_environment,
registration_info=registration_info,
- sso_context=sso_context)
+ vm_template=vm_template,
+ sso_context=sso_context,
+ ssoadfs_authority=ssoadfs_authority,
+ sso_client_id=sso_client_id,
+ sso_client_secret_key_vault_path=sso_client_secret_key_vault_path,
+ sso_secret_type=sso_secret_type,
+ preferred_app_group_type=preferred_app_group_type,
+ start_vm_on_connect=start_vm_on_connect)
def desktopvirtualization_hostpool_delete(client,
@@ -204,3 +302,83 @@ def desktopvirtualization_hostpool_delete(client,
return client.delete(resource_group_name=resource_group_name,
host_pool_name=host_pool_name,
force=force)
+
+
+def desktopvirtualization_msix_package_list(client,
+ resource_group_name,
+ host_pool_name):
+ return client.list(resource_group_name=resource_group_name,
+ host_pool_name=host_pool_name)
+
+
+def desktopvirtualization_msix_package_show(client,
+ resource_group_name,
+ host_pool_name,
+ msix_package_full_name):
+ return client.get(resource_group_name=resource_group_name,
+ host_pool_name=host_pool_name,
+ msix_package_full_name=msix_package_full_name)
+
+
+def desktopvirtualization_msix_package_create(client,
+ resource_group_name,
+ host_pool_name,
+ msix_package_full_name,
+ image_path=None,
+ package_name=None,
+ package_family_name=None,
+ display_name=None,
+ package_relative_path=None,
+ is_regular_registration=None,
+ is_active=None,
+ package_dependencies=None,
+ version=None,
+ last_updated=None,
+ package_applications=None):
+ return client.create_or_update(resource_group_name=resource_group_name,
+ host_pool_name=host_pool_name,
+ msix_package_full_name=msix_package_full_name,
+ image_path=image_path,
+ package_name=package_name,
+ package_family_name=package_family_name,
+ display_name=display_name,
+ package_relative_path=package_relative_path,
+ is_regular_registration=is_regular_registration,
+ is_active=is_active,
+ package_dependencies=package_dependencies,
+ version=version,
+ last_updated=last_updated,
+ package_applications=package_applications)
+
+
+def desktopvirtualization_msix_package_update(client,
+ resource_group_name,
+ host_pool_name,
+ msix_package_full_name,
+ is_active=None,
+ is_regular_registration=None,
+ display_name=None):
+ return client.update(resource_group_name=resource_group_name,
+ host_pool_name=host_pool_name,
+ msix_package_full_name=msix_package_full_name,
+ is_active=is_active,
+ is_regular_registration=is_regular_registration,
+ display_name=display_name)
+
+
+def desktopvirtualization_msix_package_delete(client,
+ resource_group_name,
+ host_pool_name,
+ msix_package_full_name):
+ return client.delete(resource_group_name=resource_group_name,
+ host_pool_name=host_pool_name,
+ msix_package_full_name=msix_package_full_name)
+
+
+def desktopvirtualization_msix_image_expand(client,
+ resource_group_name,
+ host_pool_name,
+ uri=None):
+ return client.expand(resource_group_name=resource_group_name,
+ host_pool_name=host_pool_name,
+ uri=uri)
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/tests/__init__.py b/src/desktopvirtualization/azext_desktopvirtualization/tests/__init__.py
index 9b7ec942a0b..50e0627daff 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/tests/__init__.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/tests/__init__.py
@@ -9,15 +9,23 @@
# regenerated.
# --------------------------------------------------------------------------
import inspect
+import logging
import os
import sys
import traceback
+import datetime as dt
+
from azure.core.exceptions import AzureError
from azure.cli.testsdk.exceptions import CliTestError, CliExecutionError, JMESPathCheckAssertionError
+logger = logging.getLogger('azure.cli.testsdk')
+logger.addHandler(logging.StreamHandler())
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
exceptions = []
+test_map = dict()
+SUCCESSED = "successed"
+FAILED = "failed"
def try_manual(func):
@@ -39,29 +47,64 @@ def get_func_to_call():
func_to_call = func
try:
func_to_call = import_manual_function(func)
- print("Found manual override for {}(...)".format(func.__name__))
+ func_to_call = import_manual_function(func)
+ logger.info("Found manual override for %s(...)", func.__name__)
except (ImportError, AttributeError):
pass
return func_to_call
def wrapper(*args, **kwargs):
func_to_call = get_func_to_call()
- print("running {}()...".format(func.__name__))
+ logger.info("running %s()...", func.__name__)
try:
- return func_to_call(*args, **kwargs)
- except (AssertionError, AzureError, CliTestError, CliExecutionError, JMESPathCheckAssertionError) as e:
- print("--------------------------------------")
- print("step exception: ", e)
- print("--------------------------------------", file=sys.stderr)
- print("step exception in {}: {}".format(func.__name__, e), file=sys.stderr)
- traceback.print_exc()
+ test_map[func.__name__] = dict()
+ test_map[func.__name__]["result"] = SUCCESSED
+ test_map[func.__name__]["error_message"] = ""
+ test_map[func.__name__]["error_stack"] = ""
+ test_map[func.__name__]["error_normalized"] = ""
+ test_map[func.__name__]["start_dt"] = dt.datetime.utcnow()
+ ret = func_to_call(*args, **kwargs)
+ except (AssertionError, AzureError, CliTestError, CliExecutionError, SystemExit,
+ JMESPathCheckAssertionError) as e:
+ test_map[func.__name__]["end_dt"] = dt.datetime.utcnow()
+ test_map[func.__name__]["result"] = FAILED
+ test_map[func.__name__]["error_message"] = str(e).replace("\r\n", " ").replace("\n", " ")[:500]
+ test_map[func.__name__]["error_stack"] = traceback.format_exc().replace(
+ "\r\n", " ").replace("\n", " ")[:500]
+ logger.info("--------------------------------------")
+ logger.info("step exception: %s", e)
+ logger.error("--------------------------------------")
+ logger.error("step exception in %s: %s", func.__name__, e)
+ logger.info(traceback.format_exc())
exceptions.append((func.__name__, sys.exc_info()))
+ else:
+ test_map[func.__name__]["end_dt"] = dt.datetime.utcnow()
+ return ret
if inspect.isclass(func):
return get_func_to_call()
return wrapper
+def calc_coverage(filename):
+ filename = filename.split(".")[0]
+ coverage_name = filename + "_coverage.md"
+ with open(coverage_name, "w") as f:
+ f.write("|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt|\n")
+ total = len(test_map)
+ covered = 0
+ for k, v in test_map.items():
+ if not k.startswith("step_"):
+ total -= 1
+ continue
+ if v["result"] == SUCCESSED:
+ covered += 1
+ f.write("|{step_name}|{result}|{error_message}|{error_stack}|{error_normalized}|{start_dt}|"
+ "{end_dt}|\n".format(step_name=k, **v))
+ f.write("Coverage: {}/{}\n".format(covered, total))
+ print("Create coverage\n", file=sys.stderr)
+
+
def raise_if():
if exceptions:
if len(exceptions) <= 1:
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/tests/latest/test_desktopvirtualization_scenario.py b/src/desktopvirtualization/azext_desktopvirtualization/tests/latest/test_desktopvirtualization_scenario.py
index b7e6600e568..196cc54057c 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/tests/latest/test_desktopvirtualization_scenario.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/tests/latest/test_desktopvirtualization_scenario.py
@@ -10,13 +10,14 @@
import os
from azure.cli.testsdk import ScenarioTest
-from .. import try_manual, raise_if
+from .. import try_manual, raise_if, calc_coverage
from azure.cli.testsdk import ResourceGroupPreparer
TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))
+# Env setup
@try_manual
def setup(test, rg):
pass
@@ -33,12 +34,36 @@ def step__hostpools_put_hostpool_create(test, rg):
'--load-balancer-type "BreadthFirst" '
'--max-session-limit 999999 '
'--personal-desktop-assignment-type "Automatic" '
- '--registration-info expiration-time="2020-08-20T08:57:45.479Z" registration-token-operation="Update" '
+ '--preferred-app-group-type "Desktop" '
+ '--registration-info expiration-time="2020-11-27T01:01:04.003Z" registration-token-operation="Update" '
+ '--sso-client-id "client" '
+ '--sso-client-secret-key-vault-path "https://keyvault/secret" '
'--sso-context "KeyVaultPath" '
+ '--sso-secret-type "SharedKey" '
+ '--ssoadfs-authority "https://adfs" '
+ '--start-vm-on-connect false '
+ '--vm-template "{json:json}" '
'--tags tag1="value1" tag2="value2" '
'--name "{myHostPool}" '
'--resource-group "{rg}"',
- checks=[])
+ checks=[
+ test.check("location", "centralus", case_sensitive=False),
+ test.check("description", "des1", case_sensitive=False),
+ test.check("friendlyName", "friendly", case_sensitive=False),
+ test.check("hostPoolType", "Pooled", case_sensitive=False),
+ test.check("loadBalancerType", "BreadthFirst", case_sensitive=False),
+ test.check("maxSessionLimit", 999999),
+ test.check("personalDesktopAssignmentType", "Automatic", case_sensitive=False),
+ test.check("preferredAppGroupType", "Desktop", case_sensitive=False),
+ test.check("ssoClientId", "client", case_sensitive=False),
+ test.check("ssoClientSecretKeyVaultPath", "https://keyvault/secret", case_sensitive=False),
+ test.check("ssoContext", "KeyVaultPath", case_sensitive=False),
+ test.check("ssoSecretType", "SharedKey", case_sensitive=False),
+ test.check("ssoadfsAuthority", "https://adfs", case_sensitive=False),
+ test.check("startVMOnConnect", False),
+ test.check("vmTemplate", "{json:json}", case_sensitive=False),
+ test.check("name", "{myHostPool}", case_sensitive=False),
+ ])
# EXAMPLE: /HostPools/get/HostPool_Get
@@ -47,7 +72,24 @@ def step__hostpools_get_hostpool_get(test, rg):
test.cmd('az desktopvirtualization hostpool show '
'--name "{myHostPool}" '
'--resource-group "{rg}"',
- checks=[])
+ checks=[
+ test.check("location", "centralus", case_sensitive=False),
+ test.check("description", "des1", case_sensitive=False),
+ test.check("friendlyName", "friendly", case_sensitive=False),
+ test.check("hostPoolType", "Pooled", case_sensitive=False),
+ test.check("loadBalancerType", "BreadthFirst", case_sensitive=False),
+ test.check("maxSessionLimit", 999999),
+ test.check("personalDesktopAssignmentType", "Automatic", case_sensitive=False),
+ test.check("preferredAppGroupType", "Desktop", case_sensitive=False),
+ test.check("ssoClientId", "client", case_sensitive=False),
+ test.check("ssoClientSecretKeyVaultPath", "https://keyvault/secret", case_sensitive=False),
+ test.check("ssoContext", "KeyVaultPath", case_sensitive=False),
+ test.check("ssoSecretType", "SharedKey", case_sensitive=False),
+ test.check("ssoadfsAuthority", "https://adfs", case_sensitive=False),
+ test.check("startVMOnConnect", False),
+ test.check("vmTemplate", "{json:json}", case_sensitive=False),
+ test.check("name", "{myHostPool}", case_sensitive=False),
+ ])
# EXAMPLE: /HostPools/get/HostPool_List
@@ -55,7 +97,9 @@ def step__hostpools_get_hostpool_get(test, rg):
def step__hostpools_get_hostpool_list(test, rg):
test.cmd('az desktopvirtualization hostpool list '
'-g ""',
- checks=[])
+ checks=[
+ test.check('length(@)', 1),
+ ])
# EXAMPLE: /HostPools/get/HostPool_ListByResourceGroup
@@ -63,7 +107,9 @@ def step__hostpools_get_hostpool_list(test, rg):
def step__hostpools_get_hostpool_listbyresourcegroup(test, rg):
test.cmd('az desktopvirtualization hostpool list '
'--resource-group "{rg}"',
- checks=[])
+ checks=[
+ test.check('length(@)', 1),
+ ])
# EXAMPLE: /HostPools/patch/HostPool_Update
@@ -75,28 +121,59 @@ def step__hostpools_patch_hostpool_update(test, rg):
'--load-balancer-type "BreadthFirst" '
'--max-session-limit 999999 '
'--personal-desktop-assignment-type "Automatic" '
- '--registration-info expiration-time="2020-08-20T08:57:45.522Z" registration-token-operation="Update" '
+ '--registration-info expiration-time="2020-11-27T01:01:04.005Z" registration-token-operation="Update" '
+ '--sso-client-id "client" '
+ '--sso-client-secret-key-vault-path "https://keyvault/secret" '
'--sso-context "KeyVaultPath" '
+ '--sso-secret-type "SharedKey" '
+ '--ssoadfs-authority "https://adfs" '
+ '--start-vm-on-connect false '
+ '--vm-template "{json:json}" '
'--tags tag1="value1" tag2="value2" '
'--name "{myHostPool}" '
'--resource-group "{rg}"',
- checks=[])
+ checks=[
+ test.check("location", "centralus", case_sensitive=False),
+ test.check("description", "des1", case_sensitive=False),
+ test.check("friendlyName", "friendly", case_sensitive=False),
+ test.check("hostPoolType", "Pooled", case_sensitive=False),
+ test.check("loadBalancerType", "BreadthFirst", case_sensitive=False),
+ test.check("maxSessionLimit", 999999),
+ test.check("personalDesktopAssignmentType", "Automatic", case_sensitive=False),
+ test.check("preferredAppGroupType", "Desktop", case_sensitive=False),
+ test.check("ssoClientId", "client", case_sensitive=False),
+ test.check("ssoClientSecretKeyVaultPath", "https://keyvault/secret", case_sensitive=False),
+ test.check("ssoContext", "KeyVaultPath", case_sensitive=False),
+ test.check("ssoSecretType", "SharedKey", case_sensitive=False),
+ test.check("ssoadfsAuthority", "https://adfs", case_sensitive=False),
+ test.check("startVMOnConnect", False),
+ test.check("vmTemplate", "{json:json}", case_sensitive=False),
+ test.check("name", "{myHostPool}", case_sensitive=False),
+ ])
# EXAMPLE: /ApplicationGroups/put/ApplicationGroup_Create
@try_manual
-def step__applicationgroups_put_applicationgroup_create(test, rg):
+def step__applicationgroups_put(test, rg):
test.cmd('az desktopvirtualization applicationgroup create '
'--location "centralus" '
'--description "des1" '
'--application-group-type "RemoteApp" '
'--friendly-name "friendly" '
- '--host-pool-arm-path "/subscriptions/{subscription_id}/resourcegroups/{rg}/providers/Microsoft.DesktopVir'
- 'tualization/hostpools/{myHostPool}" '
+ '--host-pool-arm-path "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.DesktopVir'
+ 'tualization/hostPools/{myHostPool}" '
'--tags tag1="value1" tag2="value2" '
'--name "{myApplicationGroup}" '
'--resource-group "{rg}"',
- checks=[])
+ checks=[
+ test.check("location", "centralus", case_sensitive=False),
+ test.check("description", "des1", case_sensitive=False),
+ test.check("applicationGroupType", "RemoteApp", case_sensitive=False),
+ test.check("friendlyName", "friendly", case_sensitive=False),
+ test.check("hostPoolArmPath", "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsof"
+ "t.DesktopVirtualization/hostPools/{myHostPool}", case_sensitive=False),
+ test.check("name", "{myApplicationGroup}", case_sensitive=False),
+ ])
# EXAMPLE: /ApplicationGroups/get/ApplicationGroup_Get
@@ -105,7 +182,15 @@ def step__applicationgroups_get_applicationgroup_get(test, rg):
test.cmd('az desktopvirtualization applicationgroup show '
'--name "{myApplicationGroup}" '
'--resource-group "{rg}"',
- checks=[])
+ checks=[
+ test.check("location", "centralus", case_sensitive=False),
+ test.check("description", "des1", case_sensitive=False),
+ test.check("applicationGroupType", "RemoteApp", case_sensitive=False),
+ test.check("friendlyName", "friendly", case_sensitive=False),
+ test.check("hostPoolArmPath", "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsof"
+ "t.DesktopVirtualization/hostPools/{myHostPool}", case_sensitive=False),
+ test.check("name", "{myApplicationGroup}", case_sensitive=False),
+ ])
# EXAMPLE: /ApplicationGroups/get/ApplicationGroup_List
@@ -119,7 +204,7 @@ def step__applicationgroups_get_applicationgroup_list(test, rg):
# EXAMPLE: /ApplicationGroups/get/ApplicationGroup_ListByResourceGroup
@try_manual
-def step__applicationgroups_get_applicationgroup_listbyresourcegroup(test, rg):
+def step__applicationgroups_get(test, rg):
test.cmd('az desktopvirtualization applicationgroup list '
'--filter "applicationGroupType eq \'RailApplication\'" '
'--resource-group "{rg}"',
@@ -128,25 +213,242 @@ def step__applicationgroups_get_applicationgroup_listbyresourcegroup(test, rg):
# EXAMPLE: /ApplicationGroups/patch/ApplicationGroups_Update
@try_manual
-def step__applicationgroups_patch_applicationgroups_update(test, rg):
+def step__applicationgroups_patch(test, rg):
test.cmd('az desktopvirtualization applicationgroup update '
'--description "des1" '
'--friendly-name "friendly" '
'--tags tag1="value1" tag2="value2" '
'--name "{myApplicationGroup}" '
'--resource-group "{rg}"',
- checks=[])
+ checks=[
+ test.check("location", "centralus", case_sensitive=False),
+ test.check("description", "des1", case_sensitive=False),
+ test.check("applicationGroupType", "RemoteApp", case_sensitive=False),
+ test.check("friendlyName", "friendly", case_sensitive=False),
+ test.check("hostPoolArmPath", "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsof"
+ "t.DesktopVirtualization/hostPools/{myHostPool}", case_sensitive=False),
+ test.check("name", "{myApplicationGroup}", case_sensitive=False),
+ ])
# EXAMPLE: /ApplicationGroups/delete/ApplicationGroup_Delete
@try_manual
-def step__applicationgroups_delete_applicationgroup_delete(test, rg):
- test.cmd('az desktopvirtualization applicationgroup delete '
+def step__applicationgroups_delete(test, rg):
+ test.cmd('az desktopvirtualization applicationgroup delete -y '
'--name "{myApplicationGroup}" '
'--resource-group "{rg}"',
checks=[])
+# EXAMPLE: /MsixImages/post/MsixImage_Expand
+@try_manual
+def step__msiximages_post_msiximage_expand(test, rg):
+ test.cmd('az desktopvirtualization msix-image expand '
+ '--host-pool-name "{myHostPool2}" '
+ '--uri "imagepath" '
+ '--resource-group "{rg}"',
+ checks=[])
+
+
+# EXAMPLE: /MSIXPackages/put/MSIXPackage_Create
+@try_manual
+def step__msixpackages_put_msixpackage_create(test, rg):
+ test.cmd('az desktopvirtualization msix-package create '
+ '--host-pool-name "{myHostPool2}" '
+ '--display-name "displayname" '
+ '--image-path "imagepath" '
+ '--is-active false '
+ '--is-regular-registration false '
+ '--last-updated "2020-11-27T01:01:04.007Z" '
+ '--package-applications description="application-desc" app-id="ApplicationId" '
+ 'app-user-model-id="AppUserModelId" friendly-name="friendlyname" icon-image-name="Apptile" '
+ 'raw-icon="VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo" raw-png="VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo" '
+ '--package-dependencies dependency-name="MsixTest_Dependency_Name" min-version="version" '
+ 'publisher="PublishedName" '
+ '--package-family-name "MsixPackage_FamilyName" '
+ '--package-name "MsixPackage_name" '
+ '--package-relative-path "packagerelativepath" '
+ '--version "version" '
+ '--msix-package-full-name "msixpackagefullname" '
+ '--resource-group "{rg}"',
+ checks=[])
+
+
+# EXAMPLE: /MSIXPackages/get/MSIXPackage_Get
+@try_manual
+def step__msixpackages_get_msixpackage_get(test, rg):
+ test.cmd('az desktopvirtualization msix-package show '
+ '--host-pool-name "{myHostPool2}" '
+ '--msix-package-full-name "packagefullname" '
+ '--resource-group "{rg}"',
+ checks=[])
+
+
+# EXAMPLE: /MSIXPackages/get/MSIXPackage_List
+@try_manual
+def step__msixpackages_get_msixpackage_list(test, rg):
+ test.cmd('az desktopvirtualization msix-package list '
+ '--host-pool-name "{myHostPool2}" '
+ '--resource-group "{rg}"',
+ checks=[])
+
+
+# EXAMPLE: /MSIXPackages/patch/MSIXPackage_Update
+@try_manual
+def step__msixpackages_patch_msixpackage_update(test, rg):
+ test.cmd('az desktopvirtualization msix-package update '
+ '--host-pool-name "{myHostPool2}" '
+ '--display-name "displayname" '
+ '--is-active true '
+ '--is-regular-registration false '
+ '--msix-package-full-name "msixpackagefullname" '
+ '--resource-group "{rg}"',
+ checks=[])
+
+
+# EXAMPLE: /MSIXPackages/delete/MSIXPackage_Delete
+@try_manual
+def step__msixpackages_delete_msixpackage_delete(test, rg):
+ test.cmd('az desktopvirtualization msix-package delete -y '
+ '--host-pool-name "{myHostPool2}" '
+ '--msix-package-full-name "packagefullname" '
+ '--resource-group "{rg}"',
+ checks=[])
+
+
+# EXAMPLE: /ScalingPlans/put/ScalingPlans_Create
+@try_manual
+def step__scalingplans_put_scalingplans_create(test, rg):
+ test.cmd('az desktopvirtualization scaling-plan create '
+ '--resource-group "{rg}" '
+ '--location "centralus" '
+ '--description "des1" '
+ '--exclusion-tag "value" '
+ '--friendly-name "friendly" '
+ '--host-pool-references host-pool-arm-path="/subscriptions/{subscription_id}/resourceGroups/{rg}/providers'
+ '/Microsoft.DesktopVirtualization/hostPools/{myHostPool}" scaling-plan-enabled=true '
+ '--host-pool-type "Personal" '
+ '--schedules name="schedule1" days-of-week="Monday" days-of-week="Tuesday" days-of-week="Wednesday" '
+ 'days-of-week="Thursday" days-of-week="Friday" off-peak-load-balancing-algorithm="DepthFirst" '
+ 'off-peak-start-time="2020-11-27T01:01:03.994Z" peak-load-balancing-algorithm="BreadthFirst" '
+ 'peak-start-time="2020-11-27T01:01:03.994Z" ramp-down-capacity-threshold-pct=50 '
+ 'ramp-down-force-logoff-users=true ramp-down-load-balancing-algorithm="DepthFirst" '
+ 'ramp-down-minimum-hosts-pct=20 ramp-down-notification-message="message" ramp-down-notification-minutes=30'
+ ' ramp-down-start-time="2020-11-27T01:01:03.994Z" ramp-up-algorithm="DepthFirst" '
+ 'ramp-up-capacity-threshold-pct=80 ramp-up-minimum-host-pct=20 ramp-up-start-time="2020-11-27T01:01:03.994'
+ 'Z" '
+ '--time-zone "" '
+ '--tags tag1="value1" tag2="value2" '
+ '--name "{myScalingPlan}"',
+ checks=[
+ test.check("location", "centralus", case_sensitive=False),
+ test.check("description", "des1", case_sensitive=False),
+ test.check("exclusionTag", "value", case_sensitive=False),
+ test.check("friendlyName", "friendly", case_sensitive=False),
+ test.check("hostPoolType", "Personal", case_sensitive=False),
+ test.check("timeZone", "", case_sensitive=False),
+ test.check("name", "{myScalingPlan}", case_sensitive=False),
+ ])
+
+
+# EXAMPLE: /ScalingPlans/get/ScalingPlans_Get
+@try_manual
+def step__scalingplans_get_scalingplans_get(test, rg):
+ test.cmd('az desktopvirtualization scaling-plan show '
+ '--resource-group "{rg}" '
+ '--name "{myScalingPlan}"',
+ checks=[
+ test.check("location", "centralus", case_sensitive=False),
+ test.check("description", "des1", case_sensitive=False),
+ test.check("exclusionTag", "value", case_sensitive=False),
+ test.check("friendlyName", "friendly", case_sensitive=False),
+ test.check("hostPoolType", "Personal", case_sensitive=False),
+ test.check("timeZone", "", case_sensitive=False),
+ ])
+
+
+# EXAMPLE: /ScalingPlans/get/ScalingPlans_ListByResourceGroup
+@try_manual
+def step__scalingplans_get(test, rg):
+ test.cmd('az desktopvirtualization scaling-plan list '
+ '--resource-group "{rg}"',
+ checks=[
+ test.check('length(@)', 1),
+ ])
+
+
+# EXAMPLE: /ScalingPlans/get/ScalingPlans_ListBySubscription
+@try_manual
+def step__scalingplans_get2(test, rg):
+ test.cmd('az desktopvirtualization scaling-plan list '
+ '-g ""',
+ checks=[
+ test.check('length(@)', 1),
+ ])
+
+
+# EXAMPLE: /ScalingPlans/get/UserSession_SendMessage_Post
+@try_manual
+def step__scalingplans_get3(test, rg):
+ test.cmd('az desktopvirtualization scaling-plan list '
+ '--host-pool-name "{myHostPool}" '
+ '--resource-group "{rg}"',
+ checks=[])
+
+
+# EXAMPLE: /ScalingPlans/patch/ScalingPlans_Update
+@try_manual
+def step__scalingplans_patch_scalingplans_update(test, rg):
+ test.cmd('az desktopvirtualization scaling-plan update '
+ '--resource-group "{rg}" '
+ '--name "{myScalingPlan}" '
+ '--description "des1" '
+ '--exclusion-tag "value" '
+ '--friendly-name "friendly" '
+ '--host-pool-references host-pool-arm-path="/subscriptions/{subscription_id}/resourceGroups/{rg}/providers'
+ '/Microsoft.DesktopVirtualization/hostPools/{myHostPool}" scaling-plan-enabled=true '
+ '--host-pool-type "Personal" '
+ '--schedules name="schedule1" days-of-week="Monday" days-of-week="Tuesday" days-of-week="Wednesday" '
+ 'days-of-week="Thursday" days-of-week="Friday" off-peak-load-balancing-algorithm="DepthFirst" '
+ 'off-peak-start-time="2020-11-27T01:01:03.994Z" peak-load-balancing-algorithm="BreadthFirst" '
+ 'peak-start-time="2020-11-27T01:01:03.994Z" ramp-down-capacity-threshold-pct=50 '
+ 'ramp-down-force-logoff-users=true ramp-down-load-balancing-algorithm="DepthFirst" '
+ 'ramp-down-minimum-hosts-pct=20 ramp-down-notification-message="message" ramp-down-notification-minutes=30'
+ ' ramp-down-start-time="2020-11-27T01:01:03.994Z" ramp-up-algorithm="DepthFirst" '
+ 'ramp-up-capacity-threshold-pct=80 ramp-up-minimum-host-pct=20 ramp-up-start-time="2020-11-27T01:01:03.994'
+ 'Z" '
+ '--time-zone "" '
+ '--tags tag1="value1" tag2="value2"',
+ checks=[
+ test.check("location", "centralus", case_sensitive=False),
+ test.check("description", "des1", case_sensitive=False),
+ test.check("exclusionTag", "value", case_sensitive=False),
+ test.check("friendlyName", "friendly", case_sensitive=False),
+ test.check("hostPoolType", "Personal", case_sensitive=False),
+ test.check("timeZone", "", case_sensitive=False),
+ test.check("name", "{myScalingPlan}", case_sensitive=False),
+ ])
+
+
+# EXAMPLE: /ScalingPlans/delete/ScalingPlans_Delete
+@try_manual
+def step__scalingplans_delete_scalingplans_delete(test, rg):
+ test.cmd('az desktopvirtualization scaling-plan delete -y '
+ '--resource-group "{rg}" '
+ '--name "{myScalingPlan}"',
+ checks=[])
+
+
+# EXAMPLE: /HostPools/delete/HostPool_Delete
+@try_manual
+def step__hostpools_delete_hostpool_delete(test, rg):
+ test.cmd('az desktopvirtualization hostpool delete -y '
+ '--force true '
+ '--name "{myHostPool}" '
+ '--resource-group "{rg}"',
+ checks=[])
+
+
# EXAMPLE: /Workspaces/put/Workspace_Create
@try_manual
def step__workspaces_put_workspace_create(test, rg):
@@ -157,7 +459,12 @@ def step__workspaces_put_workspace_create(test, rg):
'--friendly-name "friendly" '
'--tags tag1="value1" tag2="value2" '
'--name "{myWorkspace}"',
- checks=[])
+ checks=[
+ test.check("location", "centralus", case_sensitive=False),
+ test.check("description", "des1", case_sensitive=False),
+ test.check("friendlyName", "friendly", case_sensitive=False),
+ test.check("name", "{myWorkspace}", case_sensitive=False),
+ ])
# EXAMPLE: /Workspaces/get/Workspace_Get
@@ -166,7 +473,12 @@ def step__workspaces_get_workspace_get(test, rg):
test.cmd('az desktopvirtualization workspace show '
'--resource-group "{rg}" '
'--name "{myWorkspace}"',
- checks=[])
+ checks=[
+ test.check("location", "centralus", case_sensitive=False),
+ test.check("description", "des1", case_sensitive=False),
+ test.check("friendlyName", "friendly", case_sensitive=False),
+ test.check("name", "{myWorkspace}", case_sensitive=False),
+ ])
# EXAMPLE: /Workspaces/get/Workspace_ListByResourceGroup
@@ -174,7 +486,9 @@ def step__workspaces_get_workspace_get(test, rg):
def step__workspaces_get_workspace_listbyresourcegroup(test, rg):
test.cmd('az desktopvirtualization workspace list '
'--resource-group "{rg}"',
- checks=[])
+ checks=[
+ test.check('length(@)', 1),
+ ])
# EXAMPLE: /Workspaces/get/Workspace_ListBySubscription
@@ -182,7 +496,9 @@ def step__workspaces_get_workspace_listbyresourcegroup(test, rg):
def step__workspaces_get_workspace_listbysubscription(test, rg):
test.cmd('az desktopvirtualization workspace list '
'-g ""',
- checks=[])
+ checks=[
+ test.check('length(@)', 1),
+ ])
# EXAMPLE: /Workspaces/patch/Workspace_Update
@@ -194,33 +510,30 @@ def step__workspaces_patch_workspace_update(test, rg):
'--friendly-name "friendly" '
'--tags tag1="value1" tag2="value2" '
'--name "{myWorkspace}"',
- checks=[])
-
-
-# EXAMPLE: /HostPools/delete/HostPool_Delete
-@try_manual
-def step__hostpools_delete_hostpool_delete(test, rg):
- test.cmd('az desktopvirtualization hostpool delete '
- '--force true '
- '--name "{myHostPool}" '
- '--resource-group "{rg}"',
- checks=[])
+ checks=[
+ test.check("location", "centralus", case_sensitive=False),
+ test.check("description", "des1", case_sensitive=False),
+ test.check("friendlyName", "friendly", case_sensitive=False),
+ test.check("name", "{myWorkspace}", case_sensitive=False),
+ ])
# EXAMPLE: /Workspaces/delete/Workspace_Delete
@try_manual
def step__workspaces_delete_workspace_delete(test, rg):
- test.cmd('az desktopvirtualization workspace delete '
+ test.cmd('az desktopvirtualization workspace delete -y '
'--resource-group "{rg}" '
'--name "{myWorkspace}"',
checks=[])
+# Env cleanup
@try_manual
def cleanup(test, rg):
pass
+# Testcase
@try_manual
def call_scenario(test, rg):
setup(test, rg)
@@ -229,18 +542,31 @@ def call_scenario(test, rg):
step__hostpools_get_hostpool_list(test, rg)
step__hostpools_get_hostpool_listbyresourcegroup(test, rg)
step__hostpools_patch_hostpool_update(test, rg)
- step__applicationgroups_put_applicationgroup_create(test, rg)
+ step__applicationgroups_put(test, rg)
step__applicationgroups_get_applicationgroup_get(test, rg)
step__applicationgroups_get_applicationgroup_list(test, rg)
- step__applicationgroups_get_applicationgroup_listbyresourcegroup(test, rg)
- step__applicationgroups_patch_applicationgroups_update(test, rg)
- step__applicationgroups_delete_applicationgroup_delete(test, rg)
+ step__applicationgroups_get(test, rg)
+ step__applicationgroups_patch(test, rg)
+ step__applicationgroups_delete(test, rg)
+ step__msiximages_post_msiximage_expand(test, rg)
+ step__msixpackages_put_msixpackage_create(test, rg)
+ step__msixpackages_get_msixpackage_get(test, rg)
+ step__msixpackages_get_msixpackage_list(test, rg)
+ step__msixpackages_patch_msixpackage_update(test, rg)
+ step__msixpackages_delete_msixpackage_delete(test, rg)
+ step__scalingplans_put_scalingplans_create(test, rg)
+ step__scalingplans_get_scalingplans_get(test, rg)
+ step__scalingplans_get(test, rg)
+ step__scalingplans_get2(test, rg)
+ step__scalingplans_get3(test, rg)
+ step__scalingplans_patch_scalingplans_update(test, rg)
+ step__scalingplans_delete_scalingplans_delete(test, rg)
+ step__hostpools_delete_hostpool_delete(test, rg)
step__workspaces_put_workspace_create(test, rg)
step__workspaces_get_workspace_get(test, rg)
step__workspaces_get_workspace_listbyresourcegroup(test, rg)
step__workspaces_get_workspace_listbysubscription(test, rg)
step__workspaces_patch_workspace_update(test, rg)
- step__hostpools_delete_hostpool_delete(test, rg)
step__workspaces_delete_workspace_delete(test, rg)
cleanup(test, rg)
@@ -259,8 +585,11 @@ def test_desktopvirtualization(self, rg):
self.kwargs.update({
'myWorkspace': 'workspace1',
'myHostPool': 'hostPool1',
+ 'myHostPool2': 'hostpool1',
+ 'myScalingPlan': 'scalingPlan1',
'myApplicationGroup': 'applicationGroup1',
})
call_scenario(self, rg)
+ calc_coverage(__file__)
raise_if()
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/__init__.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/__init__.py
index d4c9600e5ab..5846b9c6d37 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/__init__.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/__init__.py
@@ -10,7 +10,7 @@
__all__ = ['DesktopVirtualizationAPIClient']
try:
- from ._patch import patch_sdk
+ from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/_configuration.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/_configuration.py
index ff8530a3c79..008abf384b9 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/_configuration.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/_configuration.py
@@ -10,6 +10,7 @@
from azure.core.configuration import Configuration
from azure.core.pipeline import policies
+from azure.mgmt.core.policies import ARMHttpLoggingPolicy
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
@@ -46,9 +47,8 @@ def __init__(
self.credential = credential
self.subscription_id = subscription_id
- self.api_version = "2019-12-10-preview"
- self.credential_scopes = ['https://management.azure.com/.default']
- self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
+ self.api_version = "2020-11-10-preview"
+ self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'desktopvirtualizationapiclient/{}'.format(VERSION))
self._configure(**kwargs)
@@ -61,6 +61,7 @@ def _configure(
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
+ self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/_desktop_virtualization_api_client.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/_desktop_virtualization_api_client.py
index b772c438678..9df30447570 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/_desktop_virtualization_api_client.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/_desktop_virtualization_api_client.py
@@ -20,7 +20,7 @@
from ._configuration import DesktopVirtualizationAPIClientConfiguration
from .operations import OperationOperations
from .operations import WorkspaceOperations
-from .operations import ApplicationGroupAssignmentOperations
+from .operations import ScalingPlanOperations
from .operations import ApplicationGroupOperations
from .operations import StartMenuItemOperations
from .operations import ApplicationOperations
@@ -28,7 +28,8 @@
from .operations import HostPoolOperations
from .operations import UserSessionOperations
from .operations import SessionHostOperations
-from .operations import ActiveApplicationOperations
+from .operations import MsixPackageOperations
+from .operations import MsixImageOperations
from . import models
@@ -39,8 +40,8 @@ class DesktopVirtualizationAPIClient(object):
:vartype operation: desktop_virtualization_api_client.operations.OperationOperations
:ivar workspace: WorkspaceOperations operations
:vartype workspace: desktop_virtualization_api_client.operations.WorkspaceOperations
- :ivar application_group_assignment: ApplicationGroupAssignmentOperations operations
- :vartype application_group_assignment: desktop_virtualization_api_client.operations.ApplicationGroupAssignmentOperations
+ :ivar scaling_plan: ScalingPlanOperations operations
+ :vartype scaling_plan: desktop_virtualization_api_client.operations.ScalingPlanOperations
:ivar application_group: ApplicationGroupOperations operations
:vartype application_group: desktop_virtualization_api_client.operations.ApplicationGroupOperations
:ivar start_menu_item: StartMenuItemOperations operations
@@ -55,14 +56,15 @@ class DesktopVirtualizationAPIClient(object):
:vartype user_session: desktop_virtualization_api_client.operations.UserSessionOperations
:ivar session_host: SessionHostOperations operations
:vartype session_host: desktop_virtualization_api_client.operations.SessionHostOperations
- :ivar active_application: ActiveApplicationOperations operations
- :vartype active_application: desktop_virtualization_api_client.operations.ActiveApplicationOperations
+ :ivar msix_package: MsixPackageOperations operations
+ :vartype msix_package: desktop_virtualization_api_client.operations.MsixPackageOperations
+ :ivar msix_image: MsixImageOperations operations
+ :vartype msix_image: desktop_virtualization_api_client.operations.MsixImageOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""
def __init__(
@@ -86,7 +88,7 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.workspace = WorkspaceOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.application_group_assignment = ApplicationGroupAssignmentOperations(
+ self.scaling_plan = ScalingPlanOperations(
self._client, self._config, self._serialize, self._deserialize)
self.application_group = ApplicationGroupOperations(
self._client, self._config, self._serialize, self._deserialize)
@@ -102,7 +104,9 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.session_host = SessionHostOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.active_application = ActiveApplicationOperations(
+ self.msix_package = MsixPackageOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.msix_image = MsixImageOperations(
self._client, self._config, self._serialize, self._deserialize)
def close(self):
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/__init__.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/__init__.py
index 541fe112221..3160c7b3c30 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/__init__.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/__init__.py
@@ -6,5 +6,5 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from ._desktop_virtualization_api_client_async import DesktopVirtualizationAPIClient
+from ._desktop_virtualization_api_client import DesktopVirtualizationAPIClient
__all__ = ['DesktopVirtualizationAPIClient']
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/_configuration.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/_configuration.py
new file mode 100644
index 00000000000..26d5d4fc562
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/_configuration.py
@@ -0,0 +1,66 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from typing import Any, TYPE_CHECKING
+
+from azure.core.configuration import Configuration
+from azure.core.pipeline import policies
+from azure.mgmt.core.policies import ARMHttpLoggingPolicy
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from azure.core.credentials_async import AsyncTokenCredential
+
+VERSION = "unknown"
+
+class DesktopVirtualizationAPIClientConfiguration(Configuration):
+ """Configuration for DesktopVirtualizationAPIClient.
+
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param credential: Credential needed for the client to connect to Azure.
+ :type credential: ~azure.core.credentials_async.AsyncTokenCredential
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ """
+
+ def __init__(
+ self,
+ credential: "AsyncTokenCredential",
+ subscription_id: str,
+ **kwargs: Any
+ ) -> None:
+ if credential is None:
+ raise ValueError("Parameter 'credential' must not be None.")
+ if subscription_id is None:
+ raise ValueError("Parameter 'subscription_id' must not be None.")
+ super(DesktopVirtualizationAPIClientConfiguration, self).__init__(**kwargs)
+
+ self.credential = credential
+ self.subscription_id = subscription_id
+ self.api_version = "2020-11-10-preview"
+ self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
+ kwargs.setdefault('sdk_moniker', 'desktopvirtualizationapiclient/{}'.format(VERSION))
+ self._configure(**kwargs)
+
+ def _configure(
+ self,
+ **kwargs: Any
+ ) -> None:
+ self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
+ self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
+ self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
+ self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
+ self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
+ self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
+ self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
+ self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
+ self.authentication_policy = kwargs.get('authentication_policy')
+ if self.credential and not self.authentication_policy:
+ self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/_desktop_virtualization_api_client.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/_desktop_virtualization_api_client.py
new file mode 100644
index 00000000000..f6cdd2a371f
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/_desktop_virtualization_api_client.py
@@ -0,0 +1,117 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from typing import Any, Optional, TYPE_CHECKING
+
+from azure.mgmt.core import AsyncARMPipelineClient
+from msrest import Deserializer, Serializer
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from azure.core.credentials_async import AsyncTokenCredential
+
+from ._configuration import DesktopVirtualizationAPIClientConfiguration
+from .operations import OperationOperations
+from .operations import WorkspaceOperations
+from .operations import ScalingPlanOperations
+from .operations import ApplicationGroupOperations
+from .operations import StartMenuItemOperations
+from .operations import ApplicationOperations
+from .operations import DesktopOperations
+from .operations import HostPoolOperations
+from .operations import UserSessionOperations
+from .operations import SessionHostOperations
+from .operations import MsixPackageOperations
+from .operations import MsixImageOperations
+from .. import models
+
+
+class DesktopVirtualizationAPIClient(object):
+ """DesktopVirtualizationAPIClient.
+
+ :ivar operation: OperationOperations operations
+ :vartype operation: desktop_virtualization_api_client.aio.operations.OperationOperations
+ :ivar workspace: WorkspaceOperations operations
+ :vartype workspace: desktop_virtualization_api_client.aio.operations.WorkspaceOperations
+ :ivar scaling_plan: ScalingPlanOperations operations
+ :vartype scaling_plan: desktop_virtualization_api_client.aio.operations.ScalingPlanOperations
+ :ivar application_group: ApplicationGroupOperations operations
+ :vartype application_group: desktop_virtualization_api_client.aio.operations.ApplicationGroupOperations
+ :ivar start_menu_item: StartMenuItemOperations operations
+ :vartype start_menu_item: desktop_virtualization_api_client.aio.operations.StartMenuItemOperations
+ :ivar application: ApplicationOperations operations
+ :vartype application: desktop_virtualization_api_client.aio.operations.ApplicationOperations
+ :ivar desktop: DesktopOperations operations
+ :vartype desktop: desktop_virtualization_api_client.aio.operations.DesktopOperations
+ :ivar host_pool: HostPoolOperations operations
+ :vartype host_pool: desktop_virtualization_api_client.aio.operations.HostPoolOperations
+ :ivar user_session: UserSessionOperations operations
+ :vartype user_session: desktop_virtualization_api_client.aio.operations.UserSessionOperations
+ :ivar session_host: SessionHostOperations operations
+ :vartype session_host: desktop_virtualization_api_client.aio.operations.SessionHostOperations
+ :ivar msix_package: MsixPackageOperations operations
+ :vartype msix_package: desktop_virtualization_api_client.aio.operations.MsixPackageOperations
+ :ivar msix_image: MsixImageOperations operations
+ :vartype msix_image: desktop_virtualization_api_client.aio.operations.MsixImageOperations
+ :param credential: Credential needed for the client to connect to Azure.
+ :type credential: ~azure.core.credentials_async.AsyncTokenCredential
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self,
+ credential: "AsyncTokenCredential",
+ subscription_id: str,
+ base_url: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ if not base_url:
+ base_url = 'https://management.azure.com'
+ self._config = DesktopVirtualizationAPIClientConfiguration(credential, subscription_id, **kwargs)
+ self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
+
+ client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
+ self._serialize = Serializer(client_models)
+ self._deserialize = Deserializer(client_models)
+
+ self.operation = OperationOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.workspace = WorkspaceOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.scaling_plan = ScalingPlanOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.application_group = ApplicationGroupOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.start_menu_item = StartMenuItemOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.application = ApplicationOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.desktop = DesktopOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.host_pool = HostPoolOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.user_session = UserSessionOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.session_host = SessionHostOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.msix_package = MsixPackageOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.msix_image = MsixImageOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+
+ async def close(self) -> None:
+ await self._client.close()
+
+ async def __aenter__(self) -> "DesktopVirtualizationAPIClient":
+ await self._client.__aenter__()
+ return self
+
+ async def __aexit__(self, *exc_details) -> None:
+ await self._client.__aexit__(*exc_details)
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/__init__.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/__init__.py
new file mode 100644
index 00000000000..8590a6c12f9
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/__init__.py
@@ -0,0 +1,35 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from ._operation_operations import OperationOperations
+from ._workspace_operations import WorkspaceOperations
+from ._scaling_plan_operations import ScalingPlanOperations
+from ._application_group_operations import ApplicationGroupOperations
+from ._start_menu_item_operations import StartMenuItemOperations
+from ._application_operations import ApplicationOperations
+from ._desktop_operations import DesktopOperations
+from ._host_pool_operations import HostPoolOperations
+from ._user_session_operations import UserSessionOperations
+from ._session_host_operations import SessionHostOperations
+from ._msix_package_operations import MsixPackageOperations
+from ._msix_image_operations import MsixImageOperations
+
+__all__ = [
+ 'OperationOperations',
+ 'WorkspaceOperations',
+ 'ScalingPlanOperations',
+ 'ApplicationGroupOperations',
+ 'StartMenuItemOperations',
+ 'ApplicationOperations',
+ 'DesktopOperations',
+ 'HostPoolOperations',
+ 'UserSessionOperations',
+ 'SessionHostOperations',
+ 'MsixPackageOperations',
+ 'MsixImageOperations',
+]
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_application_group_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_application_group_operations.py
new file mode 100644
index 00000000000..3df0235f3fe
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_application_group_operations.py
@@ -0,0 +1,467 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union
+import warnings
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class ApplicationGroupOperations:
+ """ApplicationGroupOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ async def get(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ **kwargs
+ ) -> "models.ApplicationGroup":
+ """Get an application group.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ApplicationGroup, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.ApplicationGroup
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationGroup"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ApplicationGroup', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}'} # type: ignore
+
+ async def create_or_update(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ location: str,
+ host_pool_arm_path: str,
+ application_group_type: Union[str, "models.ApplicationGroupType"],
+ tags: Optional[Dict[str, str]] = None,
+ description: Optional[str] = None,
+ friendly_name: Optional[str] = None,
+ **kwargs
+ ) -> "models.ApplicationGroup":
+ """Create or update an applicationGroup.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :param location: The geo-location where the resource lives.
+ :type location: str
+ :param host_pool_arm_path: HostPool arm path of ApplicationGroup.
+ :type host_pool_arm_path: str
+ :param application_group_type: Resource Type of ApplicationGroup.
+ :type application_group_type: str or ~desktop_virtualization_api_client.models.ApplicationGroupType
+ :param tags: Resource tags.
+ :type tags: dict[str, str]
+ :param description: Description of ApplicationGroup.
+ :type description: str
+ :param friendly_name: Friendly name of ApplicationGroup.
+ :type friendly_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ApplicationGroup, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.ApplicationGroup
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationGroup"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ application_group = models.ApplicationGroup(tags=tags, location=location, description=description, friendly_name=friendly_name, host_pool_arm_path=host_pool_arm_path, application_group_type=application_group_type)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.create_or_update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(application_group, 'ApplicationGroup')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationGroup', pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('ApplicationGroup', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}'} # type: ignore
+
+ async def delete(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ **kwargs
+ ) -> None:
+ """Remove an applicationGroup.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.delete.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}'} # type: ignore
+
+ async def update(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ tags: Optional[Dict[str, str]] = None,
+ description: Optional[str] = None,
+ friendly_name: Optional[str] = None,
+ **kwargs
+ ) -> "models.ApplicationGroup":
+ """Update an applicationGroup.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :param tags: tags to be updated.
+ :type tags: dict[str, str]
+ :param description: Description of ApplicationGroup.
+ :type description: str
+ :param friendly_name: Friendly name of ApplicationGroup.
+ :type friendly_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ApplicationGroup, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.ApplicationGroup
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationGroup"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ application_group = models.ApplicationGroupPatch(tags=tags, description=description, friendly_name=friendly_name)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ if application_group is not None:
+ body_content = self._serialize.body(application_group, 'ApplicationGroupPatch')
+ else:
+ body_content = None
+ body_content_kwargs['content'] = body_content
+ request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ApplicationGroup', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}'} # type: ignore
+
+ def list_by_resource_group(
+ self,
+ resource_group_name: str,
+ filter: Optional[str] = None,
+ **kwargs
+ ) -> AsyncIterable["models.ApplicationGroupList"]:
+ """List applicationGroups.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param filter: OData filter expression. Valid properties for filtering are
+ applicationGroupType.
+ :type filter: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either ApplicationGroupList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ApplicationGroupList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationGroupList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('ApplicationGroupList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups'} # type: ignore
+
+ def list_by_subscription(
+ self,
+ filter: Optional[str] = None,
+ **kwargs
+ ) -> AsyncIterable["models.ApplicationGroupList"]:
+ """List applicationGroups in subscription.
+
+ :param filter: OData filter expression. Valid properties for filtering are
+ applicationGroupType.
+ :type filter: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either ApplicationGroupList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ApplicationGroupList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationGroupList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_subscription.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('ApplicationGroupList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/applicationGroups'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_application_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_application_operations.py
new file mode 100644
index 00000000000..96dee4548d2
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_application_operations.py
@@ -0,0 +1,457 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union
+import warnings
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class ApplicationOperations:
+ """ApplicationOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ async def get(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ application_name: str,
+ **kwargs
+ ) -> "models.Application":
+ """Get an application.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :param application_name: The name of the application within the specified application group.
+ :type application_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: Application, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.Application
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.Application"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('Application', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}'} # type: ignore
+
+ async def create_or_update(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ application_name: str,
+ command_line_setting: Union[str, "models.CommandLineSetting"],
+ description: Optional[str] = None,
+ friendly_name: Optional[str] = None,
+ file_path: Optional[str] = None,
+ msix_package_family_name: Optional[str] = None,
+ msix_package_application_id: Optional[str] = None,
+ application_type: Optional[Union[str, "models.RemoteApplicationType"]] = None,
+ command_line_arguments: Optional[str] = None,
+ show_in_portal: Optional[bool] = None,
+ icon_path: Optional[str] = None,
+ icon_index: Optional[int] = None,
+ **kwargs
+ ) -> "models.Application":
+ """Create or update an application.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :param application_name: The name of the application within the specified application group.
+ :type application_name: str
+ :param command_line_setting: Specifies whether this published application can be launched with
+ command line arguments provided by the client, command line arguments specified at publish
+ time, or no command line arguments at all.
+ :type command_line_setting: str or ~desktop_virtualization_api_client.models.CommandLineSetting
+ :param description: Description of Application.
+ :type description: str
+ :param friendly_name: Friendly name of Application.
+ :type friendly_name: str
+ :param file_path: Specifies a path for the executable file for the application.
+ :type file_path: str
+ :param msix_package_family_name: Specifies the package family name for MSIX applications.
+ :type msix_package_family_name: str
+ :param msix_package_application_id: Specifies the package application Id for MSIX applications.
+ :type msix_package_application_id: str
+ :param application_type: Resource Type of Application.
+ :type application_type: str or ~desktop_virtualization_api_client.models.RemoteApplicationType
+ :param command_line_arguments: Command Line Arguments for Application.
+ :type command_line_arguments: str
+ :param show_in_portal: Specifies whether to show the RemoteApp program in the RD Web Access
+ server.
+ :type show_in_portal: bool
+ :param icon_path: Path to icon.
+ :type icon_path: str
+ :param icon_index: Index of the icon.
+ :type icon_index: int
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: Application, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.Application
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.Application"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ application = models.Application(description=description, friendly_name=friendly_name, file_path=file_path, msix_package_family_name=msix_package_family_name, msix_package_application_id=msix_package_application_id, application_type=application_type, command_line_setting=command_line_setting, command_line_arguments=command_line_arguments, show_in_portal=show_in_portal, icon_path=icon_path, icon_index=icon_index)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.create_or_update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(application, 'Application')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('Application', pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('Application', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}'} # type: ignore
+
+ async def delete(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ application_name: str,
+ **kwargs
+ ) -> None:
+ """Remove an application.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :param application_name: The name of the application within the specified application group.
+ :type application_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.delete.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}'} # type: ignore
+
+ async def update(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ application_name: str,
+ tags: Optional[Dict[str, str]] = None,
+ description: Optional[str] = None,
+ friendly_name: Optional[str] = None,
+ file_path: Optional[str] = None,
+ command_line_setting: Optional[Union[str, "models.CommandLineSetting"]] = None,
+ command_line_arguments: Optional[str] = None,
+ show_in_portal: Optional[bool] = None,
+ icon_path: Optional[str] = None,
+ icon_index: Optional[int] = None,
+ msix_package_family_name: Optional[str] = None,
+ msix_package_application_id: Optional[str] = None,
+ application_type: Optional[Union[str, "models.RemoteApplicationType"]] = None,
+ **kwargs
+ ) -> "models.Application":
+ """Update an application.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :param application_name: The name of the application within the specified application group.
+ :type application_name: str
+ :param tags: tags to be updated.
+ :type tags: dict[str, str]
+ :param description: Description of Application.
+ :type description: str
+ :param friendly_name: Friendly name of Application.
+ :type friendly_name: str
+ :param file_path: Specifies a path for the executable file for the application.
+ :type file_path: str
+ :param command_line_setting: Specifies whether this published application can be launched with
+ command line arguments provided by the client, command line arguments specified at publish
+ time, or no command line arguments at all.
+ :type command_line_setting: str or ~desktop_virtualization_api_client.models.CommandLineSetting
+ :param command_line_arguments: Command Line Arguments for Application.
+ :type command_line_arguments: str
+ :param show_in_portal: Specifies whether to show the RemoteApp program in the RD Web Access
+ server.
+ :type show_in_portal: bool
+ :param icon_path: Path to icon.
+ :type icon_path: str
+ :param icon_index: Index of the icon.
+ :type icon_index: int
+ :param msix_package_family_name: Specifies the package family name for MSIX applications.
+ :type msix_package_family_name: str
+ :param msix_package_application_id: Specifies the package application Id for MSIX applications.
+ :type msix_package_application_id: str
+ :param application_type: Resource Type of Application.
+ :type application_type: str or ~desktop_virtualization_api_client.models.RemoteApplicationType
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: Application, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.Application
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.Application"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ application = models.ApplicationPatch(tags=tags, description=description, friendly_name=friendly_name, file_path=file_path, command_line_setting=command_line_setting, command_line_arguments=command_line_arguments, show_in_portal=show_in_portal, icon_path=icon_path, icon_index=icon_index, msix_package_family_name=msix_package_family_name, msix_package_application_id=msix_package_application_id, application_type=application_type)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ if application is not None:
+ body_content = self._serialize.body(application, 'ApplicationPatch')
+ else:
+ body_content = None
+ body_content_kwargs['content'] = body_content
+ request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('Application', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}'} # type: ignore
+
+ def list(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ **kwargs
+ ) -> AsyncIterable["models.ApplicationList"]:
+ """List applications.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either ApplicationList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ApplicationList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('ApplicationList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_desktop_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_desktop_operations.py
new file mode 100644
index 00000000000..ea68e22ce87
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_desktop_operations.py
@@ -0,0 +1,242 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, Callable, Dict, Generic, Optional, TypeVar
+import warnings
+
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class DesktopOperations:
+ """DesktopOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ async def get(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ desktop_name: str,
+ **kwargs
+ ) -> "models.Desktop":
+ """Get a desktop.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :param desktop_name: The name of the desktop within the specified desktop group.
+ :type desktop_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: Desktop, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.Desktop
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.Desktop"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ 'desktopName': self._serialize.url("desktop_name", desktop_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('Desktop', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}'} # type: ignore
+
+ async def update(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ desktop_name: str,
+ tags: Optional[Dict[str, str]] = None,
+ description: Optional[str] = None,
+ friendly_name: Optional[str] = None,
+ **kwargs
+ ) -> "models.Desktop":
+ """Update a desktop.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :param desktop_name: The name of the desktop within the specified desktop group.
+ :type desktop_name: str
+ :param tags: tags to be updated.
+ :type tags: dict[str, str]
+ :param description: Description of Desktop.
+ :type description: str
+ :param friendly_name: Friendly name of Desktop.
+ :type friendly_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: Desktop, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.Desktop
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.Desktop"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ desktop = models.DesktopPatch(tags=tags, description=description, friendly_name=friendly_name)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ 'desktopName': self._serialize.url("desktop_name", desktop_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ if desktop is not None:
+ body_content = self._serialize.body(desktop, 'DesktopPatch')
+ else:
+ body_content = None
+ body_content_kwargs['content'] = body_content
+ request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('Desktop', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}'} # type: ignore
+
+ async def list(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ **kwargs
+ ) -> "models.DesktopList":
+ """List desktops.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: DesktopList, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.DesktopList
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.DesktopList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.list.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('DesktopList', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_host_pool_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_host_pool_operations.py
new file mode 100644
index 00000000000..17c5ab0b985
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_host_pool_operations.py
@@ -0,0 +1,553 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union
+import warnings
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class HostPoolOperations:
+ """HostPoolOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ async def get(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ **kwargs
+ ) -> "models.HostPool":
+ """Get a host pool.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: HostPool, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.HostPool
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.HostPool"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('HostPool', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}'} # type: ignore
+
+ async def create_or_update(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ location: str,
+ host_pool_type: Union[str, "models.HostPoolType"],
+ load_balancer_type: Union[str, "models.LoadBalancerType"],
+ preferred_app_group_type: Union[str, "models.PreferredAppGroupType"],
+ tags: Optional[Dict[str, str]] = None,
+ friendly_name: Optional[str] = None,
+ description: Optional[str] = None,
+ personal_desktop_assignment_type: Optional[Union[str, "models.PersonalDesktopAssignmentType"]] = None,
+ custom_rdp_property: Optional[str] = None,
+ max_session_limit: Optional[int] = None,
+ ring: Optional[int] = None,
+ validation_environment: Optional[bool] = None,
+ registration_info: Optional["models.RegistrationInfo"] = None,
+ vm_template: Optional[str] = None,
+ sso_context: Optional[str] = None,
+ ssoadfs_authority: Optional[str] = None,
+ sso_client_id: Optional[str] = None,
+ sso_client_secret_key_vault_path: Optional[str] = None,
+ sso_secret_type: Optional[Union[str, "models.SsoSecretType"]] = None,
+ start_vm_on_connect: Optional[bool] = None,
+ **kwargs
+ ) -> "models.HostPool":
+ """Create or update a host pool.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param location: The geo-location where the resource lives.
+ :type location: str
+ :param host_pool_type: HostPool type for desktop.
+ :type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType
+ :param load_balancer_type: The type of the load balancer.
+ :type load_balancer_type: str or ~desktop_virtualization_api_client.models.LoadBalancerType
+ :param preferred_app_group_type: The type of preferred application group type, default to
+ Desktop Application Group.
+ :type preferred_app_group_type: str or ~desktop_virtualization_api_client.models.PreferredAppGroupType
+ :param tags: Resource tags.
+ :type tags: dict[str, str]
+ :param friendly_name: Friendly name of HostPool.
+ :type friendly_name: str
+ :param description: Description of HostPool.
+ :type description: str
+ :param personal_desktop_assignment_type: PersonalDesktopAssignment type for HostPool.
+ :type personal_desktop_assignment_type: str or ~desktop_virtualization_api_client.models.PersonalDesktopAssignmentType
+ :param custom_rdp_property: Custom rdp property of HostPool.
+ :type custom_rdp_property: str
+ :param max_session_limit: The max session limit of HostPool.
+ :type max_session_limit: int
+ :param ring: The ring number of HostPool.
+ :type ring: int
+ :param validation_environment: Is validation environment.
+ :type validation_environment: bool
+ :param registration_info: The registration info of HostPool.
+ :type registration_info: ~desktop_virtualization_api_client.models.RegistrationInfo
+ :param vm_template: VM template for sessionhosts configuration within hostpool.
+ :type vm_template: str
+ :param sso_context: Path to keyvault containing ssoContext secret.
+ :type sso_context: str
+ :param ssoadfs_authority: URL to customer ADFS server for signing WVD SSO certificates.
+ :type ssoadfs_authority: str
+ :param sso_client_id: ClientId for the registered Relying Party used to issue WVD SSO
+ certificates.
+ :type sso_client_id: str
+ :param sso_client_secret_key_vault_path: Path to Azure KeyVault storing the secret used for
+ communication to ADFS.
+ :type sso_client_secret_key_vault_path: str
+ :param sso_secret_type: The type of single sign on Secret Type.
+ :type sso_secret_type: str or ~desktop_virtualization_api_client.models.SsoSecretType
+ :param start_vm_on_connect: The flag to turn on/off StartVMOnConnect feature.
+ :type start_vm_on_connect: bool
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: HostPool, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.HostPool
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.HostPool"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ host_pool = models.HostPool(tags=tags, location=location, friendly_name=friendly_name, description=description, host_pool_type=host_pool_type, personal_desktop_assignment_type=personal_desktop_assignment_type, custom_rdp_property=custom_rdp_property, max_session_limit=max_session_limit, load_balancer_type=load_balancer_type, ring=ring, validation_environment=validation_environment, registration_info=registration_info, vm_template=vm_template, sso_context=sso_context, ssoadfs_authority=ssoadfs_authority, sso_client_id=sso_client_id, sso_client_secret_key_vault_path=sso_client_secret_key_vault_path, sso_secret_type=sso_secret_type, preferred_app_group_type=preferred_app_group_type, start_vm_on_connect=start_vm_on_connect)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.create_or_update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(host_pool, 'HostPool')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('HostPool', pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('HostPool', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}'} # type: ignore
+
+ async def delete(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ force: Optional[bool] = None,
+ **kwargs
+ ) -> None:
+ """Remove a host pool.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param force: Force flag to delete sessionHost.
+ :type force: bool
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.delete.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if force is not None:
+ query_parameters['force'] = self._serialize.query("force", force, 'bool')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}'} # type: ignore
+
+ async def update(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ tags: Optional[Dict[str, str]] = None,
+ friendly_name: Optional[str] = None,
+ description: Optional[str] = None,
+ custom_rdp_property: Optional[str] = None,
+ max_session_limit: Optional[int] = None,
+ personal_desktop_assignment_type: Optional[Union[str, "models.PersonalDesktopAssignmentType"]] = None,
+ load_balancer_type: Optional[Union[str, "models.LoadBalancerType"]] = None,
+ ring: Optional[int] = None,
+ validation_environment: Optional[bool] = None,
+ registration_info: Optional["models.RegistrationInfoPatch"] = None,
+ vm_template: Optional[str] = None,
+ sso_context: Optional[str] = None,
+ ssoadfs_authority: Optional[str] = None,
+ sso_client_id: Optional[str] = None,
+ sso_client_secret_key_vault_path: Optional[str] = None,
+ sso_secret_type: Optional[Union[str, "models.SsoSecretType"]] = None,
+ preferred_app_group_type: Optional[Union[str, "models.PreferredAppGroupType"]] = None,
+ start_vm_on_connect: Optional[bool] = None,
+ **kwargs
+ ) -> "models.HostPool":
+ """Update a host pool.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param tags: tags to be updated.
+ :type tags: dict[str, str]
+ :param friendly_name: Friendly name of HostPool.
+ :type friendly_name: str
+ :param description: Description of HostPool.
+ :type description: str
+ :param custom_rdp_property: Custom rdp property of HostPool.
+ :type custom_rdp_property: str
+ :param max_session_limit: The max session limit of HostPool.
+ :type max_session_limit: int
+ :param personal_desktop_assignment_type: PersonalDesktopAssignment type for HostPool.
+ :type personal_desktop_assignment_type: str or ~desktop_virtualization_api_client.models.PersonalDesktopAssignmentType
+ :param load_balancer_type: The type of the load balancer.
+ :type load_balancer_type: str or ~desktop_virtualization_api_client.models.LoadBalancerType
+ :param ring: The ring number of HostPool.
+ :type ring: int
+ :param validation_environment: Is validation environment.
+ :type validation_environment: bool
+ :param registration_info: The registration info of HostPool.
+ :type registration_info: ~desktop_virtualization_api_client.models.RegistrationInfoPatch
+ :param vm_template: VM template for sessionhosts configuration within hostpool.
+ :type vm_template: str
+ :param sso_context: Path to keyvault containing ssoContext secret.
+ :type sso_context: str
+ :param ssoadfs_authority: URL to customer ADFS server for signing WVD SSO certificates.
+ :type ssoadfs_authority: str
+ :param sso_client_id: ClientId for the registered Relying Party used to issue WVD SSO
+ certificates.
+ :type sso_client_id: str
+ :param sso_client_secret_key_vault_path: Path to Azure KeyVault storing the secret used for
+ communication to ADFS.
+ :type sso_client_secret_key_vault_path: str
+ :param sso_secret_type: The type of single sign on Secret Type.
+ :type sso_secret_type: str or ~desktop_virtualization_api_client.models.SsoSecretType
+ :param preferred_app_group_type: The type of preferred application group type, default to
+ Desktop Application Group.
+ :type preferred_app_group_type: str or ~desktop_virtualization_api_client.models.PreferredAppGroupType
+ :param start_vm_on_connect: The flag to turn on/off StartVMOnConnect feature.
+ :type start_vm_on_connect: bool
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: HostPool, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.HostPool
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.HostPool"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ host_pool = models.HostPoolPatch(tags=tags, friendly_name=friendly_name, description=description, custom_rdp_property=custom_rdp_property, max_session_limit=max_session_limit, personal_desktop_assignment_type=personal_desktop_assignment_type, load_balancer_type=load_balancer_type, ring=ring, validation_environment=validation_environment, registration_info=registration_info, vm_template=vm_template, sso_context=sso_context, ssoadfs_authority=ssoadfs_authority, sso_client_id=sso_client_id, sso_client_secret_key_vault_path=sso_client_secret_key_vault_path, sso_secret_type=sso_secret_type, preferred_app_group_type=preferred_app_group_type, start_vm_on_connect=start_vm_on_connect)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ if host_pool is not None:
+ body_content = self._serialize.body(host_pool, 'HostPoolPatch')
+ else:
+ body_content = None
+ body_content_kwargs['content'] = body_content
+ request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('HostPool', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}'} # type: ignore
+
+ def list_by_resource_group(
+ self,
+ resource_group_name: str,
+ **kwargs
+ ) -> AsyncIterable["models.HostPoolList"]:
+ """List hostPools.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either HostPoolList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.HostPoolList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.HostPoolList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('HostPoolList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools'} # type: ignore
+
+ def list(
+ self,
+ **kwargs
+ ) -> AsyncIterable["models.HostPoolList"]:
+ """List hostPools in subscription.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either HostPoolList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.HostPoolList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.HostPoolList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('HostPoolList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/hostPools'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_msix_image_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_msix_image_operations.py
new file mode 100644
index 00000000000..1572837353c
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_msix_image_operations.py
@@ -0,0 +1,128 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
+import warnings
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class MsixImageOperations:
+ """MsixImageOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ def expand(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ uri: Optional[str] = None,
+ **kwargs
+ ) -> AsyncIterable["models.ExpandMsixImageList"]:
+ """Expands and Lists MSIX packages in an Image, given the Image Path.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param uri: URI to Image.
+ :type uri: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either ExpandMsixImageList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ExpandMsixImageList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ExpandMsixImageList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ msix_image_uri = models.MsixImageUri(uri=uri)
+ api_version = "2020-11-10-preview"
+ content_type = "application/json"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.expand.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(msix_image_uri, 'MsixImageUri')
+ body_content_kwargs['content'] = body_content
+ request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(msix_image_uri, 'MsixImageUri')
+ body_content_kwargs['content'] = body_content
+ request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('ExpandMsixImageList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ expand.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/expandMsixImage'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_msix_package_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_msix_package_operations.py
new file mode 100644
index 00000000000..be6010141d8
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_msix_package_operations.py
@@ -0,0 +1,430 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+import datetime
+from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union
+import warnings
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class MsixPackageOperations:
+ """MsixPackageOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ async def get(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ msix_package_full_name: str,
+ **kwargs
+ ) -> "models.MsixPackage":
+ """Get a msixpackage.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param msix_package_full_name: The version specific package full name of the MSIX package
+ within specified hostpool.
+ :type msix_package_full_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: MsixPackage, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.MsixPackage
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.MsixPackage"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('MsixPackage', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore
+
+ async def create_or_update(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ msix_package_full_name: str,
+ image_path: Optional[str] = None,
+ package_name: Optional[str] = None,
+ package_family_name: Optional[str] = None,
+ display_name: Optional[str] = None,
+ package_relative_path: Optional[str] = None,
+ is_regular_registration: Optional[bool] = None,
+ is_active: Optional[bool] = None,
+ package_dependencies: Optional[List["models.MsixPackageDependencies"]] = None,
+ version: Optional[str] = None,
+ last_updated: Optional[datetime.datetime] = None,
+ package_applications: Optional[List["models.MsixPackageApplications"]] = None,
+ **kwargs
+ ) -> "models.MsixPackage":
+ """Create or update a MSIX package.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param msix_package_full_name: The version specific package full name of the MSIX package
+ within specified hostpool.
+ :type msix_package_full_name: str
+ :param image_path: VHD/CIM image path on Network Share.
+ :type image_path: str
+ :param package_name: Package Name from appxmanifest.xml.
+ :type package_name: str
+ :param package_family_name: Package Family Name from appxmanifest.xml. Contains Package Name
+ and Publisher name.
+ :type package_family_name: str
+ :param display_name: User friendly Name to be displayed in the portal.
+ :type display_name: str
+ :param package_relative_path: Relative Path to the package inside the image.
+ :type package_relative_path: str
+ :param is_regular_registration: Specifies how to register Package in feed.
+ :type is_regular_registration: bool
+ :param is_active: Make this version of the package the active one across the hostpool.
+ :type is_active: bool
+ :param package_dependencies: List of package dependencies.
+ :type package_dependencies: list[~desktop_virtualization_api_client.models.MsixPackageDependencies]
+ :param version: Package Version found in the appxmanifest.xml.
+ :type version: str
+ :param last_updated: Date Package was last updated, found in the appxmanifest.xml.
+ :type last_updated: ~datetime.datetime
+ :param package_applications: List of package applications.
+ :type package_applications: list[~desktop_virtualization_api_client.models.MsixPackageApplications]
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: MsixPackage, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.MsixPackage
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.MsixPackage"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ msix_package = models.MsixPackage(image_path=image_path, package_name=package_name, package_family_name=package_family_name, display_name=display_name, package_relative_path=package_relative_path, is_regular_registration=is_regular_registration, is_active=is_active, package_dependencies=package_dependencies, version=version, last_updated=last_updated, package_applications=package_applications)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.create_or_update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(msix_package, 'MsixPackage')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('MsixPackage', pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('MsixPackage', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore
+
+ async def delete(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ msix_package_full_name: str,
+ **kwargs
+ ) -> None:
+ """Remove an MSIX Package.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param msix_package_full_name: The version specific package full name of the MSIX package
+ within specified hostpool.
+ :type msix_package_full_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.delete.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore
+
+ async def update(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ msix_package_full_name: str,
+ is_active: Optional[bool] = None,
+ is_regular_registration: Optional[bool] = None,
+ display_name: Optional[str] = None,
+ **kwargs
+ ) -> "models.MsixPackage":
+ """Update an MSIX Package.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param msix_package_full_name: The version specific package full name of the MSIX package
+ within specified hostpool.
+ :type msix_package_full_name: str
+ :param is_active: Set a version of the package to be active across hostpool.
+ :type is_active: bool
+ :param is_regular_registration: Set Registration mode. Regular or Delayed.
+ :type is_regular_registration: bool
+ :param display_name: Display name for MSIX Package.
+ :type display_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: MsixPackage, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.MsixPackage
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.MsixPackage"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ msix_package = models.MsixPackagePatch(is_active=is_active, is_regular_registration=is_regular_registration, display_name=display_name)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ if msix_package is not None:
+ body_content = self._serialize.body(msix_package, 'MsixPackagePatch')
+ else:
+ body_content = None
+ body_content_kwargs['content'] = body_content
+ request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('MsixPackage', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore
+
+ def list(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ **kwargs
+ ) -> AsyncIterable["models.MsixPackageList"]:
+ """List MSIX packages in hostpool.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either MsixPackageList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.MsixPackageList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.MsixPackageList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('MsixPackageList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_operation_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_operation_operations.py
new file mode 100644
index 00000000000..4218904905d
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_operation_operations.py
@@ -0,0 +1,87 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, Callable, Dict, Generic, Optional, TypeVar
+import warnings
+
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class OperationOperations:
+ """OperationOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ async def list(
+ self,
+ **kwargs
+ ) -> "models.ResourceProviderOperationList":
+ """List all of the available operations the Desktop Virtualization resource provider supports.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ResourceProviderOperationList, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.ResourceProviderOperationList
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceProviderOperationList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.list.metadata['url'] # type: ignore
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ResourceProviderOperationList', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ list.metadata = {'url': '/providers/Microsoft.DesktopVirtualization/operations'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_scaling_plan_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_scaling_plan_operations.py
new file mode 100644
index 00000000000..eaf6196e0af
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_scaling_plan_operations.py
@@ -0,0 +1,553 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union
+import warnings
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class ScalingPlanOperations:
+ """ScalingPlanOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ async def get(
+ self,
+ resource_group_name: str,
+ scaling_plan_name: str,
+ **kwargs
+ ) -> "models.ScalingPlan":
+ """Get a scaling plan.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param scaling_plan_name: The name of the scaling plan.
+ :type scaling_plan_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ScalingPlan, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.ScalingPlan
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ScalingPlan"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ScalingPlan', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore
+
+ async def create(
+ self,
+ resource_group_name: str,
+ scaling_plan_name: str,
+ location: str,
+ tags: Optional[Dict[str, str]] = None,
+ description: Optional[str] = None,
+ friendly_name: Optional[str] = None,
+ time_zone: Optional[str] = None,
+ host_pool_type: Optional[Union[str, "models.HostPoolType"]] = None,
+ exclusion_tag: Optional[str] = None,
+ schedules: Optional[List["models.ScalingSchedule"]] = None,
+ host_pool_references: Optional[List["models.ScalingHostPoolReference"]] = None,
+ **kwargs
+ ) -> "models.ScalingPlan":
+ """Create or update a scaling plan.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param scaling_plan_name: The name of the scaling plan.
+ :type scaling_plan_name: str
+ :param location: The geo-location where the resource lives.
+ :type location: str
+ :param tags: Resource tags.
+ :type tags: dict[str, str]
+ :param description: Description of scaling plan.
+ :type description: str
+ :param friendly_name: User friendly name of scaling plan.
+ :type friendly_name: str
+ :param time_zone: Timezone of the scaling plan.
+ :type time_zone: str
+ :param host_pool_type: HostPool type for scaling plan.
+ :type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType
+ :param exclusion_tag: Exclusion tag for scaling plan.
+ :type exclusion_tag: str
+ :param schedules: List of ScalingSchedule definitions.
+ :type schedules: list[~desktop_virtualization_api_client.models.ScalingSchedule]
+ :param host_pool_references: List of ScalingHostPoolReference definitions.
+ :type host_pool_references: list[~desktop_virtualization_api_client.models.ScalingHostPoolReference]
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ScalingPlan, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.ScalingPlan
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ScalingPlan"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ scaling_plan = models.ScalingPlan(tags=tags, location=location, description=description, friendly_name=friendly_name, time_zone=time_zone, host_pool_type=host_pool_type, exclusion_tag=exclusion_tag, schedules=schedules, host_pool_references=host_pool_references)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.create.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(scaling_plan, 'ScalingPlan')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('ScalingPlan', pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('ScalingPlan', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore
+
+ async def delete(
+ self,
+ resource_group_name: str,
+ scaling_plan_name: str,
+ **kwargs
+ ) -> None:
+ """Remove a scaling plan.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param scaling_plan_name: The name of the scaling plan.
+ :type scaling_plan_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.delete.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore
+
+ async def update(
+ self,
+ resource_group_name: str,
+ scaling_plan_name: str,
+ tags: Optional[Dict[str, str]] = None,
+ description: Optional[str] = None,
+ friendly_name: Optional[str] = None,
+ time_zone: Optional[str] = None,
+ host_pool_type: Optional[Union[str, "models.HostPoolType"]] = None,
+ exclusion_tag: Optional[str] = None,
+ schedules: Optional[List["models.ScalingSchedule"]] = None,
+ host_pool_references: Optional[List["models.ScalingHostPoolReference"]] = None,
+ **kwargs
+ ) -> "models.ScalingPlan":
+ """Update a scaling plan.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param scaling_plan_name: The name of the scaling plan.
+ :type scaling_plan_name: str
+ :param tags: tags to be updated.
+ :type tags: dict[str, str]
+ :param description: Description of scaling plan.
+ :type description: str
+ :param friendly_name: User friendly name of scaling plan.
+ :type friendly_name: str
+ :param time_zone: Timezone of the scaling plan.
+ :type time_zone: str
+ :param host_pool_type: HostPool type for scaling plan.
+ :type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType
+ :param exclusion_tag: Exclusion tag for scaling plan.
+ :type exclusion_tag: str
+ :param schedules: List of ScalingSchedule definitions.
+ :type schedules: list[~desktop_virtualization_api_client.models.ScalingSchedule]
+ :param host_pool_references: List of ScalingHostPoolReference definitions.
+ :type host_pool_references: list[~desktop_virtualization_api_client.models.ScalingHostPoolReference]
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ScalingPlan, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.ScalingPlan
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ScalingPlan"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ scaling_plan = models.ScalingPlanPatch(tags=tags, description=description, friendly_name=friendly_name, time_zone=time_zone, host_pool_type=host_pool_type, exclusion_tag=exclusion_tag, schedules=schedules, host_pool_references=host_pool_references)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ if scaling_plan is not None:
+ body_content = self._serialize.body(scaling_plan, 'ScalingPlanPatch')
+ else:
+ body_content = None
+ body_content_kwargs['content'] = body_content
+ request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ScalingPlan', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore
+
+ def list_by_resource_group(
+ self,
+ resource_group_name: str,
+ **kwargs
+ ) -> AsyncIterable["models.ScalingPlanList"]:
+ """List scaling plans.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either ScalingPlanList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ScalingPlanList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ScalingPlanList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('ScalingPlanList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans'} # type: ignore
+
+ def list_by_subscription(
+ self,
+ **kwargs
+ ) -> AsyncIterable["models.ScalingPlanList"]:
+ """List scaling plans in subscription.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either ScalingPlanList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ScalingPlanList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ScalingPlanList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_subscription.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('ScalingPlanList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/scalingPlans'} # type: ignore
+
+ def list_by_host_pool(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ **kwargs
+ ) -> AsyncIterable["models.ScalingPlanList"]:
+ """List scaling plan associated with hostpool.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either ScalingPlanList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ScalingPlanList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ScalingPlanList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_host_pool.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('ScalingPlanList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/scalingPlans'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_session_host_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_session_host_operations.py
new file mode 100644
index 00000000000..fb4e34a5855
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_session_host_operations.py
@@ -0,0 +1,320 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
+import warnings
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class SessionHostOperations:
+ """SessionHostOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ async def get(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ session_host_name: str,
+ **kwargs
+ ) -> "models.SessionHost":
+ """Get a session host.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param session_host_name: The name of the session host within the specified host pool.
+ :type session_host_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: SessionHost, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.SessionHost
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.SessionHost"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('SessionHost', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}'} # type: ignore
+
+ async def delete(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ session_host_name: str,
+ force: Optional[bool] = None,
+ **kwargs
+ ) -> None:
+ """Remove a SessionHost.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param session_host_name: The name of the session host within the specified host pool.
+ :type session_host_name: str
+ :param force: Force flag to force sessionHost deletion even when userSession exists.
+ :type force: bool
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.delete.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if force is not None:
+ query_parameters['force'] = self._serialize.query("force", force, 'bool')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}'} # type: ignore
+
+ async def update(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ session_host_name: str,
+ allow_new_session: Optional[bool] = None,
+ assigned_user: Optional[str] = None,
+ **kwargs
+ ) -> "models.SessionHost":
+ """Update a session host.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param session_host_name: The name of the session host within the specified host pool.
+ :type session_host_name: str
+ :param allow_new_session: Allow a new session.
+ :type allow_new_session: bool
+ :param assigned_user: User assigned to SessionHost.
+ :type assigned_user: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: SessionHost, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.SessionHost
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.SessionHost"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ session_host = models.SessionHostPatch(allow_new_session=allow_new_session, assigned_user=assigned_user)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ if session_host is not None:
+ body_content = self._serialize.body(session_host, 'SessionHostPatch')
+ else:
+ body_content = None
+ body_content_kwargs['content'] = body_content
+ request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('SessionHost', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}'} # type: ignore
+
+ def list(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ **kwargs
+ ) -> AsyncIterable["models.SessionHostList"]:
+ """List sessionHosts.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either SessionHostList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.SessionHostList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.SessionHostList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('SessionHostList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_start_menu_item_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_start_menu_item_operations.py
new file mode 100644
index 00000000000..72003d79b80
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_start_menu_item_operations.py
@@ -0,0 +1,116 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
+import warnings
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class StartMenuItemOperations:
+ """StartMenuItemOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ def list(
+ self,
+ resource_group_name: str,
+ application_group_name: str,
+ **kwargs
+ ) -> AsyncIterable["models.StartMenuItemList"]:
+ """List start menu items in the given application group.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param application_group_name: The name of the application group.
+ :type application_group_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either StartMenuItemList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.StartMenuItemList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.StartMenuItemList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('StartMenuItemList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/startMenuItems'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_user_session_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_user_session_operations.py
new file mode 100644
index 00000000000..39963d0b3b0
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_user_session_operations.py
@@ -0,0 +1,476 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
+import warnings
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class UserSessionOperations:
+ """UserSessionOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ def list_by_host_pool(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ filter: Optional[str] = None,
+ **kwargs
+ ) -> AsyncIterable["models.UserSessionList"]:
+ """List userSessions.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param filter: OData filter expression. Valid properties for filtering are userprincipalname
+ and sessionstate.
+ :type filter: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either UserSessionList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.UserSessionList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.UserSessionList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_host_pool.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('UserSessionList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/userSessions'} # type: ignore
+
+ async def get(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ session_host_name: str,
+ user_session_id: str,
+ **kwargs
+ ) -> "models.UserSession":
+ """Get a userSession.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param session_host_name: The name of the session host within the specified host pool.
+ :type session_host_name: str
+ :param user_session_id: The name of the user session within the specified session host.
+ :type user_session_id: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: UserSession, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.UserSession
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.UserSession"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3),
+ 'userSessionId': self._serialize.url("user_session_id", user_session_id, 'str', max_length=24, min_length=1),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('UserSession', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}'} # type: ignore
+
+ async def delete(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ session_host_name: str,
+ user_session_id: str,
+ force: Optional[bool] = None,
+ **kwargs
+ ) -> None:
+ """Remove a userSession.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param session_host_name: The name of the session host within the specified host pool.
+ :type session_host_name: str
+ :param user_session_id: The name of the user session within the specified session host.
+ :type user_session_id: str
+ :param force: Force flag to login off userSession.
+ :type force: bool
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.delete.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3),
+ 'userSessionId': self._serialize.url("user_session_id", user_session_id, 'str', max_length=24, min_length=1),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if force is not None:
+ query_parameters['force'] = self._serialize.query("force", force, 'bool')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}'} # type: ignore
+
+ def list(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ session_host_name: str,
+ **kwargs
+ ) -> AsyncIterable["models.UserSessionList"]:
+ """List userSessions.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param session_host_name: The name of the session host within the specified host pool.
+ :type session_host_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either UserSessionList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.UserSessionList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.UserSessionList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('UserSessionList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions'} # type: ignore
+
+ async def disconnect(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ session_host_name: str,
+ user_session_id: str,
+ **kwargs
+ ) -> None:
+ """Disconnect a userSession.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param session_host_name: The name of the session host within the specified host pool.
+ :type session_host_name: str
+ :param user_session_id: The name of the user session within the specified session host.
+ :type user_session_id: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.disconnect.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3),
+ 'userSessionId': self._serialize.url("user_session_id", user_session_id, 'str', max_length=24, min_length=1),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.post(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ disconnect.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/disconnect'} # type: ignore
+
+ async def send_message(
+ self,
+ resource_group_name: str,
+ host_pool_name: str,
+ session_host_name: str,
+ user_session_id: str,
+ message_title: Optional[str] = None,
+ message_body: Optional[str] = None,
+ **kwargs
+ ) -> None:
+ """Send a message to a user.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param session_host_name: The name of the session host within the specified host pool.
+ :type session_host_name: str
+ :param user_session_id: The name of the user session within the specified session host.
+ :type user_session_id: str
+ :param message_title: Title of message.
+ :type message_title: str
+ :param message_body: Body of message.
+ :type message_body: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ send_message = models.SendMessage(message_title=message_title, message_body=message_body)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.send_message.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3),
+ 'userSessionId': self._serialize.url("user_session_id", user_session_id, 'str', max_length=24, min_length=1),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ if send_message is not None:
+ body_content = self._serialize.body(send_message, 'SendMessage')
+ else:
+ body_content = None
+ body_content_kwargs['content'] = body_content
+ request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ send_message.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/sendMessage'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_workspace_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_workspace_operations.py
new file mode 100644
index 00000000000..83044d106f9
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations/_workspace_operations.py
@@ -0,0 +1,455 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union
+import warnings
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class WorkspaceOperations:
+ """WorkspaceOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ async def get(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs
+ ) -> "models.Workspace":
+ """Get a workspace.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: The name of the workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: Workspace, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.Workspace
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.Workspace"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('Workspace', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}'} # type: ignore
+
+ async def create_or_update(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ location: str,
+ tags: Optional[Dict[str, str]] = None,
+ description: Optional[str] = None,
+ friendly_name: Optional[str] = None,
+ application_group_references: Optional[List[str]] = None,
+ **kwargs
+ ) -> "models.Workspace":
+ """Create or update a workspace.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: The name of the workspace.
+ :type workspace_name: str
+ :param location: The geo-location where the resource lives.
+ :type location: str
+ :param tags: Resource tags.
+ :type tags: dict[str, str]
+ :param description: Description of Workspace.
+ :type description: str
+ :param friendly_name: Friendly name of Workspace.
+ :type friendly_name: str
+ :param application_group_references: List of applicationGroup resource Ids.
+ :type application_group_references: list[str]
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: Workspace, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.Workspace
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.Workspace"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ workspace = models.Workspace(tags=tags, location=location, description=description, friendly_name=friendly_name, application_group_references=application_group_references)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.create_or_update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(workspace, 'Workspace')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('Workspace', pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('Workspace', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}'} # type: ignore
+
+ async def delete(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs
+ ) -> None:
+ """Remove a workspace.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: The name of the workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.delete.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}'} # type: ignore
+
+ async def update(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ tags: Optional[Dict[str, str]] = None,
+ description: Optional[str] = None,
+ friendly_name: Optional[str] = None,
+ application_group_references: Optional[List[str]] = None,
+ **kwargs
+ ) -> "models.Workspace":
+ """Update a workspace.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: The name of the workspace.
+ :type workspace_name: str
+ :param tags: tags to be updated.
+ :type tags: dict[str, str]
+ :param description: Description of Workspace.
+ :type description: str
+ :param friendly_name: Friendly name of Workspace.
+ :type friendly_name: str
+ :param application_group_references: List of applicationGroup links.
+ :type application_group_references: list[str]
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: Workspace, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.Workspace
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.Workspace"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ workspace = models.WorkspacePatch(tags=tags, description=description, friendly_name=friendly_name, application_group_references=application_group_references)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ if workspace is not None:
+ body_content = self._serialize.body(workspace, 'WorkspacePatch')
+ else:
+ body_content = None
+ body_content_kwargs['content'] = body_content
+ request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('Workspace', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}'} # type: ignore
+
+ def list_by_resource_group(
+ self,
+ resource_group_name: str,
+ **kwargs
+ ) -> AsyncIterable["models.WorkspaceList"]:
+ """List workspaces.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either WorkspaceList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.WorkspaceList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkspaceList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('WorkspaceList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces'} # type: ignore
+
+ def list_by_subscription(
+ self,
+ **kwargs
+ ) -> AsyncIterable["models.WorkspaceList"]:
+ """List workspaces in subscription.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either WorkspaceList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.WorkspaceList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.WorkspaceList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_subscription.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('WorkspaceList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/workspaces'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/__init__.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/__init__.py
index b642bd2d7f5..e61ecc0ebcd 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/__init__.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/__init__.py
@@ -13,18 +13,32 @@
from ._models_py3 import ApplicationGroupPatch
from ._models_py3 import ApplicationList
from ._models_py3 import ApplicationPatch
+ from ._models_py3 import CloudErrorProperties
from ._models_py3 import Desktop
from ._models_py3 import DesktopList
from ._models_py3 import DesktopPatch
+ from ._models_py3 import ExpandMsixImage
+ from ._models_py3 import ExpandMsixImageList
from ._models_py3 import HostPool
from ._models_py3 import HostPoolList
from ._models_py3 import HostPoolPatch
+ from ._models_py3 import MsixImageUri
+ from ._models_py3 import MsixPackage
+ from ._models_py3 import MsixPackageApplications
+ from ._models_py3 import MsixPackageDependencies
+ from ._models_py3 import MsixPackageList
+ from ._models_py3 import MsixPackagePatch
from ._models_py3 import RegistrationInfo
from ._models_py3 import RegistrationInfoPatch
from ._models_py3 import Resource
from ._models_py3 import ResourceProviderOperation
from ._models_py3 import ResourceProviderOperationDisplay
from ._models_py3 import ResourceProviderOperationList
+ from ._models_py3 import ScalingHostPoolReference
+ from ._models_py3 import ScalingPlan
+ from ._models_py3 import ScalingPlanList
+ from ._models_py3 import ScalingPlanPatch
+ from ._models_py3 import ScalingSchedule
from ._models_py3 import SendMessage
from ._models_py3 import SessionHost
from ._models_py3 import SessionHostList
@@ -44,18 +58,32 @@
from ._models import ApplicationGroupPatch # type: ignore
from ._models import ApplicationList # type: ignore
from ._models import ApplicationPatch # type: ignore
+ from ._models import CloudErrorProperties # type: ignore
from ._models import Desktop # type: ignore
from ._models import DesktopList # type: ignore
from ._models import DesktopPatch # type: ignore
+ from ._models import ExpandMsixImage # type: ignore
+ from ._models import ExpandMsixImageList # type: ignore
from ._models import HostPool # type: ignore
from ._models import HostPoolList # type: ignore
from ._models import HostPoolPatch # type: ignore
+ from ._models import MsixImageUri # type: ignore
+ from ._models import MsixPackage # type: ignore
+ from ._models import MsixPackageApplications # type: ignore
+ from ._models import MsixPackageDependencies # type: ignore
+ from ._models import MsixPackageList # type: ignore
+ from ._models import MsixPackagePatch # type: ignore
from ._models import RegistrationInfo # type: ignore
from ._models import RegistrationInfoPatch # type: ignore
from ._models import Resource # type: ignore
from ._models import ResourceProviderOperation # type: ignore
from ._models import ResourceProviderOperationDisplay # type: ignore
from ._models import ResourceProviderOperationList # type: ignore
+ from ._models import ScalingHostPoolReference # type: ignore
+ from ._models import ScalingPlan # type: ignore
+ from ._models import ScalingPlanList # type: ignore
+ from ._models import ScalingPlanPatch # type: ignore
+ from ._models import ScalingSchedule # type: ignore
from ._models import SendMessage # type: ignore
from ._models import SessionHost # type: ignore
from ._models import SessionHostList # type: ignore
@@ -76,9 +104,15 @@
HostPoolType,
LoadBalancerType,
PersonalDesktopAssignmentType,
+ PreferredAppGroupType,
RegistrationTokenOperation,
+ RemoteApplicationType,
+ ScalingScheduleDaysOfWeekItem,
+ SessionHostLoadBalancingAlgorithm,
SessionState,
+ SsoSecretType,
Status,
+ StopHostsWhen,
UpdateState,
)
@@ -89,18 +123,32 @@
'ApplicationGroupPatch',
'ApplicationList',
'ApplicationPatch',
+ 'CloudErrorProperties',
'Desktop',
'DesktopList',
'DesktopPatch',
+ 'ExpandMsixImage',
+ 'ExpandMsixImageList',
'HostPool',
'HostPoolList',
'HostPoolPatch',
+ 'MsixImageUri',
+ 'MsixPackage',
+ 'MsixPackageApplications',
+ 'MsixPackageDependencies',
+ 'MsixPackageList',
+ 'MsixPackagePatch',
'RegistrationInfo',
'RegistrationInfoPatch',
'Resource',
'ResourceProviderOperation',
'ResourceProviderOperationDisplay',
'ResourceProviderOperationList',
+ 'ScalingHostPoolReference',
+ 'ScalingPlan',
+ 'ScalingPlanList',
+ 'ScalingPlanPatch',
+ 'ScalingSchedule',
'SendMessage',
'SessionHost',
'SessionHostList',
@@ -119,8 +167,14 @@
'HostPoolType',
'LoadBalancerType',
'PersonalDesktopAssignmentType',
+ 'PreferredAppGroupType',
'RegistrationTokenOperation',
+ 'RemoteApplicationType',
+ 'ScalingScheduleDaysOfWeekItem',
+ 'SessionHostLoadBalancingAlgorithm',
'SessionState',
+ 'SsoSecretType',
'Status',
+ 'StopHostsWhen',
'UpdateState',
]
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/_desktop_virtualization_api_client_enums.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/_desktop_virtualization_api_client_enums.py
index f087ff99f72..8904efce3e8 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/_desktop_virtualization_api_client_enums.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/_desktop_virtualization_api_client_enums.py
@@ -6,90 +6,156 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from enum import Enum
-
-class ApplicationGroupType(str, Enum):
+from enum import Enum, EnumMeta
+from six import with_metaclass
+
+class _CaseInsensitiveEnumMeta(EnumMeta):
+ def __getitem__(self, name):
+ return super().__getitem__(name.upper())
+
+ def __getattr__(cls, name):
+ """Return the enum member matching `name`
+ We use __getattr__ instead of descriptors or inserting into the enum
+ class' __dict__ in order to support `name` and `value` being both
+ properties for enum members (which live in the class' __dict__) and
+ enum members themselves.
+ """
+ try:
+ return cls._member_map_[name.upper()]
+ except KeyError:
+ raise AttributeError(name)
+
+
+class ApplicationGroupType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Resource Type of ApplicationGroup.
"""
- remote_app = "RemoteApp"
- desktop = "Desktop"
+ REMOTE_APP = "RemoteApp"
+ DESKTOP = "Desktop"
-class ApplicationType(str, Enum):
+class ApplicationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Application type of application.
"""
- remote_app = "RemoteApp"
- desktop = "Desktop"
+ REMOTE_APP = "RemoteApp"
+ DESKTOP = "Desktop"
-class CommandLineSetting(str, Enum):
+class CommandLineSetting(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Specifies whether this published application can be launched with command line arguments
provided by the client, command line arguments specified at publish time, or no command line
arguments at all.
"""
- do_not_allow = "DoNotAllow"
- allow = "Allow"
- require = "Require"
+ DO_NOT_ALLOW = "DoNotAllow"
+ ALLOW = "Allow"
+ REQUIRE = "Require"
-class HostPoolType(str, Enum):
+class HostPoolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""HostPool type for desktop.
"""
- personal = "Personal"
- pooled = "Pooled"
+ PERSONAL = "Personal"
+ POOLED = "Pooled"
-class LoadBalancerType(str, Enum):
+class LoadBalancerType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""The type of the load balancer.
"""
- breadth_first = "BreadthFirst"
- depth_first = "DepthFirst"
- persistent = "Persistent"
+ BREADTH_FIRST = "BreadthFirst"
+ DEPTH_FIRST = "DepthFirst"
+ PERSISTENT = "Persistent"
-class PersonalDesktopAssignmentType(str, Enum):
+class PersonalDesktopAssignmentType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""PersonalDesktopAssignment type for HostPool.
"""
- automatic = "Automatic"
- direct = "Direct"
+ AUTOMATIC = "Automatic"
+ DIRECT = "Direct"
+
+class PreferredAppGroupType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """The type of preferred application group type, default to Desktop Application Group
+ """
-class RegistrationTokenOperation(str, Enum):
+ NONE = "None"
+ DESKTOP = "Desktop"
+ RAIL_APPLICATIONS = "RailApplications"
+
+class RegistrationTokenOperation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""The type of resetting the token.
"""
- delete = "Delete"
- none = "None"
- update = "Update"
+ DELETE = "Delete"
+ NONE = "None"
+ UPDATE = "Update"
+
+class RemoteApplicationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """Resource Type of Application.
+ """
+
+ IN_BUILT = "InBuilt"
+ MSIX_APPLICATION = "MsixApplication"
+
+class ScalingScheduleDaysOfWeekItem(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+
+ SUNDAY = "Sunday"
+ MONDAY = "Monday"
+ TUESDAY = "Tuesday"
+ WEDNESDAY = "Wednesday"
+ THURSDAY = "Thursday"
+ FRIDAY = "Friday"
+ SATURDAY = "Saturday"
+
+class SessionHostLoadBalancingAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """Load balancing algorithm for ramp up period.
+ """
+
+ BREADTH_FIRST = "BreadthFirst"
+ DEPTH_FIRST = "DepthFirst"
-class SessionState(str, Enum):
+class SessionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""State of user session.
"""
- unknown = "Unknown"
- active = "Active"
- disconnected = "Disconnected"
- pending = "Pending"
- log_off = "LogOff"
- user_profile_disk_mounted = "UserProfileDiskMounted"
+ UNKNOWN = "Unknown"
+ ACTIVE = "Active"
+ DISCONNECTED = "Disconnected"
+ PENDING = "Pending"
+ LOG_OFF = "LogOff"
+ USER_PROFILE_DISK_MOUNTED = "UserProfileDiskMounted"
+
+class SsoSecretType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """The type of single sign on Secret Type.
+ """
-class Status(str, Enum):
+ SHARED_KEY = "SharedKey"
+ CERTIFICATE = "Certificate"
+ SHARED_KEY_IN_KEY_VAULT = "SharedKeyInKeyVault"
+ CERTIFICATE_IN_KEY_VAULT = "CertificateInKeyVault"
+
+class Status(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Status for a SessionHost.
"""
- available = "Available"
- unavailable = "Unavailable"
- shutdown = "Shutdown"
- disconnected = "Disconnected"
- upgrading = "Upgrading"
- upgrade_failed = "UpgradeFailed"
+ AVAILABLE = "Available"
+ UNAVAILABLE = "Unavailable"
+ SHUTDOWN = "Shutdown"
+ DISCONNECTED = "Disconnected"
+ UPGRADING = "Upgrading"
+ UPGRADE_FAILED = "UpgradeFailed"
+
+class StopHostsWhen(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """Specifies when to stop hosts during ramp down period.
+ """
+
+ ZERO_SESSIONS = "ZeroSessions"
+ ZERO_ACTIVE_SESSIONS = "ZeroActiveSessions"
-class UpdateState(str, Enum):
+class UpdateState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Update state of a SessionHost.
"""
- initial = "Initial"
- pending = "Pending"
- started = "Started"
- succeeded = "Succeeded"
- failed = "Failed"
+ INITIAL = "Initial"
+ PENDING = "Pending"
+ STARTED = "Started"
+ SUCCEEDED = "Succeeded"
+ FAILED = "Failed"
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/_models.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/_models.py
index bea5d4e283b..9259f3b6b41 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/_models.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/_models.py
@@ -10,17 +10,17 @@
class Resource(msrest.serialization.Model):
- """Resource.
+ """Common fields that are returned in the response for all Azure Resource Manager resources.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
"""
@@ -53,13 +53,13 @@ class Application(Resource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param description: Description of Application.
:type description: str
@@ -67,6 +67,13 @@ class Application(Resource):
:type friendly_name: str
:param file_path: Specifies a path for the executable file for the application.
:type file_path: str
+ :param msix_package_family_name: Specifies the package family name for MSIX applications.
+ :type msix_package_family_name: str
+ :param msix_package_application_id: Specifies the package application Id for MSIX applications.
+ :type msix_package_application_id: str
+ :param application_type: Resource Type of Application. Possible values include: "InBuilt",
+ "MsixApplication".
+ :type application_type: str or ~desktop_virtualization_api_client.models.RemoteApplicationType
:param command_line_setting: Required. Specifies whether this published application can be
launched with command line arguments provided by the client, command line arguments specified
at publish time, or no command line arguments at all. Possible values include: "DoNotAllow",
@@ -103,6 +110,9 @@ class Application(Resource):
'description': {'key': 'properties.description', 'type': 'str'},
'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
'file_path': {'key': 'properties.filePath', 'type': 'str'},
+ 'msix_package_family_name': {'key': 'properties.msixPackageFamilyName', 'type': 'str'},
+ 'msix_package_application_id': {'key': 'properties.msixPackageApplicationId', 'type': 'str'},
+ 'application_type': {'key': 'properties.applicationType', 'type': 'str'},
'command_line_setting': {'key': 'properties.commandLineSetting', 'type': 'str'},
'command_line_arguments': {'key': 'properties.commandLineArguments', 'type': 'str'},
'show_in_portal': {'key': 'properties.showInPortal', 'type': 'bool'},
@@ -120,6 +130,9 @@ def __init__(
self.description = kwargs.get('description', None)
self.friendly_name = kwargs.get('friendly_name', None)
self.file_path = kwargs.get('file_path', None)
+ self.msix_package_family_name = kwargs.get('msix_package_family_name', None)
+ self.msix_package_application_id = kwargs.get('msix_package_application_id', None)
+ self.application_type = kwargs.get('application_type', None)
self.command_line_setting = kwargs['command_line_setting']
self.command_line_arguments = kwargs.get('command_line_arguments', None)
self.show_in_portal = kwargs.get('show_in_portal', None)
@@ -130,19 +143,19 @@ def __init__(
class TrackedResource(Resource):
- """The resource model definition for a ARM tracked top level resource.
+ """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
@@ -181,13 +194,13 @@ class ApplicationGroup(TrackedResource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
@@ -276,13 +289,13 @@ class ApplicationGroupPatch(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. tags to be updated.
:type tags: dict[str, str]
@@ -371,6 +384,13 @@ class ApplicationPatch(msrest.serialization.Model):
:type icon_path: str
:param icon_index: Index of the icon.
:type icon_index: int
+ :param msix_package_family_name: Specifies the package family name for MSIX applications.
+ :type msix_package_family_name: str
+ :param msix_package_application_id: Specifies the package application Id for MSIX applications.
+ :type msix_package_application_id: str
+ :param application_type: Resource Type of Application. Possible values include: "InBuilt",
+ "MsixApplication".
+ :type application_type: str or ~desktop_virtualization_api_client.models.RemoteApplicationType
"""
_attribute_map = {
@@ -383,6 +403,9 @@ class ApplicationPatch(msrest.serialization.Model):
'show_in_portal': {'key': 'properties.showInPortal', 'type': 'bool'},
'icon_path': {'key': 'properties.iconPath', 'type': 'str'},
'icon_index': {'key': 'properties.iconIndex', 'type': 'int'},
+ 'msix_package_family_name': {'key': 'properties.msixPackageFamilyName', 'type': 'str'},
+ 'msix_package_application_id': {'key': 'properties.msixPackageApplicationId', 'type': 'str'},
+ 'application_type': {'key': 'properties.applicationType', 'type': 'str'},
}
def __init__(
@@ -399,6 +422,32 @@ def __init__(
self.show_in_portal = kwargs.get('show_in_portal', None)
self.icon_path = kwargs.get('icon_path', None)
self.icon_index = kwargs.get('icon_index', None)
+ self.msix_package_family_name = kwargs.get('msix_package_family_name', None)
+ self.msix_package_application_id = kwargs.get('msix_package_application_id', None)
+ self.application_type = kwargs.get('application_type', None)
+
+
+class CloudErrorProperties(msrest.serialization.Model):
+ """CloudErrorProperties.
+
+ :param code: Error code.
+ :type code: str
+ :param message: Error message indicating why the operation failed.
+ :type message: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(CloudErrorProperties, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', None)
class Desktop(Resource):
@@ -406,13 +455,13 @@ class Desktop(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param description: Description of Desktop.
:type description: str
@@ -509,6 +558,124 @@ def __init__(
self.friendly_name = kwargs.get('friendly_name', None)
+class ExpandMsixImage(Resource):
+ """Represents the definition of contents retrieved after expanding the MSIX Image.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :param package_alias: Alias of MSIX Package.
+ :type package_alias: str
+ :param image_path: VHD/CIM image path on Network Share.
+ :type image_path: str
+ :param package_name: Package Name from appxmanifest.xml.
+ :type package_name: str
+ :param package_family_name: Package Family Name from appxmanifest.xml. Contains Package Name
+ and Publisher name.
+ :type package_family_name: str
+ :param package_full_name: Package Full Name from appxmanifest.xml.
+ :type package_full_name: str
+ :param display_name: User friendly Name to be displayed in the portal.
+ :type display_name: str
+ :param package_relative_path: Relative Path to the package inside the image.
+ :type package_relative_path: str
+ :param is_regular_registration: Specifies how to register Package in feed.
+ :type is_regular_registration: bool
+ :param is_active: Make this version of the package the active one across the hostpool.
+ :type is_active: bool
+ :param package_dependencies: List of package dependencies.
+ :type package_dependencies:
+ list[~desktop_virtualization_api_client.models.MsixPackageDependencies]
+ :param version: Package Version found in the appxmanifest.xml.
+ :type version: str
+ :param last_updated: Date Package was last updated, found in the appxmanifest.xml.
+ :type last_updated: ~datetime.datetime
+ :param package_applications: List of package applications.
+ :type package_applications:
+ list[~desktop_virtualization_api_client.models.MsixPackageApplications]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'package_alias': {'key': 'properties.packageAlias', 'type': 'str'},
+ 'image_path': {'key': 'properties.imagePath', 'type': 'str'},
+ 'package_name': {'key': 'properties.packageName', 'type': 'str'},
+ 'package_family_name': {'key': 'properties.packageFamilyName', 'type': 'str'},
+ 'package_full_name': {'key': 'properties.packageFullName', 'type': 'str'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ 'package_relative_path': {'key': 'properties.packageRelativePath', 'type': 'str'},
+ 'is_regular_registration': {'key': 'properties.isRegularRegistration', 'type': 'bool'},
+ 'is_active': {'key': 'properties.isActive', 'type': 'bool'},
+ 'package_dependencies': {'key': 'properties.packageDependencies', 'type': '[MsixPackageDependencies]'},
+ 'version': {'key': 'properties.version', 'type': 'str'},
+ 'last_updated': {'key': 'properties.lastUpdated', 'type': 'iso-8601'},
+ 'package_applications': {'key': 'properties.packageApplications', 'type': '[MsixPackageApplications]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ExpandMsixImage, self).__init__(**kwargs)
+ self.package_alias = kwargs.get('package_alias', None)
+ self.image_path = kwargs.get('image_path', None)
+ self.package_name = kwargs.get('package_name', None)
+ self.package_family_name = kwargs.get('package_family_name', None)
+ self.package_full_name = kwargs.get('package_full_name', None)
+ self.display_name = kwargs.get('display_name', None)
+ self.package_relative_path = kwargs.get('package_relative_path', None)
+ self.is_regular_registration = kwargs.get('is_regular_registration', None)
+ self.is_active = kwargs.get('is_active', None)
+ self.package_dependencies = kwargs.get('package_dependencies', None)
+ self.version = kwargs.get('version', None)
+ self.last_updated = kwargs.get('last_updated', None)
+ self.package_applications = kwargs.get('package_applications', None)
+
+
+class ExpandMsixImageList(msrest.serialization.Model):
+ """List of MSIX package properties retrieved from MSIX Image expansion.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :param value: List of MSIX package properties from give MSIX Image.
+ :type value: list[~desktop_virtualization_api_client.models.ExpandMsixImage]
+ :ivar next_link: Link to the next page of results.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ 'next_link': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[ExpandMsixImage]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ExpandMsixImageList, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+ self.next_link = None
+
+
class HostPool(TrackedResource):
"""Represents a HostPool definition.
@@ -516,13 +683,13 @@ class HostPool(TrackedResource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
@@ -535,8 +702,8 @@ class HostPool(TrackedResource):
:param host_pool_type: Required. HostPool type for desktop. Possible values include:
"Personal", "Pooled".
:type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType
- :param personal_desktop_assignment_type: Required. PersonalDesktopAssignment type for HostPool.
- Possible values include: "Automatic", "Direct".
+ :param personal_desktop_assignment_type: PersonalDesktopAssignment type for HostPool. Possible
+ values include: "Automatic", "Direct".
:type personal_desktop_assignment_type: str or
~desktop_virtualization_api_client.models.PersonalDesktopAssignmentType
:param custom_rdp_property: Custom rdp property of HostPool.
@@ -558,6 +725,24 @@ class HostPool(TrackedResource):
:vartype application_group_references: list[str]
:param sso_context: Path to keyvault containing ssoContext secret.
:type sso_context: str
+ :param ssoadfs_authority: URL to customer ADFS server for signing WVD SSO certificates.
+ :type ssoadfs_authority: str
+ :param sso_client_id: ClientId for the registered Relying Party used to issue WVD SSO
+ certificates.
+ :type sso_client_id: str
+ :param sso_client_secret_key_vault_path: Path to Azure KeyVault storing the secret used for
+ communication to ADFS.
+ :type sso_client_secret_key_vault_path: str
+ :param sso_secret_type: The type of single sign on Secret Type. Possible values include:
+ "SharedKey", "Certificate", "SharedKeyInKeyVault", "CertificateInKeyVault".
+ :type sso_secret_type: str or ~desktop_virtualization_api_client.models.SsoSecretType
+ :param preferred_app_group_type: Required. The type of preferred application group type,
+ default to Desktop Application Group. Possible values include: "None", "Desktop",
+ "RailApplications".
+ :type preferred_app_group_type: str or
+ ~desktop_virtualization_api_client.models.PreferredAppGroupType
+ :param start_vm_on_connect: The flag to turn on/off StartVMOnConnect feature.
+ :type start_vm_on_connect: bool
"""
_validation = {
@@ -566,9 +751,9 @@ class HostPool(TrackedResource):
'type': {'readonly': True},
'location': {'required': True},
'host_pool_type': {'required': True},
- 'personal_desktop_assignment_type': {'required': True},
'load_balancer_type': {'required': True},
'application_group_references': {'readonly': True},
+ 'preferred_app_group_type': {'required': True},
}
_attribute_map = {
@@ -590,6 +775,12 @@ class HostPool(TrackedResource):
'vm_template': {'key': 'properties.vmTemplate', 'type': 'str'},
'application_group_references': {'key': 'properties.applicationGroupReferences', 'type': '[str]'},
'sso_context': {'key': 'properties.ssoContext', 'type': 'str'},
+ 'ssoadfs_authority': {'key': 'properties.ssoadfsAuthority', 'type': 'str'},
+ 'sso_client_id': {'key': 'properties.ssoClientId', 'type': 'str'},
+ 'sso_client_secret_key_vault_path': {'key': 'properties.ssoClientSecretKeyVaultPath', 'type': 'str'},
+ 'sso_secret_type': {'key': 'properties.ssoSecretType', 'type': 'str'},
+ 'preferred_app_group_type': {'key': 'properties.preferredAppGroupType', 'type': 'str'},
+ 'start_vm_on_connect': {'key': 'properties.startVMOnConnect', 'type': 'bool'},
}
def __init__(
@@ -600,7 +791,7 @@ def __init__(
self.friendly_name = kwargs.get('friendly_name', None)
self.description = kwargs.get('description', None)
self.host_pool_type = kwargs['host_pool_type']
- self.personal_desktop_assignment_type = kwargs['personal_desktop_assignment_type']
+ self.personal_desktop_assignment_type = kwargs.get('personal_desktop_assignment_type', None)
self.custom_rdp_property = kwargs.get('custom_rdp_property', None)
self.max_session_limit = kwargs.get('max_session_limit', None)
self.load_balancer_type = kwargs['load_balancer_type']
@@ -610,6 +801,12 @@ def __init__(
self.vm_template = kwargs.get('vm_template', None)
self.application_group_references = None
self.sso_context = kwargs.get('sso_context', None)
+ self.ssoadfs_authority = kwargs.get('ssoadfs_authority', None)
+ self.sso_client_id = kwargs.get('sso_client_id', None)
+ self.sso_client_secret_key_vault_path = kwargs.get('sso_client_secret_key_vault_path', None)
+ self.sso_secret_type = kwargs.get('sso_secret_type', None)
+ self.preferred_app_group_type = kwargs['preferred_app_group_type']
+ self.start_vm_on_connect = kwargs.get('start_vm_on_connect', None)
class HostPoolList(msrest.serialization.Model):
@@ -646,13 +843,13 @@ class HostPoolPatch(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. tags to be updated.
:type tags: dict[str, str]
@@ -677,8 +874,27 @@ class HostPoolPatch(Resource):
:type validation_environment: bool
:param registration_info: The registration info of HostPool.
:type registration_info: ~desktop_virtualization_api_client.models.RegistrationInfoPatch
+ :param vm_template: VM template for sessionhosts configuration within hostpool.
+ :type vm_template: str
:param sso_context: Path to keyvault containing ssoContext secret.
:type sso_context: str
+ :param ssoadfs_authority: URL to customer ADFS server for signing WVD SSO certificates.
+ :type ssoadfs_authority: str
+ :param sso_client_id: ClientId for the registered Relying Party used to issue WVD SSO
+ certificates.
+ :type sso_client_id: str
+ :param sso_client_secret_key_vault_path: Path to Azure KeyVault storing the secret used for
+ communication to ADFS.
+ :type sso_client_secret_key_vault_path: str
+ :param sso_secret_type: The type of single sign on Secret Type. Possible values include:
+ "SharedKey", "Certificate", "SharedKeyInKeyVault", "CertificateInKeyVault".
+ :type sso_secret_type: str or ~desktop_virtualization_api_client.models.SsoSecretType
+ :param preferred_app_group_type: The type of preferred application group type, default to
+ Desktop Application Group. Possible values include: "None", "Desktop", "RailApplications".
+ :type preferred_app_group_type: str or
+ ~desktop_virtualization_api_client.models.PreferredAppGroupType
+ :param start_vm_on_connect: The flag to turn on/off StartVMOnConnect feature.
+ :type start_vm_on_connect: bool
"""
_validation = {
@@ -701,7 +917,14 @@ class HostPoolPatch(Resource):
'ring': {'key': 'properties.ring', 'type': 'int'},
'validation_environment': {'key': 'properties.validationEnvironment', 'type': 'bool'},
'registration_info': {'key': 'properties.registrationInfo', 'type': 'RegistrationInfoPatch'},
+ 'vm_template': {'key': 'properties.vmTemplate', 'type': 'str'},
'sso_context': {'key': 'properties.ssoContext', 'type': 'str'},
+ 'ssoadfs_authority': {'key': 'properties.ssoadfsAuthority', 'type': 'str'},
+ 'sso_client_id': {'key': 'properties.ssoClientId', 'type': 'str'},
+ 'sso_client_secret_key_vault_path': {'key': 'properties.ssoClientSecretKeyVaultPath', 'type': 'str'},
+ 'sso_secret_type': {'key': 'properties.ssoSecretType', 'type': 'str'},
+ 'preferred_app_group_type': {'key': 'properties.preferredAppGroupType', 'type': 'str'},
+ 'start_vm_on_connect': {'key': 'properties.startVMOnConnect', 'type': 'bool'},
}
def __init__(
@@ -719,7 +942,260 @@ def __init__(
self.ring = kwargs.get('ring', None)
self.validation_environment = kwargs.get('validation_environment', None)
self.registration_info = kwargs.get('registration_info', None)
+ self.vm_template = kwargs.get('vm_template', None)
self.sso_context = kwargs.get('sso_context', None)
+ self.ssoadfs_authority = kwargs.get('ssoadfs_authority', None)
+ self.sso_client_id = kwargs.get('sso_client_id', None)
+ self.sso_client_secret_key_vault_path = kwargs.get('sso_client_secret_key_vault_path', None)
+ self.sso_secret_type = kwargs.get('sso_secret_type', None)
+ self.preferred_app_group_type = kwargs.get('preferred_app_group_type', None)
+ self.start_vm_on_connect = kwargs.get('start_vm_on_connect', None)
+
+
+class MsixImageUri(msrest.serialization.Model):
+ """Represents URI referring to MSIX Image.
+
+ :param uri: URI to Image.
+ :type uri: str
+ """
+
+ _attribute_map = {
+ 'uri': {'key': 'uri', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(MsixImageUri, self).__init__(**kwargs)
+ self.uri = kwargs.get('uri', None)
+
+
+class MsixPackage(Resource):
+ """Schema for MSIX Package properties.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :param image_path: VHD/CIM image path on Network Share.
+ :type image_path: str
+ :param package_name: Package Name from appxmanifest.xml.
+ :type package_name: str
+ :param package_family_name: Package Family Name from appxmanifest.xml. Contains Package Name
+ and Publisher name.
+ :type package_family_name: str
+ :param display_name: User friendly Name to be displayed in the portal.
+ :type display_name: str
+ :param package_relative_path: Relative Path to the package inside the image.
+ :type package_relative_path: str
+ :param is_regular_registration: Specifies how to register Package in feed.
+ :type is_regular_registration: bool
+ :param is_active: Make this version of the package the active one across the hostpool.
+ :type is_active: bool
+ :param package_dependencies: List of package dependencies.
+ :type package_dependencies:
+ list[~desktop_virtualization_api_client.models.MsixPackageDependencies]
+ :param version: Package Version found in the appxmanifest.xml.
+ :type version: str
+ :param last_updated: Date Package was last updated, found in the appxmanifest.xml.
+ :type last_updated: ~datetime.datetime
+ :param package_applications: List of package applications.
+ :type package_applications:
+ list[~desktop_virtualization_api_client.models.MsixPackageApplications]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'image_path': {'key': 'properties.imagePath', 'type': 'str'},
+ 'package_name': {'key': 'properties.packageName', 'type': 'str'},
+ 'package_family_name': {'key': 'properties.packageFamilyName', 'type': 'str'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ 'package_relative_path': {'key': 'properties.packageRelativePath', 'type': 'str'},
+ 'is_regular_registration': {'key': 'properties.isRegularRegistration', 'type': 'bool'},
+ 'is_active': {'key': 'properties.isActive', 'type': 'bool'},
+ 'package_dependencies': {'key': 'properties.packageDependencies', 'type': '[MsixPackageDependencies]'},
+ 'version': {'key': 'properties.version', 'type': 'str'},
+ 'last_updated': {'key': 'properties.lastUpdated', 'type': 'iso-8601'},
+ 'package_applications': {'key': 'properties.packageApplications', 'type': '[MsixPackageApplications]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(MsixPackage, self).__init__(**kwargs)
+ self.image_path = kwargs.get('image_path', None)
+ self.package_name = kwargs.get('package_name', None)
+ self.package_family_name = kwargs.get('package_family_name', None)
+ self.display_name = kwargs.get('display_name', None)
+ self.package_relative_path = kwargs.get('package_relative_path', None)
+ self.is_regular_registration = kwargs.get('is_regular_registration', None)
+ self.is_active = kwargs.get('is_active', None)
+ self.package_dependencies = kwargs.get('package_dependencies', None)
+ self.version = kwargs.get('version', None)
+ self.last_updated = kwargs.get('last_updated', None)
+ self.package_applications = kwargs.get('package_applications', None)
+
+
+class MsixPackageApplications(msrest.serialization.Model):
+ """Schema for MSIX Package Application properties.
+
+ :param app_id: Package Application Id, found in appxmanifest.xml.
+ :type app_id: str
+ :param description: Description of Package Application.
+ :type description: str
+ :param app_user_model_id: Used to activate Package Application. Consists of Package Name and
+ ApplicationID. Found in appxmanifest.xml.
+ :type app_user_model_id: str
+ :param friendly_name: User friendly name.
+ :type friendly_name: str
+ :param icon_image_name: User friendly name.
+ :type icon_image_name: str
+ :param raw_icon: the icon a 64 bit string as a byte array.
+ :type raw_icon: bytearray
+ :param raw_png: the icon a 64 bit string as a byte array.
+ :type raw_png: bytearray
+ """
+
+ _attribute_map = {
+ 'app_id': {'key': 'appId', 'type': 'str'},
+ 'description': {'key': 'description', 'type': 'str'},
+ 'app_user_model_id': {'key': 'appUserModelID', 'type': 'str'},
+ 'friendly_name': {'key': 'friendlyName', 'type': 'str'},
+ 'icon_image_name': {'key': 'iconImageName', 'type': 'str'},
+ 'raw_icon': {'key': 'rawIcon', 'type': 'bytearray'},
+ 'raw_png': {'key': 'rawPng', 'type': 'bytearray'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(MsixPackageApplications, self).__init__(**kwargs)
+ self.app_id = kwargs.get('app_id', None)
+ self.description = kwargs.get('description', None)
+ self.app_user_model_id = kwargs.get('app_user_model_id', None)
+ self.friendly_name = kwargs.get('friendly_name', None)
+ self.icon_image_name = kwargs.get('icon_image_name', None)
+ self.raw_icon = kwargs.get('raw_icon', None)
+ self.raw_png = kwargs.get('raw_png', None)
+
+
+class MsixPackageDependencies(msrest.serialization.Model):
+ """Schema for MSIX Package Dependencies properties.
+
+ :param dependency_name: Name of package dependency.
+ :type dependency_name: str
+ :param publisher: Name of dependency publisher.
+ :type publisher: str
+ :param min_version: Dependency version required.
+ :type min_version: str
+ """
+
+ _attribute_map = {
+ 'dependency_name': {'key': 'dependencyName', 'type': 'str'},
+ 'publisher': {'key': 'publisher', 'type': 'str'},
+ 'min_version': {'key': 'minVersion', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(MsixPackageDependencies, self).__init__(**kwargs)
+ self.dependency_name = kwargs.get('dependency_name', None)
+ self.publisher = kwargs.get('publisher', None)
+ self.min_version = kwargs.get('min_version', None)
+
+
+class MsixPackageList(msrest.serialization.Model):
+ """List of MSIX Package definitions.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :param value: List of MSIX Package definitions.
+ :type value: list[~desktop_virtualization_api_client.models.MsixPackage]
+ :ivar next_link: Link to the next page of results.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ 'next_link': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[MsixPackage]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(MsixPackageList, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+ self.next_link = None
+
+
+class MsixPackagePatch(Resource):
+ """MSIX Package properties that can be patched.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :param is_active: Set a version of the package to be active across hostpool.
+ :type is_active: bool
+ :param is_regular_registration: Set Registration mode. Regular or Delayed.
+ :type is_regular_registration: bool
+ :param display_name: Display name for MSIX Package.
+ :type display_name: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'is_active': {'key': 'properties.isActive', 'type': 'bool'},
+ 'is_regular_registration': {'key': 'properties.isRegularRegistration', 'type': 'bool'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(MsixPackagePatch, self).__init__(**kwargs)
+ self.is_active = kwargs.get('is_active', None)
+ self.is_regular_registration = kwargs.get('is_regular_registration', None)
+ self.display_name = kwargs.get('display_name', None)
class RegistrationInfo(msrest.serialization.Model):
@@ -849,6 +1325,285 @@ def __init__(
self.value = kwargs.get('value', None)
+class ScalingHostPoolReference(msrest.serialization.Model):
+ """Scaling plan reference to hostpool.
+
+ :param host_pool_arm_path: Arm path of referenced hostpool.
+ :type host_pool_arm_path: str
+ :param scaling_plan_enabled: Is the scaling plan enabled for this hostpool.
+ :type scaling_plan_enabled: bool
+ """
+
+ _attribute_map = {
+ 'host_pool_arm_path': {'key': 'hostPoolArmPath', 'type': 'str'},
+ 'scaling_plan_enabled': {'key': 'scalingPlanEnabled', 'type': 'bool'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ScalingHostPoolReference, self).__init__(**kwargs)
+ self.host_pool_arm_path = kwargs.get('host_pool_arm_path', None)
+ self.scaling_plan_enabled = kwargs.get('scaling_plan_enabled', None)
+
+
+class ScalingPlan(TrackedResource):
+ """Represents a scaling plan definition.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :param tags: A set of tags. Resource tags.
+ :type tags: dict[str, str]
+ :param location: Required. The geo-location where the resource lives.
+ :type location: str
+ :param description: Description of scaling plan.
+ :type description: str
+ :param friendly_name: User friendly name of scaling plan.
+ :type friendly_name: str
+ :param time_zone: Timezone of the scaling plan.
+ :type time_zone: str
+ :param host_pool_type: HostPool type for scaling plan. Possible values include: "Personal",
+ "Pooled".
+ :type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType
+ :param exclusion_tag: Exclusion tag for scaling plan.
+ :type exclusion_tag: str
+ :param schedules: List of ScalingSchedule definitions.
+ :type schedules: list[~desktop_virtualization_api_client.models.ScalingSchedule]
+ :param host_pool_references: List of ScalingHostPoolReference definitions.
+ :type host_pool_references:
+ list[~desktop_virtualization_api_client.models.ScalingHostPoolReference]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'description': {'key': 'properties.description', 'type': 'str'},
+ 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
+ 'time_zone': {'key': 'properties.timeZone', 'type': 'str'},
+ 'host_pool_type': {'key': 'properties.hostPoolType', 'type': 'str'},
+ 'exclusion_tag': {'key': 'properties.exclusionTag', 'type': 'str'},
+ 'schedules': {'key': 'properties.schedules', 'type': '[ScalingSchedule]'},
+ 'host_pool_references': {'key': 'properties.hostPoolReferences', 'type': '[ScalingHostPoolReference]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ScalingPlan, self).__init__(**kwargs)
+ self.description = kwargs.get('description', None)
+ self.friendly_name = kwargs.get('friendly_name', None)
+ self.time_zone = kwargs.get('time_zone', None)
+ self.host_pool_type = kwargs.get('host_pool_type', None)
+ self.exclusion_tag = kwargs.get('exclusion_tag', None)
+ self.schedules = kwargs.get('schedules', None)
+ self.host_pool_references = kwargs.get('host_pool_references', None)
+
+
+class ScalingPlanList(msrest.serialization.Model):
+ """List of scaling plan definitions.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :param value: List of scaling plan definitions.
+ :type value: list[~desktop_virtualization_api_client.models.ScalingPlan]
+ :ivar next_link: Link to the next page of results.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ 'next_link': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[ScalingPlan]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ScalingPlanList, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+ self.next_link = None
+
+
+class ScalingPlanPatch(msrest.serialization.Model):
+ """Scaling plan properties that can be patched.
+
+ :param tags: A set of tags. tags to be updated.
+ :type tags: dict[str, str]
+ :param description: Description of scaling plan.
+ :type description: str
+ :param friendly_name: User friendly name of scaling plan.
+ :type friendly_name: str
+ :param time_zone: Timezone of the scaling plan.
+ :type time_zone: str
+ :param host_pool_type: HostPool type for scaling plan. Possible values include: "Personal",
+ "Pooled".
+ :type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType
+ :param exclusion_tag: Exclusion tag for scaling plan.
+ :type exclusion_tag: str
+ :param schedules: List of ScalingSchedule definitions.
+ :type schedules: list[~desktop_virtualization_api_client.models.ScalingSchedule]
+ :param host_pool_references: List of ScalingHostPoolReference definitions.
+ :type host_pool_references:
+ list[~desktop_virtualization_api_client.models.ScalingHostPoolReference]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'description': {'key': 'properties.description', 'type': 'str'},
+ 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
+ 'time_zone': {'key': 'properties.timeZone', 'type': 'str'},
+ 'host_pool_type': {'key': 'properties.hostPoolType', 'type': 'str'},
+ 'exclusion_tag': {'key': 'properties.exclusionTag', 'type': 'str'},
+ 'schedules': {'key': 'properties.schedules', 'type': '[ScalingSchedule]'},
+ 'host_pool_references': {'key': 'properties.hostPoolReferences', 'type': '[ScalingHostPoolReference]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ScalingPlanPatch, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
+ self.description = kwargs.get('description', None)
+ self.friendly_name = kwargs.get('friendly_name', None)
+ self.time_zone = kwargs.get('time_zone', None)
+ self.host_pool_type = kwargs.get('host_pool_type', None)
+ self.exclusion_tag = kwargs.get('exclusion_tag', None)
+ self.schedules = kwargs.get('schedules', None)
+ self.host_pool_references = kwargs.get('host_pool_references', None)
+
+
+class ScalingSchedule(msrest.serialization.Model):
+ """Scaling plan schedule.
+
+ :param name: Name of the scaling schedule.
+ :type name: str
+ :param days_of_week: Set of days of the week on which this schedule is active.
+ :type days_of_week: list[str or
+ ~desktop_virtualization_api_client.models.ScalingScheduleDaysOfWeekItem]
+ :param ramp_up_start_time: Starting time for ramp up period.
+ :type ramp_up_start_time: ~datetime.datetime
+ :param ramp_up_algorithm: Load balancing algorithm for ramp up period. Possible values include:
+ "BreadthFirst", "DepthFirst".
+ :type ramp_up_algorithm: str or
+ ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm
+ :param ramp_up_minimum_host_pct: Minimum host percentage for ramp up period.
+ :type ramp_up_minimum_host_pct: int
+ :param ramp_up_capacity_threshold_pct: Capacity threshold for ramp up period.
+ :type ramp_up_capacity_threshold_pct: int
+ :param peak_start_time: Starting time for peak period.
+ :type peak_start_time: ~datetime.datetime
+ :param peak_load_balancing_algorithm: Load balancing algorithm for peak period. Possible values
+ include: "BreadthFirst", "DepthFirst".
+ :type peak_load_balancing_algorithm: str or
+ ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm
+ :param ramp_down_start_time: Starting time for ramp down period.
+ :type ramp_down_start_time: ~datetime.datetime
+ :param ramp_down_load_balancing_algorithm: Load balancing algorithm for ramp down period.
+ Possible values include: "BreadthFirst", "DepthFirst".
+ :type ramp_down_load_balancing_algorithm: str or
+ ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm
+ :param ramp_down_minimum_hosts_pct: Minimum host percentage for ramp down period.
+ :type ramp_down_minimum_hosts_pct: int
+ :param ramp_down_capacity_threshold_pct: Capacity threshold for ramp down period.
+ :type ramp_down_capacity_threshold_pct: int
+ :param ramp_down_force_logoff_users: Should users be logged off forcefully from hosts.
+ :type ramp_down_force_logoff_users: bool
+ :param ramp_down_stop_hosts_when: Specifies when to stop hosts during ramp down period.
+ Possible values include: "ZeroSessions", "ZeroActiveSessions".
+ :type ramp_down_stop_hosts_when: str or ~desktop_virtualization_api_client.models.StopHostsWhen
+ :param ramp_down_notification_minutes: Number of minutes to wait to stop hosts during ramp down
+ period.
+ :type ramp_down_notification_minutes: int
+ :param ramp_down_notification_message: Notification message for users during ramp down period.
+ :type ramp_down_notification_message: str
+ :param off_peak_start_time: Starting time for off-peak period.
+ :type off_peak_start_time: ~datetime.datetime
+ :param off_peak_load_balancing_algorithm: Load balancing algorithm for off-peak period.
+ Possible values include: "BreadthFirst", "DepthFirst".
+ :type off_peak_load_balancing_algorithm: str or
+ ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm
+ """
+
+ _validation = {
+ 'ramp_up_minimum_host_pct': {'maximum': 100, 'minimum': 0},
+ 'ramp_up_capacity_threshold_pct': {'maximum': 100, 'minimum': 0},
+ 'ramp_down_minimum_hosts_pct': {'maximum': 100, 'minimum': 0},
+ 'ramp_down_capacity_threshold_pct': {'maximum': 100, 'minimum': 0},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'days_of_week': {'key': 'daysOfWeek', 'type': '[str]'},
+ 'ramp_up_start_time': {'key': 'rampUpStartTime', 'type': 'iso-8601'},
+ 'ramp_up_algorithm': {'key': 'rampUpAlgorithm', 'type': 'str'},
+ 'ramp_up_minimum_host_pct': {'key': 'rampUpMinimumHostPct', 'type': 'int'},
+ 'ramp_up_capacity_threshold_pct': {'key': 'rampUpCapacityThresholdPct', 'type': 'int'},
+ 'peak_start_time': {'key': 'peakStartTime', 'type': 'iso-8601'},
+ 'peak_load_balancing_algorithm': {'key': 'peakLoadBalancingAlgorithm', 'type': 'str'},
+ 'ramp_down_start_time': {'key': 'rampDownStartTime', 'type': 'iso-8601'},
+ 'ramp_down_load_balancing_algorithm': {'key': 'rampDownLoadBalancingAlgorithm', 'type': 'str'},
+ 'ramp_down_minimum_hosts_pct': {'key': 'rampDownMinimumHostsPct', 'type': 'int'},
+ 'ramp_down_capacity_threshold_pct': {'key': 'rampDownCapacityThresholdPct', 'type': 'int'},
+ 'ramp_down_force_logoff_users': {'key': 'rampDownForceLogoffUsers', 'type': 'bool'},
+ 'ramp_down_stop_hosts_when': {'key': 'rampDownStopHostsWhen', 'type': 'str'},
+ 'ramp_down_notification_minutes': {'key': 'rampDownNotificationMinutes', 'type': 'int'},
+ 'ramp_down_notification_message': {'key': 'rampDownNotificationMessage', 'type': 'str'},
+ 'off_peak_start_time': {'key': 'offPeakStartTime', 'type': 'iso-8601'},
+ 'off_peak_load_balancing_algorithm': {'key': 'offPeakLoadBalancingAlgorithm', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ScalingSchedule, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.days_of_week = kwargs.get('days_of_week', None)
+ self.ramp_up_start_time = kwargs.get('ramp_up_start_time', None)
+ self.ramp_up_algorithm = kwargs.get('ramp_up_algorithm', None)
+ self.ramp_up_minimum_host_pct = kwargs.get('ramp_up_minimum_host_pct', None)
+ self.ramp_up_capacity_threshold_pct = kwargs.get('ramp_up_capacity_threshold_pct', None)
+ self.peak_start_time = kwargs.get('peak_start_time', None)
+ self.peak_load_balancing_algorithm = kwargs.get('peak_load_balancing_algorithm', None)
+ self.ramp_down_start_time = kwargs.get('ramp_down_start_time', None)
+ self.ramp_down_load_balancing_algorithm = kwargs.get('ramp_down_load_balancing_algorithm', None)
+ self.ramp_down_minimum_hosts_pct = kwargs.get('ramp_down_minimum_hosts_pct', None)
+ self.ramp_down_capacity_threshold_pct = kwargs.get('ramp_down_capacity_threshold_pct', None)
+ self.ramp_down_force_logoff_users = kwargs.get('ramp_down_force_logoff_users', None)
+ self.ramp_down_stop_hosts_when = kwargs.get('ramp_down_stop_hosts_when', None)
+ self.ramp_down_notification_minutes = kwargs.get('ramp_down_notification_minutes', None)
+ self.ramp_down_notification_message = kwargs.get('ramp_down_notification_message', None)
+ self.off_peak_start_time = kwargs.get('off_peak_start_time', None)
+ self.off_peak_load_balancing_algorithm = kwargs.get('off_peak_load_balancing_algorithm', None)
+
+
class SendMessage(msrest.serialization.Model):
"""Represents message sent to a UserSession.
@@ -877,13 +1632,13 @@ class SessionHost(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param last_heart_beat: Last heart beat from SessionHost.
:type last_heart_beat: ~datetime.datetime
@@ -893,6 +1648,10 @@ class SessionHost(Resource):
:type agent_version: str
:param allow_new_session: Allow a new session.
:type allow_new_session: bool
+ :ivar virtual_machine_id: Virtual Machine Id of SessionHost's underlying virtual machine.
+ :vartype virtual_machine_id: str
+ :ivar resource_id: Resource Id of SessionHost's underlying virtual machine.
+ :vartype resource_id: str
:param assigned_user: User assigned to SessionHost.
:type assigned_user: str
:param status: Status for a SessionHost. Possible values include: "Available", "Unavailable",
@@ -917,6 +1676,8 @@ class SessionHost(Resource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
+ 'virtual_machine_id': {'readonly': True},
+ 'resource_id': {'readonly': True},
'status_timestamp': {'readonly': True},
'last_update_time': {'readonly': True},
}
@@ -929,6 +1690,8 @@ class SessionHost(Resource):
'sessions': {'key': 'properties.sessions', 'type': 'int'},
'agent_version': {'key': 'properties.agentVersion', 'type': 'str'},
'allow_new_session': {'key': 'properties.allowNewSession', 'type': 'bool'},
+ 'virtual_machine_id': {'key': 'properties.virtualMachineId', 'type': 'str'},
+ 'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
'assigned_user': {'key': 'properties.assignedUser', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'str'},
'status_timestamp': {'key': 'properties.statusTimestamp', 'type': 'iso-8601'},
@@ -948,6 +1711,8 @@ def __init__(
self.sessions = kwargs.get('sessions', None)
self.agent_version = kwargs.get('agent_version', None)
self.allow_new_session = kwargs.get('allow_new_session', None)
+ self.virtual_machine_id = None
+ self.resource_id = None
self.assigned_user = kwargs.get('assigned_user', None)
self.status = kwargs.get('status', None)
self.status_timestamp = None
@@ -992,13 +1757,13 @@ class SessionHostPatch(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param allow_new_session: Allow a new session.
:type allow_new_session: bool
@@ -1034,13 +1799,13 @@ class StartMenuItem(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param app_alias: Alias of StartMenuItem.
:type app_alias: str
@@ -1121,13 +1886,13 @@ class UserSession(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param user_principal_name: The user principal name.
:type user_principal_name: str
@@ -1208,13 +1973,13 @@ class Workspace(TrackedResource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/_models_py3.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/_models_py3.py
index cc133d4a876..58e03a9f1c8 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/_models_py3.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/models/_models_py3.py
@@ -15,17 +15,17 @@
class Resource(msrest.serialization.Model):
- """Resource.
+ """Common fields that are returned in the response for all Azure Resource Manager resources.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
"""
@@ -58,13 +58,13 @@ class Application(Resource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param description: Description of Application.
:type description: str
@@ -72,6 +72,13 @@ class Application(Resource):
:type friendly_name: str
:param file_path: Specifies a path for the executable file for the application.
:type file_path: str
+ :param msix_package_family_name: Specifies the package family name for MSIX applications.
+ :type msix_package_family_name: str
+ :param msix_package_application_id: Specifies the package application Id for MSIX applications.
+ :type msix_package_application_id: str
+ :param application_type: Resource Type of Application. Possible values include: "InBuilt",
+ "MsixApplication".
+ :type application_type: str or ~desktop_virtualization_api_client.models.RemoteApplicationType
:param command_line_setting: Required. Specifies whether this published application can be
launched with command line arguments provided by the client, command line arguments specified
at publish time, or no command line arguments at all. Possible values include: "DoNotAllow",
@@ -108,6 +115,9 @@ class Application(Resource):
'description': {'key': 'properties.description', 'type': 'str'},
'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
'file_path': {'key': 'properties.filePath', 'type': 'str'},
+ 'msix_package_family_name': {'key': 'properties.msixPackageFamilyName', 'type': 'str'},
+ 'msix_package_application_id': {'key': 'properties.msixPackageApplicationId', 'type': 'str'},
+ 'application_type': {'key': 'properties.applicationType', 'type': 'str'},
'command_line_setting': {'key': 'properties.commandLineSetting', 'type': 'str'},
'command_line_arguments': {'key': 'properties.commandLineArguments', 'type': 'str'},
'show_in_portal': {'key': 'properties.showInPortal', 'type': 'bool'},
@@ -124,6 +134,9 @@ def __init__(
description: Optional[str] = None,
friendly_name: Optional[str] = None,
file_path: Optional[str] = None,
+ msix_package_family_name: Optional[str] = None,
+ msix_package_application_id: Optional[str] = None,
+ application_type: Optional[Union[str, "RemoteApplicationType"]] = None,
command_line_arguments: Optional[str] = None,
show_in_portal: Optional[bool] = None,
icon_path: Optional[str] = None,
@@ -134,6 +147,9 @@ def __init__(
self.description = description
self.friendly_name = friendly_name
self.file_path = file_path
+ self.msix_package_family_name = msix_package_family_name
+ self.msix_package_application_id = msix_package_application_id
+ self.application_type = application_type
self.command_line_setting = command_line_setting
self.command_line_arguments = command_line_arguments
self.show_in_portal = show_in_portal
@@ -144,19 +160,19 @@ def __init__(
class TrackedResource(Resource):
- """The resource model definition for a ARM tracked top level resource.
+ """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
@@ -198,13 +214,13 @@ class ApplicationGroup(TrackedResource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
@@ -302,13 +318,13 @@ class ApplicationGroupPatch(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. tags to be updated.
:type tags: dict[str, str]
@@ -403,6 +419,13 @@ class ApplicationPatch(msrest.serialization.Model):
:type icon_path: str
:param icon_index: Index of the icon.
:type icon_index: int
+ :param msix_package_family_name: Specifies the package family name for MSIX applications.
+ :type msix_package_family_name: str
+ :param msix_package_application_id: Specifies the package application Id for MSIX applications.
+ :type msix_package_application_id: str
+ :param application_type: Resource Type of Application. Possible values include: "InBuilt",
+ "MsixApplication".
+ :type application_type: str or ~desktop_virtualization_api_client.models.RemoteApplicationType
"""
_attribute_map = {
@@ -415,6 +438,9 @@ class ApplicationPatch(msrest.serialization.Model):
'show_in_portal': {'key': 'properties.showInPortal', 'type': 'bool'},
'icon_path': {'key': 'properties.iconPath', 'type': 'str'},
'icon_index': {'key': 'properties.iconIndex', 'type': 'int'},
+ 'msix_package_family_name': {'key': 'properties.msixPackageFamilyName', 'type': 'str'},
+ 'msix_package_application_id': {'key': 'properties.msixPackageApplicationId', 'type': 'str'},
+ 'application_type': {'key': 'properties.applicationType', 'type': 'str'},
}
def __init__(
@@ -429,6 +455,9 @@ def __init__(
show_in_portal: Optional[bool] = None,
icon_path: Optional[str] = None,
icon_index: Optional[int] = None,
+ msix_package_family_name: Optional[str] = None,
+ msix_package_application_id: Optional[str] = None,
+ application_type: Optional[Union[str, "RemoteApplicationType"]] = None,
**kwargs
):
super(ApplicationPatch, self).__init__(**kwargs)
@@ -441,6 +470,35 @@ def __init__(
self.show_in_portal = show_in_portal
self.icon_path = icon_path
self.icon_index = icon_index
+ self.msix_package_family_name = msix_package_family_name
+ self.msix_package_application_id = msix_package_application_id
+ self.application_type = application_type
+
+
+class CloudErrorProperties(msrest.serialization.Model):
+ """CloudErrorProperties.
+
+ :param code: Error code.
+ :type code: str
+ :param message: Error message indicating why the operation failed.
+ :type message: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ code: Optional[str] = None,
+ message: Optional[str] = None,
+ **kwargs
+ ):
+ super(CloudErrorProperties, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
class Desktop(Resource):
@@ -448,13 +506,13 @@ class Desktop(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param description: Description of Desktop.
:type description: str
@@ -560,6 +618,140 @@ def __init__(
self.friendly_name = friendly_name
+class ExpandMsixImage(Resource):
+ """Represents the definition of contents retrieved after expanding the MSIX Image.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :param package_alias: Alias of MSIX Package.
+ :type package_alias: str
+ :param image_path: VHD/CIM image path on Network Share.
+ :type image_path: str
+ :param package_name: Package Name from appxmanifest.xml.
+ :type package_name: str
+ :param package_family_name: Package Family Name from appxmanifest.xml. Contains Package Name
+ and Publisher name.
+ :type package_family_name: str
+ :param package_full_name: Package Full Name from appxmanifest.xml.
+ :type package_full_name: str
+ :param display_name: User friendly Name to be displayed in the portal.
+ :type display_name: str
+ :param package_relative_path: Relative Path to the package inside the image.
+ :type package_relative_path: str
+ :param is_regular_registration: Specifies how to register Package in feed.
+ :type is_regular_registration: bool
+ :param is_active: Make this version of the package the active one across the hostpool.
+ :type is_active: bool
+ :param package_dependencies: List of package dependencies.
+ :type package_dependencies:
+ list[~desktop_virtualization_api_client.models.MsixPackageDependencies]
+ :param version: Package Version found in the appxmanifest.xml.
+ :type version: str
+ :param last_updated: Date Package was last updated, found in the appxmanifest.xml.
+ :type last_updated: ~datetime.datetime
+ :param package_applications: List of package applications.
+ :type package_applications:
+ list[~desktop_virtualization_api_client.models.MsixPackageApplications]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'package_alias': {'key': 'properties.packageAlias', 'type': 'str'},
+ 'image_path': {'key': 'properties.imagePath', 'type': 'str'},
+ 'package_name': {'key': 'properties.packageName', 'type': 'str'},
+ 'package_family_name': {'key': 'properties.packageFamilyName', 'type': 'str'},
+ 'package_full_name': {'key': 'properties.packageFullName', 'type': 'str'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ 'package_relative_path': {'key': 'properties.packageRelativePath', 'type': 'str'},
+ 'is_regular_registration': {'key': 'properties.isRegularRegistration', 'type': 'bool'},
+ 'is_active': {'key': 'properties.isActive', 'type': 'bool'},
+ 'package_dependencies': {'key': 'properties.packageDependencies', 'type': '[MsixPackageDependencies]'},
+ 'version': {'key': 'properties.version', 'type': 'str'},
+ 'last_updated': {'key': 'properties.lastUpdated', 'type': 'iso-8601'},
+ 'package_applications': {'key': 'properties.packageApplications', 'type': '[MsixPackageApplications]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ package_alias: Optional[str] = None,
+ image_path: Optional[str] = None,
+ package_name: Optional[str] = None,
+ package_family_name: Optional[str] = None,
+ package_full_name: Optional[str] = None,
+ display_name: Optional[str] = None,
+ package_relative_path: Optional[str] = None,
+ is_regular_registration: Optional[bool] = None,
+ is_active: Optional[bool] = None,
+ package_dependencies: Optional[List["MsixPackageDependencies"]] = None,
+ version: Optional[str] = None,
+ last_updated: Optional[datetime.datetime] = None,
+ package_applications: Optional[List["MsixPackageApplications"]] = None,
+ **kwargs
+ ):
+ super(ExpandMsixImage, self).__init__(**kwargs)
+ self.package_alias = package_alias
+ self.image_path = image_path
+ self.package_name = package_name
+ self.package_family_name = package_family_name
+ self.package_full_name = package_full_name
+ self.display_name = display_name
+ self.package_relative_path = package_relative_path
+ self.is_regular_registration = is_regular_registration
+ self.is_active = is_active
+ self.package_dependencies = package_dependencies
+ self.version = version
+ self.last_updated = last_updated
+ self.package_applications = package_applications
+
+
+class ExpandMsixImageList(msrest.serialization.Model):
+ """List of MSIX package properties retrieved from MSIX Image expansion.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :param value: List of MSIX package properties from give MSIX Image.
+ :type value: list[~desktop_virtualization_api_client.models.ExpandMsixImage]
+ :ivar next_link: Link to the next page of results.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ 'next_link': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[ExpandMsixImage]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["ExpandMsixImage"]] = None,
+ **kwargs
+ ):
+ super(ExpandMsixImageList, self).__init__(**kwargs)
+ self.value = value
+ self.next_link = None
+
+
class HostPool(TrackedResource):
"""Represents a HostPool definition.
@@ -567,13 +759,13 @@ class HostPool(TrackedResource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
@@ -586,8 +778,8 @@ class HostPool(TrackedResource):
:param host_pool_type: Required. HostPool type for desktop. Possible values include:
"Personal", "Pooled".
:type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType
- :param personal_desktop_assignment_type: Required. PersonalDesktopAssignment type for HostPool.
- Possible values include: "Automatic", "Direct".
+ :param personal_desktop_assignment_type: PersonalDesktopAssignment type for HostPool. Possible
+ values include: "Automatic", "Direct".
:type personal_desktop_assignment_type: str or
~desktop_virtualization_api_client.models.PersonalDesktopAssignmentType
:param custom_rdp_property: Custom rdp property of HostPool.
@@ -609,6 +801,24 @@ class HostPool(TrackedResource):
:vartype application_group_references: list[str]
:param sso_context: Path to keyvault containing ssoContext secret.
:type sso_context: str
+ :param ssoadfs_authority: URL to customer ADFS server for signing WVD SSO certificates.
+ :type ssoadfs_authority: str
+ :param sso_client_id: ClientId for the registered Relying Party used to issue WVD SSO
+ certificates.
+ :type sso_client_id: str
+ :param sso_client_secret_key_vault_path: Path to Azure KeyVault storing the secret used for
+ communication to ADFS.
+ :type sso_client_secret_key_vault_path: str
+ :param sso_secret_type: The type of single sign on Secret Type. Possible values include:
+ "SharedKey", "Certificate", "SharedKeyInKeyVault", "CertificateInKeyVault".
+ :type sso_secret_type: str or ~desktop_virtualization_api_client.models.SsoSecretType
+ :param preferred_app_group_type: Required. The type of preferred application group type,
+ default to Desktop Application Group. Possible values include: "None", "Desktop",
+ "RailApplications".
+ :type preferred_app_group_type: str or
+ ~desktop_virtualization_api_client.models.PreferredAppGroupType
+ :param start_vm_on_connect: The flag to turn on/off StartVMOnConnect feature.
+ :type start_vm_on_connect: bool
"""
_validation = {
@@ -617,9 +827,9 @@ class HostPool(TrackedResource):
'type': {'readonly': True},
'location': {'required': True},
'host_pool_type': {'required': True},
- 'personal_desktop_assignment_type': {'required': True},
'load_balancer_type': {'required': True},
'application_group_references': {'readonly': True},
+ 'preferred_app_group_type': {'required': True},
}
_attribute_map = {
@@ -641,6 +851,12 @@ class HostPool(TrackedResource):
'vm_template': {'key': 'properties.vmTemplate', 'type': 'str'},
'application_group_references': {'key': 'properties.applicationGroupReferences', 'type': '[str]'},
'sso_context': {'key': 'properties.ssoContext', 'type': 'str'},
+ 'ssoadfs_authority': {'key': 'properties.ssoadfsAuthority', 'type': 'str'},
+ 'sso_client_id': {'key': 'properties.ssoClientId', 'type': 'str'},
+ 'sso_client_secret_key_vault_path': {'key': 'properties.ssoClientSecretKeyVaultPath', 'type': 'str'},
+ 'sso_secret_type': {'key': 'properties.ssoSecretType', 'type': 'str'},
+ 'preferred_app_group_type': {'key': 'properties.preferredAppGroupType', 'type': 'str'},
+ 'start_vm_on_connect': {'key': 'properties.startVMOnConnect', 'type': 'bool'},
}
def __init__(
@@ -648,11 +864,12 @@ def __init__(
*,
location: str,
host_pool_type: Union[str, "HostPoolType"],
- personal_desktop_assignment_type: Union[str, "PersonalDesktopAssignmentType"],
load_balancer_type: Union[str, "LoadBalancerType"],
+ preferred_app_group_type: Union[str, "PreferredAppGroupType"],
tags: Optional[Dict[str, str]] = None,
friendly_name: Optional[str] = None,
description: Optional[str] = None,
+ personal_desktop_assignment_type: Optional[Union[str, "PersonalDesktopAssignmentType"]] = None,
custom_rdp_property: Optional[str] = None,
max_session_limit: Optional[int] = None,
ring: Optional[int] = None,
@@ -660,6 +877,11 @@ def __init__(
registration_info: Optional["RegistrationInfo"] = None,
vm_template: Optional[str] = None,
sso_context: Optional[str] = None,
+ ssoadfs_authority: Optional[str] = None,
+ sso_client_id: Optional[str] = None,
+ sso_client_secret_key_vault_path: Optional[str] = None,
+ sso_secret_type: Optional[Union[str, "SsoSecretType"]] = None,
+ start_vm_on_connect: Optional[bool] = None,
**kwargs
):
super(HostPool, self).__init__(tags=tags, location=location, **kwargs)
@@ -676,6 +898,12 @@ def __init__(
self.vm_template = vm_template
self.application_group_references = None
self.sso_context = sso_context
+ self.ssoadfs_authority = ssoadfs_authority
+ self.sso_client_id = sso_client_id
+ self.sso_client_secret_key_vault_path = sso_client_secret_key_vault_path
+ self.sso_secret_type = sso_secret_type
+ self.preferred_app_group_type = preferred_app_group_type
+ self.start_vm_on_connect = start_vm_on_connect
class HostPoolList(msrest.serialization.Model):
@@ -714,13 +942,13 @@ class HostPoolPatch(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. tags to be updated.
:type tags: dict[str, str]
@@ -745,8 +973,27 @@ class HostPoolPatch(Resource):
:type validation_environment: bool
:param registration_info: The registration info of HostPool.
:type registration_info: ~desktop_virtualization_api_client.models.RegistrationInfoPatch
+ :param vm_template: VM template for sessionhosts configuration within hostpool.
+ :type vm_template: str
:param sso_context: Path to keyvault containing ssoContext secret.
:type sso_context: str
+ :param ssoadfs_authority: URL to customer ADFS server for signing WVD SSO certificates.
+ :type ssoadfs_authority: str
+ :param sso_client_id: ClientId for the registered Relying Party used to issue WVD SSO
+ certificates.
+ :type sso_client_id: str
+ :param sso_client_secret_key_vault_path: Path to Azure KeyVault storing the secret used for
+ communication to ADFS.
+ :type sso_client_secret_key_vault_path: str
+ :param sso_secret_type: The type of single sign on Secret Type. Possible values include:
+ "SharedKey", "Certificate", "SharedKeyInKeyVault", "CertificateInKeyVault".
+ :type sso_secret_type: str or ~desktop_virtualization_api_client.models.SsoSecretType
+ :param preferred_app_group_type: The type of preferred application group type, default to
+ Desktop Application Group. Possible values include: "None", "Desktop", "RailApplications".
+ :type preferred_app_group_type: str or
+ ~desktop_virtualization_api_client.models.PreferredAppGroupType
+ :param start_vm_on_connect: The flag to turn on/off StartVMOnConnect feature.
+ :type start_vm_on_connect: bool
"""
_validation = {
@@ -769,7 +1016,14 @@ class HostPoolPatch(Resource):
'ring': {'key': 'properties.ring', 'type': 'int'},
'validation_environment': {'key': 'properties.validationEnvironment', 'type': 'bool'},
'registration_info': {'key': 'properties.registrationInfo', 'type': 'RegistrationInfoPatch'},
+ 'vm_template': {'key': 'properties.vmTemplate', 'type': 'str'},
'sso_context': {'key': 'properties.ssoContext', 'type': 'str'},
+ 'ssoadfs_authority': {'key': 'properties.ssoadfsAuthority', 'type': 'str'},
+ 'sso_client_id': {'key': 'properties.ssoClientId', 'type': 'str'},
+ 'sso_client_secret_key_vault_path': {'key': 'properties.ssoClientSecretKeyVaultPath', 'type': 'str'},
+ 'sso_secret_type': {'key': 'properties.ssoSecretType', 'type': 'str'},
+ 'preferred_app_group_type': {'key': 'properties.preferredAppGroupType', 'type': 'str'},
+ 'start_vm_on_connect': {'key': 'properties.startVMOnConnect', 'type': 'bool'},
}
def __init__(
@@ -785,7 +1039,14 @@ def __init__(
ring: Optional[int] = None,
validation_environment: Optional[bool] = None,
registration_info: Optional["RegistrationInfoPatch"] = None,
+ vm_template: Optional[str] = None,
sso_context: Optional[str] = None,
+ ssoadfs_authority: Optional[str] = None,
+ sso_client_id: Optional[str] = None,
+ sso_client_secret_key_vault_path: Optional[str] = None,
+ sso_secret_type: Optional[Union[str, "SsoSecretType"]] = None,
+ preferred_app_group_type: Optional[Union[str, "PreferredAppGroupType"]] = None,
+ start_vm_on_connect: Optional[bool] = None,
**kwargs
):
super(HostPoolPatch, self).__init__(**kwargs)
@@ -799,7 +1060,292 @@ def __init__(
self.ring = ring
self.validation_environment = validation_environment
self.registration_info = registration_info
+ self.vm_template = vm_template
self.sso_context = sso_context
+ self.ssoadfs_authority = ssoadfs_authority
+ self.sso_client_id = sso_client_id
+ self.sso_client_secret_key_vault_path = sso_client_secret_key_vault_path
+ self.sso_secret_type = sso_secret_type
+ self.preferred_app_group_type = preferred_app_group_type
+ self.start_vm_on_connect = start_vm_on_connect
+
+
+class MsixImageUri(msrest.serialization.Model):
+ """Represents URI referring to MSIX Image.
+
+ :param uri: URI to Image.
+ :type uri: str
+ """
+
+ _attribute_map = {
+ 'uri': {'key': 'uri', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ uri: Optional[str] = None,
+ **kwargs
+ ):
+ super(MsixImageUri, self).__init__(**kwargs)
+ self.uri = uri
+
+
+class MsixPackage(Resource):
+ """Schema for MSIX Package properties.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :param image_path: VHD/CIM image path on Network Share.
+ :type image_path: str
+ :param package_name: Package Name from appxmanifest.xml.
+ :type package_name: str
+ :param package_family_name: Package Family Name from appxmanifest.xml. Contains Package Name
+ and Publisher name.
+ :type package_family_name: str
+ :param display_name: User friendly Name to be displayed in the portal.
+ :type display_name: str
+ :param package_relative_path: Relative Path to the package inside the image.
+ :type package_relative_path: str
+ :param is_regular_registration: Specifies how to register Package in feed.
+ :type is_regular_registration: bool
+ :param is_active: Make this version of the package the active one across the hostpool.
+ :type is_active: bool
+ :param package_dependencies: List of package dependencies.
+ :type package_dependencies:
+ list[~desktop_virtualization_api_client.models.MsixPackageDependencies]
+ :param version: Package Version found in the appxmanifest.xml.
+ :type version: str
+ :param last_updated: Date Package was last updated, found in the appxmanifest.xml.
+ :type last_updated: ~datetime.datetime
+ :param package_applications: List of package applications.
+ :type package_applications:
+ list[~desktop_virtualization_api_client.models.MsixPackageApplications]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'image_path': {'key': 'properties.imagePath', 'type': 'str'},
+ 'package_name': {'key': 'properties.packageName', 'type': 'str'},
+ 'package_family_name': {'key': 'properties.packageFamilyName', 'type': 'str'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ 'package_relative_path': {'key': 'properties.packageRelativePath', 'type': 'str'},
+ 'is_regular_registration': {'key': 'properties.isRegularRegistration', 'type': 'bool'},
+ 'is_active': {'key': 'properties.isActive', 'type': 'bool'},
+ 'package_dependencies': {'key': 'properties.packageDependencies', 'type': '[MsixPackageDependencies]'},
+ 'version': {'key': 'properties.version', 'type': 'str'},
+ 'last_updated': {'key': 'properties.lastUpdated', 'type': 'iso-8601'},
+ 'package_applications': {'key': 'properties.packageApplications', 'type': '[MsixPackageApplications]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ image_path: Optional[str] = None,
+ package_name: Optional[str] = None,
+ package_family_name: Optional[str] = None,
+ display_name: Optional[str] = None,
+ package_relative_path: Optional[str] = None,
+ is_regular_registration: Optional[bool] = None,
+ is_active: Optional[bool] = None,
+ package_dependencies: Optional[List["MsixPackageDependencies"]] = None,
+ version: Optional[str] = None,
+ last_updated: Optional[datetime.datetime] = None,
+ package_applications: Optional[List["MsixPackageApplications"]] = None,
+ **kwargs
+ ):
+ super(MsixPackage, self).__init__(**kwargs)
+ self.image_path = image_path
+ self.package_name = package_name
+ self.package_family_name = package_family_name
+ self.display_name = display_name
+ self.package_relative_path = package_relative_path
+ self.is_regular_registration = is_regular_registration
+ self.is_active = is_active
+ self.package_dependencies = package_dependencies
+ self.version = version
+ self.last_updated = last_updated
+ self.package_applications = package_applications
+
+
+class MsixPackageApplications(msrest.serialization.Model):
+ """Schema for MSIX Package Application properties.
+
+ :param app_id: Package Application Id, found in appxmanifest.xml.
+ :type app_id: str
+ :param description: Description of Package Application.
+ :type description: str
+ :param app_user_model_id: Used to activate Package Application. Consists of Package Name and
+ ApplicationID. Found in appxmanifest.xml.
+ :type app_user_model_id: str
+ :param friendly_name: User friendly name.
+ :type friendly_name: str
+ :param icon_image_name: User friendly name.
+ :type icon_image_name: str
+ :param raw_icon: the icon a 64 bit string as a byte array.
+ :type raw_icon: bytearray
+ :param raw_png: the icon a 64 bit string as a byte array.
+ :type raw_png: bytearray
+ """
+
+ _attribute_map = {
+ 'app_id': {'key': 'appId', 'type': 'str'},
+ 'description': {'key': 'description', 'type': 'str'},
+ 'app_user_model_id': {'key': 'appUserModelID', 'type': 'str'},
+ 'friendly_name': {'key': 'friendlyName', 'type': 'str'},
+ 'icon_image_name': {'key': 'iconImageName', 'type': 'str'},
+ 'raw_icon': {'key': 'rawIcon', 'type': 'bytearray'},
+ 'raw_png': {'key': 'rawPng', 'type': 'bytearray'},
+ }
+
+ def __init__(
+ self,
+ *,
+ app_id: Optional[str] = None,
+ description: Optional[str] = None,
+ app_user_model_id: Optional[str] = None,
+ friendly_name: Optional[str] = None,
+ icon_image_name: Optional[str] = None,
+ raw_icon: Optional[bytearray] = None,
+ raw_png: Optional[bytearray] = None,
+ **kwargs
+ ):
+ super(MsixPackageApplications, self).__init__(**kwargs)
+ self.app_id = app_id
+ self.description = description
+ self.app_user_model_id = app_user_model_id
+ self.friendly_name = friendly_name
+ self.icon_image_name = icon_image_name
+ self.raw_icon = raw_icon
+ self.raw_png = raw_png
+
+
+class MsixPackageDependencies(msrest.serialization.Model):
+ """Schema for MSIX Package Dependencies properties.
+
+ :param dependency_name: Name of package dependency.
+ :type dependency_name: str
+ :param publisher: Name of dependency publisher.
+ :type publisher: str
+ :param min_version: Dependency version required.
+ :type min_version: str
+ """
+
+ _attribute_map = {
+ 'dependency_name': {'key': 'dependencyName', 'type': 'str'},
+ 'publisher': {'key': 'publisher', 'type': 'str'},
+ 'min_version': {'key': 'minVersion', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ dependency_name: Optional[str] = None,
+ publisher: Optional[str] = None,
+ min_version: Optional[str] = None,
+ **kwargs
+ ):
+ super(MsixPackageDependencies, self).__init__(**kwargs)
+ self.dependency_name = dependency_name
+ self.publisher = publisher
+ self.min_version = min_version
+
+
+class MsixPackageList(msrest.serialization.Model):
+ """List of MSIX Package definitions.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :param value: List of MSIX Package definitions.
+ :type value: list[~desktop_virtualization_api_client.models.MsixPackage]
+ :ivar next_link: Link to the next page of results.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ 'next_link': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[MsixPackage]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["MsixPackage"]] = None,
+ **kwargs
+ ):
+ super(MsixPackageList, self).__init__(**kwargs)
+ self.value = value
+ self.next_link = None
+
+
+class MsixPackagePatch(Resource):
+ """MSIX Package properties that can be patched.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :param is_active: Set a version of the package to be active across hostpool.
+ :type is_active: bool
+ :param is_regular_registration: Set Registration mode. Regular or Delayed.
+ :type is_regular_registration: bool
+ :param display_name: Display name for MSIX Package.
+ :type display_name: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'is_active': {'key': 'properties.isActive', 'type': 'bool'},
+ 'is_regular_registration': {'key': 'properties.isRegularRegistration', 'type': 'bool'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ is_active: Optional[bool] = None,
+ is_regular_registration: Optional[bool] = None,
+ display_name: Optional[str] = None,
+ **kwargs
+ ):
+ super(MsixPackagePatch, self).__init__(**kwargs)
+ self.is_active = is_active
+ self.is_regular_registration = is_regular_registration
+ self.display_name = display_name
class RegistrationInfo(msrest.serialization.Model):
@@ -946,6 +1492,328 @@ def __init__(
self.value = value
+class ScalingHostPoolReference(msrest.serialization.Model):
+ """Scaling plan reference to hostpool.
+
+ :param host_pool_arm_path: Arm path of referenced hostpool.
+ :type host_pool_arm_path: str
+ :param scaling_plan_enabled: Is the scaling plan enabled for this hostpool.
+ :type scaling_plan_enabled: bool
+ """
+
+ _attribute_map = {
+ 'host_pool_arm_path': {'key': 'hostPoolArmPath', 'type': 'str'},
+ 'scaling_plan_enabled': {'key': 'scalingPlanEnabled', 'type': 'bool'},
+ }
+
+ def __init__(
+ self,
+ *,
+ host_pool_arm_path: Optional[str] = None,
+ scaling_plan_enabled: Optional[bool] = None,
+ **kwargs
+ ):
+ super(ScalingHostPoolReference, self).__init__(**kwargs)
+ self.host_pool_arm_path = host_pool_arm_path
+ self.scaling_plan_enabled = scaling_plan_enabled
+
+
+class ScalingPlan(TrackedResource):
+ """Represents a scaling plan definition.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :param tags: A set of tags. Resource tags.
+ :type tags: dict[str, str]
+ :param location: Required. The geo-location where the resource lives.
+ :type location: str
+ :param description: Description of scaling plan.
+ :type description: str
+ :param friendly_name: User friendly name of scaling plan.
+ :type friendly_name: str
+ :param time_zone: Timezone of the scaling plan.
+ :type time_zone: str
+ :param host_pool_type: HostPool type for scaling plan. Possible values include: "Personal",
+ "Pooled".
+ :type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType
+ :param exclusion_tag: Exclusion tag for scaling plan.
+ :type exclusion_tag: str
+ :param schedules: List of ScalingSchedule definitions.
+ :type schedules: list[~desktop_virtualization_api_client.models.ScalingSchedule]
+ :param host_pool_references: List of ScalingHostPoolReference definitions.
+ :type host_pool_references:
+ list[~desktop_virtualization_api_client.models.ScalingHostPoolReference]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'description': {'key': 'properties.description', 'type': 'str'},
+ 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
+ 'time_zone': {'key': 'properties.timeZone', 'type': 'str'},
+ 'host_pool_type': {'key': 'properties.hostPoolType', 'type': 'str'},
+ 'exclusion_tag': {'key': 'properties.exclusionTag', 'type': 'str'},
+ 'schedules': {'key': 'properties.schedules', 'type': '[ScalingSchedule]'},
+ 'host_pool_references': {'key': 'properties.hostPoolReferences', 'type': '[ScalingHostPoolReference]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ location: str,
+ tags: Optional[Dict[str, str]] = None,
+ description: Optional[str] = None,
+ friendly_name: Optional[str] = None,
+ time_zone: Optional[str] = None,
+ host_pool_type: Optional[Union[str, "HostPoolType"]] = None,
+ exclusion_tag: Optional[str] = None,
+ schedules: Optional[List["ScalingSchedule"]] = None,
+ host_pool_references: Optional[List["ScalingHostPoolReference"]] = None,
+ **kwargs
+ ):
+ super(ScalingPlan, self).__init__(tags=tags, location=location, **kwargs)
+ self.description = description
+ self.friendly_name = friendly_name
+ self.time_zone = time_zone
+ self.host_pool_type = host_pool_type
+ self.exclusion_tag = exclusion_tag
+ self.schedules = schedules
+ self.host_pool_references = host_pool_references
+
+
+class ScalingPlanList(msrest.serialization.Model):
+ """List of scaling plan definitions.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :param value: List of scaling plan definitions.
+ :type value: list[~desktop_virtualization_api_client.models.ScalingPlan]
+ :ivar next_link: Link to the next page of results.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ 'next_link': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[ScalingPlan]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["ScalingPlan"]] = None,
+ **kwargs
+ ):
+ super(ScalingPlanList, self).__init__(**kwargs)
+ self.value = value
+ self.next_link = None
+
+
+class ScalingPlanPatch(msrest.serialization.Model):
+ """Scaling plan properties that can be patched.
+
+ :param tags: A set of tags. tags to be updated.
+ :type tags: dict[str, str]
+ :param description: Description of scaling plan.
+ :type description: str
+ :param friendly_name: User friendly name of scaling plan.
+ :type friendly_name: str
+ :param time_zone: Timezone of the scaling plan.
+ :type time_zone: str
+ :param host_pool_type: HostPool type for scaling plan. Possible values include: "Personal",
+ "Pooled".
+ :type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType
+ :param exclusion_tag: Exclusion tag for scaling plan.
+ :type exclusion_tag: str
+ :param schedules: List of ScalingSchedule definitions.
+ :type schedules: list[~desktop_virtualization_api_client.models.ScalingSchedule]
+ :param host_pool_references: List of ScalingHostPoolReference definitions.
+ :type host_pool_references:
+ list[~desktop_virtualization_api_client.models.ScalingHostPoolReference]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'description': {'key': 'properties.description', 'type': 'str'},
+ 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
+ 'time_zone': {'key': 'properties.timeZone', 'type': 'str'},
+ 'host_pool_type': {'key': 'properties.hostPoolType', 'type': 'str'},
+ 'exclusion_tag': {'key': 'properties.exclusionTag', 'type': 'str'},
+ 'schedules': {'key': 'properties.schedules', 'type': '[ScalingSchedule]'},
+ 'host_pool_references': {'key': 'properties.hostPoolReferences', 'type': '[ScalingHostPoolReference]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ tags: Optional[Dict[str, str]] = None,
+ description: Optional[str] = None,
+ friendly_name: Optional[str] = None,
+ time_zone: Optional[str] = None,
+ host_pool_type: Optional[Union[str, "HostPoolType"]] = None,
+ exclusion_tag: Optional[str] = None,
+ schedules: Optional[List["ScalingSchedule"]] = None,
+ host_pool_references: Optional[List["ScalingHostPoolReference"]] = None,
+ **kwargs
+ ):
+ super(ScalingPlanPatch, self).__init__(**kwargs)
+ self.tags = tags
+ self.description = description
+ self.friendly_name = friendly_name
+ self.time_zone = time_zone
+ self.host_pool_type = host_pool_type
+ self.exclusion_tag = exclusion_tag
+ self.schedules = schedules
+ self.host_pool_references = host_pool_references
+
+
+class ScalingSchedule(msrest.serialization.Model):
+ """Scaling plan schedule.
+
+ :param name: Name of the scaling schedule.
+ :type name: str
+ :param days_of_week: Set of days of the week on which this schedule is active.
+ :type days_of_week: list[str or
+ ~desktop_virtualization_api_client.models.ScalingScheduleDaysOfWeekItem]
+ :param ramp_up_start_time: Starting time for ramp up period.
+ :type ramp_up_start_time: ~datetime.datetime
+ :param ramp_up_algorithm: Load balancing algorithm for ramp up period. Possible values include:
+ "BreadthFirst", "DepthFirst".
+ :type ramp_up_algorithm: str or
+ ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm
+ :param ramp_up_minimum_host_pct: Minimum host percentage for ramp up period.
+ :type ramp_up_minimum_host_pct: int
+ :param ramp_up_capacity_threshold_pct: Capacity threshold for ramp up period.
+ :type ramp_up_capacity_threshold_pct: int
+ :param peak_start_time: Starting time for peak period.
+ :type peak_start_time: ~datetime.datetime
+ :param peak_load_balancing_algorithm: Load balancing algorithm for peak period. Possible values
+ include: "BreadthFirst", "DepthFirst".
+ :type peak_load_balancing_algorithm: str or
+ ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm
+ :param ramp_down_start_time: Starting time for ramp down period.
+ :type ramp_down_start_time: ~datetime.datetime
+ :param ramp_down_load_balancing_algorithm: Load balancing algorithm for ramp down period.
+ Possible values include: "BreadthFirst", "DepthFirst".
+ :type ramp_down_load_balancing_algorithm: str or
+ ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm
+ :param ramp_down_minimum_hosts_pct: Minimum host percentage for ramp down period.
+ :type ramp_down_minimum_hosts_pct: int
+ :param ramp_down_capacity_threshold_pct: Capacity threshold for ramp down period.
+ :type ramp_down_capacity_threshold_pct: int
+ :param ramp_down_force_logoff_users: Should users be logged off forcefully from hosts.
+ :type ramp_down_force_logoff_users: bool
+ :param ramp_down_stop_hosts_when: Specifies when to stop hosts during ramp down period.
+ Possible values include: "ZeroSessions", "ZeroActiveSessions".
+ :type ramp_down_stop_hosts_when: str or ~desktop_virtualization_api_client.models.StopHostsWhen
+ :param ramp_down_notification_minutes: Number of minutes to wait to stop hosts during ramp down
+ period.
+ :type ramp_down_notification_minutes: int
+ :param ramp_down_notification_message: Notification message for users during ramp down period.
+ :type ramp_down_notification_message: str
+ :param off_peak_start_time: Starting time for off-peak period.
+ :type off_peak_start_time: ~datetime.datetime
+ :param off_peak_load_balancing_algorithm: Load balancing algorithm for off-peak period.
+ Possible values include: "BreadthFirst", "DepthFirst".
+ :type off_peak_load_balancing_algorithm: str or
+ ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm
+ """
+
+ _validation = {
+ 'ramp_up_minimum_host_pct': {'maximum': 100, 'minimum': 0},
+ 'ramp_up_capacity_threshold_pct': {'maximum': 100, 'minimum': 0},
+ 'ramp_down_minimum_hosts_pct': {'maximum': 100, 'minimum': 0},
+ 'ramp_down_capacity_threshold_pct': {'maximum': 100, 'minimum': 0},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'days_of_week': {'key': 'daysOfWeek', 'type': '[str]'},
+ 'ramp_up_start_time': {'key': 'rampUpStartTime', 'type': 'iso-8601'},
+ 'ramp_up_algorithm': {'key': 'rampUpAlgorithm', 'type': 'str'},
+ 'ramp_up_minimum_host_pct': {'key': 'rampUpMinimumHostPct', 'type': 'int'},
+ 'ramp_up_capacity_threshold_pct': {'key': 'rampUpCapacityThresholdPct', 'type': 'int'},
+ 'peak_start_time': {'key': 'peakStartTime', 'type': 'iso-8601'},
+ 'peak_load_balancing_algorithm': {'key': 'peakLoadBalancingAlgorithm', 'type': 'str'},
+ 'ramp_down_start_time': {'key': 'rampDownStartTime', 'type': 'iso-8601'},
+ 'ramp_down_load_balancing_algorithm': {'key': 'rampDownLoadBalancingAlgorithm', 'type': 'str'},
+ 'ramp_down_minimum_hosts_pct': {'key': 'rampDownMinimumHostsPct', 'type': 'int'},
+ 'ramp_down_capacity_threshold_pct': {'key': 'rampDownCapacityThresholdPct', 'type': 'int'},
+ 'ramp_down_force_logoff_users': {'key': 'rampDownForceLogoffUsers', 'type': 'bool'},
+ 'ramp_down_stop_hosts_when': {'key': 'rampDownStopHostsWhen', 'type': 'str'},
+ 'ramp_down_notification_minutes': {'key': 'rampDownNotificationMinutes', 'type': 'int'},
+ 'ramp_down_notification_message': {'key': 'rampDownNotificationMessage', 'type': 'str'},
+ 'off_peak_start_time': {'key': 'offPeakStartTime', 'type': 'iso-8601'},
+ 'off_peak_load_balancing_algorithm': {'key': 'offPeakLoadBalancingAlgorithm', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ days_of_week: Optional[List[Union[str, "ScalingScheduleDaysOfWeekItem"]]] = None,
+ ramp_up_start_time: Optional[datetime.datetime] = None,
+ ramp_up_algorithm: Optional[Union[str, "SessionHostLoadBalancingAlgorithm"]] = None,
+ ramp_up_minimum_host_pct: Optional[int] = None,
+ ramp_up_capacity_threshold_pct: Optional[int] = None,
+ peak_start_time: Optional[datetime.datetime] = None,
+ peak_load_balancing_algorithm: Optional[Union[str, "SessionHostLoadBalancingAlgorithm"]] = None,
+ ramp_down_start_time: Optional[datetime.datetime] = None,
+ ramp_down_load_balancing_algorithm: Optional[Union[str, "SessionHostLoadBalancingAlgorithm"]] = None,
+ ramp_down_minimum_hosts_pct: Optional[int] = None,
+ ramp_down_capacity_threshold_pct: Optional[int] = None,
+ ramp_down_force_logoff_users: Optional[bool] = None,
+ ramp_down_stop_hosts_when: Optional[Union[str, "StopHostsWhen"]] = None,
+ ramp_down_notification_minutes: Optional[int] = None,
+ ramp_down_notification_message: Optional[str] = None,
+ off_peak_start_time: Optional[datetime.datetime] = None,
+ off_peak_load_balancing_algorithm: Optional[Union[str, "SessionHostLoadBalancingAlgorithm"]] = None,
+ **kwargs
+ ):
+ super(ScalingSchedule, self).__init__(**kwargs)
+ self.name = name
+ self.days_of_week = days_of_week
+ self.ramp_up_start_time = ramp_up_start_time
+ self.ramp_up_algorithm = ramp_up_algorithm
+ self.ramp_up_minimum_host_pct = ramp_up_minimum_host_pct
+ self.ramp_up_capacity_threshold_pct = ramp_up_capacity_threshold_pct
+ self.peak_start_time = peak_start_time
+ self.peak_load_balancing_algorithm = peak_load_balancing_algorithm
+ self.ramp_down_start_time = ramp_down_start_time
+ self.ramp_down_load_balancing_algorithm = ramp_down_load_balancing_algorithm
+ self.ramp_down_minimum_hosts_pct = ramp_down_minimum_hosts_pct
+ self.ramp_down_capacity_threshold_pct = ramp_down_capacity_threshold_pct
+ self.ramp_down_force_logoff_users = ramp_down_force_logoff_users
+ self.ramp_down_stop_hosts_when = ramp_down_stop_hosts_when
+ self.ramp_down_notification_minutes = ramp_down_notification_minutes
+ self.ramp_down_notification_message = ramp_down_notification_message
+ self.off_peak_start_time = off_peak_start_time
+ self.off_peak_load_balancing_algorithm = off_peak_load_balancing_algorithm
+
+
class SendMessage(msrest.serialization.Model):
"""Represents message sent to a UserSession.
@@ -977,13 +1845,13 @@ class SessionHost(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param last_heart_beat: Last heart beat from SessionHost.
:type last_heart_beat: ~datetime.datetime
@@ -993,6 +1861,10 @@ class SessionHost(Resource):
:type agent_version: str
:param allow_new_session: Allow a new session.
:type allow_new_session: bool
+ :ivar virtual_machine_id: Virtual Machine Id of SessionHost's underlying virtual machine.
+ :vartype virtual_machine_id: str
+ :ivar resource_id: Resource Id of SessionHost's underlying virtual machine.
+ :vartype resource_id: str
:param assigned_user: User assigned to SessionHost.
:type assigned_user: str
:param status: Status for a SessionHost. Possible values include: "Available", "Unavailable",
@@ -1017,6 +1889,8 @@ class SessionHost(Resource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
+ 'virtual_machine_id': {'readonly': True},
+ 'resource_id': {'readonly': True},
'status_timestamp': {'readonly': True},
'last_update_time': {'readonly': True},
}
@@ -1029,6 +1903,8 @@ class SessionHost(Resource):
'sessions': {'key': 'properties.sessions', 'type': 'int'},
'agent_version': {'key': 'properties.agentVersion', 'type': 'str'},
'allow_new_session': {'key': 'properties.allowNewSession', 'type': 'bool'},
+ 'virtual_machine_id': {'key': 'properties.virtualMachineId', 'type': 'str'},
+ 'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
'assigned_user': {'key': 'properties.assignedUser', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'str'},
'status_timestamp': {'key': 'properties.statusTimestamp', 'type': 'iso-8601'},
@@ -1059,6 +1935,8 @@ def __init__(
self.sessions = sessions
self.agent_version = agent_version
self.allow_new_session = allow_new_session
+ self.virtual_machine_id = None
+ self.resource_id = None
self.assigned_user = assigned_user
self.status = status
self.status_timestamp = None
@@ -1105,13 +1983,13 @@ class SessionHostPatch(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param allow_new_session: Allow a new session.
:type allow_new_session: bool
@@ -1150,13 +2028,13 @@ class StartMenuItem(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param app_alias: Alias of StartMenuItem.
:type app_alias: str
@@ -1246,13 +2124,13 @@ class UserSession(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param user_principal_name: The user principal name.
:type user_principal_name: str
@@ -1341,13 +2219,13 @@ class Workspace(TrackedResource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/__init__.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/__init__.py
index 08f1a117a4f..8590a6c12f9 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/__init__.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/__init__.py
@@ -8,7 +8,7 @@
from ._operation_operations import OperationOperations
from ._workspace_operations import WorkspaceOperations
-from ._application_group_assignment_operations import ApplicationGroupAssignmentOperations
+from ._scaling_plan_operations import ScalingPlanOperations
from ._application_group_operations import ApplicationGroupOperations
from ._start_menu_item_operations import StartMenuItemOperations
from ._application_operations import ApplicationOperations
@@ -16,12 +16,13 @@
from ._host_pool_operations import HostPoolOperations
from ._user_session_operations import UserSessionOperations
from ._session_host_operations import SessionHostOperations
-from ._active_application_operations import ActiveApplicationOperations
+from ._msix_package_operations import MsixPackageOperations
+from ._msix_image_operations import MsixImageOperations
__all__ = [
'OperationOperations',
'WorkspaceOperations',
- 'ApplicationGroupAssignmentOperations',
+ 'ScalingPlanOperations',
'ApplicationGroupOperations',
'StartMenuItemOperations',
'ApplicationOperations',
@@ -29,5 +30,6 @@
'HostPoolOperations',
'UserSessionOperations',
'SessionHostOperations',
- 'ActiveApplicationOperations',
+ 'MsixPackageOperations',
+ 'MsixImageOperations',
]
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_application_group_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_application_group_operations.py
index 7ab3e5b6dec..bb171c49982 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_application_group_operations.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_application_group_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -64,9 +64,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationGroup"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -83,9 +86,8 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -139,12 +141,15 @@ def create_or_update(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationGroup"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- _application_group = models.ApplicationGroup(tags=tags, location=location, description=description, friendly_name=friendly_name, host_pool_arm_path=host_pool_arm_path, application_group_type=application_group_type)
- api_version = "2019-12-10-preview"
+ application_group = models.ApplicationGroup(tags=tags, location=location, description=description, friendly_name=friendly_name, host_pool_arm_path=host_pool_arm_path, application_group_type=application_group_type)
+ api_version = "2020-11-10-preview"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.create_or_update.metadata['url'] # type: ignore
@@ -162,14 +167,12 @@ def create_or_update(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(_application_group, 'ApplicationGroup')
+ body_content = self._serialize.body(application_group, 'ApplicationGroup')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -177,7 +180,6 @@ def create_or_update(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
- deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('ApplicationGroup', pipeline_response)
@@ -209,9 +211,12 @@ def delete(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.delete.metadata['url'] # type: ignore
@@ -228,8 +233,8 @@ def delete(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -271,12 +276,15 @@ def update(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationGroup"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- _application_group = models.ApplicationGroupPatch(tags=tags, description=description, friendly_name=friendly_name)
- api_version = "2019-12-10-preview"
+ application_group = models.ApplicationGroupPatch(tags=tags, description=description, friendly_name=friendly_name)
+ api_version = "2020-11-10-preview"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.update.metadata['url'] # type: ignore
@@ -294,17 +302,15 @@ def update(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
- if _application_group is not None:
- body_content = self._serialize.body(_application_group, 'ApplicationGroupPatch')
+ if application_group is not None:
+ body_content = self._serialize.body(application_group, 'ApplicationGroupPatch')
else:
body_content = None
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -332,7 +338,7 @@ def list_by_resource_group(
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param filter: OData filter expression. Valid properties for filtering are
- applicationGroupType.
+ applicationGroupType.
:type filter: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either ApplicationGroupList or the result of cls(response)
@@ -340,11 +346,18 @@ def list_by_resource_group(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationGroupList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
if not next_link:
# Construct URL
url = self.list_by_resource_group.metadata['url'] # type: ignore
@@ -359,15 +372,11 @@ def prepare_request(next_link=None):
if filter is not None:
query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
-
- # Construct and send request
- request = self._client.get(url, query_parameters, header_parameters)
+ request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
@@ -403,7 +412,7 @@ def list_by_subscription(
"""List applicationGroups in subscription.
:param filter: OData filter expression. Valid properties for filtering are
- applicationGroupType.
+ applicationGroupType.
:type filter: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either ApplicationGroupList or the result of cls(response)
@@ -411,11 +420,18 @@ def list_by_subscription(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationGroupList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
if not next_link:
# Construct URL
url = self.list_by_subscription.metadata['url'] # type: ignore
@@ -429,15 +445,11 @@ def prepare_request(next_link=None):
if filter is not None:
query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
-
- # Construct and send request
- request = self._client.get(url, query_parameters, header_parameters)
+ request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_application_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_application_operations.py
index aa4c4afcc2b..f512c753ccf 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_application_operations.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_application_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -67,9 +67,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Application"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -87,9 +90,8 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -115,6 +117,9 @@ def create_or_update(
description=None, # type: Optional[str]
friendly_name=None, # type: Optional[str]
file_path=None, # type: Optional[str]
+ msix_package_family_name=None, # type: Optional[str]
+ msix_package_application_id=None, # type: Optional[str]
+ application_type=None, # type: Optional[Union[str, "models.RemoteApplicationType"]]
command_line_arguments=None, # type: Optional[str]
show_in_portal=None, # type: Optional[bool]
icon_path=None, # type: Optional[str]
@@ -140,6 +145,12 @@ def create_or_update(
:type friendly_name: str
:param file_path: Specifies a path for the executable file for the application.
:type file_path: str
+ :param msix_package_family_name: Specifies the package family name for MSIX applications.
+ :type msix_package_family_name: str
+ :param msix_package_application_id: Specifies the package application Id for MSIX applications.
+ :type msix_package_application_id: str
+ :param application_type: Resource Type of Application.
+ :type application_type: str or ~desktop_virtualization_api_client.models.RemoteApplicationType
:param command_line_arguments: Command Line Arguments for Application.
:type command_line_arguments: str
:param show_in_portal: Specifies whether to show the RemoteApp program in the RD Web Access
@@ -155,12 +166,15 @@ def create_or_update(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Application"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- _application = models.Application(description=description, friendly_name=friendly_name, file_path=file_path, command_line_setting=command_line_setting, command_line_arguments=command_line_arguments, show_in_portal=show_in_portal, icon_path=icon_path, icon_index=icon_index)
- api_version = "2019-12-10-preview"
+ application = models.Application(description=description, friendly_name=friendly_name, file_path=file_path, msix_package_family_name=msix_package_family_name, msix_package_application_id=msix_package_application_id, application_type=application_type, command_line_setting=command_line_setting, command_line_arguments=command_line_arguments, show_in_portal=show_in_portal, icon_path=icon_path, icon_index=icon_index)
+ api_version = "2020-11-10-preview"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.create_or_update.metadata['url'] # type: ignore
@@ -179,14 +193,12 @@ def create_or_update(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(_application, 'Application')
+ body_content = self._serialize.body(application, 'Application')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -194,7 +206,6 @@ def create_or_update(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
- deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('Application', pipeline_response)
@@ -229,9 +240,12 @@ def delete(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.delete.metadata['url'] # type: ignore
@@ -249,8 +263,8 @@ def delete(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -278,6 +292,9 @@ def update(
show_in_portal=None, # type: Optional[bool]
icon_path=None, # type: Optional[str]
icon_index=None, # type: Optional[int]
+ msix_package_family_name=None, # type: Optional[str]
+ msix_package_application_id=None, # type: Optional[str]
+ application_type=None, # type: Optional[Union[str, "models.RemoteApplicationType"]]
**kwargs # type: Any
):
# type: (...) -> "models.Application"
@@ -310,18 +327,27 @@ def update(
:type icon_path: str
:param icon_index: Index of the icon.
:type icon_index: int
+ :param msix_package_family_name: Specifies the package family name for MSIX applications.
+ :type msix_package_family_name: str
+ :param msix_package_application_id: Specifies the package application Id for MSIX applications.
+ :type msix_package_application_id: str
+ :param application_type: Resource Type of Application.
+ :type application_type: str or ~desktop_virtualization_api_client.models.RemoteApplicationType
:keyword callable cls: A custom type or function that will be passed the direct response
:return: Application, or the result of cls(response)
:rtype: ~desktop_virtualization_api_client.models.Application
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Application"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- _application = models.ApplicationPatch(tags=tags, description=description, friendly_name=friendly_name, file_path=file_path, command_line_setting=command_line_setting, command_line_arguments=command_line_arguments, show_in_portal=show_in_portal, icon_path=icon_path, icon_index=icon_index)
- api_version = "2019-12-10-preview"
+ application = models.ApplicationPatch(tags=tags, description=description, friendly_name=friendly_name, file_path=file_path, command_line_setting=command_line_setting, command_line_arguments=command_line_arguments, show_in_portal=show_in_portal, icon_path=icon_path, icon_index=icon_index, msix_package_family_name=msix_package_family_name, msix_package_application_id=msix_package_application_id, application_type=application_type)
+ api_version = "2020-11-10-preview"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.update.metadata['url'] # type: ignore
@@ -340,17 +366,15 @@ def update(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
- if _application is not None:
- body_content = self._serialize.body(_application, 'ApplicationPatch')
+ if application is not None:
+ body_content = self._serialize.body(application, 'ApplicationPatch')
else:
body_content = None
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -385,11 +409,18 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
@@ -403,15 +434,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
-
- # Construct and send request
- request = self._client.get(url, query_parameters, header_parameters)
+ request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_desktop_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_desktop_operations.py
index 0d844be1080..9ad40867dbf 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_desktop_operations.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_desktop_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
from azure.mgmt.core.exceptions import ARMErrorFormat
@@ -66,9 +66,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Desktop"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -86,9 +89,8 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -136,12 +138,15 @@ def update(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Desktop"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- _desktop = models.DesktopPatch(tags=tags, description=description, friendly_name=friendly_name)
- api_version = "2019-12-10-preview"
+ desktop = models.DesktopPatch(tags=tags, description=description, friendly_name=friendly_name)
+ api_version = "2020-11-10-preview"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.update.metadata['url'] # type: ignore
@@ -160,17 +165,15 @@ def update(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
- if _desktop is not None:
- body_content = self._serialize.body(_desktop, 'DesktopPatch')
+ if desktop is not None:
+ body_content = self._serialize.body(desktop, 'DesktopPatch')
else:
body_content = None
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -205,9 +208,12 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DesktopList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.list.metadata['url'] # type: ignore
@@ -224,9 +230,8 @@ def list(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_host_pool_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_host_pool_operations.py
index 855d0c0470d..5949692e013 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_host_pool_operations.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_host_pool_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -64,9 +64,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.HostPool"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -83,9 +86,8 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -108,11 +110,12 @@ def create_or_update(
host_pool_name, # type: str
location, # type: str
host_pool_type, # type: Union[str, "models.HostPoolType"]
- personal_desktop_assignment_type, # type: Union[str, "models.PersonalDesktopAssignmentType"]
load_balancer_type, # type: Union[str, "models.LoadBalancerType"]
+ preferred_app_group_type, # type: Union[str, "models.PreferredAppGroupType"]
tags=None, # type: Optional[Dict[str, str]]
friendly_name=None, # type: Optional[str]
description=None, # type: Optional[str]
+ personal_desktop_assignment_type=None, # type: Optional[Union[str, "models.PersonalDesktopAssignmentType"]]
custom_rdp_property=None, # type: Optional[str]
max_session_limit=None, # type: Optional[int]
ring=None, # type: Optional[int]
@@ -120,6 +123,11 @@ def create_or_update(
registration_info=None, # type: Optional["models.RegistrationInfo"]
vm_template=None, # type: Optional[str]
sso_context=None, # type: Optional[str]
+ ssoadfs_authority=None, # type: Optional[str]
+ sso_client_id=None, # type: Optional[str]
+ sso_client_secret_key_vault_path=None, # type: Optional[str]
+ sso_secret_type=None, # type: Optional[Union[str, "models.SsoSecretType"]]
+ start_vm_on_connect=None, # type: Optional[bool]
**kwargs # type: Any
):
# type: (...) -> "models.HostPool"
@@ -133,16 +141,19 @@ def create_or_update(
:type location: str
:param host_pool_type: HostPool type for desktop.
:type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType
- :param personal_desktop_assignment_type: PersonalDesktopAssignment type for HostPool.
- :type personal_desktop_assignment_type: str or ~desktop_virtualization_api_client.models.PersonalDesktopAssignmentType
:param load_balancer_type: The type of the load balancer.
:type load_balancer_type: str or ~desktop_virtualization_api_client.models.LoadBalancerType
+ :param preferred_app_group_type: The type of preferred application group type, default to
+ Desktop Application Group.
+ :type preferred_app_group_type: str or ~desktop_virtualization_api_client.models.PreferredAppGroupType
:param tags: Resource tags.
:type tags: dict[str, str]
:param friendly_name: Friendly name of HostPool.
:type friendly_name: str
:param description: Description of HostPool.
:type description: str
+ :param personal_desktop_assignment_type: PersonalDesktopAssignment type for HostPool.
+ :type personal_desktop_assignment_type: str or ~desktop_virtualization_api_client.models.PersonalDesktopAssignmentType
:param custom_rdp_property: Custom rdp property of HostPool.
:type custom_rdp_property: str
:param max_session_limit: The max session limit of HostPool.
@@ -157,18 +168,33 @@ def create_or_update(
:type vm_template: str
:param sso_context: Path to keyvault containing ssoContext secret.
:type sso_context: str
+ :param ssoadfs_authority: URL to customer ADFS server for signing WVD SSO certificates.
+ :type ssoadfs_authority: str
+ :param sso_client_id: ClientId for the registered Relying Party used to issue WVD SSO
+ certificates.
+ :type sso_client_id: str
+ :param sso_client_secret_key_vault_path: Path to Azure KeyVault storing the secret used for
+ communication to ADFS.
+ :type sso_client_secret_key_vault_path: str
+ :param sso_secret_type: The type of single sign on Secret Type.
+ :type sso_secret_type: str or ~desktop_virtualization_api_client.models.SsoSecretType
+ :param start_vm_on_connect: The flag to turn on/off StartVMOnConnect feature.
+ :type start_vm_on_connect: bool
:keyword callable cls: A custom type or function that will be passed the direct response
:return: HostPool, or the result of cls(response)
:rtype: ~desktop_virtualization_api_client.models.HostPool
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.HostPool"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- _host_pool = models.HostPool(tags=tags, location=location, friendly_name=friendly_name, description=description, host_pool_type=host_pool_type, personal_desktop_assignment_type=personal_desktop_assignment_type, custom_rdp_property=custom_rdp_property, max_session_limit=max_session_limit, load_balancer_type=load_balancer_type, ring=ring, validation_environment=validation_environment, registration_info=registration_info, vm_template=vm_template, sso_context=sso_context)
- api_version = "2019-12-10-preview"
+ host_pool = models.HostPool(tags=tags, location=location, friendly_name=friendly_name, description=description, host_pool_type=host_pool_type, personal_desktop_assignment_type=personal_desktop_assignment_type, custom_rdp_property=custom_rdp_property, max_session_limit=max_session_limit, load_balancer_type=load_balancer_type, ring=ring, validation_environment=validation_environment, registration_info=registration_info, vm_template=vm_template, sso_context=sso_context, ssoadfs_authority=ssoadfs_authority, sso_client_id=sso_client_id, sso_client_secret_key_vault_path=sso_client_secret_key_vault_path, sso_secret_type=sso_secret_type, preferred_app_group_type=preferred_app_group_type, start_vm_on_connect=start_vm_on_connect)
+ api_version = "2020-11-10-preview"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.create_or_update.metadata['url'] # type: ignore
@@ -186,14 +212,12 @@ def create_or_update(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(_host_pool, 'HostPool')
+ body_content = self._serialize.body(host_pool, 'HostPool')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -201,7 +225,6 @@ def create_or_update(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
- deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('HostPool', pipeline_response)
@@ -236,9 +259,12 @@ def delete(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.delete.metadata['url'] # type: ignore
@@ -257,8 +283,8 @@ def delete(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -286,7 +312,14 @@ def update(
ring=None, # type: Optional[int]
validation_environment=None, # type: Optional[bool]
registration_info=None, # type: Optional["models.RegistrationInfoPatch"]
+ vm_template=None, # type: Optional[str]
sso_context=None, # type: Optional[str]
+ ssoadfs_authority=None, # type: Optional[str]
+ sso_client_id=None, # type: Optional[str]
+ sso_client_secret_key_vault_path=None, # type: Optional[str]
+ sso_secret_type=None, # type: Optional[Union[str, "models.SsoSecretType"]]
+ preferred_app_group_type=None, # type: Optional[Union[str, "models.PreferredAppGroupType"]]
+ start_vm_on_connect=None, # type: Optional[bool]
**kwargs # type: Any
):
# type: (...) -> "models.HostPool"
@@ -316,20 +349,40 @@ def update(
:type validation_environment: bool
:param registration_info: The registration info of HostPool.
:type registration_info: ~desktop_virtualization_api_client.models.RegistrationInfoPatch
+ :param vm_template: VM template for sessionhosts configuration within hostpool.
+ :type vm_template: str
:param sso_context: Path to keyvault containing ssoContext secret.
:type sso_context: str
+ :param ssoadfs_authority: URL to customer ADFS server for signing WVD SSO certificates.
+ :type ssoadfs_authority: str
+ :param sso_client_id: ClientId for the registered Relying Party used to issue WVD SSO
+ certificates.
+ :type sso_client_id: str
+ :param sso_client_secret_key_vault_path: Path to Azure KeyVault storing the secret used for
+ communication to ADFS.
+ :type sso_client_secret_key_vault_path: str
+ :param sso_secret_type: The type of single sign on Secret Type.
+ :type sso_secret_type: str or ~desktop_virtualization_api_client.models.SsoSecretType
+ :param preferred_app_group_type: The type of preferred application group type, default to
+ Desktop Application Group.
+ :type preferred_app_group_type: str or ~desktop_virtualization_api_client.models.PreferredAppGroupType
+ :param start_vm_on_connect: The flag to turn on/off StartVMOnConnect feature.
+ :type start_vm_on_connect: bool
:keyword callable cls: A custom type or function that will be passed the direct response
:return: HostPool, or the result of cls(response)
:rtype: ~desktop_virtualization_api_client.models.HostPool
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.HostPool"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- _host_pool = models.HostPoolPatch(tags=tags, friendly_name=friendly_name, description=description, custom_rdp_property=custom_rdp_property, max_session_limit=max_session_limit, personal_desktop_assignment_type=personal_desktop_assignment_type, load_balancer_type=load_balancer_type, ring=ring, validation_environment=validation_environment, registration_info=registration_info, sso_context=sso_context)
- api_version = "2019-12-10-preview"
+ host_pool = models.HostPoolPatch(tags=tags, friendly_name=friendly_name, description=description, custom_rdp_property=custom_rdp_property, max_session_limit=max_session_limit, personal_desktop_assignment_type=personal_desktop_assignment_type, load_balancer_type=load_balancer_type, ring=ring, validation_environment=validation_environment, registration_info=registration_info, vm_template=vm_template, sso_context=sso_context, ssoadfs_authority=ssoadfs_authority, sso_client_id=sso_client_id, sso_client_secret_key_vault_path=sso_client_secret_key_vault_path, sso_secret_type=sso_secret_type, preferred_app_group_type=preferred_app_group_type, start_vm_on_connect=start_vm_on_connect)
+ api_version = "2020-11-10-preview"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.update.metadata['url'] # type: ignore
@@ -347,17 +400,15 @@ def update(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
- if _host_pool is not None:
- body_content = self._serialize.body(_host_pool, 'HostPoolPatch')
+ if host_pool is not None:
+ body_content = self._serialize.body(host_pool, 'HostPoolPatch')
else:
body_content = None
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -389,11 +440,18 @@ def list_by_resource_group(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.HostPoolList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
if not next_link:
# Construct URL
url = self.list_by_resource_group.metadata['url'] # type: ignore
@@ -406,15 +464,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
-
- # Construct and send request
- request = self._client.get(url, query_parameters, header_parameters)
+ request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
@@ -454,11 +508,18 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.HostPoolList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
@@ -470,15 +531,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
-
- # Construct and send request
- request = self._client.get(url, query_parameters, header_parameters)
+ request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_msix_image_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_msix_image_operations.py
new file mode 100644
index 00000000000..2ececca9908
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_msix_image_operations.py
@@ -0,0 +1,133 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import TYPE_CHECKING
+import warnings
+
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.paging import ItemPaged
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import HttpRequest, HttpResponse
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from .. import models
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
+
+ T = TypeVar('T')
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+class MsixImageOperations(object):
+ """MsixImageOperations operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ def expand(
+ self,
+ resource_group_name, # type: str
+ host_pool_name, # type: str
+ uri=None, # type: Optional[str]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> Iterable["models.ExpandMsixImageList"]
+ """Expands and Lists MSIX packages in an Image, given the Image Path.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param uri: URI to Image.
+ :type uri: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either ExpandMsixImageList or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.ExpandMsixImageList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ExpandMsixImageList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ msix_image_uri = models.MsixImageUri(uri=uri)
+ api_version = "2020-11-10-preview"
+ content_type = "application/json"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.expand.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(msix_image_uri, 'MsixImageUri')
+ body_content_kwargs['content'] = body_content
+ request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(msix_image_uri, 'MsixImageUri')
+ body_content_kwargs['content'] = body_content
+ request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs)
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize('ExpandMsixImageList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ expand.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/expandMsixImage'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_msix_package_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_msix_package_operations.py
new file mode 100644
index 00000000000..f7ef7cc3004
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_msix_package_operations.py
@@ -0,0 +1,439 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+import datetime
+from typing import TYPE_CHECKING
+import warnings
+
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.paging import ItemPaged
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import HttpRequest, HttpResponse
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from .. import models
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union
+
+ T = TypeVar('T')
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+class MsixPackageOperations(object):
+ """MsixPackageOperations operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ def get(
+ self,
+ resource_group_name, # type: str
+ host_pool_name, # type: str
+ msix_package_full_name, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.MsixPackage"
+ """Get a msixpackage.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param msix_package_full_name: The version specific package full name of the MSIX package
+ within specified hostpool.
+ :type msix_package_full_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: MsixPackage, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.MsixPackage
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.MsixPackage"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('MsixPackage', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore
+
+ def create_or_update(
+ self,
+ resource_group_name, # type: str
+ host_pool_name, # type: str
+ msix_package_full_name, # type: str
+ image_path=None, # type: Optional[str]
+ package_name=None, # type: Optional[str]
+ package_family_name=None, # type: Optional[str]
+ display_name=None, # type: Optional[str]
+ package_relative_path=None, # type: Optional[str]
+ is_regular_registration=None, # type: Optional[bool]
+ is_active=None, # type: Optional[bool]
+ package_dependencies=None, # type: Optional[List["models.MsixPackageDependencies"]]
+ version=None, # type: Optional[str]
+ last_updated=None, # type: Optional[datetime.datetime]
+ package_applications=None, # type: Optional[List["models.MsixPackageApplications"]]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.MsixPackage"
+ """Create or update a MSIX package.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param msix_package_full_name: The version specific package full name of the MSIX package
+ within specified hostpool.
+ :type msix_package_full_name: str
+ :param image_path: VHD/CIM image path on Network Share.
+ :type image_path: str
+ :param package_name: Package Name from appxmanifest.xml.
+ :type package_name: str
+ :param package_family_name: Package Family Name from appxmanifest.xml. Contains Package Name
+ and Publisher name.
+ :type package_family_name: str
+ :param display_name: User friendly Name to be displayed in the portal.
+ :type display_name: str
+ :param package_relative_path: Relative Path to the package inside the image.
+ :type package_relative_path: str
+ :param is_regular_registration: Specifies how to register Package in feed.
+ :type is_regular_registration: bool
+ :param is_active: Make this version of the package the active one across the hostpool.
+ :type is_active: bool
+ :param package_dependencies: List of package dependencies.
+ :type package_dependencies: list[~desktop_virtualization_api_client.models.MsixPackageDependencies]
+ :param version: Package Version found in the appxmanifest.xml.
+ :type version: str
+ :param last_updated: Date Package was last updated, found in the appxmanifest.xml.
+ :type last_updated: ~datetime.datetime
+ :param package_applications: List of package applications.
+ :type package_applications: list[~desktop_virtualization_api_client.models.MsixPackageApplications]
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: MsixPackage, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.MsixPackage
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.MsixPackage"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ msix_package = models.MsixPackage(image_path=image_path, package_name=package_name, package_family_name=package_family_name, display_name=display_name, package_relative_path=package_relative_path, is_regular_registration=is_regular_registration, is_active=is_active, package_dependencies=package_dependencies, version=version, last_updated=last_updated, package_applications=package_applications)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.create_or_update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(msix_package, 'MsixPackage')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('MsixPackage', pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('MsixPackage', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore
+
+ def delete(
+ self,
+ resource_group_name, # type: str
+ host_pool_name, # type: str
+ msix_package_full_name, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ """Remove an MSIX Package.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param msix_package_full_name: The version specific package full name of the MSIX package
+ within specified hostpool.
+ :type msix_package_full_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.delete.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore
+
+ def update(
+ self,
+ resource_group_name, # type: str
+ host_pool_name, # type: str
+ msix_package_full_name, # type: str
+ is_active=None, # type: Optional[bool]
+ is_regular_registration=None, # type: Optional[bool]
+ display_name=None, # type: Optional[str]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.MsixPackage"
+ """Update an MSIX Package.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :param msix_package_full_name: The version specific package full name of the MSIX package
+ within specified hostpool.
+ :type msix_package_full_name: str
+ :param is_active: Set a version of the package to be active across hostpool.
+ :type is_active: bool
+ :param is_regular_registration: Set Registration mode. Regular or Delayed.
+ :type is_regular_registration: bool
+ :param display_name: Display name for MSIX Package.
+ :type display_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: MsixPackage, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.MsixPackage
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.MsixPackage"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ msix_package = models.MsixPackagePatch(is_active=is_active, is_regular_registration=is_regular_registration, display_name=display_name)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ if msix_package is not None:
+ body_content = self._serialize.body(msix_package, 'MsixPackagePatch')
+ else:
+ body_content = None
+ body_content_kwargs['content'] = body_content
+ request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('MsixPackage', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore
+
+ def list(
+ self,
+ resource_group_name, # type: str
+ host_pool_name, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> Iterable["models.MsixPackageList"]
+ """List MSIX packages in hostpool.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either MsixPackageList or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.MsixPackageList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.MsixPackageList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize('MsixPackageList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_operation_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_operation_operations.py
index 7fbcd6b267d..cd1d20e7606 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_operation_operations.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_operation_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
from azure.mgmt.core.exceptions import ARMErrorFormat
@@ -57,9 +57,12 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceProviderOperationList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.list.metadata['url'] # type: ignore
@@ -70,9 +73,8 @@ def list(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_scaling_plan_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_scaling_plan_operations.py
new file mode 100644
index 00000000000..352a8edf658
--- /dev/null
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_scaling_plan_operations.py
@@ -0,0 +1,564 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import TYPE_CHECKING
+import warnings
+
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.paging import ItemPaged
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import HttpRequest, HttpResponse
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from .. import models
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union
+
+ T = TypeVar('T')
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+class ScalingPlanOperations(object):
+ """ScalingPlanOperations operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~desktop_virtualization_api_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ def get(
+ self,
+ resource_group_name, # type: str
+ scaling_plan_name, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.ScalingPlan"
+ """Get a scaling plan.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param scaling_plan_name: The name of the scaling plan.
+ :type scaling_plan_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ScalingPlan, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.ScalingPlan
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ScalingPlan"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ScalingPlan', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore
+
+ def create(
+ self,
+ resource_group_name, # type: str
+ scaling_plan_name, # type: str
+ location, # type: str
+ tags=None, # type: Optional[Dict[str, str]]
+ description=None, # type: Optional[str]
+ friendly_name=None, # type: Optional[str]
+ time_zone=None, # type: Optional[str]
+ host_pool_type=None, # type: Optional[Union[str, "models.HostPoolType"]]
+ exclusion_tag=None, # type: Optional[str]
+ schedules=None, # type: Optional[List["models.ScalingSchedule"]]
+ host_pool_references=None, # type: Optional[List["models.ScalingHostPoolReference"]]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.ScalingPlan"
+ """Create or update a scaling plan.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param scaling_plan_name: The name of the scaling plan.
+ :type scaling_plan_name: str
+ :param location: The geo-location where the resource lives.
+ :type location: str
+ :param tags: Resource tags.
+ :type tags: dict[str, str]
+ :param description: Description of scaling plan.
+ :type description: str
+ :param friendly_name: User friendly name of scaling plan.
+ :type friendly_name: str
+ :param time_zone: Timezone of the scaling plan.
+ :type time_zone: str
+ :param host_pool_type: HostPool type for scaling plan.
+ :type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType
+ :param exclusion_tag: Exclusion tag for scaling plan.
+ :type exclusion_tag: str
+ :param schedules: List of ScalingSchedule definitions.
+ :type schedules: list[~desktop_virtualization_api_client.models.ScalingSchedule]
+ :param host_pool_references: List of ScalingHostPoolReference definitions.
+ :type host_pool_references: list[~desktop_virtualization_api_client.models.ScalingHostPoolReference]
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ScalingPlan, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.ScalingPlan
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ScalingPlan"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ scaling_plan = models.ScalingPlan(tags=tags, location=location, description=description, friendly_name=friendly_name, time_zone=time_zone, host_pool_type=host_pool_type, exclusion_tag=exclusion_tag, schedules=schedules, host_pool_references=host_pool_references)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.create.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(scaling_plan, 'ScalingPlan')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('ScalingPlan', pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('ScalingPlan', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore
+
+ def delete(
+ self,
+ resource_group_name, # type: str
+ scaling_plan_name, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ """Remove a scaling plan.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param scaling_plan_name: The name of the scaling plan.
+ :type scaling_plan_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.delete.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore
+
+ def update(
+ self,
+ resource_group_name, # type: str
+ scaling_plan_name, # type: str
+ tags=None, # type: Optional[Dict[str, str]]
+ description=None, # type: Optional[str]
+ friendly_name=None, # type: Optional[str]
+ time_zone=None, # type: Optional[str]
+ host_pool_type=None, # type: Optional[Union[str, "models.HostPoolType"]]
+ exclusion_tag=None, # type: Optional[str]
+ schedules=None, # type: Optional[List["models.ScalingSchedule"]]
+ host_pool_references=None, # type: Optional[List["models.ScalingHostPoolReference"]]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.ScalingPlan"
+ """Update a scaling plan.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param scaling_plan_name: The name of the scaling plan.
+ :type scaling_plan_name: str
+ :param tags: tags to be updated.
+ :type tags: dict[str, str]
+ :param description: Description of scaling plan.
+ :type description: str
+ :param friendly_name: User friendly name of scaling plan.
+ :type friendly_name: str
+ :param time_zone: Timezone of the scaling plan.
+ :type time_zone: str
+ :param host_pool_type: HostPool type for scaling plan.
+ :type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType
+ :param exclusion_tag: Exclusion tag for scaling plan.
+ :type exclusion_tag: str
+ :param schedules: List of ScalingSchedule definitions.
+ :type schedules: list[~desktop_virtualization_api_client.models.ScalingSchedule]
+ :param host_pool_references: List of ScalingHostPoolReference definitions.
+ :type host_pool_references: list[~desktop_virtualization_api_client.models.ScalingHostPoolReference]
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ScalingPlan, or the result of cls(response)
+ :rtype: ~desktop_virtualization_api_client.models.ScalingPlan
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ScalingPlan"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ scaling_plan = models.ScalingPlanPatch(tags=tags, description=description, friendly_name=friendly_name, time_zone=time_zone, host_pool_type=host_pool_type, exclusion_tag=exclusion_tag, schedules=schedules, host_pool_references=host_pool_references)
+ api_version = "2020-11-10-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ if scaling_plan is not None:
+ body_content = self._serialize.body(scaling_plan, 'ScalingPlanPatch')
+ else:
+ body_content = None
+ body_content_kwargs['content'] = body_content
+ request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ScalingPlan', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore
+
+ def list_by_resource_group(
+ self,
+ resource_group_name, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> Iterable["models.ScalingPlanList"]
+ """List scaling plans.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either ScalingPlanList or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.ScalingPlanList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ScalingPlanList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize('ScalingPlanList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans'} # type: ignore
+
+ def list_by_subscription(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> Iterable["models.ScalingPlanList"]
+ """List scaling plans in subscription.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either ScalingPlanList or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.ScalingPlanList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ScalingPlanList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_subscription.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize('ScalingPlanList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/scalingPlans'} # type: ignore
+
+ def list_by_host_pool(
+ self,
+ resource_group_name, # type: str
+ host_pool_name, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> Iterable["models.ScalingPlanList"]
+ """List scaling plan associated with hostpool.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param host_pool_name: The name of the host pool within the specified resource group.
+ :type host_pool_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either ScalingPlanList or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.ScalingPlanList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.ScalingPlanList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_host_pool.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=24, min_length=3),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize('ScalingPlanList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ list_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/scalingPlans'} # type: ignore
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_session_host_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_session_host_operations.py
index 4faae4be2b6..e67afc1dce8 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_session_host_operations.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_session_host_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -67,9 +67,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.SessionHost"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -87,9 +90,8 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -131,9 +133,12 @@ def delete(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.delete.metadata['url'] # type: ignore
@@ -153,8 +158,8 @@ def delete(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -196,12 +201,15 @@ def update(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.SessionHost"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- _session_host = models.SessionHostPatch(allow_new_session=allow_new_session, assigned_user=assigned_user)
- api_version = "2019-12-10-preview"
+ session_host = models.SessionHostPatch(allow_new_session=allow_new_session, assigned_user=assigned_user)
+ api_version = "2020-11-10-preview"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.update.metadata['url'] # type: ignore
@@ -220,17 +228,15 @@ def update(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
- if _session_host is not None:
- body_content = self._serialize.body(_session_host, 'SessionHostPatch')
+ if session_host is not None:
+ body_content = self._serialize.body(session_host, 'SessionHostPatch')
else:
body_content = None
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -265,11 +271,18 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.SessionHostList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
@@ -283,15 +296,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
-
- # Construct and send request
- request = self._client.get(url, query_parameters, header_parameters)
+ request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_start_menu_item_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_start_menu_item_operations.py
index 815e7e5139e..cec1dc4f4a9 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_start_menu_item_operations.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_start_menu_item_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -64,11 +64,18 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.StartMenuItemList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
@@ -82,15 +89,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
-
- # Construct and send request
- request = self._client.get(url, query_parameters, header_parameters)
+ request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_user_session_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_user_session_operations.py
index 47cebe6695e..ec37712e516 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_user_session_operations.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_user_session_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -60,7 +60,7 @@ def list_by_host_pool(
:param host_pool_name: The name of the host pool within the specified resource group.
:type host_pool_name: str
:param filter: OData filter expression. Valid properties for filtering are userprincipalname
- and sessionstate.
+ and sessionstate.
:type filter: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either UserSessionList or the result of cls(response)
@@ -68,11 +68,18 @@ def list_by_host_pool(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.UserSessionList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
if not next_link:
# Construct URL
url = self.list_by_host_pool.metadata['url'] # type: ignore
@@ -88,15 +95,11 @@ def prepare_request(next_link=None):
if filter is not None:
query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
-
- # Construct and send request
- request = self._client.get(url, query_parameters, header_parameters)
+ request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
@@ -148,9 +151,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.UserSession"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -169,9 +175,8 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -216,9 +221,12 @@ def delete(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.delete.metadata['url'] # type: ignore
@@ -239,8 +247,8 @@ def delete(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -276,11 +284,18 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.UserSessionList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
@@ -295,15 +310,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
-
- # Construct and send request
- request = self._client.get(url, query_parameters, header_parameters)
+ request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
@@ -355,9 +366,12 @@ def disconnect(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.disconnect.metadata['url'] # type: ignore
@@ -376,8 +390,8 @@ def disconnect(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -422,12 +436,15 @@ def send_message(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- _send_message = models.SendMessage(message_title=message_title, message_body=message_body)
- api_version = "2019-12-10-preview"
+ send_message = models.SendMessage(message_title=message_title, message_body=message_body)
+ api_version = "2020-11-10-preview"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.send_message.metadata['url'] # type: ignore
@@ -447,16 +464,15 @@ def send_message(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
- if _send_message is not None:
- body_content = self._serialize.body(_send_message, 'SendMessage')
+ if send_message is not None:
+ body_content = self._serialize.body(send_message, 'SendMessage')
else:
body_content = None
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
diff --git a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_workspace_operations.py b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_workspace_operations.py
index 821e5c5e7d4..de176d7aa56 100644
--- a/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_workspace_operations.py
+++ b/src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/operations/_workspace_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -64,9 +64,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Workspace"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -83,9 +86,8 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -136,12 +138,15 @@ def create_or_update(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Workspace"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- _workspace = models.Workspace(tags=tags, location=location, description=description, friendly_name=friendly_name, application_group_references=application_group_references)
- api_version = "2019-12-10-preview"
+ workspace = models.Workspace(tags=tags, location=location, description=description, friendly_name=friendly_name, application_group_references=application_group_references)
+ api_version = "2020-11-10-preview"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.create_or_update.metadata['url'] # type: ignore
@@ -159,14 +164,12 @@ def create_or_update(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(_workspace, 'Workspace')
+ body_content = self._serialize.body(workspace, 'Workspace')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -174,7 +177,6 @@ def create_or_update(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
- deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('Workspace', pipeline_response)
@@ -206,9 +208,12 @@ def delete(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
# Construct URL
url = self.delete.metadata['url'] # type: ignore
@@ -225,8 +230,8 @@ def delete(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -271,12 +276,15 @@ def update(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Workspace"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- _workspace = models.WorkspacePatch(tags=tags, description=description, friendly_name=friendly_name, application_group_references=application_group_references)
- api_version = "2019-12-10-preview"
+ workspace = models.WorkspacePatch(tags=tags, description=description, friendly_name=friendly_name, application_group_references=application_group_references)
+ api_version = "2020-11-10-preview"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.update.metadata['url'] # type: ignore
@@ -294,17 +302,15 @@ def update(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
- # Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
- if _workspace is not None:
- body_content = self._serialize.body(_workspace, 'WorkspacePatch')
+ if workspace is not None:
+ body_content = self._serialize.body(workspace, 'WorkspacePatch')
else:
body_content = None
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -336,11 +342,18 @@ def list_by_resource_group(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.WorkspaceList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
if not next_link:
# Construct URL
url = self.list_by_resource_group.metadata['url'] # type: ignore
@@ -353,15 +366,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
-
- # Construct and send request
- request = self._client.get(url, query_parameters, header_parameters)
+ request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
@@ -401,11 +410,18 @@ def list_by_subscription(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.WorkspaceList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2019-12-10-preview"
+ api_version = "2020-11-10-preview"
+ accept = "application/json"
def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
if not next_link:
# Construct URL
url = self.list_by_subscription.metadata['url'] # type: ignore
@@ -417,15 +433,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
-
- # Construct and send request
- request = self._client.get(url, query_parameters, header_parameters)
+ request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
diff --git a/src/desktopvirtualization/report.md b/src/desktopvirtualization/report.md
index d535730ab5d..dc8cf03f027 100644
--- a/src/desktopvirtualization/report.md
+++ b/src/desktopvirtualization/report.md
@@ -1,164 +1,579 @@
# Azure CLI Module Creation Report
-### desktopvirtualization applicationgroup create
-
-create a desktopvirtualization applicationgroup.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--application-group-name**|string|The name of the application group|application_group_name|
-|**--location**|string|The geo-location where the resource lives|location|
-|**--host-pool-arm-path**|string|HostPool arm path of ApplicationGroup.|host_pool_arm_path|
-|**--application-group-type**|choice|Resource Type of ApplicationGroup.|application_group_type|
-|**--tags**|dictionary|Resource tags.|tags|
-|**--description**|string|Description of ApplicationGroup.|description|
-|**--friendly-name**|string|Friendly name of ApplicationGroup.|friendly_name|
-### desktopvirtualization applicationgroup delete
-
-delete a desktopvirtualization applicationgroup.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--application-group-name**|string|The name of the application group|application_group_name|
-### desktopvirtualization applicationgroup list
-
-list a desktopvirtualization applicationgroup.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--filter**|string|OData filter expression. Valid properties for filtering are applicationGroupType.|filter|
-### desktopvirtualization applicationgroup show
-
-show a desktopvirtualization applicationgroup.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--application-group-name**|string|The name of the application group|application_group_name|
-### desktopvirtualization applicationgroup update
-
-update a desktopvirtualization applicationgroup.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--application-group-name**|string|The name of the application group|application_group_name|
-|**--tags**|dictionary|tags to be updated|tags|
-|**--description**|string|Description of ApplicationGroup.|description|
-|**--friendly-name**|string|Friendly name of ApplicationGroup.|friendly_name|
-### desktopvirtualization hostpool create
-
-create a desktopvirtualization hostpool.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|
-|**--location**|string|The geo-location where the resource lives|location|
-|**--host-pool-type**|choice|HostPool type for desktop.|host_pool_type|
-|**--personal-desktop-assignment-type**|choice|PersonalDesktopAssignment type for HostPool.|personal_desktop_assignment_type|
-|**--load-balancer-type**|choice|The type of the load balancer.|load_balancer_type|
-|**--tags**|dictionary|Resource tags.|tags|
-|**--friendly-name**|string|Friendly name of HostPool.|friendly_name|
-|**--description**|string|Description of HostPool.|description|
-|**--custom-rdp-property**|string|Custom rdp property of HostPool.|custom_rdp_property|
-|**--max-session-limit**|integer|The max session limit of HostPool.|max_session_limit|
-|**--ring**|integer|The ring number of HostPool.|ring|
-|**--validation-environment**|boolean|Is validation environment.|validation_environment|
-|**--registration-info**|object|The registration info of HostPool.|registration_info|
-|**--vm-template**|string|VM template for sessionhosts configuration within hostpool.|vm_template|
-|**--sso-context**|string|Path to keyvault containing ssoContext secret.|sso_context|
-### desktopvirtualization hostpool delete
-
-delete a desktopvirtualization hostpool.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|
-|**--force**|boolean|Force flag to delete sessionHost.|force|
-### desktopvirtualization hostpool list
-
-list a desktopvirtualization hostpool.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-### desktopvirtualization hostpool show
-
-show a desktopvirtualization hostpool.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|
-### desktopvirtualization hostpool update
-
-update a desktopvirtualization hostpool.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|
-|**--tags**|dictionary|tags to be updated|tags|
-|**--friendly-name**|string|Friendly name of HostPool.|friendly_name|
-|**--description**|string|Description of HostPool.|description|
-|**--custom-rdp-property**|string|Custom rdp property of HostPool.|custom_rdp_property|
-|**--max-session-limit**|integer|The max session limit of HostPool.|max_session_limit|
-|**--personal-desktop-assignment-type**|choice|PersonalDesktopAssignment type for HostPool.|personal_desktop_assignment_type|
-|**--load-balancer-type**|choice|The type of the load balancer.|load_balancer_type|
-|**--ring**|integer|The ring number of HostPool.|ring|
-|**--validation-environment**|boolean|Is validation environment.|validation_environment|
-|**--registration-info**|object|The registration info of HostPool.|registration_info|
-|**--sso-context**|string|Path to keyvault containing ssoContext secret.|sso_context|
-### desktopvirtualization workspace create
-
-create a desktopvirtualization workspace.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--workspace-name**|string|The name of the workspace|workspace_name|
-|**--location**|string|The geo-location where the resource lives|location|
-|**--tags**|dictionary|Resource tags.|tags|
-|**--description**|string|Description of Workspace.|description|
-|**--friendly-name**|string|Friendly name of Workspace.|friendly_name|
-|**--application-group-references**|array|List of applicationGroup resource Ids.|application_group_references|
-### desktopvirtualization workspace delete
-
-delete a desktopvirtualization workspace.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--workspace-name**|string|The name of the workspace|workspace_name|
-### desktopvirtualization workspace list
-
-list a desktopvirtualization workspace.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-### desktopvirtualization workspace show
-
-show a desktopvirtualization workspace.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--workspace-name**|string|The name of the workspace|workspace_name|
-### desktopvirtualization workspace update
-
-update a desktopvirtualization workspace.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|
-|**--workspace-name**|string|The name of the workspace|workspace_name|
-|**--tags**|dictionary|tags to be updated|tags|
-|**--description**|string|Description of Workspace.|description|
-|**--friendly-name**|string|Friendly name of Workspace.|friendly_name|
-|**--application-group-references**|array|List of applicationGroup links.|application_group_references|
\ No newline at end of file
+## EXTENSION
+|CLI Extension|Command Groups|
+|---------|------------|
+|az desktopvirtualization|[groups](#CommandGroups)
+
+## GROUPS
+### Command groups in `az desktopvirtualization` extension
+|CLI Command Group|Group Swagger name|Commands|
+|---------|------------|--------|
+|az desktopvirtualization workspace|Workspaces|[commands](#CommandsInWorkspaces)|
+|az desktopvirtualization scaling-plan|ScalingPlans|[commands](#CommandsInScalingPlans)|
+|az desktopvirtualization applicationgroup|ApplicationGroups|[commands](#CommandsInApplicationGroups)|
+|az desktopvirtualization hostpool|HostPools|[commands](#CommandsInHostPools)|
+|az desktopvirtualization msix-package|MSIXPackages|[commands](#CommandsInMSIXPackages)|
+|az desktopvirtualization msix-image|MsixImages|[commands](#CommandsInMsixImages)|
+
+## COMMANDS
+### Commands in `az desktopvirtualization applicationgroup` group
+|CLI Command|Operation Swagger name|Parameters|Examples|
+|---------|------------|--------|-----------|
+|[az desktopvirtualization applicationgroup list](#ApplicationGroupsListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersApplicationGroupsListByResourceGroup)|[Example](#ExamplesApplicationGroupsListByResourceGroup)|
+|[az desktopvirtualization applicationgroup list](#ApplicationGroupsListBySubscription)|ListBySubscription|[Parameters](#ParametersApplicationGroupsListBySubscription)|[Example](#ExamplesApplicationGroupsListBySubscription)|
+|[az desktopvirtualization applicationgroup show](#ApplicationGroupsGet)|Get|[Parameters](#ParametersApplicationGroupsGet)|[Example](#ExamplesApplicationGroupsGet)|
+|[az desktopvirtualization applicationgroup create](#ApplicationGroupsCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersApplicationGroupsCreateOrUpdate#Create)|[Example](#ExamplesApplicationGroupsCreateOrUpdate#Create)|
+|[az desktopvirtualization applicationgroup update](#ApplicationGroupsUpdate)|Update|[Parameters](#ParametersApplicationGroupsUpdate)|[Example](#ExamplesApplicationGroupsUpdate)|
+|[az desktopvirtualization applicationgroup delete](#ApplicationGroupsDelete)|Delete|[Parameters](#ParametersApplicationGroupsDelete)|[Example](#ExamplesApplicationGroupsDelete)|
+
+### Commands in `az desktopvirtualization hostpool` group
+|CLI Command|Operation Swagger name|Parameters|Examples|
+|---------|------------|--------|-----------|
+|[az desktopvirtualization hostpool list](#HostPoolsListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersHostPoolsListByResourceGroup)|[Example](#ExamplesHostPoolsListByResourceGroup)|
+|[az desktopvirtualization hostpool list](#HostPoolsList)|List|[Parameters](#ParametersHostPoolsList)|[Example](#ExamplesHostPoolsList)|
+|[az desktopvirtualization hostpool show](#HostPoolsGet)|Get|[Parameters](#ParametersHostPoolsGet)|[Example](#ExamplesHostPoolsGet)|
+|[az desktopvirtualization hostpool create](#HostPoolsCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersHostPoolsCreateOrUpdate#Create)|[Example](#ExamplesHostPoolsCreateOrUpdate#Create)|
+|[az desktopvirtualization hostpool update](#HostPoolsUpdate)|Update|[Parameters](#ParametersHostPoolsUpdate)|[Example](#ExamplesHostPoolsUpdate)|
+|[az desktopvirtualization hostpool delete](#HostPoolsDelete)|Delete|[Parameters](#ParametersHostPoolsDelete)|[Example](#ExamplesHostPoolsDelete)|
+
+### Commands in `az desktopvirtualization msix-image` group
+|CLI Command|Operation Swagger name|Parameters|Examples|
+|---------|------------|--------|-----------|
+|[az desktopvirtualization msix-image expand](#MsixImagesExpand)|Expand|[Parameters](#ParametersMsixImagesExpand)|[Example](#ExamplesMsixImagesExpand)|
+
+### Commands in `az desktopvirtualization msix-package` group
+|CLI Command|Operation Swagger name|Parameters|Examples|
+|---------|------------|--------|-----------|
+|[az desktopvirtualization msix-package list](#MSIXPackagesList)|List|[Parameters](#ParametersMSIXPackagesList)|[Example](#ExamplesMSIXPackagesList)|
+|[az desktopvirtualization msix-package show](#MSIXPackagesGet)|Get|[Parameters](#ParametersMSIXPackagesGet)|[Example](#ExamplesMSIXPackagesGet)|
+|[az desktopvirtualization msix-package create](#MSIXPackagesCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersMSIXPackagesCreateOrUpdate#Create)|[Example](#ExamplesMSIXPackagesCreateOrUpdate#Create)|
+|[az desktopvirtualization msix-package update](#MSIXPackagesUpdate)|Update|[Parameters](#ParametersMSIXPackagesUpdate)|[Example](#ExamplesMSIXPackagesUpdate)|
+|[az desktopvirtualization msix-package delete](#MSIXPackagesDelete)|Delete|[Parameters](#ParametersMSIXPackagesDelete)|[Example](#ExamplesMSIXPackagesDelete)|
+
+### Commands in `az desktopvirtualization scaling-plan` group
+|CLI Command|Operation Swagger name|Parameters|Examples|
+|---------|------------|--------|-----------|
+|[az desktopvirtualization scaling-plan list](#ScalingPlansListByHostPool)|ListByHostPool|[Parameters](#ParametersScalingPlansListByHostPool)|[Example](#ExamplesScalingPlansListByHostPool)|
+|[az desktopvirtualization scaling-plan list](#ScalingPlansListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersScalingPlansListByResourceGroup)|[Example](#ExamplesScalingPlansListByResourceGroup)|
+|[az desktopvirtualization scaling-plan list](#ScalingPlansListBySubscription)|ListBySubscription|[Parameters](#ParametersScalingPlansListBySubscription)|[Example](#ExamplesScalingPlansListBySubscription)|
+|[az desktopvirtualization scaling-plan show](#ScalingPlansGet)|Get|[Parameters](#ParametersScalingPlansGet)|[Example](#ExamplesScalingPlansGet)|
+|[az desktopvirtualization scaling-plan create](#ScalingPlansCreate)|Create|[Parameters](#ParametersScalingPlansCreate)|[Example](#ExamplesScalingPlansCreate)|
+|[az desktopvirtualization scaling-plan update](#ScalingPlansUpdate)|Update|[Parameters](#ParametersScalingPlansUpdate)|[Example](#ExamplesScalingPlansUpdate)|
+|[az desktopvirtualization scaling-plan delete](#ScalingPlansDelete)|Delete|[Parameters](#ParametersScalingPlansDelete)|[Example](#ExamplesScalingPlansDelete)|
+
+### Commands in `az desktopvirtualization workspace` group
+|CLI Command|Operation Swagger name|Parameters|Examples|
+|---------|------------|--------|-----------|
+|[az desktopvirtualization workspace list](#WorkspacesListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersWorkspacesListByResourceGroup)|[Example](#ExamplesWorkspacesListByResourceGroup)|
+|[az desktopvirtualization workspace list](#WorkspacesListBySubscription)|ListBySubscription|[Parameters](#ParametersWorkspacesListBySubscription)|[Example](#ExamplesWorkspacesListBySubscription)|
+|[az desktopvirtualization workspace show](#WorkspacesGet)|Get|[Parameters](#ParametersWorkspacesGet)|[Example](#ExamplesWorkspacesGet)|
+|[az desktopvirtualization workspace create](#WorkspacesCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersWorkspacesCreateOrUpdate#Create)|[Example](#ExamplesWorkspacesCreateOrUpdate#Create)|
+|[az desktopvirtualization workspace update](#WorkspacesUpdate)|Update|[Parameters](#ParametersWorkspacesUpdate)|[Example](#ExamplesWorkspacesUpdate)|
+|[az desktopvirtualization workspace delete](#WorkspacesDelete)|Delete|[Parameters](#ParametersWorkspacesDelete)|[Example](#ExamplesWorkspacesDelete)|
+
+
+## COMMAND DETAILS
+
+### group `az desktopvirtualization applicationgroup`
+#### Command `az desktopvirtualization applicationgroup list`
+
+##### Example
+```
+az desktopvirtualization applicationgroup list --filter "applicationGroupType eq \'RailApplication\'" --resource-group \
+"resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--filter**|string|OData filter expression. Valid properties for filtering are applicationGroupType.|filter|$filter|
+
+#### Command `az desktopvirtualization applicationgroup list`
+
+##### Example
+```
+az desktopvirtualization applicationgroup list --filter "applicationGroupType eq \'RailApplication\'"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az desktopvirtualization applicationgroup show`
+
+##### Example
+```
+az desktopvirtualization applicationgroup show --name "applicationGroup1" --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--application-group-name**|string|The name of the application group|application_group_name|applicationGroupName|
+
+#### Command `az desktopvirtualization applicationgroup create`
+
+##### Example
+```
+az desktopvirtualization applicationgroup create --location "centralus" --description "des1" --application-group-type \
+"RemoteApp" --friendly-name "friendly" --host-pool-arm-path "/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resour\
+ceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1" --tags tag1="value1" \
+tag2="value2" --name "applicationGroup1" --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--application-group-name**|string|The name of the application group|application_group_name|applicationGroupName|
+|**--location**|string|The geo-location where the resource lives|location|location|
+|**--host-pool-arm-path**|string|HostPool arm path of ApplicationGroup.|host_pool_arm_path|hostPoolArmPath|
+|**--application-group-type**|choice|Resource Type of ApplicationGroup.|application_group_type|applicationGroupType|
+|**--tags**|dictionary|Resource tags.|tags|tags|
+|**--description**|string|Description of ApplicationGroup.|description|description|
+|**--friendly-name**|string|Friendly name of ApplicationGroup.|friendly_name|friendlyName|
+
+#### Command `az desktopvirtualization applicationgroup update`
+
+##### Example
+```
+az desktopvirtualization applicationgroup update --description "des1" --friendly-name "friendly" --tags tag1="value1" \
+tag2="value2" --name "applicationGroup1" --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--application-group-name**|string|The name of the application group|application_group_name|applicationGroupName|
+|**--tags**|dictionary|tags to be updated|tags|tags|
+|**--description**|string|Description of ApplicationGroup.|description|description|
+|**--friendly-name**|string|Friendly name of ApplicationGroup.|friendly_name|friendlyName|
+
+#### Command `az desktopvirtualization applicationgroup delete`
+
+##### Example
+```
+az desktopvirtualization applicationgroup delete --name "applicationGroup1" --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--application-group-name**|string|The name of the application group|application_group_name|applicationGroupName|
+
+### group `az desktopvirtualization hostpool`
+#### Command `az desktopvirtualization hostpool list`
+
+##### Example
+```
+az desktopvirtualization hostpool list --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+
+#### Command `az desktopvirtualization hostpool list`
+
+##### Example
+```
+az desktopvirtualization hostpool list
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az desktopvirtualization hostpool show`
+
+##### Example
+```
+az desktopvirtualization hostpool show --name "hostPool1" --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|hostPoolName|
+
+#### Command `az desktopvirtualization hostpool create`
+
+##### Example
+```
+az desktopvirtualization hostpool create --location "centralus" --description "des1" --friendly-name "friendly" \
+--host-pool-type "Pooled" --load-balancer-type "BreadthFirst" --max-session-limit 999999 \
+--personal-desktop-assignment-type "Automatic" --preferred-app-group-type "Desktop" --registration-info \
+expiration-time="2020-10-01T14:01:54.9571247Z" registration-token-operation="Update" --sso-client-id "client" \
+--sso-client-secret-key-vault-path "https://keyvault/secret" --sso-context "KeyVaultPath" --sso-secret-type \
+"SharedKey" --ssoadfs-authority "https://adfs" --start-vm-on-connect false --vm-template "{json:json}" --tags \
+tag1="value1" tag2="value2" --name "hostPool1" --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|hostPoolName|
+|**--location**|string|The geo-location where the resource lives|location|location|
+|**--host-pool-type**|choice|HostPool type for desktop.|host_pool_type|hostPoolType|
+|**--load-balancer-type**|choice|The type of the load balancer.|load_balancer_type|loadBalancerType|
+|**--preferred-app-group-type**|choice|The type of preferred application group type, default to Desktop Application Group|preferred_app_group_type|preferredAppGroupType|
+|**--tags**|dictionary|Resource tags.|tags|tags|
+|**--friendly-name**|string|Friendly name of HostPool.|friendly_name|friendlyName|
+|**--description**|string|Description of HostPool.|description|description|
+|**--personal-desktop-assignment-type**|choice|PersonalDesktopAssignment type for HostPool.|personal_desktop_assignment_type|personalDesktopAssignmentType|
+|**--custom-rdp-property**|string|Custom rdp property of HostPool.|custom_rdp_property|customRdpProperty|
+|**--max-session-limit**|integer|The max session limit of HostPool.|max_session_limit|maxSessionLimit|
+|**--ring**|integer|The ring number of HostPool.|ring|ring|
+|**--validation-environment**|boolean|Is validation environment.|validation_environment|validationEnvironment|
+|**--registration-info**|object|The registration info of HostPool.|registration_info|registrationInfo|
+|**--vm-template**|string|VM template for sessionhosts configuration within hostpool.|vm_template|vmTemplate|
+|**--sso-context**|string|Path to keyvault containing ssoContext secret.|sso_context|ssoContext|
+|**--ssoadfs-authority**|string|URL to customer ADFS server for signing WVD SSO certificates.|ssoadfs_authority|ssoadfsAuthority|
+|**--sso-client-id**|string|ClientId for the registered Relying Party used to issue WVD SSO certificates.|sso_client_id|ssoClientId|
+|**--sso-client-secret-key-vault-path**|string|Path to Azure KeyVault storing the secret used for communication to ADFS.|sso_client_secret_key_vault_path|ssoClientSecretKeyVaultPath|
+|**--sso-secret-type**|choice|The type of single sign on Secret Type.|sso_secret_type|ssoSecretType|
+|**--start-vm-on-connect**|boolean|The flag to turn on/off StartVMOnConnect feature.|start_vm_on_connect|startVMOnConnect|
+
+#### Command `az desktopvirtualization hostpool update`
+
+##### Example
+```
+az desktopvirtualization hostpool update --description "des1" --friendly-name "friendly" --load-balancer-type \
+"BreadthFirst" --max-session-limit 999999 --personal-desktop-assignment-type "Automatic" --registration-info \
+expiration-time="2020-10-01T15:01:54.9571247Z" registration-token-operation="Update" --sso-client-id "client" \
+--sso-client-secret-key-vault-path "https://keyvault/secret" --sso-context "KeyVaultPath" --sso-secret-type \
+"SharedKey" --ssoadfs-authority "https://adfs" --start-vm-on-connect false --vm-template "{json:json}" --tags \
+tag1="value1" tag2="value2" --name "hostPool1" --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|hostPoolName|
+|**--tags**|dictionary|tags to be updated|tags|tags|
+|**--friendly-name**|string|Friendly name of HostPool.|friendly_name|friendlyName|
+|**--description**|string|Description of HostPool.|description|description|
+|**--custom-rdp-property**|string|Custom rdp property of HostPool.|custom_rdp_property|customRdpProperty|
+|**--max-session-limit**|integer|The max session limit of HostPool.|max_session_limit|maxSessionLimit|
+|**--personal-desktop-assignment-type**|choice|PersonalDesktopAssignment type for HostPool.|personal_desktop_assignment_type|personalDesktopAssignmentType|
+|**--load-balancer-type**|choice|The type of the load balancer.|load_balancer_type|loadBalancerType|
+|**--ring**|integer|The ring number of HostPool.|ring|ring|
+|**--validation-environment**|boolean|Is validation environment.|validation_environment|validationEnvironment|
+|**--registration-info**|object|The registration info of HostPool.|registration_info|registrationInfo|
+|**--vm-template**|string|VM template for sessionhosts configuration within hostpool.|vm_template|vmTemplate|
+|**--sso-context**|string|Path to keyvault containing ssoContext secret.|sso_context|ssoContext|
+|**--ssoadfs-authority**|string|URL to customer ADFS server for signing WVD SSO certificates.|ssoadfs_authority|ssoadfsAuthority|
+|**--sso-client-id**|string|ClientId for the registered Relying Party used to issue WVD SSO certificates.|sso_client_id|ssoClientId|
+|**--sso-client-secret-key-vault-path**|string|Path to Azure KeyVault storing the secret used for communication to ADFS.|sso_client_secret_key_vault_path|ssoClientSecretKeyVaultPath|
+|**--sso-secret-type**|choice|The type of single sign on Secret Type.|sso_secret_type|ssoSecretType|
+|**--preferred-app-group-type**|choice|The type of preferred application group type, default to Desktop Application Group|preferred_app_group_type|preferredAppGroupType|
+|**--start-vm-on-connect**|boolean|The flag to turn on/off StartVMOnConnect feature.|start_vm_on_connect|startVMOnConnect|
+
+#### Command `az desktopvirtualization hostpool delete`
+
+##### Example
+```
+az desktopvirtualization hostpool delete --force true --name "hostPool1" --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|hostPoolName|
+|**--force**|boolean|Force flag to delete sessionHost.|force|force|
+
+### group `az desktopvirtualization msix-image`
+#### Command `az desktopvirtualization msix-image expand`
+
+##### Example
+```
+az desktopvirtualization msix-image expand --host-pool-name "hostpool1" --uri "imagepath" --resource-group \
+"resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|hostPoolName|
+|**--uri**|string|URI to Image|uri|uri|
+
+### group `az desktopvirtualization msix-package`
+#### Command `az desktopvirtualization msix-package list`
+
+##### Example
+```
+az desktopvirtualization msix-package list --host-pool-name "hostpool1" --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|hostPoolName|
+
+#### Command `az desktopvirtualization msix-package show`
+
+##### Example
+```
+az desktopvirtualization msix-package show --host-pool-name "hostpool1" --msix-package-full-name "packagefullname" \
+--resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|hostPoolName|
+|**--msix-package-full-name**|string|The version specific package full name of the MSIX package within specified hostpool|msix_package_full_name|msixPackageFullName|
+
+#### Command `az desktopvirtualization msix-package create`
+
+##### Example
+```
+az desktopvirtualization msix-package create --host-pool-name "hostpool1" --display-name "displayname" --image-path \
+"imagepath" --is-active false --is-regular-registration false --last-updated "2008-09-22T14:01:54.9571247Z" \
+--package-applications description="application-desc" app-id="ApplicationId" app-user-model-id="AppUserModelId" \
+friendly-name="friendlyname" icon-image-name="Apptile" raw-icon="VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo" \
+raw-png="VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo" --package-dependencies dependency-name="MsixTest_Dependency_Name" \
+min-version="version" publisher="PublishedName" --package-family-name "MsixPackage_FamilyName" --package-name \
+"MsixPackage_name" --package-relative-path "packagerelativepath" --version "version" --msix-package-full-name \
+"msixpackagefullname" --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|hostPoolName|
+|**--msix-package-full-name**|string|The version specific package full name of the MSIX package within specified hostpool|msix_package_full_name|msixPackageFullName|
+|**--image-path**|string|VHD/CIM image path on Network Share.|image_path|imagePath|
+|**--package-name**|string|Package Name from appxmanifest.xml.|package_name|packageName|
+|**--package-family-name**|string|Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name.|package_family_name|packageFamilyName|
+|**--display-name**|string|User friendly Name to be displayed in the portal.|display_name|displayName|
+|**--package-relative-path**|string|Relative Path to the package inside the image.|package_relative_path|packageRelativePath|
+|**--is-regular-registration**|boolean|Specifies how to register Package in feed.|is_regular_registration|isRegularRegistration|
+|**--is-active**|boolean|Make this version of the package the active one across the hostpool.|is_active|isActive|
+|**--package-dependencies**|array|List of package dependencies.|package_dependencies|packageDependencies|
+|**--version**|string|Package Version found in the appxmanifest.xml.|version|version|
+|**--last-updated**|date-time|Date Package was last updated, found in the appxmanifest.xml.|last_updated|lastUpdated|
+|**--package-applications**|array|List of package applications.|package_applications|packageApplications|
+
+#### Command `az desktopvirtualization msix-package update`
+
+##### Example
+```
+az desktopvirtualization msix-package update --host-pool-name "hostpool1" --display-name "displayname" --is-active \
+true --is-regular-registration false --msix-package-full-name "msixpackagefullname" --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|hostPoolName|
+|**--msix-package-full-name**|string|The version specific package full name of the MSIX package within specified hostpool|msix_package_full_name|msixPackageFullName|
+|**--is-active**|boolean|Set a version of the package to be active across hostpool.|is_active|isActive|
+|**--is-regular-registration**|boolean|Set Registration mode. Regular or Delayed.|is_regular_registration|isRegularRegistration|
+|**--display-name**|string|Display name for MSIX Package.|display_name|displayName|
+
+#### Command `az desktopvirtualization msix-package delete`
+
+##### Example
+```
+az desktopvirtualization msix-package delete --host-pool-name "hostpool1" --msix-package-full-name "packagefullname" \
+--resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|hostPoolName|
+|**--msix-package-full-name**|string|The version specific package full name of the MSIX package within specified hostpool|msix_package_full_name|msixPackageFullName|
+
+### group `az desktopvirtualization scaling-plan`
+#### Command `az desktopvirtualization scaling-plan list`
+
+##### Example
+```
+az desktopvirtualization scaling-plan list --host-pool-name "hostPool1" --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--host-pool-name**|string|The name of the host pool within the specified resource group|host_pool_name|hostPoolName|
+
+#### Command `az desktopvirtualization scaling-plan list`
+
+##### Example
+```
+az desktopvirtualization scaling-plan list --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az desktopvirtualization scaling-plan list`
+
+##### Example
+```
+az desktopvirtualization scaling-plan list
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az desktopvirtualization scaling-plan show`
+
+##### Example
+```
+az desktopvirtualization scaling-plan show --resource-group "resourceGroup1" --name "scalingPlan1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--scaling-plan-name**|string|The name of the scaling plan.|scaling_plan_name|scalingPlanName|
+
+#### Command `az desktopvirtualization scaling-plan create`
+
+##### Example
+```
+az desktopvirtualization scaling-plan create --resource-group "resourceGroup1" --location "centralus" --description \
+"des1" --exclusion-tag "value" --friendly-name "friendly" --host-pool-references host-pool-arm-path="/subscriptions/dae\
+fabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hos\
+tPool1" scaling-plan-enabled=true --host-pool-type "Personal" --schedules name="schedule1" days-of-week="Monday" \
+days-of-week="Tuesday" days-of-week="Wednesday" days-of-week="Thursday" days-of-week="Friday" \
+off-peak-load-balancing-algorithm="DepthFirst" off-peak-start-time="2020-11-10T20:00:00.000Z" \
+peak-load-balancing-algorithm="BreadthFirst" peak-start-time="2020-11-10T08:00:00.000Z" ramp-down-capacity-threshold-pc\
+t=50 ramp-down-force-logoff-users=true ramp-down-load-balancing-algorithm="DepthFirst" ramp-down-minimum-hosts-pct=20 \
+ramp-down-notification-message="message" ramp-down-notification-minutes=30 ramp-down-start-time="2020-11-10T18:00:00.00\
+0Z" ramp-up-algorithm="DepthFirst" ramp-up-capacity-threshold-pct=80 ramp-up-minimum-host-pct=20 \
+ramp-up-start-time="2020-11-10T06:00:00.000Z" --time-zone "" --tags tag1="value1" tag2="value2" --name "scalingPlan1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--scaling-plan-name**|string|The name of the scaling plan.|scaling_plan_name|scalingPlanName|
+|**--location**|string|The geo-location where the resource lives|location|location|
+|**--tags**|dictionary|Resource tags.|tags|tags|
+|**--description**|string|Description of scaling plan.|description|description|
+|**--friendly-name**|string|User friendly name of scaling plan.|friendly_name|friendlyName|
+|**--time-zone**|string|Timezone of the scaling plan.|time_zone|timeZone|
+|**--host-pool-type**|choice|HostPool type for scaling plan.|host_pool_type|hostPoolType|
+|**--exclusion-tag**|string|Exclusion tag for scaling plan.|exclusion_tag|exclusionTag|
+|**--schedules**|array|List of ScalingSchedule definitions.|schedules|schedules|
+|**--host-pool-references**|array|List of ScalingHostPoolReference definitions.|host_pool_references|hostPoolReferences|
+
+#### Command `az desktopvirtualization scaling-plan update`
+
+##### Example
+```
+az desktopvirtualization scaling-plan update --resource-group "resourceGroup1" --name "scalingPlan1" --description \
+"des1" --exclusion-tag "value" --friendly-name "friendly" --host-pool-references host-pool-arm-path="/subscriptions/dae\
+fabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hos\
+tPool1" scaling-plan-enabled=true --host-pool-type "Personal" --schedules name="schedule1" days-of-week="Monday" \
+days-of-week="Tuesday" days-of-week="Wednesday" days-of-week="Thursday" days-of-week="Friday" \
+off-peak-load-balancing-algorithm="DepthFirst" off-peak-start-time="2020-11-10T20:00:00.000Z" \
+peak-load-balancing-algorithm="BreadthFirst" peak-start-time="2020-11-10T08:00:00.000Z" ramp-down-capacity-threshold-pc\
+t=50 ramp-down-force-logoff-users=true ramp-down-load-balancing-algorithm="DepthFirst" ramp-down-minimum-hosts-pct=20 \
+ramp-down-notification-message="message" ramp-down-notification-minutes=30 ramp-down-start-time="2020-11-10T18:00:00.00\
+0Z" ramp-up-algorithm="DepthFirst" ramp-up-capacity-threshold-pct=80 ramp-up-minimum-host-pct=20 \
+ramp-up-start-time="2020-11-10T06:00:00.000Z" --time-zone "" --tags tag1="value1" tag2="value2"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--scaling-plan-name**|string|The name of the scaling plan.|scaling_plan_name|scalingPlanName|
+|**--tags**|dictionary|tags to be updated|tags|tags|
+|**--description**|string|Description of scaling plan.|description|description|
+|**--friendly-name**|string|User friendly name of scaling plan.|friendly_name|friendlyName|
+|**--time-zone**|string|Timezone of the scaling plan.|time_zone|timeZone|
+|**--host-pool-type**|choice|HostPool type for scaling plan.|host_pool_type|hostPoolType|
+|**--exclusion-tag**|string|Exclusion tag for scaling plan.|exclusion_tag|exclusionTag|
+|**--schedules**|array|List of ScalingSchedule definitions.|schedules|schedules|
+|**--host-pool-references**|array|List of ScalingHostPoolReference definitions.|host_pool_references|hostPoolReferences|
+
+#### Command `az desktopvirtualization scaling-plan delete`
+
+##### Example
+```
+az desktopvirtualization scaling-plan delete --resource-group "resourceGroup1" --name "scalingPlan1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--scaling-plan-name**|string|The name of the scaling plan.|scaling_plan_name|scalingPlanName|
+
+### group `az desktopvirtualization workspace`
+#### Command `az desktopvirtualization workspace list`
+
+##### Example
+```
+az desktopvirtualization workspace list --resource-group "resourceGroup1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+
+#### Command `az desktopvirtualization workspace list`
+
+##### Example
+```
+az desktopvirtualization workspace list
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az desktopvirtualization workspace show`
+
+##### Example
+```
+az desktopvirtualization workspace show --resource-group "resourceGroup1" --name "workspace1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--workspace-name**|string|The name of the workspace|workspace_name|workspaceName|
+
+#### Command `az desktopvirtualization workspace create`
+
+##### Example
+```
+az desktopvirtualization workspace create --resource-group "resourceGroup1" --location "centralus" --description \
+"des1" --friendly-name "friendly" --tags tag1="value1" tag2="value2" --name "workspace1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--workspace-name**|string|The name of the workspace|workspace_name|workspaceName|
+|**--location**|string|The geo-location where the resource lives|location|location|
+|**--tags**|dictionary|Resource tags.|tags|tags|
+|**--description**|string|Description of Workspace.|description|description|
+|**--friendly-name**|string|Friendly name of Workspace.|friendly_name|friendlyName|
+|**--application-group-references**|array|List of applicationGroup resource Ids.|application_group_references|applicationGroupReferences|
+
+#### Command `az desktopvirtualization workspace update`
+
+##### Example
+```
+az desktopvirtualization workspace update --resource-group "resourceGroup1" --description "des1" --friendly-name \
+"friendly" --tags tag1="value1" tag2="value2" --name "workspace1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--workspace-name**|string|The name of the workspace|workspace_name|workspaceName|
+|**--tags**|dictionary|tags to be updated|tags|tags|
+|**--description**|string|Description of Workspace.|description|description|
+|**--friendly-name**|string|Friendly name of Workspace.|friendly_name|friendlyName|
+|**--application-group-references**|array|List of applicationGroup links.|application_group_references|applicationGroupReferences|
+
+#### Command `az desktopvirtualization workspace delete`
+
+##### Example
+```
+az desktopvirtualization workspace delete --resource-group "resourceGroup1" --name "workspace1"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName|
+|**--workspace-name**|string|The name of the workspace|workspace_name|workspaceName|
diff --git a/src/desktopvirtualization/setup.py b/src/desktopvirtualization/setup.py
index 2c2a532e47a..073a8214f4b 100644
--- a/src/desktopvirtualization/setup.py
+++ b/src/desktopvirtualization/setup.py
@@ -12,7 +12,7 @@
# HISTORY.rst entry.
VERSION = '0.1.0'
try:
- from .manual.version import VERSION
+ from azext_desktopvirtualization.manual.version import VERSION
except ImportError:
pass
@@ -31,8 +31,9 @@
]
DEPENDENCIES = []
+
try:
- from .manual.dependency import DEPENDENCIES
+ from azext_desktopvirtualization.manual.dependency import DEPENDENCIES
except ImportError:
pass