diff --git a/src/guestconfig/azext_guestconfig/__init__.py b/src/guestconfig/azext_guestconfig/__init__.py
index 011b2bd1059..a3cd44101b7 100644
--- a/src/guestconfig/azext_guestconfig/__init__.py
+++ b/src/guestconfig/azext_guestconfig/__init__.py
@@ -10,16 +10,20 @@
from azure.cli.core import AzCommandsLoader
from azext_guestconfig.generated._help import helps # pylint: disable=unused-import
+try:
+ from azext_guestconfig.manual._help import helps # pylint: disable=reimported
+except ImportError:
+ pass
class GuestConfigurationClientCommandsLoader(AzCommandsLoader):
def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
- from azext_guestconfig.generated._client_factory import cf_guestconfig
+ from azext_guestconfig.generated._client_factory import cf_guestconfig_cl
guestconfig_custom = CliCommandType(
operations_tmpl='azext_guestconfig.custom#{}',
- client_factory=cf_guestconfig)
+ client_factory=cf_guestconfig_cl)
parent = super(GuestConfigurationClientCommandsLoader, self)
parent.__init__(cli_ctx=cli_ctx, custom_command_type=guestconfig_custom)
diff --git a/src/guestconfig/azext_guestconfig/azext_metadata.json b/src/guestconfig/azext_guestconfig/azext_metadata.json
index 13025150393..cfc30c747c7 100644
--- a/src/guestconfig/azext_guestconfig/azext_metadata.json
+++ b/src/guestconfig/azext_guestconfig/azext_metadata.json
@@ -1,4 +1,4 @@
{
"azext.isExperimental": true,
- "azext.minCliCoreVersion": "2.3.1"
+ "azext.minCliCoreVersion": "2.15.0"
}
\ No newline at end of file
diff --git a/src/guestconfig/azext_guestconfig/generated/_client_factory.py b/src/guestconfig/azext_guestconfig/generated/_client_factory.py
index 43931b02c83..81b2dcbabff 100644
--- a/src/guestconfig/azext_guestconfig/generated/_client_factory.py
+++ b/src/guestconfig/azext_guestconfig/generated/_client_factory.py
@@ -9,23 +9,24 @@
# --------------------------------------------------------------------------
-def cf_guestconfig(cli_ctx, *_):
+def cf_guestconfig_cl(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
- from ..vendored_sdks.guestconfig import GuestConfigurationClient
- return get_mgmt_service_client(cli_ctx, GuestConfigurationClient)
+ from azext_guestconfig.vendored_sdks.guestconfig import GuestConfigurationClient
+ return get_mgmt_service_client(cli_ctx,
+ GuestConfigurationClient)
def cf_guest_configuration_assignment(cli_ctx, *_):
- return cf_guestconfig(cli_ctx).guest_configuration_assignment
+ return cf_guestconfig_cl(cli_ctx).guest_configuration_assignments
def cf_guest_configuration_assignment_report(cli_ctx, *_):
- return cf_guestconfig(cli_ctx).guest_configuration_assignment_report
+ return cf_guestconfig_cl(cli_ctx).guest_configuration_assignment_reports
def cf_guest_configuration_hcrp_assignment(cli_ctx, *_):
- return cf_guestconfig(cli_ctx).guest_configuration_hcrp_assignment
+ return cf_guestconfig_cl(cli_ctx).guest_configuration_hcrp_assignments
def cf_guest_configuration_hcrp_assignment_report(cli_ctx, *_):
- return cf_guestconfig(cli_ctx).guest_configuration_hcrp_assignment_report
+ return cf_guestconfig_cl(cli_ctx).guest_configuration_hcrp_assignment_reports
diff --git a/src/guestconfig/azext_guestconfig/generated/_help.py b/src/guestconfig/azext_guestconfig/generated/_help.py
index efc8f5b8eea..cf7812dbc75 100644
--- a/src/guestconfig/azext_guestconfig/generated/_help.py
+++ b/src/guestconfig/azext_guestconfig/generated/_help.py
@@ -14,180 +14,63 @@
helps['guestconfig guest-configuration-assignment'] = """
type: group
- short-summary: guestconfig guest-configuration-assignment
+ short-summary: Manage guest configuration assignment with guestconfig
"""
helps['guestconfig guest-configuration-assignment list'] = """
type: command
- short-summary: List all guest configuration assignments for a virtual machine.
+ short-summary: "List all guest configuration assignments for a virtual machine."
examples:
- name: List all guest configuration assignments for a virtual machine
text: |-
- az guestconfig guest-configuration-assignment list --resource-group "myResourceGroupName" --vm-name "myV\
-MName"
+ az guestconfig guest-configuration-assignment list --resource-group "myResourceGroupName" --vm-name \
+"myVMName"
"""
helps['guestconfig guest-configuration-assignment show'] = """
type: command
- short-summary: Get information about a guest configuration assignment
+ short-summary: "Get information about a guest configuration assignment."
examples:
- name: Get a guest configuration assignment
text: |-
- az guestconfig guest-configuration-assignment show --name "SecureProtocol" --resource-group "myResourceG\
-roupName" --vm-name "myVMName"
-"""
-
-helps['guestconfig guest-configuration-assignment create'] = """
- type: command
- short-summary: Creates an association between a VM and guest configuration
- parameters:
- - name: --guest-configuration-configuration-parameter
- short-summary: The configuration parameters for the guest configuration.
- long-summary: |
- Usage: --guest-configuration-configuration-parameter name=XX value=XX
-
- name: Name of the configuration parameter.
- value: Value of the configuration parameter.
-
- Multiple actions can be specified by using more than one --guest-configuration-configuration-parameter argu\
-ment.
- - name: --guest-configuration-configuration-setting
- short-summary: The configuration setting for the guest configuration.
- long-summary: |
- Usage: --guest-configuration-configuration-setting configuration-mode=XX allow-module-overwrite=XX action-a\
-fter-reboot=XX refresh-frequency-mins=XX reboot-if-needed=XX configuration-mode-frequency-mins=XX
-
- configuration-mode: Specifies how the LCM(Local Configuration Manager) actually applies the configuration t\
-o the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect.
- allow-module-overwrite: If true - new configurations downloaded from the pull service are allowed to overwr\
-ite the old ones on the target node. Otherwise, false
- action-after-reboot: Specifies what happens after a reboot during the application of a configuration. The p\
-ossible values are ContinueConfiguration and StopConfiguration
- refresh-frequency-mins: The time interval, in minutes, at which the LCM checks a pull service to get update\
-d configurations. This value is ignored if the LCM is not configured in pull mode. The default value is 30.
- reboot-if-needed: Set this to true to automatically reboot the node after a configuration that requires reb\
-oot is applied. Otherwise, you will have to manually reboot the node for any configuration that requires it. The defaul\
-t value is false. To use this setting when a reboot condition is enacted by something other than DSC (such as Windows I\
-nstaller), combine this setting with the xPendingReboot module.
- configuration-mode-frequency-mins: How often, in minutes, the current configuration is checked and applied.\
- This property is ignored if the ConfigurationMode property is set to ApplyOnly. The default value is 15.
- examples:
- - name: Create or update guest configuration assignment
- text: |-
- az guestconfig guest-configuration-assignment create --guest-configuration-assignment-name "WhitelistedA\
-pplication" --guest-configuration-name "WhitelistedApplication" --location "westcentralus" --context "Azure policy" --g\
-uest-configuration-name "WhitelistedApplication" --guest-configuration-configuration-parameter name="[InstalledApplicat\
-ion]bwhitelistedapp;Name" value="NotePad,sql" --guest-configuration-configuration-setting action-after-reboot="Continue\
-Configuration" configuration-mode="MonitorOnly" configuration-mode-frequency-mins=15 reboot-if-needed="False" --guest-c\
-onfiguration-version "1.*" --resource-group "myResourceGroupName" --vm-name "myVMName"
-"""
-
-helps['guestconfig guest-configuration-assignment update'] = """
- type: command
- short-summary: Creates an association between a VM and guest configuration
- parameters:
- - name: --guest-configuration-configuration-parameter
- short-summary: The configuration parameters for the guest configuration.
- long-summary: |
- Usage: --guest-configuration-configuration-parameter name=XX value=XX
-
- name: Name of the configuration parameter.
- value: Value of the configuration parameter.
-
- Multiple actions can be specified by using more than one --guest-configuration-configuration-parameter argu\
-ment.
- - name: --guest-configuration-configuration-setting
- short-summary: The configuration setting for the guest configuration.
- long-summary: |
- Usage: --guest-configuration-configuration-setting configuration-mode=XX allow-module-overwrite=XX action-a\
-fter-reboot=XX refresh-frequency-mins=XX reboot-if-needed=XX configuration-mode-frequency-mins=XX
-
- configuration-mode: Specifies how the LCM(Local Configuration Manager) actually applies the configuration t\
-o the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect.
- allow-module-overwrite: If true - new configurations downloaded from the pull service are allowed to overwr\
-ite the old ones on the target node. Otherwise, false
- action-after-reboot: Specifies what happens after a reboot during the application of a configuration. The p\
-ossible values are ContinueConfiguration and StopConfiguration
- refresh-frequency-mins: The time interval, in minutes, at which the LCM checks a pull service to get update\
-d configurations. This value is ignored if the LCM is not configured in pull mode. The default value is 30.
- reboot-if-needed: Set this to true to automatically reboot the node after a configuration that requires reb\
-oot is applied. Otherwise, you will have to manually reboot the node for any configuration that requires it. The defaul\
-t value is false. To use this setting when a reboot condition is enacted by something other than DSC (such as Windows I\
-nstaller), combine this setting with the xPendingReboot module.
- configuration-mode-frequency-mins: How often, in minutes, the current configuration is checked and applied.\
- This property is ignored if the ConfigurationMode property is set to ApplyOnly. The default value is 15.
- examples:
- - name: Create or update guest configuration assignment
- text: |-
- az guestconfig guest-configuration-assignment update --guest-configuration-assignment-name "WhitelistedA\
-pplication" --guest-configuration-name "WhitelistedApplication" --location "westcentralus" --context "Azure policy" --g\
-uest-configuration-name "WhitelistedApplication" --guest-configuration-configuration-parameter name="[InstalledApplicat\
-ion]bwhitelistedapp;Name" value="NotePad,sql" --guest-configuration-configuration-setting action-after-reboot="Continue\
-Configuration" configuration-mode="MonitorOnly" configuration-mode-frequency-mins=15 reboot-if-needed="False" --guest-c\
-onfiguration-version "1.*" --resource-group "myResourceGroupName" --vm-name "myVMName"
-"""
-
-helps['guestconfig guest-configuration-assignment delete'] = """
- type: command
- short-summary: Delete a guest configuration assignment
- examples:
- - name: Delete an guest configuration assignment
- text: |-
- az guestconfig guest-configuration-assignment delete --name "SecureProtocol" --resource-group "myResourc\
-eGroupName" --vm-name "myVMName"
-"""
-
-helps['guestconfig guest-configuration-assignment wait'] = """
- type: command
- short-summary: Place the CLI in a waiting state until a condition of the guestconfig guest-configuration-assignment\
- is met.
- examples:
- - name: Pause executing next line of CLI script until the guestconfig guest-configuration-assignment is successfu\
-lly created.
- text: |-
- az guestconfig guest-configuration-assignment wait --name "SecureProtocol" --resource-group "myResourceG\
-roupName" --vm-name "myVMName" --created
- - name: Pause executing next line of CLI script until the guestconfig guest-configuration-assignment is successfu\
-lly deleted.
- text: |-
- az guestconfig guest-configuration-assignment wait --name "SecureProtocol" --resource-group "myResourceG\
-roupName" --vm-name "myVMName" --deleted
+ az guestconfig guest-configuration-assignment show --name "SecureProtocol" --resource-group \
+"myResourceGroupName" --vm-name "myVMName"
"""
helps['guestconfig guest-configuration-assignment-report'] = """
type: group
- short-summary: guestconfig guest-configuration-assignment-report
+ short-summary: Manage guest configuration assignment report with guestconfig
"""
helps['guestconfig guest-configuration-assignment-report list'] = """
type: command
- short-summary: List all reports for the guest configuration assignment, latest report first.
+ short-summary: "List all reports for the guest configuration assignment, latest report first."
examples:
- name: List all guest configuration assignments for a virtual machine
text: |-
- az guestconfig guest-configuration-assignment-report list --guest-configuration-assignment-name "AuditSe\
-cureProtocol" --resource-group "myResourceGroupName" --vm-name "myVMName"
+ az guestconfig guest-configuration-assignment-report list --guest-configuration-assignment-name \
+"AuditSecureProtocol" --resource-group "myResourceGroupName" --vm-name "myVMName"
"""
helps['guestconfig guest-configuration-assignment-report show'] = """
type: command
- short-summary: Get a report for the guest configuration assignment, by reportId.
+ short-summary: "Get a report for the guest configuration assignment, by reportId."
examples:
- name: Get a guest configuration assignment report by Id for a virtual machine
text: |-
- az guestconfig guest-configuration-assignment-report show --guest-configuration-assignment-name "AuditSe\
-cureProtocol" --report-id "7367cbb8-ae99-47d0-a33b-a283564d2cb1" --resource-group "myResourceGroupName" --vm-name "myvm\
-"
+ az guestconfig guest-configuration-assignment-report show --guest-configuration-assignment-name \
+"AuditSecureProtocol" --report-id "7367cbb8-ae99-47d0-a33b-a283564d2cb1" --resource-group "myResourceGroupName" \
+--vm-name "myvm"
"""
helps['guestconfig guest-configuration-hcrp-assignment'] = """
type: group
- short-summary: guestconfig guest-configuration-hcrp-assignment
+ short-summary: Manage guest configuration hcrp assignment with guestconfig
"""
helps['guestconfig guest-configuration-hcrp-assignment list'] = """
type: command
- short-summary: List all guest configuration assignments for an ARC machine.
+ short-summary: "List all guest configuration assignments for an ARC machine."
examples:
- name: List all guest configuration assignments for a virtual machine
text: |-
@@ -197,153 +80,36 @@
helps['guestconfig guest-configuration-hcrp-assignment show'] = """
type: command
- short-summary: Get information about a guest configuration assignment
+ short-summary: "Get information about a guest configuration assignment."
examples:
- name: Get a guest configuration assignment
text: |-
- az guestconfig guest-configuration-hcrp-assignment show --guest-configuration-assignment-name "SecurePro\
-tocol" --machine-name "myMachineName" --resource-group "myResourceGroupName"
-"""
-
-helps['guestconfig guest-configuration-hcrp-assignment create'] = """
- type: command
- short-summary: Creates an association between a ARC machine and guest configuration
- parameters:
- - name: --guest-configuration-configuration-parameter
- short-summary: The configuration parameters for the guest configuration.
- long-summary: |
- Usage: --guest-configuration-configuration-parameter name=XX value=XX
-
- name: Name of the configuration parameter.
- value: Value of the configuration parameter.
-
- Multiple actions can be specified by using more than one --guest-configuration-configuration-parameter argu\
-ment.
- - name: --guest-configuration-configuration-setting
- short-summary: The configuration setting for the guest configuration.
- long-summary: |
- Usage: --guest-configuration-configuration-setting configuration-mode=XX allow-module-overwrite=XX action-a\
-fter-reboot=XX refresh-frequency-mins=XX reboot-if-needed=XX configuration-mode-frequency-mins=XX
-
- configuration-mode: Specifies how the LCM(Local Configuration Manager) actually applies the configuration t\
-o the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect.
- allow-module-overwrite: If true - new configurations downloaded from the pull service are allowed to overwr\
-ite the old ones on the target node. Otherwise, false
- action-after-reboot: Specifies what happens after a reboot during the application of a configuration. The p\
-ossible values are ContinueConfiguration and StopConfiguration
- refresh-frequency-mins: The time interval, in minutes, at which the LCM checks a pull service to get update\
-d configurations. This value is ignored if the LCM is not configured in pull mode. The default value is 30.
- reboot-if-needed: Set this to true to automatically reboot the node after a configuration that requires reb\
-oot is applied. Otherwise, you will have to manually reboot the node for any configuration that requires it. The defaul\
-t value is false. To use this setting when a reboot condition is enacted by something other than DSC (such as Windows I\
-nstaller), combine this setting with the xPendingReboot module.
- configuration-mode-frequency-mins: How often, in minutes, the current configuration is checked and applied.\
- This property is ignored if the ConfigurationMode property is set to ApplyOnly. The default value is 15.
- examples:
- - name: Create or update guest configuration assignment
- text: |-
- az guestconfig guest-configuration-hcrp-assignment create --guest-configuration-assignment-name "Whiteli\
-stedApplication" --machine-name "myMachineName" --guest-configuration-name "WhitelistedApplication" --location "westcen\
-tralus" --context "Azure policy" --guest-configuration-name "WhitelistedApplication" --guest-configuration-configuratio\
-n-parameter name="[InstalledApplication]bwhitelistedapp;Name" value="NotePad,sql" --guest-configuration-configuration-s\
-etting action-after-reboot="ContinueConfiguration" configuration-mode="MonitorOnly" configuration-mode-frequency-mins=1\
-5 reboot-if-needed="False" --guest-configuration-version "1.*" --resource-group "myResourceGroupName"
-"""
-
-helps['guestconfig guest-configuration-hcrp-assignment update'] = """
- type: command
- short-summary: Creates an association between a ARC machine and guest configuration
- parameters:
- - name: --guest-configuration-configuration-parameter
- short-summary: The configuration parameters for the guest configuration.
- long-summary: |
- Usage: --guest-configuration-configuration-parameter name=XX value=XX
-
- name: Name of the configuration parameter.
- value: Value of the configuration parameter.
-
- Multiple actions can be specified by using more than one --guest-configuration-configuration-parameter argu\
-ment.
- - name: --guest-configuration-configuration-setting
- short-summary: The configuration setting for the guest configuration.
- long-summary: |
- Usage: --guest-configuration-configuration-setting configuration-mode=XX allow-module-overwrite=XX action-a\
-fter-reboot=XX refresh-frequency-mins=XX reboot-if-needed=XX configuration-mode-frequency-mins=XX
-
- configuration-mode: Specifies how the LCM(Local Configuration Manager) actually applies the configuration t\
-o the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect.
- allow-module-overwrite: If true - new configurations downloaded from the pull service are allowed to overwr\
-ite the old ones on the target node. Otherwise, false
- action-after-reboot: Specifies what happens after a reboot during the application of a configuration. The p\
-ossible values are ContinueConfiguration and StopConfiguration
- refresh-frequency-mins: The time interval, in minutes, at which the LCM checks a pull service to get update\
-d configurations. This value is ignored if the LCM is not configured in pull mode. The default value is 30.
- reboot-if-needed: Set this to true to automatically reboot the node after a configuration that requires reb\
-oot is applied. Otherwise, you will have to manually reboot the node for any configuration that requires it. The defaul\
-t value is false. To use this setting when a reboot condition is enacted by something other than DSC (such as Windows I\
-nstaller), combine this setting with the xPendingReboot module.
- configuration-mode-frequency-mins: How often, in minutes, the current configuration is checked and applied.\
- This property is ignored if the ConfigurationMode property is set to ApplyOnly. The default value is 15.
- examples:
- - name: Create or update guest configuration assignment
- text: |-
- az guestconfig guest-configuration-hcrp-assignment update --guest-configuration-assignment-name "Whiteli\
-stedApplication" --machine-name "myMachineName" --guest-configuration-name "WhitelistedApplication" --location "westcen\
-tralus" --context "Azure policy" --guest-configuration-name "WhitelistedApplication" --guest-configuration-configuratio\
-n-parameter name="[InstalledApplication]bwhitelistedapp;Name" value="NotePad,sql" --guest-configuration-configuration-s\
-etting action-after-reboot="ContinueConfiguration" configuration-mode="MonitorOnly" configuration-mode-frequency-mins=1\
-5 reboot-if-needed="False" --guest-configuration-version "1.*" --resource-group "myResourceGroupName"
-"""
-
-helps['guestconfig guest-configuration-hcrp-assignment delete'] = """
- type: command
- short-summary: Delete a guest configuration assignment
- examples:
- - name: Delete an guest configuration assignment
- text: |-
- az guestconfig guest-configuration-hcrp-assignment delete --guest-configuration-assignment-name "SecureP\
-rotocol" --machine-name "myMachineName" --resource-group "myResourceGroupName"
-"""
-
-helps['guestconfig guest-configuration-hcrp-assignment wait'] = """
- type: command
- short-summary: Place the CLI in a waiting state until a condition of the guestconfig guest-configuration-hcrp-assig\
-nment is met.
- examples:
- - name: Pause executing next line of CLI script until the guestconfig guest-configuration-hcrp-assignment is succ\
-essfully created.
- text: |-
- az guestconfig guest-configuration-hcrp-assignment wait --guest-configuration-assignment-name "SecurePro\
-tocol" --machine-name "myMachineName" --resource-group "myResourceGroupName" --created
- - name: Pause executing next line of CLI script until the guestconfig guest-configuration-hcrp-assignment is succ\
-essfully deleted.
- text: |-
- az guestconfig guest-configuration-hcrp-assignment wait --guest-configuration-assignment-name "SecurePro\
-tocol" --machine-name "myMachineName" --resource-group "myResourceGroupName" --deleted
+ az guestconfig guest-configuration-hcrp-assignment show --guest-configuration-assignment-name \
+"SecureProtocol" --machine-name "myMachineName" --resource-group "myResourceGroupName"
"""
helps['guestconfig guest-configuration-hcrp-assignment-report'] = """
type: group
- short-summary: guestconfig guest-configuration-hcrp-assignment-report
+ short-summary: Manage guest configuration hcrp assignment report with guestconfig
"""
helps['guestconfig guest-configuration-hcrp-assignment-report list'] = """
type: command
- short-summary: List all reports for the guest configuration assignment, latest report first.
+ short-summary: "List all reports for the guest configuration assignment, latest report first."
examples:
- name: List all guest configuration assignments for a virtual machine
text: |-
- az guestconfig guest-configuration-hcrp-assignment-report list --guest-configuration-assignment-name "Au\
-ditSecureProtocol" --machine-name "myMachineName" --resource-group "myResourceGroupName"
+ az guestconfig guest-configuration-hcrp-assignment-report list --guest-configuration-assignment-name \
+"AuditSecureProtocol" --machine-name "myMachineName" --resource-group "myResourceGroupName"
"""
helps['guestconfig guest-configuration-hcrp-assignment-report show'] = """
type: command
- short-summary: Get a report for the guest configuration assignment, by reportId.
+ short-summary: "Get a report for the guest configuration assignment, by reportId."
examples:
- name: Get a guest configuration assignment report by Id for a virtual machine
text: |-
- az guestconfig guest-configuration-hcrp-assignment-report show --guest-configuration-assignment-name "Au\
-ditSecureProtocol" --machine-name "myMachineName" --report-id "7367cbb8-ae99-47d0-a33b-a283564d2cb1" --resource-group "\
-myResourceGroupName"
+ az guestconfig guest-configuration-hcrp-assignment-report show --guest-configuration-assignment-name \
+"AuditSecureProtocol" --machine-name "myMachineName" --report-id "7367cbb8-ae99-47d0-a33b-a283564d2cb1" \
+--resource-group "myResourceGroupName"
"""
diff --git a/src/guestconfig/azext_guestconfig/generated/_params.py b/src/guestconfig/azext_guestconfig/generated/_params.py
index 0a1d2ac4a47..431336c8796 100644
--- a/src/guestconfig/azext_guestconfig/generated/_params.py
+++ b/src/guestconfig/azext_guestconfig/generated/_params.py
@@ -10,154 +10,54 @@
# pylint: disable=too-many-lines
# pylint: disable=too-many-statements
-from knack.arguments import CLIArgumentType
-from azure.cli.core.commands.parameters import (
- resource_group_name_type,
- get_location_type
-)
-from azure.cli.core.commands.validators import get_default_location_from_resource_group
-from azext_guestconfig.action import (
- AddGuestConfigurationConfigurationParameter,
- AddGuestConfigurationConfigurationSetting
-)
+from azure.cli.core.commands.parameters import resource_group_name_type
def load_arguments(self, _):
with self.argument_context('guestconfig guest-configuration-assignment list') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('vm_name', help='The name of the virtual machine.')
+ c.argument('vm_name', type=str, help='The name of the virtual machine.')
with self.argument_context('guestconfig guest-configuration-assignment show') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('guest_configuration_assignment_name', options_list=['--name', '-n'], help='The guest configuration '
- 'assignment name.', id_part='child_name_1')
- c.argument('vm_name', help='The name of the virtual machine.', id_part='name')
-
- with self.argument_context('guestconfig guest-configuration-assignment create') as c:
- c.argument('guest_configuration_assignment_name', help='Name of the guest configuration assignment.')
- c.argument('resource_group_name', resource_group_name_type)
- c.argument('vm_name', help='The name of the virtual machine.')
- c.argument('name', help='Name of the guest configuration assignment.')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
- validator=get_default_location_from_resource_group)
- c.argument('context', help='The source which initiated the guest configuration assignment. Ex: Azure Policy')
- c.argument('latest_assignment_report_assignment', arg_type=CLIArgumentType(options_list=['--latest-assignment-r'
- 'eport-assignment'], help='Configuration details of the guest configuration assignment. Expected val' 'ue: json-string/@json-file.'))
- c.argument('guest_configuration_name', help='Name of the guest configuration.')
- c.argument('guest_configuration_version', help='Version of the guest configuration.')
- c.argument('guest_configuration_configuration_parameter', action=AddGuestConfigurationConfigurationParameter,
- nargs='+', help='The configuration parameters for the guest configuration.')
- c.argument('guest_configuration_configuration_setting', action=AddGuestConfigurationConfigurationSetting,
- nargs='+', help='The configuration setting for the guest configuration.')
-
- with self.argument_context('guestconfig guest-configuration-assignment update') as c:
- c.argument('guest_configuration_assignment_name', help='Name of the guest configuration assignment.', id_part='child_name_1')
- c.argument('resource_group_name', resource_group_name_type)
- c.argument('vm_name', help='The name of the virtual machine.', id_part='name')
- c.argument('name', help='Name of the guest configuration assignment.')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
- validator=get_default_location_from_resource_group)
- c.argument('context', help='The source which initiated the guest configuration assignment. Ex: Azure Policy')
- c.argument('latest_assignment_report_assignment', arg_type=CLIArgumentType(options_list=['--latest-assignment-r'
- 'eport-assignment'], help='Configuration details of the guest configuration assignment. Expected val' 'ue: json-string/@json-file.'))
- c.argument('guest_configuration_name', help='Name of the guest configuration.')
- c.argument('guest_configuration_version', help='Version of the guest configuration.')
- c.argument('guest_configuration_configuration_parameter', action=AddGuestConfigurationConfigurationParameter,
- nargs='+', help='The configuration parameters for the guest configuration.')
- c.argument('guest_configuration_configuration_setting', action=AddGuestConfigurationConfigurationSetting,
- nargs='+', help='The configuration setting for the guest configuration.')
-
- with self.argument_context('guestconfig guest-configuration-assignment delete') as c:
- c.argument('resource_group_name', resource_group_name_type)
- c.argument('guest_configuration_assignment_name', options_list=['--name', '-n'], help='Name of the guest config'
- 'uration assignment', id_part='child_name_1')
- c.argument('vm_name', help='The name of the virtual machine.', id_part='name')
-
- with self.argument_context('guestconfig guest-configuration-assignment wait') as c:
- c.argument('resource_group_name', resource_group_name_type)
- c.argument('guest_configuration_assignment_name', options_list=['--name', '-n'], help='The guest configuration '
- 'assignment name.', id_part='child_name_1')
- c.argument('vm_name', help='The name of the virtual machine.', id_part='name')
+ c.argument('guest_configuration_assignment_name', options_list=['--name', '-n',
+ '--guest-configuration-assignment-name'],
+ type=str, help='The guest configuration assignment name.', id_part='child_name_1')
+ c.argument('vm_name', type=str, help='The name of the virtual machine.', id_part='name')
with self.argument_context('guestconfig guest-configuration-assignment-report list') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('guest_configuration_assignment_name', help='The guest configuration assignment name.')
- c.argument('vm_name', help='The name of the virtual machine.')
+ c.argument('guest_configuration_assignment_name', type=str, help='The guest configuration assignment name.')
+ c.argument('vm_name', type=str, help='The name of the virtual machine.')
with self.argument_context('guestconfig guest-configuration-assignment-report show') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('guest_configuration_assignment_name', help='The guest configuration assignment name.', id_part='chi'
- 'ld_name_1')
- c.argument('report_id', help='The GUID for the guest configuration assignment report.',
+ c.argument('guest_configuration_assignment_name', type=str, help='The guest configuration assignment name.',
+ id_part='child_name_1')
+ c.argument('report_id', type=str, help='The GUID for the guest configuration assignment report.',
id_part='child_name_2')
- c.argument('vm_name', help='The name of the virtual machine.', id_part='name')
+ c.argument('vm_name', type=str, help='The name of the virtual machine.', id_part='name')
with self.argument_context('guestconfig guest-configuration-hcrp-assignment list') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('machine_name', help='The name of the ARC machine.')
+ c.argument('machine_name', type=str, help='The name of the ARC machine.')
with self.argument_context('guestconfig guest-configuration-hcrp-assignment show') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('guest_configuration_assignment_name', help='The guest configuration assignment name.', id_part='chi'
- 'ld_name_1')
- c.argument('machine_name', help='The name of the ARC machine.', id_part='name')
-
- with self.argument_context('guestconfig guest-configuration-hcrp-assignment create') as c:
- c.argument('guest_configuration_assignment_name', help='Name of the guest configuration assignment.')
- c.argument('resource_group_name', resource_group_name_type)
- c.argument('machine_name', help='The name of the ARC machine.')
- c.argument('name', help='Name of the guest configuration assignment.')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
- validator=get_default_location_from_resource_group)
- c.argument('context', help='The source which initiated the guest configuration assignment. Ex: Azure Policy')
- c.argument('latest_assignment_report_assignment', arg_type=CLIArgumentType(options_list=['--latest-assignment-r'
- 'eport-assignment'], help='Configuration details of the guest configuration assignment. Expected val' 'ue: json-string/@json-file.'))
- c.argument('guest_configuration_name', help='Name of the guest configuration.')
- c.argument('guest_configuration_version', help='Version of the guest configuration.')
- c.argument('guest_configuration_configuration_parameter', action=AddGuestConfigurationConfigurationParameter,
- nargs='+', help='The configuration parameters for the guest configuration.')
- c.argument('guest_configuration_configuration_setting', action=AddGuestConfigurationConfigurationSetting,
- nargs='+', help='The configuration setting for the guest configuration.')
-
- with self.argument_context('guestconfig guest-configuration-hcrp-assignment update') as c:
- c.argument('guest_configuration_assignment_name', help='Name of the guest configuration assignment.', id_part='child_name_1')
- c.argument('resource_group_name', resource_group_name_type)
- c.argument('machine_name', help='The name of the ARC machine.', id_part='name')
- c.argument('name', help='Name of the guest configuration assignment.')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
- validator=get_default_location_from_resource_group)
- c.argument('context', help='The source which initiated the guest configuration assignment. Ex: Azure Policy')
- c.argument('latest_assignment_report_assignment', arg_type=CLIArgumentType(options_list=['--latest-assignment-r'
- 'eport-assignment'], help='Configuration details of the guest configuration assignment. Expected val' 'ue: json-string/@json-file.'))
- c.argument('guest_configuration_name', help='Name of the guest configuration.')
- c.argument('guest_configuration_version', help='Version of the guest configuration.')
- c.argument('guest_configuration_configuration_parameter', action=AddGuestConfigurationConfigurationParameter,
- nargs='+', help='The configuration parameters for the guest configuration.')
- c.argument('guest_configuration_configuration_setting', action=AddGuestConfigurationConfigurationSetting,
- nargs='+', help='The configuration setting for the guest configuration.')
-
- with self.argument_context('guestconfig guest-configuration-hcrp-assignment delete') as c:
- c.argument('resource_group_name', resource_group_name_type)
- c.argument('guest_configuration_assignment_name', help='Name of the guest configuration assignment', id_part='c'
- 'hild_name_1')
- c.argument('machine_name', help='The name of the ARC machine.', id_part='name')
-
- with self.argument_context('guestconfig guest-configuration-hcrp-assignment wait') as c:
- c.argument('resource_group_name', resource_group_name_type)
- c.argument('guest_configuration_assignment_name', help='The guest configuration assignment name.', id_part='chi'
- 'ld_name_1')
- c.argument('machine_name', help='The name of the ARC machine.', id_part='name')
+ c.argument('guest_configuration_assignment_name', type=str, help='The guest configuration assignment name.',
+ id_part='child_name_1')
+ c.argument('machine_name', type=str, help='The name of the ARC machine.', id_part='name')
with self.argument_context('guestconfig guest-configuration-hcrp-assignment-report list') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('guest_configuration_assignment_name', help='The guest configuration assignment name.')
- c.argument('machine_name', help='The name of the ARC machine.')
+ c.argument('guest_configuration_assignment_name', type=str, help='The guest configuration assignment name.')
+ c.argument('machine_name', type=str, help='The name of the ARC machine.')
with self.argument_context('guestconfig guest-configuration-hcrp-assignment-report show') as c:
c.argument('resource_group_name', resource_group_name_type)
- c.argument('guest_configuration_assignment_name', help='The guest configuration assignment name.', id_part='chi'
- 'ld_name_1')
- c.argument('report_id', help='The GUID for the guest configuration assignment report.',
+ c.argument('guest_configuration_assignment_name', type=str, help='The guest configuration assignment name.',
+ id_part='child_name_1')
+ c.argument('report_id', type=str, help='The GUID for the guest configuration assignment report.',
id_part='child_name_2')
- c.argument('machine_name', help='The name of the ARC machine.', id_part='name')
+ c.argument('machine_name', type=str, help='The name of the ARC machine.', id_part='name')
diff --git a/src/guestconfig/azext_guestconfig/generated/action.py b/src/guestconfig/azext_guestconfig/generated/action.py
index 5ca01f8907b..b49bfaeeefe 100644
--- a/src/guestconfig/azext_guestconfig/generated/action.py
+++ b/src/guestconfig/azext_guestconfig/generated/action.py
@@ -8,66 +8,3 @@
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=protected-access
-
-import argparse
-from knack.util import CLIError
-from collections import defaultdict
-
-
-class AddGuestConfigurationConfigurationParameter(argparse._AppendAction):
- def __call__(self, parser, namespace, values, option_string=None):
- action = self.get_action(values, option_string)
- super(AddGuestConfigurationConfigurationParameter, 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 == 'value':
- d['value'] = v[0]
- return d
-
-
-class AddGuestConfigurationConfigurationSetting(argparse.Action):
- def __call__(self, parser, namespace, values, option_string=None):
- action = self.get_action(values, option_string)
- namespace.guest_configuration_configuration_setting = action
-
- 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 = {}
- d['refresh_frequency_mins'] = 30
- d['reboot_if_needed'] = "False"
- d['configuration_mode_frequency_mins'] = 15
- for k in properties:
- kl = k.lower()
- v = properties[k]
- if kl == 'configuration-mode':
- d['configuration_mode'] = v[0]
- elif kl == 'allow-module-overwrite':
- d['allow_module_overwrite'] = v[0]
- elif kl == 'action-after-reboot':
- d['action_after_reboot'] = v[0]
- elif kl == 'refresh-frequency-mins':
- d['refresh_frequency_mins'] = v[0]
- elif kl == 'reboot-if-needed':
- d['reboot_if_needed'] = v[0]
- elif kl == 'configuration-mode-frequency-mins':
- d['configuration_mode_frequency_mins'] = v[0]
- return d
diff --git a/src/guestconfig/azext_guestconfig/generated/commands.py b/src/guestconfig/azext_guestconfig/generated/commands.py
index d902a678590..83faa3b5867 100644
--- a/src/guestconfig/azext_guestconfig/generated/commands.py
+++ b/src/guestconfig/azext_guestconfig/generated/commands.py
@@ -7,6 +7,8 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=too-many-statements
+# pylint: disable=too-many-locals
from azure.cli.core.commands import CliCommandType
@@ -15,51 +17,46 @@ def load_command_table(self, _):
from azext_guestconfig.generated._client_factory import cf_guest_configuration_assignment
guestconfig_guest_configuration_assignment = CliCommandType(
- operations_tmpl='azext_guestconfig.vendored_sdks.guestconfig.operations._guest_configuration_assignment_operati'
- 'ons#GuestConfigurationAssignmentOperations.{}',
+ operations_tmpl='azext_guestconfig.vendored_sdks.guestconfig.operations._guest_configuration_assignments_operat'
+ 'ions#GuestConfigurationAssignmentsOperations.{}',
client_factory=cf_guest_configuration_assignment)
with self.command_group('guestconfig guest-configuration-assignment', guestconfig_guest_configuration_assignment,
- client_factory=cf_guest_configuration_assignment, is_experimental=True) as g:
+ client_factory=cf_guest_configuration_assignment) as g:
g.custom_command('list', 'guestconfig_guest_configuration_assignment_list')
g.custom_show_command('show', 'guestconfig_guest_configuration_assignment_show')
- g.custom_command('create', 'guestconfig_guest_configuration_assignment_create', supports_no_wait=True)
- g.custom_command('update', 'guestconfig_guest_configuration_assignment_update', supports_no_wait=True)
- g.custom_command('delete', 'guestconfig_guest_configuration_assignment_delete', supports_no_wait=True)
- g.custom_wait_command('wait', 'guestconfig_guest_configuration_assignment_show')
from azext_guestconfig.generated._client_factory import cf_guest_configuration_assignment_report
guestconfig_guest_configuration_assignment_report = CliCommandType(
- operations_tmpl='azext_guestconfig.vendored_sdks.guestconfig.operations._guest_configuration_assignment_report_'
- 'operations#GuestConfigurationAssignmentReportOperations.{}',
+ operations_tmpl='azext_guestconfig.vendored_sdks.guestconfig.operations._guest_configuration_assignment_reports'
+ '_operations#GuestConfigurationAssignmentReportsOperations.{}',
client_factory=cf_guest_configuration_assignment_report)
with self.command_group('guestconfig guest-configuration-assignment-report',
guestconfig_guest_configuration_assignment_report,
- client_factory=cf_guest_configuration_assignment_report, is_experimental=True) as g:
+ client_factory=cf_guest_configuration_assignment_report) as g:
g.custom_command('list', 'guestconfig_guest_configuration_assignment_report_list')
g.custom_show_command('show', 'guestconfig_guest_configuration_assignment_report_show')
from azext_guestconfig.generated._client_factory import cf_guest_configuration_hcrp_assignment
guestconfig_guest_configuration_hcrp_assignment = CliCommandType(
- operations_tmpl='azext_guestconfig.vendored_sdks.guestconfig.operations._guest_configuration_hcrp_assignment_op'
- 'erations#GuestConfigurationHcrpAssignmentOperations.{}',
+ operations_tmpl='azext_guestconfig.vendored_sdks.guestconfig.operations._guest_configuration_hcrp_assignments_o'
+ 'perations#GuestConfigurationHcrpAssignmentsOperations.{}',
client_factory=cf_guest_configuration_hcrp_assignment)
with self.command_group('guestconfig guest-configuration-hcrp-assignment',
guestconfig_guest_configuration_hcrp_assignment,
- client_factory=cf_guest_configuration_hcrp_assignment, is_experimental=True) as g:
+ client_factory=cf_guest_configuration_hcrp_assignment) as g:
g.custom_command('list', 'guestconfig_guest_configuration_hcrp_assignment_list')
g.custom_show_command('show', 'guestconfig_guest_configuration_hcrp_assignment_show')
- g.custom_command('create', 'guestconfig_guest_configuration_hcrp_assignment_create', supports_no_wait=True)
- g.custom_command('update', 'guestconfig_guest_configuration_hcrp_assignment_update', supports_no_wait=True)
- g.custom_command('delete', 'guestconfig_guest_configuration_hcrp_assignment_delete', supports_no_wait=True)
- g.custom_wait_command('wait', 'guestconfig_guest_configuration_hcrp_assignment_show')
from azext_guestconfig.generated._client_factory import cf_guest_configuration_hcrp_assignment_report
guestconfig_guest_configuration_hcrp_assignment_report = CliCommandType(
operations_tmpl='azext_guestconfig.vendored_sdks.guestconfig.operations._guest_configuration_hcrp_assignment_re'
- 'port_operations#GuestConfigurationHcrpAssignmentReportOperations.{}',
+ 'ports_operations#GuestConfigurationHcrpAssignmentReportsOperations.{}',
client_factory=cf_guest_configuration_hcrp_assignment_report)
with self.command_group('guestconfig guest-configuration-hcrp-assignment-report',
guestconfig_guest_configuration_hcrp_assignment_report,
- client_factory=cf_guest_configuration_hcrp_assignment_report, is_experimental=True) as g:
+ client_factory=cf_guest_configuration_hcrp_assignment_report) as g:
g.custom_command('list', 'guestconfig_guest_configuration_hcrp_assignment_report_list')
g.custom_show_command('show', 'guestconfig_guest_configuration_hcrp_assignment_report_show')
+
+ with self.command_group('guestconfig', is_experimental=True):
+ pass
diff --git a/src/guestconfig/azext_guestconfig/generated/custom.py b/src/guestconfig/azext_guestconfig/generated/custom.py
index afaaa2c3335..55a625bdf95 100644
--- a/src/guestconfig/azext_guestconfig/generated/custom.py
+++ b/src/guestconfig/azext_guestconfig/generated/custom.py
@@ -9,9 +9,6 @@
# --------------------------------------------------------------------------
# pylint: disable=too-many-lines
-import json
-from azure.cli.core.util import sdk_no_wait
-
def guestconfig_guest_configuration_assignment_list(client,
resource_group_name,
@@ -29,82 +26,6 @@ def guestconfig_guest_configuration_assignment_show(client,
vm_name=vm_name)
-def guestconfig_guest_configuration_assignment_create(client,
- guest_configuration_assignment_name,
- resource_group_name,
- vm_name,
- name=None,
- location=None,
- context=None,
- latest_assignment_report_assignment=None,
- guest_configuration_name=None,
- guest_configuration_version=None,
- guest_configuration_configuration_parameter=None,
- guest_configuration_configuration_setting=None,
- no_wait=False):
- if isinstance(latest_assignment_report_assignment, str):
- latest_assignment_report_assignment = json.loads(latest_assignment_report_assignment)
- return sdk_no_wait(no_wait,
- client.begin_create_or_update,
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- resource_group_name=resource_group_name,
- vm_name=vm_name,
- name=name,
- location=location,
- context=context,
- assignment=latest_assignment_report_assignment,
- vm=json.loads("{}"),
- resources="{}",
- guest_configuration_navigation_name=guest_configuration_name,
- version=guest_configuration_version,
- configuration_parameter=guest_configuration_configuration_parameter,
- configuration_setting=guest_configuration_configuration_setting)
-
-
-def guestconfig_guest_configuration_assignment_update(client,
- guest_configuration_assignment_name,
- resource_group_name,
- vm_name,
- name=None,
- location=None,
- context=None,
- latest_assignment_report_assignment=None,
- guest_configuration_name=None,
- guest_configuration_version=None,
- guest_configuration_configuration_parameter=None,
- guest_configuration_configuration_setting=None,
- no_wait=False):
- if isinstance(latest_assignment_report_assignment, str):
- latest_assignment_report_assignment = json.loads(latest_assignment_report_assignment)
- return sdk_no_wait(no_wait,
- client.begin_create_or_update,
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- resource_group_name=resource_group_name,
- vm_name=vm_name,
- name=name,
- location=location,
- context=context,
- assignment=latest_assignment_report_assignment,
- vm=json.loads("{}"),
- resources="{}",
- guest_configuration_navigation_name=guest_configuration_name,
- version=guest_configuration_version,
- configuration_parameter=guest_configuration_configuration_parameter,
- configuration_setting=guest_configuration_configuration_setting)
-
-
-def guestconfig_guest_configuration_assignment_delete(client,
- resource_group_name,
- guest_configuration_assignment_name,
- vm_name,
- no_wait=False):
- return sdk_no_wait(no_wait,
- client.begin_delete,
- resource_group_name=resource_group_name,
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- vm_name=vm_name)
-
-
def guestconfig_guest_configuration_assignment_report_list(client,
resource_group_name,
guest_configuration_assignment_name,
@@ -141,82 +62,6 @@ def guestconfig_guest_configuration_hcrp_assignment_show(client,
machine_name=machine_name)
-def guestconfig_guest_configuration_hcrp_assignment_create(client,
- guest_configuration_assignment_name,
- resource_group_name,
- machine_name,
- name=None,
- location=None,
- context=None,
- latest_assignment_report_assignment=None,
- guest_configuration_name=None,
- guest_configuration_version=None,
- guest_configuration_configuration_parameter=None,
- guest_configuration_configuration_setting=None,
- no_wait=False):
- if isinstance(latest_assignment_report_assignment, str):
- latest_assignment_report_assignment = json.loads(latest_assignment_report_assignment)
- return sdk_no_wait(no_wait,
- client.begin_create_or_update,
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- resource_group_name=resource_group_name,
- machine_name=machine_name,
- name=name,
- location=location,
- context=context,
- assignment=latest_assignment_report_assignment,
- vm=json.loads("{}"),
- resources="{}",
- guest_configuration_navigation_name=guest_configuration_name,
- version=guest_configuration_version,
- configuration_parameter=guest_configuration_configuration_parameter,
- configuration_setting=guest_configuration_configuration_setting)
-
-
-def guestconfig_guest_configuration_hcrp_assignment_update(client,
- guest_configuration_assignment_name,
- resource_group_name,
- machine_name,
- name=None,
- location=None,
- context=None,
- latest_assignment_report_assignment=None,
- guest_configuration_name=None,
- guest_configuration_version=None,
- guest_configuration_configuration_parameter=None,
- guest_configuration_configuration_setting=None,
- no_wait=False):
- if isinstance(latest_assignment_report_assignment, str):
- latest_assignment_report_assignment = json.loads(latest_assignment_report_assignment)
- return sdk_no_wait(no_wait,
- client.begin_create_or_update,
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- resource_group_name=resource_group_name,
- machine_name=machine_name,
- name=name,
- location=location,
- context=context,
- assignment=latest_assignment_report_assignment,
- vm=json.loads("{}"),
- resources="{}",
- guest_configuration_navigation_name=guest_configuration_name,
- version=guest_configuration_version,
- configuration_parameter=guest_configuration_configuration_parameter,
- configuration_setting=guest_configuration_configuration_setting)
-
-
-def guestconfig_guest_configuration_hcrp_assignment_delete(client,
- resource_group_name,
- guest_configuration_assignment_name,
- machine_name,
- no_wait=False):
- return sdk_no_wait(no_wait,
- client.begin_delete,
- resource_group_name=resource_group_name,
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- machine_name=machine_name)
-
-
def guestconfig_guest_configuration_hcrp_assignment_report_list(client,
resource_group_name,
guest_configuration_assignment_name,
diff --git a/src/guestconfig/azext_guestconfig/tests/__init__.py b/src/guestconfig/azext_guestconfig/tests/__init__.py
index 9b7ec942a0b..70488e93851 100644
--- a/src/guestconfig/azext_guestconfig/tests/__init__.py
+++ b/src/guestconfig/azext_guestconfig/tests/__init__.py
@@ -9,22 +9,30 @@
# 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):
def import_manual_function(origin_func):
from importlib import import_module
- decorated_path = inspect.getfile(origin_func)
- module_path = __path__[0]
+ decorated_path = inspect.getfile(origin_func).lower()
+ module_path = __path__[0].lower()
if not decorated_path.startswith(module_path):
raise Exception("Decorator can only be used in submodules!")
manual_path = os.path.join(
@@ -39,29 +47,66 @@ 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__))
+ 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:
+ use_exception_cache = os.getenv("TEST_EXCEPTION_CACHE")
+ if use_exception_cache is None or use_exception_cache.lower() != "true":
+ raise
+ 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/guestconfig/azext_guestconfig/tests/latest/example_steps.py b/src/guestconfig/azext_guestconfig/tests/latest/example_steps.py
new file mode 100644
index 00000000000..1c1c5cef3d2
--- /dev/null
+++ b/src/guestconfig/azext_guestconfig/tests/latest/example_steps.py
@@ -0,0 +1,110 @@
+# --------------------------------------------------------------------------
+# 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.
+# --------------------------------------------------------------------------
+# pylint: disable=line-too-long
+
+
+from .. import try_manual
+
+
+# EXAMPLE: /GuestConfigurationAssignments/get/Get a guest configuration assignment
+@try_manual
+def step_guest_configuration_assignment_show(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az guestconfig guest-configuration-assignment show '
+ '--name "{myGuestConfigurationAssignment}" '
+ '--resource-group "{rg}" '
+ '--vm-name "myVMName"',
+ checks=checks)
+
+
+# EXAMPLE: /GuestConfigurationAssignments/get/List all guest configuration assignments for a virtual machine
+@try_manual
+def step_guest_configuration_assignment_list(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az guestconfig guest-configuration-assignment list '
+ '--resource-group "{rg}" '
+ '--vm-name "myVMName"',
+ checks=checks)
+
+
+# EXAMPLE: /GuestConfigurationAssignmentReports/get/Get a guest configuration assignment report by Id for a virtual machine
+@try_manual
+def step_guest_configuration_assignment_report_show(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az guestconfig guest-configuration-assignment-report show '
+ '--guest-configuration-assignment-name "{myGuestConfigurationAssignment2}" '
+ '--report-id "7367cbb8-ae99-47d0-a33b-a283564d2cb1" '
+ '--resource-group "{rg}" '
+ '--vm-name "myvm"',
+ checks=checks)
+
+
+# EXAMPLE: /GuestConfigurationAssignmentReports/get/List all guest configuration assignments for a virtual machine
+@try_manual
+def step_guest_configuration_assignment_report_list(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az guestconfig guest-configuration-assignment-report list '
+ '--guest-configuration-assignment-name "{myGuestConfigurationAssignment2}" '
+ '--resource-group "{rg}" '
+ '--vm-name "myVMName"',
+ checks=checks)
+
+
+# EXAMPLE: /GuestConfigurationHCRPAssignmentReports/get/Get a guest configuration assignment report by Id for a virtual machine
+@try_manual
+def step_guest_configuration_hcrp(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az guestconfig guest-configuration-hcrp-assignment-report show '
+ '--guest-configuration-assignment-name "{myGuestConfigurationAssignment2}" '
+ '--machine-name "myMachineName" '
+ '--report-id "7367cbb8-ae99-47d0-a33b-a283564d2cb1" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /GuestConfigurationHCRPAssignmentReports/get/List all guest configuration assignments for a virtual machine
+@try_manual
+def step_guest_configuration_hcrp2(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az guestconfig guest-configuration-hcrp-assignment-report list '
+ '--guest-configuration-assignment-name "{myGuestConfigurationAssignment2}" '
+ '--machine-name "myMachineName" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /GuestConfigurationHCRPAssignments/get/Get a guest configuration assignment
+@try_manual
+def step_guest_configuration_hcrp_assignment_show(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az guestconfig guest-configuration-hcrp-assignment show '
+ '--guest-configuration-assignment-name "{myGuestConfigurationAssignment}" '
+ '--machine-name "myMachineName" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /GuestConfigurationHCRPAssignments/get/List all guest configuration assignments for a virtual machine
+@try_manual
+def step_guest_configuration_hcrp_assignment_list(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az guestconfig guest-configuration-hcrp-assignment list '
+ '--machine-name "myMachineName" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
diff --git a/src/guestconfig/azext_guestconfig/tests/latest/test_guestconfig_scenario.py b/src/guestconfig/azext_guestconfig/tests/latest/test_guestconfig_scenario.py
index 08b8dd07608..7f280948f07 100644
--- a/src/guestconfig/azext_guestconfig/tests/latest/test_guestconfig_scenario.py
+++ b/src/guestconfig/azext_guestconfig/tests/latest/test_guestconfig_scenario.py
@@ -7,138 +7,70 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
-# pylint: disable=line-too-long
import os
from azure.cli.testsdk import ScenarioTest
-from .. import try_manual, raise_if
from azure.cli.testsdk import ResourceGroupPreparer
+from .example_steps import step_guest_configuration_assignment_show
+from .example_steps import step_guest_configuration_assignment_list
+from .example_steps import step_guest_configuration_assignment_report_show
+from .example_steps import step_guest_configuration_assignment_report_list
+from .example_steps import step_guest_configuration_hcrp
+from .example_steps import step_guest_configuration_hcrp2
+from .example_steps import step_guest_configuration_hcrp_assignment_show
+from .example_steps import step_guest_configuration_hcrp_assignment_list
+from .. import (
+ try_manual,
+ raise_if,
+ calc_coverage
+)
TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))
+# Env setup_scenario
@try_manual
-def setup(test, rg):
+def setup_scenario(test, rg):
pass
-# EXAMPLE: /GuestConfigurationAssignments/get/Get a guest configuration assignment
+# Env cleanup_scenario
@try_manual
-def step__guestconfigurationassignments_get_get_a_guest_configuration_assignment(test, rg):
- test.cmd('az guestconfig guest-configuration-assignment show '
- '--name "{GuestConfigurationAssignments}" '
- '--resource-group "{RGroup}" '
- '--vm-name "{VMName}"',
- checks=[])
-
-
-# EXAMPLE: /GuestConfigurationAssignments/get/List all guest configuration assignments for a virtual machine
-@try_manual
-def step__guestconfigurationassignments_get_list_all_guest_configuration_assignments_for_a_virtual_machine(test, rg):
- test.cmd('az guestconfig guest-configuration-assignment list '
- '--resource-group "{RGroup}" '
- '--vm-name "{VMName}"',
- checks=[])
-
-
-# EXAMPLE: /GuestConfigurationAssignmentReports/get/Get a guest configuration assignment report by Id for a virtual machine
-@try_manual
-def step__guestconfigurationassignmentreports_get_get_a_guest_configuration_assignment_report_by_id_for_a_virtual_machine(test, rg):
- test.cmd('az guestconfig guest-configuration-assignment-report show '
- '--guest-configuration-assignment-name "{GuestConfigurationAssignments}" '
- '--report-id "{GuestConfigurationReportId}" '
- '--resource-group "{RGroup}" '
- '--vm-name "{VMName}"',
- checks=[])
-
-
-# EXAMPLE: /GuestConfigurationAssignmentReports/get/List all guest configuration assignments for a virtual machine
-@try_manual
-def step__guestconfigurationassignmentreports_get_list_all_guest_configuration_assignments_for_a_virtual_machine(test, rg):
- test.cmd('az guestconfig guest-configuration-assignment-report list '
- '--guest-configuration-assignment-name "{GuestConfigurationAssignments}" '
- '--resource-group "{RGroup}" '
- '--vm-name "{VMName}"',
- checks=[])
-
-
-# EXAMPLE: /GuestConfigurationHCRPAssignmentReports/get/Get a guest configuration assignment report by Id for a virtual machine
-@try_manual
-def step__guestconfigurationhcrpassignmentreports_get_get_a_guest_configuration_assignment_report_by_id_for_a_virtual_machine(test, rg):
- test.cmd('az guestconfig guest-configuration-hcrp-assignment-report show '
- '--guest-configuration-assignment-name "{HybridGuestConfigurationAssignments}" '
- '--machine-name "{HybridMName}" '
- '--report-id "{HybridGuestConfigurationReportId}" '
- '--resource-group "{HybridRGroup}"',
- checks=[])
-
-
-# EXAMPLE: /GuestConfigurationHCRPAssignmentReports/get/List all guest configuration assignments for a virtual machine
-@try_manual
-def step__guestconfigurationhcrpassignmentreports_get_list_all_guest_configuration_assignments_for_a_virtual_machine(test, rg):
- test.cmd('az guestconfig guest-configuration-hcrp-assignment-report list '
- '--guest-configuration-assignment-name "{HybridGuestConfigurationAssignments}" '
- '--machine-name "{HybridMName}" '
- '--resource-group "{HybridRGroup}"',
- checks=[])
-
-
-# EXAMPLE: /GuestConfigurationHCRPAssignments/get/Get a guest configuration assignment
-@try_manual
-def step__guestconfigurationhcrpassignments_get_get_a_guest_configuration_assignment(test, rg):
- test.cmd('az guestconfig guest-configuration-hcrp-assignment show '
- '--guest-configuration-assignment-name "{HybridGuestConfigurationAssignments}" '
- '--machine-name "{HybridMName}" '
- '--resource-group "{HybridRGroup}"',
- checks=[])
-
-
-# EXAMPLE: /GuestConfigurationHCRPAssignments/get/List all guest configuration assignments for a virtual machine
-@try_manual
-def step__guestconfigurationhcrpassignments_get_list_all_guest_configuration_assignments_for_a_virtual_machine(test, rg):
- test.cmd('az guestconfig guest-configuration-hcrp-assignment list '
- '--machine-name "{HybridMName}" '
- '--resource-group "{HybridRGroup}"',
- checks=[])
-
-
-@try_manual
-def cleanup(test, rg):
+def cleanup_scenario(test, rg):
pass
+# Testcase: Scenario
@try_manual
def call_scenario(test, rg):
- setup(test, rg)
- step__guestconfigurationassignments_get_get_a_guest_configuration_assignment(test, rg)
- step__guestconfigurationassignments_get_list_all_guest_configuration_assignments_for_a_virtual_machine(test, rg)
- step__guestconfigurationassignmentreports_get_get_a_guest_configuration_assignment_report_by_id_for_a_virtual_machine(test, rg)
- step__guestconfigurationassignmentreports_get_list_all_guest_configuration_assignments_for_a_virtual_machine(test, rg)
- step__guestconfigurationhcrpassignmentreports_get_get_a_guest_configuration_assignment_report_by_id_for_a_virtual_machine(test, rg)
- step__guestconfigurationhcrpassignmentreports_get_list_all_guest_configuration_assignments_for_a_virtual_machine(test, rg)
- step__guestconfigurationhcrpassignments_get_get_a_guest_configuration_assignment(test, rg)
- step__guestconfigurationhcrpassignments_get_list_all_guest_configuration_assignments_for_a_virtual_machine(test, rg)
- cleanup(test, rg)
-
-
+ setup_scenario(test, rg)
+ step_guest_configuration_assignment_show(test, rg, checks=[])
+ step_guest_configuration_assignment_list(test, rg, checks=[])
+ step_guest_configuration_assignment_report_show(test, rg, checks=[])
+ step_guest_configuration_assignment_report_list(test, rg, checks=[])
+ step_guest_configuration_hcrp(test, rg, checks=[])
+ step_guest_configuration_hcrp2(test, rg, checks=[])
+ step_guest_configuration_hcrp_assignment_show(test, rg, checks=[])
+ step_guest_configuration_hcrp_assignment_list(test, rg, checks=[])
+ cleanup_scenario(test, rg)
+
+
+# Test class for Scenario
@try_manual
-class GuestConfigurationClientScenarioTest(ScenarioTest):
-
- @ResourceGroupPreparer(name_prefix='geTestResourceGroup002', key='rg', parameter_name='rg')
- def test_guestconfig(self, rg):
+class GuestconfigScenarioTest(ScenarioTest):
+ def __init__(self, *args, **kwargs):
+ super(GuestconfigScenarioTest, self).__init__(*args, **kwargs)
self.kwargs.update({
- 'WhitelistedApplication': 'WhitelistedApplication',
- 'RGroup': 'geTestResourceGroup002',
- 'VMName': 'geubuntu18.04-20200722',
- 'GuestConfigurationAssignments': 'linux-password-baseline',
- 'GuestConfigurationReportId': '8ed6b155-3627-41ee-a96c-bcb9b026eec0',
- 'HybridRGroup': 'geTestResourceGroup002',
- 'HybridMName': 'MSFT-LMR',
- 'HybridGuestConfigurationAssignments': 'WindowsTimeZone',
- 'HybridGuestConfigurationReportId': '2ecfc027-3dfa-4146-9d33-dee3cb5c7c94',
+ 'myGuestConfigurationAssignment': 'SecureProtocol',
+ 'myGuestConfigurationAssignment2': 'AuditSecureProtocol',
})
+
+ @ResourceGroupPreparer(name_prefix='clitestguestconfig_myResourceGroupName'[:7], key='rg', parameter_name='rg')
+ def test_guestconfig_Scenario(self, rg):
call_scenario(self, rg)
+ calc_coverage(__file__)
raise_if()
+
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/__init__.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/__init__.py
index 244b40bca5f..775ab0d2f63 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/__init__.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/__init__.py
@@ -10,7 +10,7 @@
__all__ = ['GuestConfigurationClient']
try:
- from ._patch import patch_sdk
+ from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/_configuration.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/_configuration.py
index 390a7843411..c1cc0ec8da1 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/_configuration.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/_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
@@ -47,8 +48,7 @@ def __init__(
self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-06-25"
- self.credential_scopes = ['https://management.azure.com/.default']
- self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
+ self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'guestconfigurationclient/{}'.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/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/_guest_configuration_client.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/_guest_configuration_client.py
index 4c9e89184a5..6d310d0e370 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/_guest_configuration_client.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/_guest_configuration_client.py
@@ -18,33 +18,32 @@
from azure.core.credentials import TokenCredential
from ._configuration import GuestConfigurationClientConfiguration
-from .operations import GuestConfigurationAssignmentOperations
-from .operations import GuestConfigurationAssignmentReportOperations
-from .operations import GuestConfigurationHcrpAssignmentOperations
-from .operations import GuestConfigurationHcrpAssignmentReportOperations
-from .operations import OperationOperations
+from .operations import GuestConfigurationAssignmentsOperations
+from .operations import GuestConfigurationAssignmentReportsOperations
+from .operations import GuestConfigurationHcrpAssignmentsOperations
+from .operations import GuestConfigurationHcrpAssignmentReportsOperations
+from .operations import Operations
from . import models
class GuestConfigurationClient(object):
"""Guest Configuration Client.
- :ivar guest_configuration_assignment: GuestConfigurationAssignmentOperations operations
- :vartype guest_configuration_assignment: guest_configuration_client.operations.GuestConfigurationAssignmentOperations
- :ivar guest_configuration_assignment_report: GuestConfigurationAssignmentReportOperations operations
- :vartype guest_configuration_assignment_report: guest_configuration_client.operations.GuestConfigurationAssignmentReportOperations
- :ivar guest_configuration_hcrp_assignment: GuestConfigurationHcrpAssignmentOperations operations
- :vartype guest_configuration_hcrp_assignment: guest_configuration_client.operations.GuestConfigurationHcrpAssignmentOperations
- :ivar guest_configuration_hcrp_assignment_report: GuestConfigurationHcrpAssignmentReportOperations operations
- :vartype guest_configuration_hcrp_assignment_report: guest_configuration_client.operations.GuestConfigurationHcrpAssignmentReportOperations
- :ivar operation: OperationOperations operations
- :vartype operation: guest_configuration_client.operations.OperationOperations
+ :ivar guest_configuration_assignments: GuestConfigurationAssignmentsOperations operations
+ :vartype guest_configuration_assignments: guest_configuration_client.operations.GuestConfigurationAssignmentsOperations
+ :ivar guest_configuration_assignment_reports: GuestConfigurationAssignmentReportsOperations operations
+ :vartype guest_configuration_assignment_reports: guest_configuration_client.operations.GuestConfigurationAssignmentReportsOperations
+ :ivar guest_configuration_hcrp_assignments: GuestConfigurationHcrpAssignmentsOperations operations
+ :vartype guest_configuration_hcrp_assignments: guest_configuration_client.operations.GuestConfigurationHcrpAssignmentsOperations
+ :ivar guest_configuration_hcrp_assignment_reports: GuestConfigurationHcrpAssignmentReportsOperations operations
+ :vartype guest_configuration_hcrp_assignment_reports: guest_configuration_client.operations.GuestConfigurationHcrpAssignmentReportsOperations
+ :ivar operations: Operations operations
+ :vartype operations: guest_configuration_client.operations.Operations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
: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__(
@@ -64,15 +63,15 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
- self.guest_configuration_assignment = GuestConfigurationAssignmentOperations(
+ self.guest_configuration_assignments = GuestConfigurationAssignmentsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.guest_configuration_assignment_report = GuestConfigurationAssignmentReportOperations(
+ self.guest_configuration_assignment_reports = GuestConfigurationAssignmentReportsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.guest_configuration_hcrp_assignment = GuestConfigurationHcrpAssignmentOperations(
+ self.guest_configuration_hcrp_assignments = GuestConfigurationHcrpAssignmentsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.guest_configuration_hcrp_assignment_report = GuestConfigurationHcrpAssignmentReportOperations(
+ self.guest_configuration_hcrp_assignment_reports = GuestConfigurationHcrpAssignmentReportsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.operation = OperationOperations(
+ self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
def close(self):
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/__init__.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/__init__.py
index 08acaef4f72..87d64022a9d 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/__init__.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/__init__.py
@@ -6,5 +6,5 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from ._guest_configuration_client_async import GuestConfigurationClient
+from ._guest_configuration_client import GuestConfigurationClient
__all__ = ['GuestConfigurationClient']
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/_configuration_async.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/_configuration.py
similarity index 91%
rename from src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/_configuration_async.py
rename to src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/_configuration.py
index 3fdd386f998..1a313b9e281 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/_configuration_async.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/_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
@@ -44,8 +45,7 @@ def __init__(
self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-06-25"
- self.credential_scopes = ['https://management.azure.com/.default']
- self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
+ self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'guestconfigurationclient/{}'.format(VERSION))
self._configure(**kwargs)
@@ -57,6 +57,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.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)
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/_guest_configuration_client_async.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/_guest_configuration_client.py
similarity index 55%
rename from src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/_guest_configuration_client_async.py
rename to src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/_guest_configuration_client.py
index ee72ec68393..1eccc9186d4 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/_guest_configuration_client_async.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/_guest_configuration_client.py
@@ -15,34 +15,33 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
-from ._configuration_async import GuestConfigurationClientConfiguration
-from .operations_async import GuestConfigurationAssignmentOperations
-from .operations_async import GuestConfigurationAssignmentReportOperations
-from .operations_async import GuestConfigurationHcrpAssignmentOperations
-from .operations_async import GuestConfigurationHcrpAssignmentReportOperations
-from .operations_async import OperationOperations
+from ._configuration import GuestConfigurationClientConfiguration
+from .operations import GuestConfigurationAssignmentsOperations
+from .operations import GuestConfigurationAssignmentReportsOperations
+from .operations import GuestConfigurationHcrpAssignmentsOperations
+from .operations import GuestConfigurationHcrpAssignmentReportsOperations
+from .operations import Operations
from .. import models
class GuestConfigurationClient(object):
"""Guest Configuration Client.
- :ivar guest_configuration_assignment: GuestConfigurationAssignmentOperations operations
- :vartype guest_configuration_assignment: guest_configuration_client.aio.operations_async.GuestConfigurationAssignmentOperations
- :ivar guest_configuration_assignment_report: GuestConfigurationAssignmentReportOperations operations
- :vartype guest_configuration_assignment_report: guest_configuration_client.aio.operations_async.GuestConfigurationAssignmentReportOperations
- :ivar guest_configuration_hcrp_assignment: GuestConfigurationHcrpAssignmentOperations operations
- :vartype guest_configuration_hcrp_assignment: guest_configuration_client.aio.operations_async.GuestConfigurationHcrpAssignmentOperations
- :ivar guest_configuration_hcrp_assignment_report: GuestConfigurationHcrpAssignmentReportOperations operations
- :vartype guest_configuration_hcrp_assignment_report: guest_configuration_client.aio.operations_async.GuestConfigurationHcrpAssignmentReportOperations
- :ivar operation: OperationOperations operations
- :vartype operation: guest_configuration_client.aio.operations_async.OperationOperations
+ :ivar guest_configuration_assignments: GuestConfigurationAssignmentsOperations operations
+ :vartype guest_configuration_assignments: guest_configuration_client.aio.operations.GuestConfigurationAssignmentsOperations
+ :ivar guest_configuration_assignment_reports: GuestConfigurationAssignmentReportsOperations operations
+ :vartype guest_configuration_assignment_reports: guest_configuration_client.aio.operations.GuestConfigurationAssignmentReportsOperations
+ :ivar guest_configuration_hcrp_assignments: GuestConfigurationHcrpAssignmentsOperations operations
+ :vartype guest_configuration_hcrp_assignments: guest_configuration_client.aio.operations.GuestConfigurationHcrpAssignmentsOperations
+ :ivar guest_configuration_hcrp_assignment_reports: GuestConfigurationHcrpAssignmentReportsOperations operations
+ :vartype guest_configuration_hcrp_assignment_reports: guest_configuration_client.aio.operations.GuestConfigurationHcrpAssignmentReportsOperations
+ :ivar operations: Operations operations
+ :vartype operations: guest_configuration_client.aio.operations.Operations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
: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__(
@@ -61,15 +60,15 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
- self.guest_configuration_assignment = GuestConfigurationAssignmentOperations(
+ self.guest_configuration_assignments = GuestConfigurationAssignmentsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.guest_configuration_assignment_report = GuestConfigurationAssignmentReportOperations(
+ self.guest_configuration_assignment_reports = GuestConfigurationAssignmentReportsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.guest_configuration_hcrp_assignment = GuestConfigurationHcrpAssignmentOperations(
+ self.guest_configuration_hcrp_assignments = GuestConfigurationHcrpAssignmentsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.guest_configuration_hcrp_assignment_report = GuestConfigurationHcrpAssignmentReportOperations(
+ self.guest_configuration_hcrp_assignment_reports = GuestConfigurationHcrpAssignmentReportsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.operation = OperationOperations(
+ self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
async def close(self) -> None:
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/__init__.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/__init__.py
new file mode 100644
index 00000000000..e0995a8b285
--- /dev/null
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/__init__.py
@@ -0,0 +1,21 @@
+# 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 ._guest_configuration_assignments_operations import GuestConfigurationAssignmentsOperations
+from ._guest_configuration_assignment_reports_operations import GuestConfigurationAssignmentReportsOperations
+from ._guest_configuration_hcrp_assignments_operations import GuestConfigurationHcrpAssignmentsOperations
+from ._guest_configuration_hcrp_assignment_reports_operations import GuestConfigurationHcrpAssignmentReportsOperations
+from ._operations import Operations
+
+__all__ = [
+ 'GuestConfigurationAssignmentsOperations',
+ 'GuestConfigurationAssignmentReportsOperations',
+ 'GuestConfigurationHcrpAssignmentsOperations',
+ 'GuestConfigurationHcrpAssignmentReportsOperations',
+ 'Operations',
+]
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_guest_configuration_assignment_report_operations_async.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_guest_configuration_assignment_reports_operations.py
similarity index 91%
rename from src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_guest_configuration_assignment_report_operations_async.py
rename to src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_guest_configuration_assignment_reports_operations.py
index 4125b128698..0bd2fd59222 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_guest_configuration_assignment_report_operations_async.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_guest_configuration_assignment_reports_operations.py
@@ -8,7 +8,7 @@
from typing import Any, Callable, Dict, Generic, Optional, TypeVar
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 AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat
@@ -18,8 +18,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class GuestConfigurationAssignmentReportOperations:
- """GuestConfigurationAssignmentReportOperations async operations.
+class GuestConfigurationAssignmentReportsOperations:
+ """GuestConfigurationAssignmentReportsOperations 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.
@@ -61,9 +61,12 @@ async def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignmentReportList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
url = self.list.metadata['url'] # type: ignore
@@ -81,9 +84,8 @@ async 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 = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -125,9 +127,12 @@ async def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignmentReport"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -146,9 +151,8 @@ async 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 = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_guest_configuration_assignment_operations_async.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_guest_configuration_assignments_operations.py
similarity index 61%
rename from src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_guest_configuration_assignment_operations_async.py
rename to src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_guest_configuration_assignments_operations.py
index b1dfe1d24db..cad9a080994 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_guest_configuration_assignment_operations_async.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_guest_configuration_assignments_operations.py
@@ -5,24 +5,22 @@
# 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
+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 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 AsyncHttpResponse, HttpRequest
-from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller
from azure.mgmt.core.exceptions import ARMErrorFormat
-from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
from ... import models
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class GuestConfigurationAssignmentOperations:
- """GuestConfigurationAssignmentOperations async operations.
+class GuestConfigurationAssignmentsOperations:
+ """GuestConfigurationAssignmentsOperations 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.
@@ -43,33 +41,40 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
- async def _create_or_update_initial(
+ async def create_or_update(
self,
guest_configuration_assignment_name: str,
resource_group_name: str,
vm_name: str,
- name: Optional[str] = None,
- location: Optional[str] = None,
- context: Optional[str] = None,
- assignment: Optional["models.AssignmentInfo"] = None,
- vm: Optional["models.VmInfo"] = None,
- resources: Optional[List["models.AssignmentReportResource"]] = None,
- guest_configuration_navigation_name: Optional[str] = None,
- version: Optional[str] = None,
- configuration_parameter: Optional[List["models.ConfigurationParameter"]] = None,
- configuration_setting: Optional["models.ConfigurationSetting"] = None,
+ parameters: "models.GuestConfigurationAssignment",
**kwargs
) -> "models.GuestConfigurationAssignment":
+ """Creates an association between a VM and guest configuration.
+
+ :param guest_configuration_assignment_name: Name of the guest configuration assignment.
+ :type guest_configuration_assignment_name: str
+ :param resource_group_name: The resource group name.
+ :type resource_group_name: str
+ :param vm_name: The name of the virtual machine.
+ :type vm_name: str
+ :param parameters: Parameters supplied to the create or update guest configuration assignment.
+ :type parameters: ~guest_configuration_client.models.GuestConfigurationAssignment
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: GuestConfigurationAssignment, or the result of cls(response)
+ :rtype: ~guest_configuration_client.models.GuestConfigurationAssignment
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- _parameters = models.GuestConfigurationAssignment(name=name, location=location, context=context, assignment=assignment, vm=vm, resources=resources, name_properties_guest_configuration_name=guest_configuration_navigation_name, version=version, configuration_parameter=configuration_parameter, configuration_setting=configuration_setting)
api_version = "2020-06-25"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self._create_or_update_initial.metadata['url'] # type: ignore
+ url = self.create_or_update.metadata['url'] # type: ignore
path_format_arguments = {
'guestConfigurationAssignmentName': self._serialize.url("guest_configuration_assignment_name", guest_configuration_assignment_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
@@ -85,14 +90,12 @@ async def _create_or_update_initial(
# 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(_parameters, 'GuestConfigurationAssignment')
+ body_content = self._serialize.body(parameters, 'GuestConfigurationAssignment')
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
@@ -101,7 +104,6 @@ async def _create_or_update_initial(
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('GuestConfigurationAssignment', pipeline_response)
@@ -112,102 +114,6 @@ async def _create_or_update_initial(
return cls(pipeline_response, deserialized, {})
return deserialized
- _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
-
- async def create_or_update(
- self,
- guest_configuration_assignment_name: str,
- resource_group_name: str,
- vm_name: str,
- name: Optional[str] = None,
- location: Optional[str] = None,
- context: Optional[str] = None,
- assignment: Optional["models.AssignmentInfo"] = None,
- vm: Optional["models.VmInfo"] = None,
- resources: Optional[List["models.AssignmentReportResource"]] = None,
- guest_configuration_navigation_name: Optional[str] = None,
- version: Optional[str] = None,
- configuration_parameter: Optional[List["models.ConfigurationParameter"]] = None,
- configuration_setting: Optional["models.ConfigurationSetting"] = None,
- **kwargs
- ) -> "models.GuestConfigurationAssignment":
- """Creates an association between a VM and guest configuration.
-
- :param guest_configuration_assignment_name: Name of the guest configuration assignment.
- :type guest_configuration_assignment_name: str
- :param resource_group_name: The resource group name.
- :type resource_group_name: str
- :param vm_name: The name of the virtual machine.
- :type vm_name: str
- :param name: Name of the guest configuration assignment.
- :type name: str
- :param location: Region where the VM is located.
- :type location: str
- :param context: The source which initiated the guest configuration assignment. Ex: Azure
- Policy.
- :type context: str
- :param assignment: Configuration details of the guest configuration assignment.
- :type assignment: ~guest_configuration_client.models.AssignmentInfo
- :param vm: Information about the VM.
- :type vm: ~guest_configuration_client.models.VmInfo
- :param resources: The list of resources for which guest configuration assignment compliance is
- checked.
- :type resources: list[~guest_configuration_client.models.AssignmentReportResource]
- :param guest_configuration_navigation_name: Name of the guest configuration.
- :type guest_configuration_navigation_name: str
- :param version: Version of the guest configuration.
- :type version: str
- :param configuration_parameter: The configuration parameters for the guest configuration.
- :type configuration_parameter: list[~guest_configuration_client.models.ConfigurationParameter]
- :param configuration_setting: The configuration setting for the guest configuration.
- :type configuration_setting: ~guest_configuration_client.models.ConfigurationSetting
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
- :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: GuestConfigurationAssignment, or the result of cls(response)
- :rtype: ~guest_configuration_client.models.GuestConfigurationAssignment
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
- cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignment"]
- lro_delay = kwargs.pop(
- 'polling_interval',
- self._config.polling_interval
- )
- raw_result = await self._create_or_update_initial(
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- resource_group_name=resource_group_name,
- vm_name=vm_name,
- name=name,
- location=location,
- context=context,
- assignment=assignment,
- vm=vm,
- resources=resources,
- guest_configuration_navigation_name=guest_configuration_navigation_name,
- version=version,
- configuration_parameter=configuration_parameter,
- configuration_setting=configuration_setting,
- cls=lambda x,y,z: x,
- **kwargs
- )
-
- kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
-
- def get_long_running_output(pipeline_response):
- deserialized = self._deserialize('GuestConfigurationAssignment', pipeline_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {})
- return deserialized
-
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
- elif polling is False: polling_method = AsyncNoPolling()
- else: polling_method = polling
- return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
async def get(
@@ -231,9 +137,12 @@ async def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -251,9 +160,8 @@ async 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 = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -271,20 +179,36 @@ async def get(
return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
- async def _delete_initial(
+ async def delete(
self,
resource_group_name: str,
guest_configuration_assignment_name: str,
vm_name: str,
**kwargs
) -> None:
+ """Delete a guest configuration assignment.
+
+ :param resource_group_name: The resource group name.
+ :type resource_group_name: str
+ :param guest_configuration_assignment_name: Name of the guest configuration assignment.
+ :type guest_configuration_assignment_name: str
+ :param vm_name: The name of the virtual machine.
+ :type vm_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 = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
- url = self._delete_initial.metadata['url'] # type: ignore
+ url = self.delete.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[-\w\._]+$'),
'guestConfigurationAssignmentName': self._serialize.url("guest_configuration_assignment_name", guest_configuration_assignment_name, 'str'),
@@ -299,8 +223,8 @@ async def _delete_initial(
# 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 = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -313,57 +237,6 @@ async def _delete_initial(
if cls:
return cls(pipeline_response, None, {})
- _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
-
- async def delete(
- self,
- resource_group_name: str,
- guest_configuration_assignment_name: str,
- vm_name: str,
- **kwargs
- ) -> None:
- """Delete a guest configuration assignment.
-
- :param resource_group_name: The resource group name.
- :type resource_group_name: str
- :param guest_configuration_assignment_name: Name of the guest configuration assignment.
- :type guest_configuration_assignment_name: str
- :param vm_name: The name of the virtual machine.
- :type vm_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
- :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: None, or the result of cls(response)
- :rtype: None
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
- cls = kwargs.pop('cls', None) # type: ClsType[None]
- lro_delay = kwargs.pop(
- 'polling_interval',
- self._config.polling_interval
- )
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- vm_name=vm_name,
- cls=lambda x,y,z: x,
- **kwargs
- )
-
- kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
-
- def get_long_running_output(pipeline_response):
- if cls:
- return cls(pipeline_response, None, {})
-
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
- elif polling is False: polling_method = AsyncNoPolling()
- else: polling_method = polling
- return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
def list(
@@ -384,11 +257,18 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignmentList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ 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
@@ -402,15 +282,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
async def extract_data(pipeline_response):
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_guest_configuration_hcrp_assignment_report_operations_async.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_guest_configuration_hcrp_assignment_reports_operations.py
similarity index 91%
rename from src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_guest_configuration_hcrp_assignment_report_operations_async.py
rename to src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_guest_configuration_hcrp_assignment_reports_operations.py
index 52830d15b2c..a5dd8324740 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_guest_configuration_hcrp_assignment_report_operations_async.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_guest_configuration_hcrp_assignment_reports_operations.py
@@ -8,7 +8,7 @@
from typing import Any, Callable, Dict, Generic, Optional, TypeVar
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 AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat
@@ -18,8 +18,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class GuestConfigurationHcrpAssignmentReportOperations:
- """GuestConfigurationHcrpAssignmentReportOperations async operations.
+class GuestConfigurationHcrpAssignmentReportsOperations:
+ """GuestConfigurationHcrpAssignmentReportsOperations 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.
@@ -61,9 +61,12 @@ async def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignmentReportList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
url = self.list.metadata['url'] # type: ignore
@@ -81,9 +84,8 @@ async 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 = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -125,9 +127,12 @@ async def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignmentReport"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -146,9 +151,8 @@ async 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 = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_guest_configuration_hcrp_assignment_operations_async.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_guest_configuration_hcrp_assignments_operations.py
similarity index 62%
rename from src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_guest_configuration_hcrp_assignment_operations_async.py
rename to src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_guest_configuration_hcrp_assignments_operations.py
index 2a36f329963..0c92a8c94df 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_guest_configuration_hcrp_assignment_operations_async.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_guest_configuration_hcrp_assignments_operations.py
@@ -5,24 +5,22 @@
# 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
+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 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 AsyncHttpResponse, HttpRequest
-from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller
from azure.mgmt.core.exceptions import ARMErrorFormat
-from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
from ... import models
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class GuestConfigurationHcrpAssignmentOperations:
- """GuestConfigurationHcrpAssignmentOperations async operations.
+class GuestConfigurationHcrpAssignmentsOperations:
+ """GuestConfigurationHcrpAssignmentsOperations 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.
@@ -43,33 +41,40 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
- async def _create_or_update_initial(
+ async def create_or_update(
self,
guest_configuration_assignment_name: str,
resource_group_name: str,
machine_name: str,
- name: Optional[str] = None,
- location: Optional[str] = None,
- context: Optional[str] = None,
- assignment: Optional["models.AssignmentInfo"] = None,
- vm: Optional["models.VmInfo"] = None,
- resources: Optional[List["models.AssignmentReportResource"]] = None,
- guest_configuration_navigation_name: Optional[str] = None,
- version: Optional[str] = None,
- configuration_parameter: Optional[List["models.ConfigurationParameter"]] = None,
- configuration_setting: Optional["models.ConfigurationSetting"] = None,
+ parameters: "models.GuestConfigurationAssignment",
**kwargs
) -> "models.GuestConfigurationAssignment":
+ """Creates an association between a ARC machine and guest configuration.
+
+ :param guest_configuration_assignment_name: Name of the guest configuration assignment.
+ :type guest_configuration_assignment_name: str
+ :param resource_group_name: The resource group name.
+ :type resource_group_name: str
+ :param machine_name: The name of the ARC machine.
+ :type machine_name: str
+ :param parameters: Parameters supplied to the create or update guest configuration assignment.
+ :type parameters: ~guest_configuration_client.models.GuestConfigurationAssignment
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: GuestConfigurationAssignment, or the result of cls(response)
+ :rtype: ~guest_configuration_client.models.GuestConfigurationAssignment
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- _parameters = models.GuestConfigurationAssignment(name=name, location=location, context=context, assignment=assignment, vm=vm, resources=resources, name_properties_guest_configuration_name=guest_configuration_navigation_name, version=version, configuration_parameter=configuration_parameter, configuration_setting=configuration_setting)
api_version = "2020-06-25"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self._create_or_update_initial.metadata['url'] # type: ignore
+ url = self.create_or_update.metadata['url'] # type: ignore
path_format_arguments = {
'guestConfigurationAssignmentName': self._serialize.url("guest_configuration_assignment_name", guest_configuration_assignment_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
@@ -85,14 +90,12 @@ async def _create_or_update_initial(
# 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(_parameters, 'GuestConfigurationAssignment')
+ body_content = self._serialize.body(parameters, 'GuestConfigurationAssignment')
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
@@ -101,7 +104,6 @@ async def _create_or_update_initial(
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('GuestConfigurationAssignment', pipeline_response)
@@ -112,102 +114,6 @@ async def _create_or_update_initial(
return cls(pipeline_response, deserialized, {})
return deserialized
- _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
-
- async def create_or_update(
- self,
- guest_configuration_assignment_name: str,
- resource_group_name: str,
- machine_name: str,
- name: Optional[str] = None,
- location: Optional[str] = None,
- context: Optional[str] = None,
- assignment: Optional["models.AssignmentInfo"] = None,
- vm: Optional["models.VmInfo"] = None,
- resources: Optional[List["models.AssignmentReportResource"]] = None,
- guest_configuration_navigation_name: Optional[str] = None,
- version: Optional[str] = None,
- configuration_parameter: Optional[List["models.ConfigurationParameter"]] = None,
- configuration_setting: Optional["models.ConfigurationSetting"] = None,
- **kwargs
- ) -> "models.GuestConfigurationAssignment":
- """Creates an association between a ARC machine and guest configuration.
-
- :param guest_configuration_assignment_name: Name of the guest configuration assignment.
- :type guest_configuration_assignment_name: str
- :param resource_group_name: The resource group name.
- :type resource_group_name: str
- :param machine_name: The name of the ARC machine.
- :type machine_name: str
- :param name: Name of the guest configuration assignment.
- :type name: str
- :param location: Region where the VM is located.
- :type location: str
- :param context: The source which initiated the guest configuration assignment. Ex: Azure
- Policy.
- :type context: str
- :param assignment: Configuration details of the guest configuration assignment.
- :type assignment: ~guest_configuration_client.models.AssignmentInfo
- :param vm: Information about the VM.
- :type vm: ~guest_configuration_client.models.VmInfo
- :param resources: The list of resources for which guest configuration assignment compliance is
- checked.
- :type resources: list[~guest_configuration_client.models.AssignmentReportResource]
- :param guest_configuration_navigation_name: Name of the guest configuration.
- :type guest_configuration_navigation_name: str
- :param version: Version of the guest configuration.
- :type version: str
- :param configuration_parameter: The configuration parameters for the guest configuration.
- :type configuration_parameter: list[~guest_configuration_client.models.ConfigurationParameter]
- :param configuration_setting: The configuration setting for the guest configuration.
- :type configuration_setting: ~guest_configuration_client.models.ConfigurationSetting
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
- :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: GuestConfigurationAssignment, or the result of cls(response)
- :rtype: ~guest_configuration_client.models.GuestConfigurationAssignment
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
- cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignment"]
- lro_delay = kwargs.pop(
- 'polling_interval',
- self._config.polling_interval
- )
- raw_result = await self._create_or_update_initial(
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- resource_group_name=resource_group_name,
- machine_name=machine_name,
- name=name,
- location=location,
- context=context,
- assignment=assignment,
- vm=vm,
- resources=resources,
- guest_configuration_navigation_name=guest_configuration_navigation_name,
- version=version,
- configuration_parameter=configuration_parameter,
- configuration_setting=configuration_setting,
- cls=lambda x,y,z: x,
- **kwargs
- )
-
- kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
-
- def get_long_running_output(pipeline_response):
- deserialized = self._deserialize('GuestConfigurationAssignment', pipeline_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {})
- return deserialized
-
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
- elif polling is False: polling_method = AsyncNoPolling()
- else: polling_method = polling
- return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
async def get(
@@ -231,9 +137,12 @@ async def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -251,9 +160,8 @@ async 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 = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -271,20 +179,36 @@ async def get(
return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
- async def _delete_initial(
+ async def delete(
self,
resource_group_name: str,
guest_configuration_assignment_name: str,
machine_name: str,
**kwargs
) -> None:
+ """Delete a guest configuration assignment.
+
+ :param resource_group_name: The resource group name.
+ :type resource_group_name: str
+ :param guest_configuration_assignment_name: Name of the guest configuration assignment.
+ :type guest_configuration_assignment_name: str
+ :param machine_name: The name of the ARC machine.
+ :type machine_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 = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
- url = self._delete_initial.metadata['url'] # type: ignore
+ url = self.delete.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[-\w\._]+$'),
'guestConfigurationAssignmentName': self._serialize.url("guest_configuration_assignment_name", guest_configuration_assignment_name, 'str'),
@@ -299,8 +223,8 @@ async def _delete_initial(
# 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 = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -313,57 +237,6 @@ async def _delete_initial(
if cls:
return cls(pipeline_response, None, {})
- _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
-
- async def delete(
- self,
- resource_group_name: str,
- guest_configuration_assignment_name: str,
- machine_name: str,
- **kwargs
- ) -> None:
- """Delete a guest configuration assignment.
-
- :param resource_group_name: The resource group name.
- :type resource_group_name: str
- :param guest_configuration_assignment_name: Name of the guest configuration assignment.
- :type guest_configuration_assignment_name: str
- :param machine_name: The name of the ARC machine.
- :type machine_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
- :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: None, or the result of cls(response)
- :rtype: None
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
- cls = kwargs.pop('cls', None) # type: ClsType[None]
- lro_delay = kwargs.pop(
- 'polling_interval',
- self._config.polling_interval
- )
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- machine_name=machine_name,
- cls=lambda x,y,z: x,
- **kwargs
- )
-
- kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
-
- def get_long_running_output(pipeline_response):
- if cls:
- return cls(pipeline_response, None, {})
-
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
- elif polling is False: polling_method = AsyncNoPolling()
- else: polling_method = polling
- return await async_poller(self._client, raw_result, get_long_running_output, polling_method)
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
def list(
@@ -384,11 +257,18 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignmentList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ 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
@@ -402,15 +282,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
async def extract_data(pipeline_response):
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_operation_operations_async.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_operations.py
similarity index 86%
rename from src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_operation_operations_async.py
rename to src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_operations.py
index 24d15812a84..fc5ee09d0c2 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/_operation_operations_async.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations/_operations.py
@@ -9,7 +9,7 @@
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
-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 AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat
@@ -19,8 +19,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class OperationOperations:
- """OperationOperations async operations.
+class Operations:
+ """Operations 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.
@@ -53,11 +53,18 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.OperationList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ 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
@@ -65,15 +72,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
async def extract_data(pipeline_response):
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/__init__.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/__init__.py
deleted file mode 100644
index adf59f69e07..00000000000
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/aio/operations_async/__init__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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 ._guest_configuration_assignment_operations_async import GuestConfigurationAssignmentOperations
-from ._guest_configuration_assignment_report_operations_async import GuestConfigurationAssignmentReportOperations
-from ._guest_configuration_hcrp_assignment_operations_async import GuestConfigurationHcrpAssignmentOperations
-from ._guest_configuration_hcrp_assignment_report_operations_async import GuestConfigurationHcrpAssignmentReportOperations
-from ._operation_operations_async import OperationOperations
-
-__all__ = [
- 'GuestConfigurationAssignmentOperations',
- 'GuestConfigurationAssignmentReportOperations',
- 'GuestConfigurationHcrpAssignmentOperations',
- 'GuestConfigurationHcrpAssignmentReportOperations',
- 'OperationOperations',
-]
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/__init__.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/__init__.py
index f3f8114101f..2f221979d06 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/__init__.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/__init__.py
@@ -8,6 +8,7 @@
try:
from ._models_py3 import AssignmentInfo
+ from ._models_py3 import AssignmentReport
from ._models_py3 import AssignmentReportDetails
from ._models_py3 import AssignmentReportResource
from ._models_py3 import AssignmentReportResourceComplianceReason
@@ -18,9 +19,11 @@
from ._models_py3 import ErrorResponseError
from ._models_py3 import GuestConfigurationAssignment
from ._models_py3 import GuestConfigurationAssignmentList
+ from ._models_py3 import GuestConfigurationAssignmentProperties
from ._models_py3 import GuestConfigurationAssignmentReport
from ._models_py3 import GuestConfigurationAssignmentReportList
from ._models_py3 import GuestConfigurationAssignmentReportProperties
+ from ._models_py3 import GuestConfigurationNavigation
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationList
@@ -29,6 +32,7 @@
from ._models_py3 import VmInfo
except (SyntaxError, ImportError):
from ._models import AssignmentInfo # type: ignore
+ from ._models import AssignmentReport # type: ignore
from ._models import AssignmentReportDetails # type: ignore
from ._models import AssignmentReportResource # type: ignore
from ._models import AssignmentReportResourceComplianceReason # type: ignore
@@ -39,9 +43,11 @@
from ._models import ErrorResponseError # type: ignore
from ._models import GuestConfigurationAssignment # type: ignore
from ._models import GuestConfigurationAssignmentList # type: ignore
+ from ._models import GuestConfigurationAssignmentProperties # type: ignore
from ._models import GuestConfigurationAssignmentReport # type: ignore
from ._models import GuestConfigurationAssignmentReportList # type: ignore
from ._models import GuestConfigurationAssignmentReportProperties # type: ignore
+ from ._models import GuestConfigurationNavigation # type: ignore
from ._models import Operation # type: ignore
from ._models import OperationDisplay # type: ignore
from ._models import OperationList # type: ignore
@@ -51,16 +57,17 @@
from ._guest_configuration_client_enums import (
ActionAfterReboot,
- AllowModuleOverwrite,
+ AssignmentType,
ComplianceStatus,
ConfigurationMode,
+ Kind,
ProvisioningState,
- RebootIfNeeded,
Type,
)
__all__ = [
'AssignmentInfo',
+ 'AssignmentReport',
'AssignmentReportDetails',
'AssignmentReportResource',
'AssignmentReportResourceComplianceReason',
@@ -71,9 +78,11 @@
'ErrorResponseError',
'GuestConfigurationAssignment',
'GuestConfigurationAssignmentList',
+ 'GuestConfigurationAssignmentProperties',
'GuestConfigurationAssignmentReport',
'GuestConfigurationAssignmentReportList',
'GuestConfigurationAssignmentReportProperties',
+ 'GuestConfigurationNavigation',
'Operation',
'OperationDisplay',
'OperationList',
@@ -81,10 +90,10 @@
'Resource',
'VmInfo',
'ActionAfterReboot',
- 'AllowModuleOverwrite',
+ 'AssignmentType',
'ComplianceStatus',
'ConfigurationMode',
+ 'Kind',
'ProvisioningState',
- 'RebootIfNeeded',
'Type',
]
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/_guest_configuration_client_enums.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/_guest_configuration_client_enums.py
index 420bd0f0510..eda3b309755 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/_guest_configuration_client_enums.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/_guest_configuration_client_enums.py
@@ -6,64 +6,79 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from enum import Enum
+from enum import Enum, EnumMeta
+from six import with_metaclass
-class ActionAfterReboot(str, Enum):
+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 ActionAfterReboot(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Specifies what happens after a reboot during the application of a configuration. The possible
values are ContinueConfiguration and StopConfiguration
"""
- continue_configuration = "ContinueConfiguration"
- stop_configuration = "StopConfiguration"
+ CONTINUE_CONFIGURATION = "ContinueConfiguration"
+ STOP_CONFIGURATION = "StopConfiguration"
-class AllowModuleOverwrite(str, Enum):
- """If true - new configurations downloaded from the pull service are allowed to overwrite the old
- ones on the target node. Otherwise, false
+class AssignmentType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """Specifies the assignment type and execution of the configuration. Possible values are Audit,
+ DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor.
"""
- true = "True"
- false = "False"
+ AUDIT = "Audit"
+ DEPLOY_AND_AUTO_CORRECT = "DeployAndAutoCorrect"
+ APPLY_AND_AUTO_CORRECT = "ApplyAndAutoCorrect"
+ APPLY_AND_MONITOR = "ApplyAndMonitor"
-class ComplianceStatus(str, Enum):
+class ComplianceStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""A value indicating compliance status of the machine for the assigned guest configuration.
"""
- compliant = "Compliant"
- non_compliant = "NonCompliant"
- pending = "Pending"
+ COMPLIANT = "Compliant"
+ NON_COMPLIANT = "NonCompliant"
+ PENDING = "Pending"
-class ConfigurationMode(str, Enum):
+class ConfigurationMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Specifies how the LCM(Local Configuration Manager) actually applies the configuration to the
target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect.
"""
- apply_only = "ApplyOnly"
- apply_and_monitor = "ApplyAndMonitor"
- apply_and_auto_correct = "ApplyAndAutoCorrect"
+ APPLY_ONLY = "ApplyOnly"
+ APPLY_AND_MONITOR = "ApplyAndMonitor"
+ APPLY_AND_AUTO_CORRECT = "ApplyAndAutoCorrect"
-class ProvisioningState(str, Enum):
- """The provisioning state, which only appears in the response.
+class Kind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """Kind of the guest configuration. For example:DSC
"""
- succeeded = "Succeeded"
- failed = "Failed"
- canceled = "Canceled"
- created = "Created"
-
-class RebootIfNeeded(str, Enum):
- """Set this to true to automatically reboot the node after a configuration that requires reboot is
- applied. Otherwise, you will have to manually reboot the node for any configuration that
- requires it. The default value is false. To use this setting when a reboot condition is enacted
- by something other than DSC (such as Windows Installer), combine this setting with the
- xPendingReboot module.
+ DSC = "DSC"
+
+class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """The provisioning state, which only appears in the response.
"""
- true = "True"
- false = "False"
+ SUCCEEDED = "Succeeded"
+ FAILED = "Failed"
+ CANCELED = "Canceled"
+ CREATED = "Created"
-class Type(str, Enum):
+class Type(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Type of report, Consistency or Initial
"""
- consistency = "Consistency"
- initial = "Initial"
+ CONSISTENCY = "Consistency"
+ INITIAL = "Initial"
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/_models.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/_models.py
index f9575199fc8..f8a2538f3ed 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/_models.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/_models.py
@@ -39,6 +39,74 @@ def __init__(
self.configuration = kwargs.get('configuration', None)
+class AssignmentReport(msrest.serialization.Model):
+ """AssignmentReport.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: ARM resource id of the report for the guest configuration assignment.
+ :vartype id: str
+ :ivar report_id: GUID that identifies the guest configuration assignment report under a
+ subscription, resource group.
+ :vartype report_id: str
+ :param assignment: Configuration details of the guest configuration assignment.
+ :type assignment: ~guest_configuration_client.models.AssignmentInfo
+ :param vm: Information about the VM.
+ :type vm: ~guest_configuration_client.models.VmInfo
+ :ivar start_time: Start date and time of the guest configuration assignment compliance status
+ check.
+ :vartype start_time: ~datetime.datetime
+ :ivar end_time: End date and time of the guest configuration assignment compliance status
+ check.
+ :vartype end_time: ~datetime.datetime
+ :ivar compliance_status: A value indicating compliance status of the machine for the assigned
+ guest configuration. Possible values include: "Compliant", "NonCompliant", "Pending".
+ :vartype compliance_status: str or ~guest_configuration_client.models.ComplianceStatus
+ :ivar operation_type: Type of report, Consistency or Initial. Possible values include:
+ "Consistency", "Initial".
+ :vartype operation_type: str or ~guest_configuration_client.models.Type
+ :param resources: The list of resources for which guest configuration assignment compliance is
+ checked.
+ :type resources: list[~guest_configuration_client.models.AssignmentReportResource]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'report_id': {'readonly': True},
+ 'start_time': {'readonly': True},
+ 'end_time': {'readonly': True},
+ 'compliance_status': {'readonly': True},
+ 'operation_type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'report_id': {'key': 'reportId', 'type': 'str'},
+ 'assignment': {'key': 'assignment', 'type': 'AssignmentInfo'},
+ 'vm': {'key': 'vm', 'type': 'VmInfo'},
+ 'start_time': {'key': 'startTime', 'type': 'iso-8601'},
+ 'end_time': {'key': 'endTime', 'type': 'iso-8601'},
+ 'compliance_status': {'key': 'complianceStatus', 'type': 'str'},
+ 'operation_type': {'key': 'operationType', 'type': 'str'},
+ 'resources': {'key': 'resources', 'type': '[AssignmentReportResource]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(AssignmentReport, self).__init__(**kwargs)
+ self.id = None
+ self.report_id = None
+ self.assignment = kwargs.get('assignment', None)
+ self.vm = kwargs.get('vm', None)
+ self.start_time = None
+ self.end_time = None
+ self.compliance_status = None
+ self.operation_type = None
+ self.resources = kwargs.get('resources', None)
+
+
class AssignmentReportDetails(msrest.serialization.Model):
"""Details of the guest configuration assignment report.
@@ -101,6 +169,8 @@ class AssignmentReportResource(msrest.serialization.Model):
:ivar compliance_status: A value indicating compliance status of the machine for the assigned
guest configuration. Possible values include: "Compliant", "NonCompliant", "Pending".
:vartype compliance_status: str or ~guest_configuration_client.models.ComplianceStatus
+ :ivar resource_id: Name of the guest configuration assignment resource setting.
+ :vartype resource_id: str
:param reasons: Compliance reason and reason code for a resource.
:type reasons:
list[~guest_configuration_client.models.AssignmentReportResourceComplianceReason]
@@ -110,11 +180,13 @@ class AssignmentReportResource(msrest.serialization.Model):
_validation = {
'compliance_status': {'readonly': True},
+ 'resource_id': {'readonly': True},
'properties': {'readonly': True},
}
_attribute_map = {
'compliance_status': {'key': 'complianceStatus', 'type': 'str'},
+ 'resource_id': {'key': 'resourceId', 'type': 'str'},
'reasons': {'key': 'reasons', 'type': '[AssignmentReportResourceComplianceReason]'},
'properties': {'key': 'properties', 'type': 'object'},
}
@@ -125,6 +197,7 @@ def __init__(
):
super(AssignmentReportResource, self).__init__(**kwargs)
self.compliance_status = None
+ self.resource_id = None
self.reasons = kwargs.get('reasons', None)
self.properties = None
@@ -221,9 +294,8 @@ class ConfigurationSetting(msrest.serialization.Model):
"ApplyAndAutoCorrect".
:type configuration_mode: str or ~guest_configuration_client.models.ConfigurationMode
:param allow_module_overwrite: If true - new configurations downloaded from the pull service
- are allowed to overwrite the old ones on the target node. Otherwise, false. Possible values
- include: "True", "False".
- :type allow_module_overwrite: str or ~guest_configuration_client.models.AllowModuleOverwrite
+ are allowed to overwrite the old ones on the target node. Otherwise, false.
+ :type allow_module_overwrite: bool
:param action_after_reboot: Specifies what happens after a reboot during the application of a
configuration. The possible values are ContinueConfiguration and StopConfiguration. Possible
values include: "ContinueConfiguration", "StopConfiguration".
@@ -236,9 +308,8 @@ class ConfigurationSetting(msrest.serialization.Model):
configuration that requires reboot is applied. Otherwise, you will have to manually reboot the
node for any configuration that requires it. The default value is false. To use this setting
when a reboot condition is enacted by something other than DSC (such as Windows Installer),
- combine this setting with the xPendingReboot module. Possible values include: "True", "False".
- Default value: "False".
- :type reboot_if_needed: str or ~guest_configuration_client.models.RebootIfNeeded
+ combine this setting with the xPendingReboot module.
+ :type reboot_if_needed: bool
:param configuration_mode_frequency_mins: How often, in minutes, the current configuration is
checked and applied. This property is ignored if the ConfigurationMode property is set to
ApplyOnly. The default value is 15.
@@ -247,10 +318,10 @@ class ConfigurationSetting(msrest.serialization.Model):
_attribute_map = {
'configuration_mode': {'key': 'configurationMode', 'type': 'str'},
- 'allow_module_overwrite': {'key': 'allowModuleOverwrite', 'type': 'str'},
+ 'allow_module_overwrite': {'key': 'allowModuleOverwrite', 'type': 'bool'},
'action_after_reboot': {'key': 'actionAfterReboot', 'type': 'str'},
'refresh_frequency_mins': {'key': 'refreshFrequencyMins', 'type': 'float'},
- 'reboot_if_needed': {'key': 'rebootIfNeeded', 'type': 'str'},
+ 'reboot_if_needed': {'key': 'rebootIfNeeded', 'type': 'bool'},
'configuration_mode_frequency_mins': {'key': 'configurationModeFrequencyMins', 'type': 'float'},
}
@@ -263,7 +334,7 @@ def __init__(
self.allow_module_overwrite = kwargs.get('allow_module_overwrite', None)
self.action_after_reboot = kwargs.get('action_after_reboot', None)
self.refresh_frequency_mins = kwargs.get('refresh_frequency_mins', 30)
- self.reboot_if_needed = kwargs.get('reboot_if_needed', "False")
+ self.reboot_if_needed = kwargs.get('reboot_if_needed', None)
self.configuration_mode_frequency_mins = kwargs.get('configuration_mode_frequency_mins', 15)
@@ -360,87 +431,13 @@ class GuestConfigurationAssignment(Resource):
:type location: str
:ivar type: The type of the resource.
:vartype type: str
- :ivar target_resource_id: VM resource Id.
- :vartype target_resource_id: str
- :ivar compliance_status_properties_compliance_status: A value indicating compliance status of
- the machine for the assigned guest configuration. Possible values include: "Compliant",
- "NonCompliant", "Pending".
- :vartype compliance_status_properties_compliance_status: str or
- ~guest_configuration_client.models.ComplianceStatus
- :ivar last_compliance_status_checked: Date and time when last compliance status was checked.
- :vartype last_compliance_status_checked: ~datetime.datetime
- :ivar latest_report_id: Id of the latest report for the guest configuration assignment.
- :vartype latest_report_id: str
- :param context: The source which initiated the guest configuration assignment. Ex: Azure
- Policy.
- :type context: str
- :ivar assignment_hash: Combined hash of the configuration package and parameters.
- :vartype assignment_hash: str
- :ivar provisioning_state: The provisioning state, which only appears in the response. Possible
- values include: "Succeeded", "Failed", "Canceled", "Created".
- :vartype provisioning_state: str or ~guest_configuration_client.models.ProvisioningState
- :ivar id_properties_latest_assignment_report_id: ARM resource id of the report for the guest
- configuration assignment.
- :vartype id_properties_latest_assignment_report_id: str
- :ivar report_id: GUID that identifies the guest configuration assignment report under a
- subscription, resource group.
- :vartype report_id: str
- :param assignment: Configuration details of the guest configuration assignment.
- :type assignment: ~guest_configuration_client.models.AssignmentInfo
- :param vm: Information about the VM.
- :type vm: ~guest_configuration_client.models.VmInfo
- :ivar start_time: Start date and time of the guest configuration assignment compliance status
- check.
- :vartype start_time: ~datetime.datetime
- :ivar end_time: End date and time of the guest configuration assignment compliance status
- check.
- :vartype end_time: ~datetime.datetime
- :ivar compliance_status_properties_latest_assignment_report_compliance_status: A value
- indicating compliance status of the machine for the assigned guest configuration. Possible
- values include: "Compliant", "NonCompliant", "Pending".
- :vartype compliance_status_properties_latest_assignment_report_compliance_status: str or
- ~guest_configuration_client.models.ComplianceStatus
- :ivar operation_type: Type of report, Consistency or Initial. Possible values include:
- "Consistency", "Initial".
- :vartype operation_type: str or ~guest_configuration_client.models.Type
- :param resources: The list of resources for which guest configuration assignment compliance is
- checked.
- :type resources: list[~guest_configuration_client.models.AssignmentReportResource]
- :ivar kind: Kind of the guest configuration. For example:DSC. Default value: "DSC".
- :vartype kind: str
- :param name_properties_guest_configuration_name: Name of the guest configuration.
- :type name_properties_guest_configuration_name: str
- :param version: Version of the guest configuration.
- :type version: str
- :ivar content_uri: Uri of the storage where guest configuration package is uploaded.
- :vartype content_uri: str
- :ivar content_hash: Combined hash of the guest configuration package and configuration
- parameters.
- :vartype content_hash: str
- :param configuration_parameter: The configuration parameters for the guest configuration.
- :type configuration_parameter: list[~guest_configuration_client.models.ConfigurationParameter]
- :param configuration_setting: The configuration setting for the guest configuration.
- :type configuration_setting: ~guest_configuration_client.models.ConfigurationSetting
+ :param properties: Properties of the Guest configuration assignment.
+ :type properties: ~guest_configuration_client.models.GuestConfigurationAssignmentProperties
"""
_validation = {
'id': {'readonly': True},
'type': {'readonly': True},
- 'target_resource_id': {'readonly': True},
- 'compliance_status_properties_compliance_status': {'readonly': True},
- 'last_compliance_status_checked': {'readonly': True},
- 'latest_report_id': {'readonly': True},
- 'assignment_hash': {'readonly': True},
- 'provisioning_state': {'readonly': True},
- 'id_properties_latest_assignment_report_id': {'readonly': True},
- 'report_id': {'readonly': True},
- 'start_time': {'readonly': True},
- 'end_time': {'readonly': True},
- 'compliance_status_properties_latest_assignment_report_compliance_status': {'readonly': True},
- 'operation_type': {'readonly': True},
- 'kind': {'constant': True},
- 'content_uri': {'readonly': True},
- 'content_hash': {'readonly': True},
}
_attribute_map = {
@@ -448,60 +445,15 @@ class GuestConfigurationAssignment(Resource):
'name': {'key': 'name', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
- 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'},
- 'compliance_status_properties_compliance_status': {'key': 'properties.complianceStatus', 'type': 'str'},
- 'last_compliance_status_checked': {'key': 'properties.lastComplianceStatusChecked', 'type': 'iso-8601'},
- 'latest_report_id': {'key': 'properties.latestReportId', 'type': 'str'},
- 'context': {'key': 'properties.context', 'type': 'str'},
- 'assignment_hash': {'key': 'properties.assignmentHash', 'type': 'str'},
- 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
- 'id_properties_latest_assignment_report_id': {'key': 'properties.latestAssignmentReport.id', 'type': 'str'},
- 'report_id': {'key': 'properties.latestAssignmentReport.reportId', 'type': 'str'},
- 'assignment': {'key': 'properties.latestAssignmentReport.assignment', 'type': 'AssignmentInfo'},
- 'vm': {'key': 'properties.latestAssignmentReport.vm', 'type': 'VmInfo'},
- 'start_time': {'key': 'properties.latestAssignmentReport.startTime', 'type': 'iso-8601'},
- 'end_time': {'key': 'properties.latestAssignmentReport.endTime', 'type': 'iso-8601'},
- 'compliance_status_properties_latest_assignment_report_compliance_status': {'key': 'properties.latestAssignmentReport.complianceStatus', 'type': 'str'},
- 'operation_type': {'key': 'properties.latestAssignmentReport.operationType', 'type': 'str'},
- 'resources': {'key': 'properties.latestAssignmentReport.resources', 'type': '[AssignmentReportResource]'},
- 'kind': {'key': 'properties.guestConfiguration.kind', 'type': 'str'},
- 'name_properties_guest_configuration_name': {'key': 'properties.guestConfiguration.name', 'type': 'str'},
- 'version': {'key': 'properties.guestConfiguration.version', 'type': 'str'},
- 'content_uri': {'key': 'properties.guestConfiguration.contentUri', 'type': 'str'},
- 'content_hash': {'key': 'properties.guestConfiguration.contentHash', 'type': 'str'},
- 'configuration_parameter': {'key': 'properties.guestConfiguration.configurationParameter', 'type': '[ConfigurationParameter]'},
- 'configuration_setting': {'key': 'properties.guestConfiguration.configurationSetting', 'type': 'ConfigurationSetting'},
- }
-
- kind = "DSC"
+ 'properties': {'key': 'properties', 'type': 'GuestConfigurationAssignmentProperties'},
+ }
def __init__(
self,
**kwargs
):
super(GuestConfigurationAssignment, self).__init__(**kwargs)
- self.target_resource_id = None
- self.compliance_status_properties_compliance_status = None
- self.last_compliance_status_checked = None
- self.latest_report_id = None
- self.context = kwargs.get('context', None)
- self.assignment_hash = None
- self.provisioning_state = None
- self.id_properties_latest_assignment_report_id = None
- self.report_id = None
- self.assignment = kwargs.get('assignment', None)
- self.vm = kwargs.get('vm', None)
- self.start_time = None
- self.end_time = None
- self.compliance_status_properties_latest_assignment_report_compliance_status = None
- self.operation_type = None
- self.resources = kwargs.get('resources', None)
- self.name_properties_guest_configuration_name = kwargs.get('name_properties_guest_configuration_name', None)
- self.version = kwargs.get('version', None)
- self.content_uri = None
- self.content_hash = None
- self.configuration_parameter = kwargs.get('configuration_parameter', None)
- self.configuration_setting = kwargs.get('configuration_setting', None)
+ self.properties = kwargs.get('properties', None)
class GuestConfigurationAssignmentList(msrest.serialization.Model):
@@ -523,6 +475,71 @@ def __init__(
self.value = kwargs.get('value', None)
+class GuestConfigurationAssignmentProperties(msrest.serialization.Model):
+ """Guest configuration assignment properties.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar target_resource_id: VM resource Id.
+ :vartype target_resource_id: str
+ :param guest_configuration: The guest configuration to assign.
+ :type guest_configuration: ~guest_configuration_client.models.GuestConfigurationNavigation
+ :ivar compliance_status: A value indicating compliance status of the machine for the assigned
+ guest configuration. Possible values include: "Compliant", "NonCompliant", "Pending".
+ :vartype compliance_status: str or ~guest_configuration_client.models.ComplianceStatus
+ :ivar last_compliance_status_checked: Date and time when last compliance status was checked.
+ :vartype last_compliance_status_checked: ~datetime.datetime
+ :ivar latest_report_id: Id of the latest report for the guest configuration assignment.
+ :vartype latest_report_id: str
+ :param latest_assignment_report: Last reported guest configuration assignment report.
+ :type latest_assignment_report: ~guest_configuration_client.models.AssignmentReport
+ :param context: The source which initiated the guest configuration assignment. Ex: Azure
+ Policy.
+ :type context: str
+ :ivar assignment_hash: Combined hash of the configuration package and parameters.
+ :vartype assignment_hash: str
+ :ivar provisioning_state: The provisioning state, which only appears in the response. Possible
+ values include: "Succeeded", "Failed", "Canceled", "Created".
+ :vartype provisioning_state: str or ~guest_configuration_client.models.ProvisioningState
+ """
+
+ _validation = {
+ 'target_resource_id': {'readonly': True},
+ 'compliance_status': {'readonly': True},
+ 'last_compliance_status_checked': {'readonly': True},
+ 'latest_report_id': {'readonly': True},
+ 'assignment_hash': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'},
+ 'guest_configuration': {'key': 'guestConfiguration', 'type': 'GuestConfigurationNavigation'},
+ 'compliance_status': {'key': 'complianceStatus', 'type': 'str'},
+ 'last_compliance_status_checked': {'key': 'lastComplianceStatusChecked', 'type': 'iso-8601'},
+ 'latest_report_id': {'key': 'latestReportId', 'type': 'str'},
+ 'latest_assignment_report': {'key': 'latestAssignmentReport', 'type': 'AssignmentReport'},
+ 'context': {'key': 'context', 'type': 'str'},
+ 'assignment_hash': {'key': 'assignmentHash', 'type': 'str'},
+ 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(GuestConfigurationAssignmentProperties, self).__init__(**kwargs)
+ self.target_resource_id = None
+ self.guest_configuration = kwargs.get('guest_configuration', None)
+ self.compliance_status = None
+ self.last_compliance_status_checked = None
+ self.latest_report_id = None
+ self.latest_assignment_report = kwargs.get('latest_assignment_report', None)
+ self.context = kwargs.get('context', None)
+ self.assignment_hash = None
+ self.provisioning_state = None
+
+
class GuestConfigurationAssignmentReport(msrest.serialization.Model):
"""Report for the guest configuration assignment. Report contains information such as compliance status, reason, and more.
@@ -635,6 +652,57 @@ def __init__(
self.details = kwargs.get('details', None)
+class GuestConfigurationNavigation(msrest.serialization.Model):
+ """Guest configuration is an artifact that encapsulates DSC configuration and its dependencies. The artifact is a zip file containing DSC configuration (as MOF) and dependent resources and other dependencies like modules.
+
+ :param kind: Kind of the guest configuration. For example:DSC. Possible values include: "DSC".
+ :type kind: str or ~guest_configuration_client.models.Kind
+ :param name: Name of the guest configuration.
+ :type name: str
+ :param version: Version of the guest configuration.
+ :type version: str
+ :param content_uri: Uri of the storage where guest configuration package is uploaded.
+ :type content_uri: str
+ :param content_hash: Combined hash of the guest configuration package and configuration
+ parameters.
+ :type content_hash: str
+ :param assignment_type: Specifies the assignment type and execution of the configuration.
+ Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor.
+ Possible values include: "Audit", "DeployAndAutoCorrect", "ApplyAndAutoCorrect",
+ "ApplyAndMonitor".
+ :type assignment_type: str or ~guest_configuration_client.models.AssignmentType
+ :param configuration_parameter: The configuration parameters for the guest configuration.
+ :type configuration_parameter: list[~guest_configuration_client.models.ConfigurationParameter]
+ :param configuration_setting: The configuration setting for the guest configuration.
+ :type configuration_setting: ~guest_configuration_client.models.ConfigurationSetting
+ """
+
+ _attribute_map = {
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'version': {'key': 'version', 'type': 'str'},
+ 'content_uri': {'key': 'contentUri', 'type': 'str'},
+ 'content_hash': {'key': 'contentHash', 'type': 'str'},
+ 'assignment_type': {'key': 'assignmentType', 'type': 'str'},
+ 'configuration_parameter': {'key': 'configurationParameter', 'type': '[ConfigurationParameter]'},
+ 'configuration_setting': {'key': 'configurationSetting', 'type': 'ConfigurationSetting'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(GuestConfigurationNavigation, self).__init__(**kwargs)
+ self.kind = kwargs.get('kind', None)
+ self.name = kwargs.get('name', None)
+ self.version = kwargs.get('version', None)
+ self.content_uri = kwargs.get('content_uri', None)
+ self.content_hash = kwargs.get('content_hash', None)
+ self.assignment_type = kwargs.get('assignment_type', None)
+ self.configuration_parameter = kwargs.get('configuration_parameter', None)
+ self.configuration_setting = kwargs.get('configuration_setting', None)
+
+
class Operation(msrest.serialization.Model):
"""GuestConfiguration REST API operation.
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/_models_py3.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/_models_py3.py
index 691af6ca03a..77176c39c4d 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/_models_py3.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/models/_models_py3.py
@@ -45,6 +45,78 @@ def __init__(
self.configuration = configuration
+class AssignmentReport(msrest.serialization.Model):
+ """AssignmentReport.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: ARM resource id of the report for the guest configuration assignment.
+ :vartype id: str
+ :ivar report_id: GUID that identifies the guest configuration assignment report under a
+ subscription, resource group.
+ :vartype report_id: str
+ :param assignment: Configuration details of the guest configuration assignment.
+ :type assignment: ~guest_configuration_client.models.AssignmentInfo
+ :param vm: Information about the VM.
+ :type vm: ~guest_configuration_client.models.VmInfo
+ :ivar start_time: Start date and time of the guest configuration assignment compliance status
+ check.
+ :vartype start_time: ~datetime.datetime
+ :ivar end_time: End date and time of the guest configuration assignment compliance status
+ check.
+ :vartype end_time: ~datetime.datetime
+ :ivar compliance_status: A value indicating compliance status of the machine for the assigned
+ guest configuration. Possible values include: "Compliant", "NonCompliant", "Pending".
+ :vartype compliance_status: str or ~guest_configuration_client.models.ComplianceStatus
+ :ivar operation_type: Type of report, Consistency or Initial. Possible values include:
+ "Consistency", "Initial".
+ :vartype operation_type: str or ~guest_configuration_client.models.Type
+ :param resources: The list of resources for which guest configuration assignment compliance is
+ checked.
+ :type resources: list[~guest_configuration_client.models.AssignmentReportResource]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'report_id': {'readonly': True},
+ 'start_time': {'readonly': True},
+ 'end_time': {'readonly': True},
+ 'compliance_status': {'readonly': True},
+ 'operation_type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'report_id': {'key': 'reportId', 'type': 'str'},
+ 'assignment': {'key': 'assignment', 'type': 'AssignmentInfo'},
+ 'vm': {'key': 'vm', 'type': 'VmInfo'},
+ 'start_time': {'key': 'startTime', 'type': 'iso-8601'},
+ 'end_time': {'key': 'endTime', 'type': 'iso-8601'},
+ 'compliance_status': {'key': 'complianceStatus', 'type': 'str'},
+ 'operation_type': {'key': 'operationType', 'type': 'str'},
+ 'resources': {'key': 'resources', 'type': '[AssignmentReportResource]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ assignment: Optional["AssignmentInfo"] = None,
+ vm: Optional["VmInfo"] = None,
+ resources: Optional[List["AssignmentReportResource"]] = None,
+ **kwargs
+ ):
+ super(AssignmentReport, self).__init__(**kwargs)
+ self.id = None
+ self.report_id = None
+ self.assignment = assignment
+ self.vm = vm
+ self.start_time = None
+ self.end_time = None
+ self.compliance_status = None
+ self.operation_type = None
+ self.resources = resources
+
+
class AssignmentReportDetails(msrest.serialization.Model):
"""Details of the guest configuration assignment report.
@@ -109,6 +181,8 @@ class AssignmentReportResource(msrest.serialization.Model):
:ivar compliance_status: A value indicating compliance status of the machine for the assigned
guest configuration. Possible values include: "Compliant", "NonCompliant", "Pending".
:vartype compliance_status: str or ~guest_configuration_client.models.ComplianceStatus
+ :ivar resource_id: Name of the guest configuration assignment resource setting.
+ :vartype resource_id: str
:param reasons: Compliance reason and reason code for a resource.
:type reasons:
list[~guest_configuration_client.models.AssignmentReportResourceComplianceReason]
@@ -118,11 +192,13 @@ class AssignmentReportResource(msrest.serialization.Model):
_validation = {
'compliance_status': {'readonly': True},
+ 'resource_id': {'readonly': True},
'properties': {'readonly': True},
}
_attribute_map = {
'compliance_status': {'key': 'complianceStatus', 'type': 'str'},
+ 'resource_id': {'key': 'resourceId', 'type': 'str'},
'reasons': {'key': 'reasons', 'type': '[AssignmentReportResourceComplianceReason]'},
'properties': {'key': 'properties', 'type': 'object'},
}
@@ -135,6 +211,7 @@ def __init__(
):
super(AssignmentReportResource, self).__init__(**kwargs)
self.compliance_status = None
+ self.resource_id = None
self.reasons = reasons
self.properties = None
@@ -234,9 +311,8 @@ class ConfigurationSetting(msrest.serialization.Model):
"ApplyAndAutoCorrect".
:type configuration_mode: str or ~guest_configuration_client.models.ConfigurationMode
:param allow_module_overwrite: If true - new configurations downloaded from the pull service
- are allowed to overwrite the old ones on the target node. Otherwise, false. Possible values
- include: "True", "False".
- :type allow_module_overwrite: str or ~guest_configuration_client.models.AllowModuleOverwrite
+ are allowed to overwrite the old ones on the target node. Otherwise, false.
+ :type allow_module_overwrite: bool
:param action_after_reboot: Specifies what happens after a reboot during the application of a
configuration. The possible values are ContinueConfiguration and StopConfiguration. Possible
values include: "ContinueConfiguration", "StopConfiguration".
@@ -249,9 +325,8 @@ class ConfigurationSetting(msrest.serialization.Model):
configuration that requires reboot is applied. Otherwise, you will have to manually reboot the
node for any configuration that requires it. The default value is false. To use this setting
when a reboot condition is enacted by something other than DSC (such as Windows Installer),
- combine this setting with the xPendingReboot module. Possible values include: "True", "False".
- Default value: "False".
- :type reboot_if_needed: str or ~guest_configuration_client.models.RebootIfNeeded
+ combine this setting with the xPendingReboot module.
+ :type reboot_if_needed: bool
:param configuration_mode_frequency_mins: How often, in minutes, the current configuration is
checked and applied. This property is ignored if the ConfigurationMode property is set to
ApplyOnly. The default value is 15.
@@ -260,10 +335,10 @@ class ConfigurationSetting(msrest.serialization.Model):
_attribute_map = {
'configuration_mode': {'key': 'configurationMode', 'type': 'str'},
- 'allow_module_overwrite': {'key': 'allowModuleOverwrite', 'type': 'str'},
+ 'allow_module_overwrite': {'key': 'allowModuleOverwrite', 'type': 'bool'},
'action_after_reboot': {'key': 'actionAfterReboot', 'type': 'str'},
'refresh_frequency_mins': {'key': 'refreshFrequencyMins', 'type': 'float'},
- 'reboot_if_needed': {'key': 'rebootIfNeeded', 'type': 'str'},
+ 'reboot_if_needed': {'key': 'rebootIfNeeded', 'type': 'bool'},
'configuration_mode_frequency_mins': {'key': 'configurationModeFrequencyMins', 'type': 'float'},
}
@@ -271,10 +346,10 @@ def __init__(
self,
*,
configuration_mode: Optional[Union[str, "ConfigurationMode"]] = None,
- allow_module_overwrite: Optional[Union[str, "AllowModuleOverwrite"]] = None,
+ allow_module_overwrite: Optional[bool] = None,
action_after_reboot: Optional[Union[str, "ActionAfterReboot"]] = None,
refresh_frequency_mins: Optional[float] = 30,
- reboot_if_needed: Optional[Union[str, "RebootIfNeeded"]] = "False",
+ reboot_if_needed: Optional[bool] = None,
configuration_mode_frequency_mins: Optional[float] = 15,
**kwargs
):
@@ -388,87 +463,13 @@ class GuestConfigurationAssignment(Resource):
:type location: str
:ivar type: The type of the resource.
:vartype type: str
- :ivar target_resource_id: VM resource Id.
- :vartype target_resource_id: str
- :ivar compliance_status_properties_compliance_status: A value indicating compliance status of
- the machine for the assigned guest configuration. Possible values include: "Compliant",
- "NonCompliant", "Pending".
- :vartype compliance_status_properties_compliance_status: str or
- ~guest_configuration_client.models.ComplianceStatus
- :ivar last_compliance_status_checked: Date and time when last compliance status was checked.
- :vartype last_compliance_status_checked: ~datetime.datetime
- :ivar latest_report_id: Id of the latest report for the guest configuration assignment.
- :vartype latest_report_id: str
- :param context: The source which initiated the guest configuration assignment. Ex: Azure
- Policy.
- :type context: str
- :ivar assignment_hash: Combined hash of the configuration package and parameters.
- :vartype assignment_hash: str
- :ivar provisioning_state: The provisioning state, which only appears in the response. Possible
- values include: "Succeeded", "Failed", "Canceled", "Created".
- :vartype provisioning_state: str or ~guest_configuration_client.models.ProvisioningState
- :ivar id_properties_latest_assignment_report_id: ARM resource id of the report for the guest
- configuration assignment.
- :vartype id_properties_latest_assignment_report_id: str
- :ivar report_id: GUID that identifies the guest configuration assignment report under a
- subscription, resource group.
- :vartype report_id: str
- :param assignment: Configuration details of the guest configuration assignment.
- :type assignment: ~guest_configuration_client.models.AssignmentInfo
- :param vm: Information about the VM.
- :type vm: ~guest_configuration_client.models.VmInfo
- :ivar start_time: Start date and time of the guest configuration assignment compliance status
- check.
- :vartype start_time: ~datetime.datetime
- :ivar end_time: End date and time of the guest configuration assignment compliance status
- check.
- :vartype end_time: ~datetime.datetime
- :ivar compliance_status_properties_latest_assignment_report_compliance_status: A value
- indicating compliance status of the machine for the assigned guest configuration. Possible
- values include: "Compliant", "NonCompliant", "Pending".
- :vartype compliance_status_properties_latest_assignment_report_compliance_status: str or
- ~guest_configuration_client.models.ComplianceStatus
- :ivar operation_type: Type of report, Consistency or Initial. Possible values include:
- "Consistency", "Initial".
- :vartype operation_type: str or ~guest_configuration_client.models.Type
- :param resources: The list of resources for which guest configuration assignment compliance is
- checked.
- :type resources: list[~guest_configuration_client.models.AssignmentReportResource]
- :ivar kind: Kind of the guest configuration. For example:DSC. Default value: "DSC".
- :vartype kind: str
- :param name_properties_guest_configuration_name: Name of the guest configuration.
- :type name_properties_guest_configuration_name: str
- :param version: Version of the guest configuration.
- :type version: str
- :ivar content_uri: Uri of the storage where guest configuration package is uploaded.
- :vartype content_uri: str
- :ivar content_hash: Combined hash of the guest configuration package and configuration
- parameters.
- :vartype content_hash: str
- :param configuration_parameter: The configuration parameters for the guest configuration.
- :type configuration_parameter: list[~guest_configuration_client.models.ConfigurationParameter]
- :param configuration_setting: The configuration setting for the guest configuration.
- :type configuration_setting: ~guest_configuration_client.models.ConfigurationSetting
+ :param properties: Properties of the Guest configuration assignment.
+ :type properties: ~guest_configuration_client.models.GuestConfigurationAssignmentProperties
"""
_validation = {
'id': {'readonly': True},
'type': {'readonly': True},
- 'target_resource_id': {'readonly': True},
- 'compliance_status_properties_compliance_status': {'readonly': True},
- 'last_compliance_status_checked': {'readonly': True},
- 'latest_report_id': {'readonly': True},
- 'assignment_hash': {'readonly': True},
- 'provisioning_state': {'readonly': True},
- 'id_properties_latest_assignment_report_id': {'readonly': True},
- 'report_id': {'readonly': True},
- 'start_time': {'readonly': True},
- 'end_time': {'readonly': True},
- 'compliance_status_properties_latest_assignment_report_compliance_status': {'readonly': True},
- 'operation_type': {'readonly': True},
- 'kind': {'constant': True},
- 'content_uri': {'readonly': True},
- 'content_hash': {'readonly': True},
}
_attribute_map = {
@@ -476,71 +477,19 @@ class GuestConfigurationAssignment(Resource):
'name': {'key': 'name', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
- 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'},
- 'compliance_status_properties_compliance_status': {'key': 'properties.complianceStatus', 'type': 'str'},
- 'last_compliance_status_checked': {'key': 'properties.lastComplianceStatusChecked', 'type': 'iso-8601'},
- 'latest_report_id': {'key': 'properties.latestReportId', 'type': 'str'},
- 'context': {'key': 'properties.context', 'type': 'str'},
- 'assignment_hash': {'key': 'properties.assignmentHash', 'type': 'str'},
- 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
- 'id_properties_latest_assignment_report_id': {'key': 'properties.latestAssignmentReport.id', 'type': 'str'},
- 'report_id': {'key': 'properties.latestAssignmentReport.reportId', 'type': 'str'},
- 'assignment': {'key': 'properties.latestAssignmentReport.assignment', 'type': 'AssignmentInfo'},
- 'vm': {'key': 'properties.latestAssignmentReport.vm', 'type': 'VmInfo'},
- 'start_time': {'key': 'properties.latestAssignmentReport.startTime', 'type': 'iso-8601'},
- 'end_time': {'key': 'properties.latestAssignmentReport.endTime', 'type': 'iso-8601'},
- 'compliance_status_properties_latest_assignment_report_compliance_status': {'key': 'properties.latestAssignmentReport.complianceStatus', 'type': 'str'},
- 'operation_type': {'key': 'properties.latestAssignmentReport.operationType', 'type': 'str'},
- 'resources': {'key': 'properties.latestAssignmentReport.resources', 'type': '[AssignmentReportResource]'},
- 'kind': {'key': 'properties.guestConfiguration.kind', 'type': 'str'},
- 'name_properties_guest_configuration_name': {'key': 'properties.guestConfiguration.name', 'type': 'str'},
- 'version': {'key': 'properties.guestConfiguration.version', 'type': 'str'},
- 'content_uri': {'key': 'properties.guestConfiguration.contentUri', 'type': 'str'},
- 'content_hash': {'key': 'properties.guestConfiguration.contentHash', 'type': 'str'},
- 'configuration_parameter': {'key': 'properties.guestConfiguration.configurationParameter', 'type': '[ConfigurationParameter]'},
- 'configuration_setting': {'key': 'properties.guestConfiguration.configurationSetting', 'type': 'ConfigurationSetting'},
- }
-
- kind = "DSC"
+ 'properties': {'key': 'properties', 'type': 'GuestConfigurationAssignmentProperties'},
+ }
def __init__(
self,
*,
name: Optional[str] = None,
location: Optional[str] = None,
- context: Optional[str] = None,
- assignment: Optional["AssignmentInfo"] = None,
- vm: Optional["VmInfo"] = None,
- resources: Optional[List["AssignmentReportResource"]] = None,
- name_properties_guest_configuration_name: Optional[str] = None,
- version: Optional[str] = None,
- configuration_parameter: Optional[List["ConfigurationParameter"]] = None,
- configuration_setting: Optional["ConfigurationSetting"] = None,
+ properties: Optional["GuestConfigurationAssignmentProperties"] = None,
**kwargs
):
super(GuestConfigurationAssignment, self).__init__(name=name, location=location, **kwargs)
- self.target_resource_id = None
- self.compliance_status_properties_compliance_status = None
- self.last_compliance_status_checked = None
- self.latest_report_id = None
- self.context = context
- self.assignment_hash = None
- self.provisioning_state = None
- self.id_properties_latest_assignment_report_id = None
- self.report_id = None
- self.assignment = assignment
- self.vm = vm
- self.start_time = None
- self.end_time = None
- self.compliance_status_properties_latest_assignment_report_compliance_status = None
- self.operation_type = None
- self.resources = resources
- self.name_properties_guest_configuration_name = name_properties_guest_configuration_name
- self.version = version
- self.content_uri = None
- self.content_hash = None
- self.configuration_parameter = configuration_parameter
- self.configuration_setting = configuration_setting
+ self.properties = properties
class GuestConfigurationAssignmentList(msrest.serialization.Model):
@@ -564,6 +513,75 @@ def __init__(
self.value = value
+class GuestConfigurationAssignmentProperties(msrest.serialization.Model):
+ """Guest configuration assignment properties.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar target_resource_id: VM resource Id.
+ :vartype target_resource_id: str
+ :param guest_configuration: The guest configuration to assign.
+ :type guest_configuration: ~guest_configuration_client.models.GuestConfigurationNavigation
+ :ivar compliance_status: A value indicating compliance status of the machine for the assigned
+ guest configuration. Possible values include: "Compliant", "NonCompliant", "Pending".
+ :vartype compliance_status: str or ~guest_configuration_client.models.ComplianceStatus
+ :ivar last_compliance_status_checked: Date and time when last compliance status was checked.
+ :vartype last_compliance_status_checked: ~datetime.datetime
+ :ivar latest_report_id: Id of the latest report for the guest configuration assignment.
+ :vartype latest_report_id: str
+ :param latest_assignment_report: Last reported guest configuration assignment report.
+ :type latest_assignment_report: ~guest_configuration_client.models.AssignmentReport
+ :param context: The source which initiated the guest configuration assignment. Ex: Azure
+ Policy.
+ :type context: str
+ :ivar assignment_hash: Combined hash of the configuration package and parameters.
+ :vartype assignment_hash: str
+ :ivar provisioning_state: The provisioning state, which only appears in the response. Possible
+ values include: "Succeeded", "Failed", "Canceled", "Created".
+ :vartype provisioning_state: str or ~guest_configuration_client.models.ProvisioningState
+ """
+
+ _validation = {
+ 'target_resource_id': {'readonly': True},
+ 'compliance_status': {'readonly': True},
+ 'last_compliance_status_checked': {'readonly': True},
+ 'latest_report_id': {'readonly': True},
+ 'assignment_hash': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'},
+ 'guest_configuration': {'key': 'guestConfiguration', 'type': 'GuestConfigurationNavigation'},
+ 'compliance_status': {'key': 'complianceStatus', 'type': 'str'},
+ 'last_compliance_status_checked': {'key': 'lastComplianceStatusChecked', 'type': 'iso-8601'},
+ 'latest_report_id': {'key': 'latestReportId', 'type': 'str'},
+ 'latest_assignment_report': {'key': 'latestAssignmentReport', 'type': 'AssignmentReport'},
+ 'context': {'key': 'context', 'type': 'str'},
+ 'assignment_hash': {'key': 'assignmentHash', 'type': 'str'},
+ 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ guest_configuration: Optional["GuestConfigurationNavigation"] = None,
+ latest_assignment_report: Optional["AssignmentReport"] = None,
+ context: Optional[str] = None,
+ **kwargs
+ ):
+ super(GuestConfigurationAssignmentProperties, self).__init__(**kwargs)
+ self.target_resource_id = None
+ self.guest_configuration = guest_configuration
+ self.compliance_status = None
+ self.last_compliance_status_checked = None
+ self.latest_report_id = None
+ self.latest_assignment_report = latest_assignment_report
+ self.context = context
+ self.assignment_hash = None
+ self.provisioning_state = None
+
+
class GuestConfigurationAssignmentReport(msrest.serialization.Model):
"""Report for the guest configuration assignment. Report contains information such as compliance status, reason, and more.
@@ -684,6 +702,66 @@ def __init__(
self.details = details
+class GuestConfigurationNavigation(msrest.serialization.Model):
+ """Guest configuration is an artifact that encapsulates DSC configuration and its dependencies. The artifact is a zip file containing DSC configuration (as MOF) and dependent resources and other dependencies like modules.
+
+ :param kind: Kind of the guest configuration. For example:DSC. Possible values include: "DSC".
+ :type kind: str or ~guest_configuration_client.models.Kind
+ :param name: Name of the guest configuration.
+ :type name: str
+ :param version: Version of the guest configuration.
+ :type version: str
+ :param content_uri: Uri of the storage where guest configuration package is uploaded.
+ :type content_uri: str
+ :param content_hash: Combined hash of the guest configuration package and configuration
+ parameters.
+ :type content_hash: str
+ :param assignment_type: Specifies the assignment type and execution of the configuration.
+ Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor.
+ Possible values include: "Audit", "DeployAndAutoCorrect", "ApplyAndAutoCorrect",
+ "ApplyAndMonitor".
+ :type assignment_type: str or ~guest_configuration_client.models.AssignmentType
+ :param configuration_parameter: The configuration parameters for the guest configuration.
+ :type configuration_parameter: list[~guest_configuration_client.models.ConfigurationParameter]
+ :param configuration_setting: The configuration setting for the guest configuration.
+ :type configuration_setting: ~guest_configuration_client.models.ConfigurationSetting
+ """
+
+ _attribute_map = {
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'version': {'key': 'version', 'type': 'str'},
+ 'content_uri': {'key': 'contentUri', 'type': 'str'},
+ 'content_hash': {'key': 'contentHash', 'type': 'str'},
+ 'assignment_type': {'key': 'assignmentType', 'type': 'str'},
+ 'configuration_parameter': {'key': 'configurationParameter', 'type': '[ConfigurationParameter]'},
+ 'configuration_setting': {'key': 'configurationSetting', 'type': 'ConfigurationSetting'},
+ }
+
+ def __init__(
+ self,
+ *,
+ kind: Optional[Union[str, "Kind"]] = None,
+ name: Optional[str] = None,
+ version: Optional[str] = None,
+ content_uri: Optional[str] = None,
+ content_hash: Optional[str] = None,
+ assignment_type: Optional[Union[str, "AssignmentType"]] = None,
+ configuration_parameter: Optional[List["ConfigurationParameter"]] = None,
+ configuration_setting: Optional["ConfigurationSetting"] = None,
+ **kwargs
+ ):
+ super(GuestConfigurationNavigation, self).__init__(**kwargs)
+ self.kind = kind
+ self.name = name
+ self.version = version
+ self.content_uri = content_uri
+ self.content_hash = content_hash
+ self.assignment_type = assignment_type
+ self.configuration_parameter = configuration_parameter
+ self.configuration_setting = configuration_setting
+
+
class Operation(msrest.serialization.Model):
"""GuestConfiguration REST API operation.
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/__init__.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/__init__.py
index 50d30bbc553..e0995a8b285 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/__init__.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/__init__.py
@@ -6,16 +6,16 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from ._guest_configuration_assignment_operations import GuestConfigurationAssignmentOperations
-from ._guest_configuration_assignment_report_operations import GuestConfigurationAssignmentReportOperations
-from ._guest_configuration_hcrp_assignment_operations import GuestConfigurationHcrpAssignmentOperations
-from ._guest_configuration_hcrp_assignment_report_operations import GuestConfigurationHcrpAssignmentReportOperations
-from ._operation_operations import OperationOperations
+from ._guest_configuration_assignments_operations import GuestConfigurationAssignmentsOperations
+from ._guest_configuration_assignment_reports_operations import GuestConfigurationAssignmentReportsOperations
+from ._guest_configuration_hcrp_assignments_operations import GuestConfigurationHcrpAssignmentsOperations
+from ._guest_configuration_hcrp_assignment_reports_operations import GuestConfigurationHcrpAssignmentReportsOperations
+from ._operations import Operations
__all__ = [
- 'GuestConfigurationAssignmentOperations',
- 'GuestConfigurationAssignmentReportOperations',
- 'GuestConfigurationHcrpAssignmentOperations',
- 'GuestConfigurationHcrpAssignmentReportOperations',
- 'OperationOperations',
+ 'GuestConfigurationAssignmentsOperations',
+ 'GuestConfigurationAssignmentReportsOperations',
+ 'GuestConfigurationHcrpAssignmentsOperations',
+ 'GuestConfigurationHcrpAssignmentReportsOperations',
+ 'Operations',
]
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_assignment_report_operations.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_assignment_reports_operations.py
similarity index 91%
rename from src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_assignment_report_operations.py
rename to src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_assignment_reports_operations.py
index 719f2b8d05b..0cefff3a54e 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_assignment_report_operations.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_assignment_reports_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
@@ -22,8 +22,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-class GuestConfigurationAssignmentReportOperations(object):
- """GuestConfigurationAssignmentReportOperations operations.
+class GuestConfigurationAssignmentReportsOperations(object):
+ """GuestConfigurationAssignmentReportsOperations 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.
@@ -66,9 +66,12 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignmentReportList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
url = self.list.metadata['url'] # type: ignore
@@ -86,9 +89,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
@@ -131,9 +133,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignmentReport"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -152,9 +157,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
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_assignment_operations.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_assignments_operations.py
similarity index 57%
rename from src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_assignment_operations.py
rename to src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_assignments_operations.py
index 7304258b910..6ee43a9cc56 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_assignment_operations.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_assignments_operations.py
@@ -8,25 +8,23 @@
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
-from azure.core.polling import LROPoller, NoPolling, PollingMethod
from azure.mgmt.core.exceptions import ARMErrorFormat
-from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
- from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union
+ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-class GuestConfigurationAssignmentOperations(object):
- """GuestConfigurationAssignmentOperations operations.
+class GuestConfigurationAssignmentsOperations(object):
+ """GuestConfigurationAssignmentsOperations 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.
@@ -47,34 +45,41 @@ def __init__(self, client, config, serializer, deserializer):
self._deserialize = deserializer
self._config = config
- def _create_or_update_initial(
+ def create_or_update(
self,
guest_configuration_assignment_name, # type: str
resource_group_name, # type: str
vm_name, # type: str
- name=None, # type: Optional[str]
- location=None, # type: Optional[str]
- context=None, # type: Optional[str]
- assignment=None, # type: Optional["models.AssignmentInfo"]
- vm=None, # type: Optional["models.VmInfo"]
- resources=None, # type: Optional[List["models.AssignmentReportResource"]]
- guest_configuration_navigation_name=None, # type: Optional[str]
- version=None, # type: Optional[str]
- configuration_parameter=None, # type: Optional[List["models.ConfigurationParameter"]]
- configuration_setting=None, # type: Optional["models.ConfigurationSetting"]
+ parameters, # type: "models.GuestConfigurationAssignment"
**kwargs # type: Any
):
# type: (...) -> "models.GuestConfigurationAssignment"
+ """Creates an association between a VM and guest configuration.
+
+ :param guest_configuration_assignment_name: Name of the guest configuration assignment.
+ :type guest_configuration_assignment_name: str
+ :param resource_group_name: The resource group name.
+ :type resource_group_name: str
+ :param vm_name: The name of the virtual machine.
+ :type vm_name: str
+ :param parameters: Parameters supplied to the create or update guest configuration assignment.
+ :type parameters: ~guest_configuration_client.models.GuestConfigurationAssignment
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: GuestConfigurationAssignment, or the result of cls(response)
+ :rtype: ~guest_configuration_client.models.GuestConfigurationAssignment
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- _parameters = models.GuestConfigurationAssignment(name=name, location=location, context=context, assignment=assignment, vm=vm, resources=resources, name_properties_guest_configuration_name=guest_configuration_navigation_name, version=version, configuration_parameter=configuration_parameter, configuration_setting=configuration_setting)
api_version = "2020-06-25"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self._create_or_update_initial.metadata['url'] # type: ignore
+ url = self.create_or_update.metadata['url'] # type: ignore
path_format_arguments = {
'guestConfigurationAssignmentName': self._serialize.url("guest_configuration_assignment_name", guest_configuration_assignment_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
@@ -90,14 +95,12 @@ def _create_or_update_initial(
# 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(_parameters, 'GuestConfigurationAssignment')
+ body_content = self._serialize.body(parameters, 'GuestConfigurationAssignment')
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
@@ -106,7 +109,6 @@ def _create_or_update_initial(
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('GuestConfigurationAssignment', pipeline_response)
@@ -117,104 +119,7 @@ def _create_or_update_initial(
return cls(pipeline_response, deserialized, {})
return deserialized
- _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
-
- def begin_create_or_update(
- self,
- guest_configuration_assignment_name, # type: str
- resource_group_name, # type: str
- vm_name, # type: str
- name=None, # type: Optional[str]
- location=None, # type: Optional[str]
- context=None, # type: Optional[str]
- assignment=None, # type: Optional["models.AssignmentInfo"]
- vm=None, # type: Optional["models.VmInfo"]
- resources=None, # type: Optional[List["models.AssignmentReportResource"]]
- guest_configuration_navigation_name=None, # type: Optional[str]
- version=None, # type: Optional[str]
- configuration_parameter=None, # type: Optional[List["models.ConfigurationParameter"]]
- configuration_setting=None, # type: Optional["models.ConfigurationSetting"]
- **kwargs # type: Any
- ):
- # type: (...) -> LROPoller
- """Creates an association between a VM and guest configuration.
-
- :param guest_configuration_assignment_name: Name of the guest configuration assignment.
- :type guest_configuration_assignment_name: str
- :param resource_group_name: The resource group name.
- :type resource_group_name: str
- :param vm_name: The name of the virtual machine.
- :type vm_name: str
- :param name: Name of the guest configuration assignment.
- :type name: str
- :param location: Region where the VM is located.
- :type location: str
- :param context: The source which initiated the guest configuration assignment. Ex: Azure
- Policy.
- :type context: str
- :param assignment: Configuration details of the guest configuration assignment.
- :type assignment: ~guest_configuration_client.models.AssignmentInfo
- :param vm: Information about the VM.
- :type vm: ~guest_configuration_client.models.VmInfo
- :param resources: The list of resources for which guest configuration assignment compliance is
- checked.
- :type resources: list[~guest_configuration_client.models.AssignmentReportResource]
- :param guest_configuration_navigation_name: Name of the guest configuration.
- :type guest_configuration_navigation_name: str
- :param version: Version of the guest configuration.
- :type version: str
- :param configuration_parameter: The configuration parameters for the guest configuration.
- :type configuration_parameter: list[~guest_configuration_client.models.ConfigurationParameter]
- :param configuration_setting: The configuration setting for the guest configuration.
- :type configuration_setting: ~guest_configuration_client.models.ConfigurationSetting
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
- :paramtype polling: bool or ~azure.core.polling.PollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of LROPoller that returns either GuestConfigurationAssignment or the result of cls(response)
- :rtype: ~azure.core.polling.LROPoller[~guest_configuration_client.models.GuestConfigurationAssignment]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
- cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignment"]
- lro_delay = kwargs.pop(
- 'polling_interval',
- self._config.polling_interval
- )
- raw_result = self._create_or_update_initial(
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- resource_group_name=resource_group_name,
- vm_name=vm_name,
- name=name,
- location=location,
- context=context,
- assignment=assignment,
- vm=vm,
- resources=resources,
- guest_configuration_navigation_name=guest_configuration_navigation_name,
- version=version,
- configuration_parameter=configuration_parameter,
- configuration_setting=configuration_setting,
- cls=lambda x,y,z: x,
- **kwargs
- )
-
- kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
-
- def get_long_running_output(pipeline_response):
- deserialized = self._deserialize('GuestConfigurationAssignment', pipeline_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {})
- return deserialized
-
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
- elif polling is False: polling_method = NoPolling()
- else: polling_method = polling
- return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
- begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
def get(
self,
@@ -238,9 +143,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -258,9 +166,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
@@ -278,7 +185,7 @@ def get(
return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
- def _delete_initial(
+ def delete(
self,
resource_group_name, # type: str
guest_configuration_assignment_name, # type: str
@@ -286,13 +193,29 @@ def _delete_initial(
**kwargs # type: Any
):
# type: (...) -> None
+ """Delete a guest configuration assignment.
+
+ :param resource_group_name: The resource group name.
+ :type resource_group_name: str
+ :param guest_configuration_assignment_name: Name of the guest configuration assignment.
+ :type guest_configuration_assignment_name: str
+ :param vm_name: The name of the virtual machine.
+ :type vm_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 = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
- url = self._delete_initial.metadata['url'] # type: ignore
+ url = self.delete.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[-\w\._]+$'),
'guestConfigurationAssignmentName': self._serialize.url("guest_configuration_assignment_name", guest_configuration_assignment_name, 'str'),
@@ -307,8 +230,8 @@ def _delete_initial(
# 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
@@ -321,59 +244,7 @@ def _delete_initial(
if cls:
return cls(pipeline_response, None, {})
- _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
-
- def begin_delete(
- self,
- resource_group_name, # type: str
- guest_configuration_assignment_name, # type: str
- vm_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> LROPoller
- """Delete a guest configuration assignment.
-
- :param resource_group_name: The resource group name.
- :type resource_group_name: str
- :param guest_configuration_assignment_name: Name of the guest configuration assignment.
- :type guest_configuration_assignment_name: str
- :param vm_name: The name of the virtual machine.
- :type vm_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
- :paramtype polling: bool or ~azure.core.polling.PollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of LROPoller that returns either None or the result of cls(response)
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
- cls = kwargs.pop('cls', None) # type: ClsType[None]
- lro_delay = kwargs.pop(
- 'polling_interval',
- self._config.polling_interval
- )
- raw_result = self._delete_initial(
- resource_group_name=resource_group_name,
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- vm_name=vm_name,
- cls=lambda x,y,z: x,
- **kwargs
- )
-
- kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
-
- def get_long_running_output(pipeline_response):
- if cls:
- return cls(pipeline_response, None, {})
-
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
- elif polling is False: polling_method = NoPolling()
- else: polling_method = polling
- return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
- begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
def list(
self,
@@ -394,11 +265,18 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignmentList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ 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
@@ -412,15 +290,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/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_hcrp_assignment_report_operations.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_hcrp_assignment_reports_operations.py
similarity index 91%
rename from src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_hcrp_assignment_report_operations.py
rename to src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_hcrp_assignment_reports_operations.py
index 32a62a6dbba..7c55142f90d 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_hcrp_assignment_report_operations.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_hcrp_assignment_reports_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
@@ -22,8 +22,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-class GuestConfigurationHcrpAssignmentReportOperations(object):
- """GuestConfigurationHcrpAssignmentReportOperations operations.
+class GuestConfigurationHcrpAssignmentReportsOperations(object):
+ """GuestConfigurationHcrpAssignmentReportsOperations 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.
@@ -66,9 +66,12 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignmentReportList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
url = self.list.metadata['url'] # type: ignore
@@ -86,9 +89,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
@@ -131,9 +133,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignmentReport"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -152,9 +157,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
diff --git a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_hcrp_assignment_operations.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_hcrp_assignments_operations.py
similarity index 57%
rename from src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_hcrp_assignment_operations.py
rename to src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_hcrp_assignments_operations.py
index 099f0cfbd2d..7b122c4d4e4 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_hcrp_assignment_operations.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_guest_configuration_hcrp_assignments_operations.py
@@ -8,25 +8,23 @@
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
-from azure.core.polling import LROPoller, NoPolling, PollingMethod
from azure.mgmt.core.exceptions import ARMErrorFormat
-from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
- from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union
+ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-class GuestConfigurationHcrpAssignmentOperations(object):
- """GuestConfigurationHcrpAssignmentOperations operations.
+class GuestConfigurationHcrpAssignmentsOperations(object):
+ """GuestConfigurationHcrpAssignmentsOperations 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.
@@ -47,34 +45,41 @@ def __init__(self, client, config, serializer, deserializer):
self._deserialize = deserializer
self._config = config
- def _create_or_update_initial(
+ def create_or_update(
self,
guest_configuration_assignment_name, # type: str
resource_group_name, # type: str
machine_name, # type: str
- name=None, # type: Optional[str]
- location=None, # type: Optional[str]
- context=None, # type: Optional[str]
- assignment=None, # type: Optional["models.AssignmentInfo"]
- vm=None, # type: Optional["models.VmInfo"]
- resources=None, # type: Optional[List["models.AssignmentReportResource"]]
- guest_configuration_navigation_name=None, # type: Optional[str]
- version=None, # type: Optional[str]
- configuration_parameter=None, # type: Optional[List["models.ConfigurationParameter"]]
- configuration_setting=None, # type: Optional["models.ConfigurationSetting"]
+ parameters, # type: "models.GuestConfigurationAssignment"
**kwargs # type: Any
):
# type: (...) -> "models.GuestConfigurationAssignment"
+ """Creates an association between a ARC machine and guest configuration.
+
+ :param guest_configuration_assignment_name: Name of the guest configuration assignment.
+ :type guest_configuration_assignment_name: str
+ :param resource_group_name: The resource group name.
+ :type resource_group_name: str
+ :param machine_name: The name of the ARC machine.
+ :type machine_name: str
+ :param parameters: Parameters supplied to the create or update guest configuration assignment.
+ :type parameters: ~guest_configuration_client.models.GuestConfigurationAssignment
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: GuestConfigurationAssignment, or the result of cls(response)
+ :rtype: ~guest_configuration_client.models.GuestConfigurationAssignment
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- _parameters = models.GuestConfigurationAssignment(name=name, location=location, context=context, assignment=assignment, vm=vm, resources=resources, name_properties_guest_configuration_name=guest_configuration_navigation_name, version=version, configuration_parameter=configuration_parameter, configuration_setting=configuration_setting)
api_version = "2020-06-25"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self._create_or_update_initial.metadata['url'] # type: ignore
+ url = self.create_or_update.metadata['url'] # type: ignore
path_format_arguments = {
'guestConfigurationAssignmentName': self._serialize.url("guest_configuration_assignment_name", guest_configuration_assignment_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
@@ -90,14 +95,12 @@ def _create_or_update_initial(
# 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(_parameters, 'GuestConfigurationAssignment')
+ body_content = self._serialize.body(parameters, 'GuestConfigurationAssignment')
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
@@ -106,7 +109,6 @@ def _create_or_update_initial(
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('GuestConfigurationAssignment', pipeline_response)
@@ -117,104 +119,7 @@ def _create_or_update_initial(
return cls(pipeline_response, deserialized, {})
return deserialized
- _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
-
- def begin_create_or_update(
- self,
- guest_configuration_assignment_name, # type: str
- resource_group_name, # type: str
- machine_name, # type: str
- name=None, # type: Optional[str]
- location=None, # type: Optional[str]
- context=None, # type: Optional[str]
- assignment=None, # type: Optional["models.AssignmentInfo"]
- vm=None, # type: Optional["models.VmInfo"]
- resources=None, # type: Optional[List["models.AssignmentReportResource"]]
- guest_configuration_navigation_name=None, # type: Optional[str]
- version=None, # type: Optional[str]
- configuration_parameter=None, # type: Optional[List["models.ConfigurationParameter"]]
- configuration_setting=None, # type: Optional["models.ConfigurationSetting"]
- **kwargs # type: Any
- ):
- # type: (...) -> LROPoller
- """Creates an association between a ARC machine and guest configuration.
-
- :param guest_configuration_assignment_name: Name of the guest configuration assignment.
- :type guest_configuration_assignment_name: str
- :param resource_group_name: The resource group name.
- :type resource_group_name: str
- :param machine_name: The name of the ARC machine.
- :type machine_name: str
- :param name: Name of the guest configuration assignment.
- :type name: str
- :param location: Region where the VM is located.
- :type location: str
- :param context: The source which initiated the guest configuration assignment. Ex: Azure
- Policy.
- :type context: str
- :param assignment: Configuration details of the guest configuration assignment.
- :type assignment: ~guest_configuration_client.models.AssignmentInfo
- :param vm: Information about the VM.
- :type vm: ~guest_configuration_client.models.VmInfo
- :param resources: The list of resources for which guest configuration assignment compliance is
- checked.
- :type resources: list[~guest_configuration_client.models.AssignmentReportResource]
- :param guest_configuration_navigation_name: Name of the guest configuration.
- :type guest_configuration_navigation_name: str
- :param version: Version of the guest configuration.
- :type version: str
- :param configuration_parameter: The configuration parameters for the guest configuration.
- :type configuration_parameter: list[~guest_configuration_client.models.ConfigurationParameter]
- :param configuration_setting: The configuration setting for the guest configuration.
- :type configuration_setting: ~guest_configuration_client.models.ConfigurationSetting
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
- :paramtype polling: bool or ~azure.core.polling.PollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of LROPoller that returns either GuestConfigurationAssignment or the result of cls(response)
- :rtype: ~azure.core.polling.LROPoller[~guest_configuration_client.models.GuestConfigurationAssignment]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
- cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignment"]
- lro_delay = kwargs.pop(
- 'polling_interval',
- self._config.polling_interval
- )
- raw_result = self._create_or_update_initial(
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- resource_group_name=resource_group_name,
- machine_name=machine_name,
- name=name,
- location=location,
- context=context,
- assignment=assignment,
- vm=vm,
- resources=resources,
- guest_configuration_navigation_name=guest_configuration_navigation_name,
- version=version,
- configuration_parameter=configuration_parameter,
- configuration_setting=configuration_setting,
- cls=lambda x,y,z: x,
- **kwargs
- )
-
- kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
-
- def get_long_running_output(pipeline_response):
- deserialized = self._deserialize('GuestConfigurationAssignment', pipeline_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {})
- return deserialized
-
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
- elif polling is False: polling_method = NoPolling()
- else: polling_method = polling
- return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
- begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
def get(
self,
@@ -238,9 +143,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -258,9 +166,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
@@ -278,7 +185,7 @@ def get(
return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
- def _delete_initial(
+ def delete(
self,
resource_group_name, # type: str
guest_configuration_assignment_name, # type: str
@@ -286,13 +193,29 @@ def _delete_initial(
**kwargs # type: Any
):
# type: (...) -> None
+ """Delete a guest configuration assignment.
+
+ :param resource_group_name: The resource group name.
+ :type resource_group_name: str
+ :param guest_configuration_assignment_name: Name of the guest configuration assignment.
+ :type guest_configuration_assignment_name: str
+ :param machine_name: The name of the ARC machine.
+ :type machine_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 = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ accept = "application/json"
# Construct URL
- url = self._delete_initial.metadata['url'] # type: ignore
+ url = self.delete.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[-\w\._]+$'),
'guestConfigurationAssignmentName': self._serialize.url("guest_configuration_assignment_name", guest_configuration_assignment_name, 'str'),
@@ -307,8 +230,8 @@ def _delete_initial(
# 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
@@ -321,59 +244,7 @@ def _delete_initial(
if cls:
return cls(pipeline_response, None, {})
- _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
-
- def begin_delete(
- self,
- resource_group_name, # type: str
- guest_configuration_assignment_name, # type: str
- machine_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> LROPoller
- """Delete a guest configuration assignment.
-
- :param resource_group_name: The resource group name.
- :type resource_group_name: str
- :param guest_configuration_assignment_name: Name of the guest configuration assignment.
- :type guest_configuration_assignment_name: str
- :param machine_name: The name of the ARC machine.
- :type machine_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
- :paramtype polling: bool or ~azure.core.polling.PollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of LROPoller that returns either None or the result of cls(response)
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
- cls = kwargs.pop('cls', None) # type: ClsType[None]
- lro_delay = kwargs.pop(
- 'polling_interval',
- self._config.polling_interval
- )
- raw_result = self._delete_initial(
- resource_group_name=resource_group_name,
- guest_configuration_assignment_name=guest_configuration_assignment_name,
- machine_name=machine_name,
- cls=lambda x,y,z: x,
- **kwargs
- )
-
- kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
-
- def get_long_running_output(pipeline_response):
- if cls:
- return cls(pipeline_response, None, {})
-
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
- elif polling is False: polling_method = NoPolling()
- else: polling_method = polling
- return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
- begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}'} # type: ignore
def list(
self,
@@ -394,11 +265,18 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.GuestConfigurationAssignmentList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ 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
@@ -412,15 +290,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/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_operation_operations.py b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_operations.py
similarity index 87%
rename from src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_operation_operations.py
rename to src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_operations.py
index 6e4e0a431ed..f9a6ccdff8f 100644
--- a/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_operation_operations.py
+++ b/src/guestconfig/azext_guestconfig/vendored_sdks/guestconfig/operations/_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
@@ -23,8 +23,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-class OperationOperations(object):
- """OperationOperations operations.
+class Operations(object):
+ """Operations 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.
@@ -58,11 +58,18 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.OperationList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-06-25"
+ 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
@@ -70,15 +77,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/guestconfig/report.md b/src/guestconfig/report.md
index 701cf1aafea..9e05e9032d9 100644
--- a/src/guestconfig/report.md
+++ b/src/guestconfig/report.md
@@ -1,160 +1,159 @@
# Azure CLI Module Creation Report
-### guestconfig guest-configuration-assignment create
-
-create a guestconfig guest-configuration-assignment.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--guest-configuration-assignment-name**|string|Name of the guest configuration assignment.|guest_configuration_assignment_name|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--vm-name**|string|The name of the virtual machine.|vm_name|
-|**--name**|string|Name of the guest configuration assignment.|name|
-|**--location**|string|Region where the VM is located.|location|
-|**--context**|string|The source which initiated the guest configuration assignment. Ex: Azure Policy|context|
-|**--latest-assignment-report-assignment**|object|Configuration details of the guest configuration assignment.|assignment|
-|**--guest-configuration-name**|string|Name of the guest configuration.|name_properties_guest_configuration_name|
-|**--guest-configuration-version**|string|Version of the guest configuration.|version|
-|**--guest-configuration-configuration-parameter**|array|The configuration parameters for the guest configuration.|configuration_parameter|
-|**--guest-configuration-configuration-setting**|object|The configuration setting for the guest configuration.|configuration_setting|
-### guestconfig guest-configuration-assignment delete
-
-delete a guestconfig guest-configuration-assignment.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--guest-configuration-assignment-name**|string|Name of the guest configuration assignment|guest_configuration_assignment_name|
-|**--vm-name**|string|The name of the virtual machine.|vm_name|
-### guestconfig guest-configuration-assignment list
-
-list a guestconfig guest-configuration-assignment.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--vm-name**|string|The name of the virtual machine.|vm_name|
-### guestconfig guest-configuration-assignment show
-
-show a guestconfig guest-configuration-assignment.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--guest-configuration-assignment-name**|string|The guest configuration assignment name.|guest_configuration_assignment_name|
-|**--vm-name**|string|The name of the virtual machine.|vm_name|
-### guestconfig guest-configuration-assignment update
-
-create a guestconfig guest-configuration-assignment.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--guest-configuration-assignment-name**|string|Name of the guest configuration assignment.|guest_configuration_assignment_name|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--vm-name**|string|The name of the virtual machine.|vm_name|
-|**--name**|string|Name of the guest configuration assignment.|name|
-|**--location**|string|Region where the VM is located.|location|
-|**--context**|string|The source which initiated the guest configuration assignment. Ex: Azure Policy|context|
-|**--latest-assignment-report-assignment**|object|Configuration details of the guest configuration assignment.|assignment|
-|**--guest-configuration-name**|string|Name of the guest configuration.|name_properties_guest_configuration_name|
-|**--guest-configuration-version**|string|Version of the guest configuration.|version|
-|**--guest-configuration-configuration-parameter**|array|The configuration parameters for the guest configuration.|configuration_parameter|
-|**--guest-configuration-configuration-setting**|object|The configuration setting for the guest configuration.|configuration_setting|
-### guestconfig guest-configuration-assignment-report list
-
-list a guestconfig guest-configuration-assignment-report.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--guest-configuration-assignment-name**|string|The guest configuration assignment name.|guest_configuration_assignment_name|
-|**--vm-name**|string|The name of the virtual machine.|vm_name|
-### guestconfig guest-configuration-assignment-report show
-
-show a guestconfig guest-configuration-assignment-report.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--guest-configuration-assignment-name**|string|The guest configuration assignment name.|guest_configuration_assignment_name|
-|**--report-id**|string|The GUID for the guest configuration assignment report.|report_id|
-|**--vm-name**|string|The name of the virtual machine.|vm_name|
-### guestconfig guest-configuration-hcrp-assignment create
-
-create a guestconfig guest-configuration-hcrp-assignment.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--guest-configuration-assignment-name**|string|Name of the guest configuration assignment.|guest_configuration_assignment_name|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--machine-name**|string|The name of the ARC machine.|machine_name|
-|**--name**|string|Name of the guest configuration assignment.|name|
-|**--location**|string|Region where the VM is located.|location|
-|**--context**|string|The source which initiated the guest configuration assignment. Ex: Azure Policy|context|
-|**--latest-assignment-report-assignment**|object|Configuration details of the guest configuration assignment.|assignment|
-|**--guest-configuration-name**|string|Name of the guest configuration.|name_properties_guest_configuration_name|
-|**--guest-configuration-version**|string|Version of the guest configuration.|version|
-|**--guest-configuration-configuration-parameter**|array|The configuration parameters for the guest configuration.|configuration_parameter|
-|**--guest-configuration-configuration-setting**|object|The configuration setting for the guest configuration.|configuration_setting|
-### guestconfig guest-configuration-hcrp-assignment delete
-
-delete a guestconfig guest-configuration-hcrp-assignment.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--guest-configuration-assignment-name**|string|Name of the guest configuration assignment|guest_configuration_assignment_name|
-|**--machine-name**|string|The name of the ARC machine.|machine_name|
-### guestconfig guest-configuration-hcrp-assignment list
-
-list a guestconfig guest-configuration-hcrp-assignment.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--machine-name**|string|The name of the ARC machine.|machine_name|
-### guestconfig guest-configuration-hcrp-assignment show
-
-show a guestconfig guest-configuration-hcrp-assignment.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--guest-configuration-assignment-name**|string|The guest configuration assignment name.|guest_configuration_assignment_name|
-|**--machine-name**|string|The name of the ARC machine.|machine_name|
-### guestconfig guest-configuration-hcrp-assignment update
-
-create a guestconfig guest-configuration-hcrp-assignment.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--guest-configuration-assignment-name**|string|Name of the guest configuration assignment.|guest_configuration_assignment_name|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--machine-name**|string|The name of the ARC machine.|machine_name|
-|**--name**|string|Name of the guest configuration assignment.|name|
-|**--location**|string|Region where the VM is located.|location|
-|**--context**|string|The source which initiated the guest configuration assignment. Ex: Azure Policy|context|
-|**--latest-assignment-report-assignment**|object|Configuration details of the guest configuration assignment.|assignment|
-|**--guest-configuration-name**|string|Name of the guest configuration.|name_properties_guest_configuration_name|
-|**--guest-configuration-version**|string|Version of the guest configuration.|version|
-|**--guest-configuration-configuration-parameter**|array|The configuration parameters for the guest configuration.|configuration_parameter|
-|**--guest-configuration-configuration-setting**|object|The configuration setting for the guest configuration.|configuration_setting|
-### guestconfig guest-configuration-hcrp-assignment-report list
-
-list a guestconfig guest-configuration-hcrp-assignment-report.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--guest-configuration-assignment-name**|string|The guest configuration assignment name.|guest_configuration_assignment_name|
-|**--machine-name**|string|The name of the ARC machine.|machine_name|
-### guestconfig guest-configuration-hcrp-assignment-report show
-
-show a guestconfig guest-configuration-hcrp-assignment-report.
-
-|Option|Type|Description|Path (SDK)|Path (swagger)|
-|------|----|-----------|----------|--------------|
-|**--resource-group-name**|string|The resource group name.|resource_group_name|
-|**--guest-configuration-assignment-name**|string|The guest configuration assignment name.|guest_configuration_assignment_name|
-|**--report-id**|string|The GUID for the guest configuration assignment report.|report_id|
-|**--machine-name**|string|The name of the ARC machine.|machine_name|
\ No newline at end of file
+## EXTENSION
+|CLI Extension|Command Groups|
+|---------|------------|
+|az guestconfig|[groups](#CommandGroups)
+
+## GROUPS
+### Command groups in `az guestconfig` extension
+|CLI Command Group|Group Swagger name|Commands|
+|---------|------------|--------|
+|az guestconfig guest-configuration-assignment|GuestConfigurationAssignments|[commands](#CommandsInGuestConfigurationAssignments)|
+|az guestconfig guest-configuration-assignment-report|GuestConfigurationAssignmentReports|[commands](#CommandsInGuestConfigurationAssignmentReports)|
+|az guestconfig guest-configuration-hcrp-assignment|GuestConfigurationHCRPAssignments|[commands](#CommandsInGuestConfigurationHCRPAssignments)|
+|az guestconfig guest-configuration-hcrp-assignment-report|GuestConfigurationHCRPAssignmentReports|[commands](#CommandsInGuestConfigurationHCRPAssignmentReports)|
+
+## COMMANDS
+### Commands in `az guestconfig guest-configuration-assignment` group
+|CLI Command|Operation Swagger name|Parameters|Examples|
+|---------|------------|--------|-----------|
+|[az guestconfig guest-configuration-assignment list](#GuestConfigurationAssignmentsList)|List|[Parameters](#ParametersGuestConfigurationAssignmentsList)|[Example](#ExamplesGuestConfigurationAssignmentsList)|
+|[az guestconfig guest-configuration-assignment show](#GuestConfigurationAssignmentsGet)|Get|[Parameters](#ParametersGuestConfigurationAssignmentsGet)|[Example](#ExamplesGuestConfigurationAssignmentsGet)|
+
+### Commands in `az guestconfig guest-configuration-assignment-report` group
+|CLI Command|Operation Swagger name|Parameters|Examples|
+|---------|------------|--------|-----------|
+|[az guestconfig guest-configuration-assignment-report list](#GuestConfigurationAssignmentReportsList)|List|[Parameters](#ParametersGuestConfigurationAssignmentReportsList)|[Example](#ExamplesGuestConfigurationAssignmentReportsList)|
+|[az guestconfig guest-configuration-assignment-report show](#GuestConfigurationAssignmentReportsGet)|Get|[Parameters](#ParametersGuestConfigurationAssignmentReportsGet)|[Example](#ExamplesGuestConfigurationAssignmentReportsGet)|
+
+### Commands in `az guestconfig guest-configuration-hcrp-assignment` group
+|CLI Command|Operation Swagger name|Parameters|Examples|
+|---------|------------|--------|-----------|
+|[az guestconfig guest-configuration-hcrp-assignment list](#GuestConfigurationHCRPAssignmentsList)|List|[Parameters](#ParametersGuestConfigurationHCRPAssignmentsList)|[Example](#ExamplesGuestConfigurationHCRPAssignmentsList)|
+|[az guestconfig guest-configuration-hcrp-assignment show](#GuestConfigurationHCRPAssignmentsGet)|Get|[Parameters](#ParametersGuestConfigurationHCRPAssignmentsGet)|[Example](#ExamplesGuestConfigurationHCRPAssignmentsGet)|
+
+### Commands in `az guestconfig guest-configuration-hcrp-assignment-report` group
+|CLI Command|Operation Swagger name|Parameters|Examples|
+|---------|------------|--------|-----------|
+|[az guestconfig guest-configuration-hcrp-assignment-report list](#GuestConfigurationHCRPAssignmentReportsList)|List|[Parameters](#ParametersGuestConfigurationHCRPAssignmentReportsList)|[Example](#ExamplesGuestConfigurationHCRPAssignmentReportsList)|
+|[az guestconfig guest-configuration-hcrp-assignment-report show](#GuestConfigurationHCRPAssignmentReportsGet)|Get|[Parameters](#ParametersGuestConfigurationHCRPAssignmentReportsGet)|[Example](#ExamplesGuestConfigurationHCRPAssignmentReportsGet)|
+
+
+## COMMAND DETAILS
+
+### group `az guestconfig guest-configuration-assignment`
+#### Command `az guestconfig guest-configuration-assignment list`
+
+##### Example
+```
+az guestconfig guest-configuration-assignment list --resource-group "myResourceGroupName" --vm-name "myVMName"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName|
+|**--vm-name**|string|The name of the virtual machine.|vm_name|vmName|
+
+#### Command `az guestconfig guest-configuration-assignment show`
+
+##### Example
+```
+az guestconfig guest-configuration-assignment show --name "SecureProtocol" --resource-group "myResourceGroupName" \
+--vm-name "myVMName"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName|
+|**--guest-configuration-assignment-name**|string|The guest configuration assignment name.|guest_configuration_assignment_name|guestConfigurationAssignmentName|
+|**--vm-name**|string|The name of the virtual machine.|vm_name|vmName|
+
+### group `az guestconfig guest-configuration-assignment-report`
+#### Command `az guestconfig guest-configuration-assignment-report list`
+
+##### Example
+```
+az guestconfig guest-configuration-assignment-report list --guest-configuration-assignment-name "AuditSecureProtocol" \
+--resource-group "myResourceGroupName" --vm-name "myVMName"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName|
+|**--guest-configuration-assignment-name**|string|The guest configuration assignment name.|guest_configuration_assignment_name|guestConfigurationAssignmentName|
+|**--vm-name**|string|The name of the virtual machine.|vm_name|vmName|
+
+#### Command `az guestconfig guest-configuration-assignment-report show`
+
+##### Example
+```
+az guestconfig guest-configuration-assignment-report show --guest-configuration-assignment-name "AuditSecureProtocol" \
+--report-id "7367cbb8-ae99-47d0-a33b-a283564d2cb1" --resource-group "myResourceGroupName" --vm-name "myvm"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName|
+|**--guest-configuration-assignment-name**|string|The guest configuration assignment name.|guest_configuration_assignment_name|guestConfigurationAssignmentName|
+|**--report-id**|string|The GUID for the guest configuration assignment report.|report_id|reportId|
+|**--vm-name**|string|The name of the virtual machine.|vm_name|vmName|
+
+### group `az guestconfig guest-configuration-hcrp-assignment`
+#### Command `az guestconfig guest-configuration-hcrp-assignment list`
+
+##### Example
+```
+az guestconfig guest-configuration-hcrp-assignment list --machine-name "myMachineName" --resource-group \
+"myResourceGroupName"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName|
+|**--machine-name**|string|The name of the ARC machine.|machine_name|machineName|
+
+#### Command `az guestconfig guest-configuration-hcrp-assignment show`
+
+##### Example
+```
+az guestconfig guest-configuration-hcrp-assignment show --guest-configuration-assignment-name "SecureProtocol" \
+--machine-name "myMachineName" --resource-group "myResourceGroupName"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName|
+|**--guest-configuration-assignment-name**|string|The guest configuration assignment name.|guest_configuration_assignment_name|guestConfigurationAssignmentName|
+|**--machine-name**|string|The name of the ARC machine.|machine_name|machineName|
+
+### group `az guestconfig guest-configuration-hcrp-assignment-report`
+#### Command `az guestconfig guest-configuration-hcrp-assignment-report list`
+
+##### Example
+```
+az guestconfig guest-configuration-hcrp-assignment-report list --guest-configuration-assignment-name \
+"AuditSecureProtocol" --machine-name "myMachineName" --resource-group "myResourceGroupName"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName|
+|**--guest-configuration-assignment-name**|string|The guest configuration assignment name.|guest_configuration_assignment_name|guestConfigurationAssignmentName|
+|**--machine-name**|string|The name of the ARC machine.|machine_name|machineName|
+
+#### Command `az guestconfig guest-configuration-hcrp-assignment-report show`
+
+##### Example
+```
+az guestconfig guest-configuration-hcrp-assignment-report show --guest-configuration-assignment-name \
+"AuditSecureProtocol" --machine-name "myMachineName" --report-id "7367cbb8-ae99-47d0-a33b-a283564d2cb1" \
+--resource-group "myResourceGroupName"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--resource-group-name**|string|The resource group name.|resource_group_name|resourceGroupName|
+|**--guest-configuration-assignment-name**|string|The guest configuration assignment name.|guest_configuration_assignment_name|guestConfigurationAssignmentName|
+|**--report-id**|string|The GUID for the guest configuration assignment report.|report_id|reportId|
+|**--machine-name**|string|The name of the ARC machine.|machine_name|machineName|
diff --git a/src/guestconfig/setup.py b/src/guestconfig/setup.py
index 8ee5f27a54f..320eda5f9ab 100644
--- a/src/guestconfig/setup.py
+++ b/src/guestconfig/setup.py
@@ -12,7 +12,7 @@
# HISTORY.rst entry.
VERSION = '0.1.0'
try:
- from .manual.version import VERSION
+ from azext_guestconfig.manual.version import VERSION
except ImportError:
pass
@@ -31,8 +31,9 @@
]
DEPENDENCIES = []
+
try:
- from .manual.dependency import DEPENDENCIES
+ from azext_guestconfig.manual.dependency import DEPENDENCIES
except ImportError:
pass