diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a1465ee32b7..36df365e829 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -147,3 +147,5 @@ /src/guestconfig/ @gehuan /src/swiftlet/ @qwordy + +/src/maintenance/ @sotaneja diff --git a/src/maintenance/HISTORY.rst b/src/maintenance/HISTORY.rst new file mode 100644 index 00000000000..6f5c4083dd8 --- /dev/null +++ b/src/maintenance/HISTORY.rst @@ -0,0 +1,13 @@ +.. :changelog: + +Release History +=============== + +1.1.0 +++++++ +* Add schedule related fields for creating maintenance configurations +* Add public maintenance configuration APIs + +1.0.1 +++++++ +* Initial release. diff --git a/src/maintenance/README.md b/src/maintenance/README.md new file mode 100644 index 00000000000..fe6d44ddf74 --- /dev/null +++ b/src/maintenance/README.md @@ -0,0 +1,5 @@ +Microsoft Azure CLI 'maintenance' Extension +========================================== + +This package is for the 'maintenance' extension. +i.e. 'az maintenance' diff --git a/src/maintenance/azext_maintenance/__init__.py b/src/maintenance/azext_maintenance/__init__.py index f071164b207..6c2ab930af5 100644 --- a/src/maintenance/azext_maintenance/__init__.py +++ b/src/maintenance/azext_maintenance/__init__.py @@ -1,28 +1,50 @@ -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- +# 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 azure.cli.core import AzCommandsLoader +from azext_maintenance.generated._help import helps # pylint: disable=unused-import +try: + from azext_maintenance.manual._help import helps # pylint: disable=reimported +except ImportError: + pass -import azext_maintenance._help # pylint: disable=unused-import - -class MaintenanceCommandsLoader(AzCommandsLoader): +class MaintenanceClientCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - maintenance_custom = CliCommandType(operations_tmpl='azext_maintenance.custom#{}') - super(MaintenanceCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=maintenance_custom) + from azext_maintenance.generated._client_factory import cf_maintenance_cl + maintenance_custom = CliCommandType( + operations_tmpl='azext_maintenance.custom#{}', + client_factory=cf_maintenance_cl) + parent = super(MaintenanceClientCommandsLoader, self) + parent.__init__(cli_ctx=cli_ctx, custom_command_type=maintenance_custom) def load_command_table(self, args): - from .commands import load_command_table + from azext_maintenance.generated.commands import load_command_table load_command_table(self, args) + try: + from azext_maintenance.manual.commands import load_command_table as load_command_table_manual + load_command_table_manual(self, args) + except ImportError: + pass return self.command_table def load_arguments(self, command): - from ._params import load_arguments + from azext_maintenance.generated._params import load_arguments load_arguments(self, command) + try: + from azext_maintenance.manual._params import load_arguments as load_arguments_manual + load_arguments_manual(self, command) + except ImportError: + pass -COMMAND_LOADER_CLS = MaintenanceCommandsLoader +COMMAND_LOADER_CLS = MaintenanceClientCommandsLoader diff --git a/src/maintenance/azext_maintenance/_client_factory.py b/src/maintenance/azext_maintenance/_client_factory.py deleted file mode 100644 index 5be4c7a2d29..00000000000 --- a/src/maintenance/azext_maintenance/_client_factory.py +++ /dev/null @@ -1,26 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - - -def _maintenance_client_factory(cli_ctx, **_): - from azext_maintenance.vendored_sdks import MaintenanceManagementClient - from azure.cli.core.commands.client_factory import get_mgmt_service_client - return get_mgmt_service_client(cli_ctx, MaintenanceManagementClient) - - -def cf_maintenance_configurations(cli_ctx, _): - return _maintenance_client_factory(cli_ctx).maintenance_configurations - - -def cf_maintenance_updates(cli_ctx, _): - return _maintenance_client_factory(cli_ctx).updates - - -def cf_configuration_assignments(cli_ctx, _): - return _maintenance_client_factory(cli_ctx).configuration_assignments - - -def cf_apply_updates(cli_ctx, _): - return _maintenance_client_factory(cli_ctx).apply_updates diff --git a/src/maintenance/azext_maintenance/_help.py b/src/maintenance/azext_maintenance/_help.py deleted file mode 100644 index 564a383cd27..00000000000 --- a/src/maintenance/azext_maintenance/_help.py +++ /dev/null @@ -1,141 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - - -from knack.help_files import helps - -helps['maintenance'] = """ - type: group - short-summary: Manage Azure Maintenance. - """ - -helps['maintenance configuration'] = """ - type: group - short-summary: Manage Azure Maintenance configurations. - """ - -helps['maintenance update'] = """ - type: group - short-summary: Azure Maintenance updates. - """ - -helps['maintenance assignment'] = """ - type: group - short-summary: Manage Azure Maintenance configuration assignment to resource. - """ - -helps['maintenance applyupdate'] = """ - type: group - short-summary: Manage Azure Maintenance update applications. - """ - -helps['maintenance configuration create'] = """ - type: command - short-summary: Creates a Maintenance Configuration. - examples: - - name: Create a Maintenance Configuration with the All scope. - text: > - az maintenance configuration create --name workervms -g MyResourceGroup -l westus -""" - -helps['maintenance configuration update'] = """ - type: command - short-summary: Creates a Maintenance Configuration. - examples: - - name: Create a Maintenance Configuration with the All scope. - text: > - az maintenance configuration update --name workervms -g MyResourceGroup -l westus --maintenanceScope All -""" - -helps['maintenance configuration delete'] = """ - type: command - short-summary: Deletes a Maintenance Configuration. - examples: - - name: Delete a Maintenance Configuration. - text: > - az maintenance configuration delete --name workervms -g MyResourceGroup -""" - -helps['maintenance configuration show'] = """ - type: command - short-summary: Get the details of a Maintenance Configuration. - examples: - - name: Get the Maintenance Configuration. - text: > - az maintenance configuration show --name workervms -g MyResourceGroup -""" - - -helps['maintenance configuration list'] = """ - type: command - short-summary: Get Configuration records within a subscription. - examples: - - name: Get Configuration records within a subscription. - text: > - az maintenance configuration list --subscription 2b4ce620-bb0f-4964-8428-dea4aefe00000 -""" - -helps['maintenance assignment create'] = """ - type: command - short-summary: Creates a Maintenance Assignment. - examples: - - name: Create a Maintenance Assignment. - text: > - az maintenance assignment create -g smdtest --resource-name smdVM --resource-type virtualMachines --provider-name Microsoft.Compute --configuration-assignment-name workervms --maintenance-configuration-id "/subscriptions/2b4ce620-bb0f-4964-8428-dea4aefec295/resourcegroups/smdtest/providers/Microsoft.Maintenance/maintenanceConfigurations/workervms" -l eastus2 -""" - -helps['maintenance assignment delete'] = """ - type: command - short-summary: Delete a Maintenance Assignment. - examples: - - name: Delete a Maintenance Assignment. - text: > - az maintenance assignment delete -g smdtest --resource-name smdVM --resource-type virtualMachines --provider-name Microsoft.Compute --configuration-assignment-name workervms -""" - -helps['maintenance assignment list'] = """ - type: command - short-summary: Lists Maintenance Assignment. - examples: - - name: List Maintenance Assignment. - text: > - az maintenance assignment list -g smdtest --resource-name smdVM --resource-type virtualMachines --provider-name Microsoft.Compute -""" - -helps['maintenance update list'] = """ - type: command - short-summary: List pending a Maintenance Updates. - examples: - - name: List pending a Maintenance Updates. - text: > - az maintenance update list -g smdtest --resource-name smdVM --resource-type virtualMachines --provider-name Microsoft.Compute -""" - -helps['maintenance applyupdate create'] = """ - type: command - short-summary: Creates a ApplyUpdate request. - examples: - - name: Creates a ApplyUpdate request. - text: > - az maintenance applyupdate create -g smdtest --resource-name smdVM --resource-type virtualMachines --provider-name Microsoft.Compute -""" - -helps['maintenance applyupdate get'] = """ - type: command - short-summary: Gets the state of a ApplyUpdate request. - examples: - - name: Gets the state of a ApplyUpdate request. - text: > - az maintenance applyupdate get -g smdtest --resource-name smdVM --resource-type virtualMachines --provider-name Microsoft.Compute --apply-update-name 7b1b66dc-e93a-4183-81ff-591f1b2d4f07 -""" - -helps['maintenance applyupdate show'] = """ - type: command - short-summary: Shows the state of a ApplyUpdate request. - examples: - - name: Shows the state of a ApplyUpdate request. - text: > - az maintenance applyupdate show -g smdtest --resource-name smdVM --resource-type virtualMachines --provider-name Microsoft.Compute --apply-update-name 7b1b66dc-e93a-4183-81ff-591f1b2d4f07 -""" diff --git a/src/maintenance/azext_maintenance/_params.py b/src/maintenance/azext_maintenance/_params.py deleted file mode 100644 index ce0ac86efee..00000000000 --- a/src/maintenance/azext_maintenance/_params.py +++ /dev/null @@ -1,65 +0,0 @@ -# pylint: disable=line-too-long -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - - -from azure.cli.core.commands.validators import get_default_location_from_resource_group -from azure.cli.core.commands.parameters import ( - resource_group_name_type, - get_location_type, - get_resource_name_completion_list, - tags_type -) - -from knack.log import get_logger - -from ._constants import ( - MAINTENANCE_RESOURCE_TYPE -) - - -logger = get_logger(__name__) - - -def load_arguments(self, _): - with self.argument_context('maintenance configuration') as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('location', - arg_type=get_location_type(self.cli_ctx), - validator=get_default_location_from_resource_group) - c.argument('resource_name', options_list=['--name', '-n'], - completer=get_resource_name_completion_list(MAINTENANCE_RESOURCE_TYPE), - help='Name of resource.') - c.argument('maintenanceScope', help='Maintenance Scope e.g. Host, Guest or All') - c.argument('provider_name', help='Maintenance resource provider - Microsoft.Maintenance') - c.argument('tags', arg_type=tags_type) - - with self.argument_context('maintenance applyupdate') as c: - c.argument('apply_update_name', help='Name of apply update resource e.g. default') - c.argument('provider_name', help='Maintenance resource provider - Microsoft.Maintenance') - c.argument('resource_parent_name', help="Name of the parent resource e.g. for dedicated hosts this would be the name of the dedicated host group, for VMSS VMs this would be the VMSS name") - c.argument('resource_parent_type', help="Type of the parent resource e.g. for dedicated hosts this would be hostGroups, for VMSS VMs this would be virtualmachinescalesets") - c.argument('resource_name', completer=get_resource_name_completion_list(MAINTENANCE_RESOURCE_TYPE), help='Name of resource.') - c.argument('resource_type', help="Type of the azure resource e.g. virtualmachines, hosts etc.") - - with self.argument_context('maintenance update') as c: - c.argument('provider_name', help='Maintenance resource provider - Microsoft.Maintenance') - c.argument('resource_parent_name', help="Name of the parent resource e.g. for dedicated hosts this would be the name of the dedicated host group, for VMSS VMs this would be the VMSS name") - c.argument('resource_parent_type', help="Type of the parent resource e.g. for dedicated hosts this would be hostGroups, for VMSS VMs this would be virtualmachinescalesets") - c.argument('resource_name', completer=get_resource_name_completion_list(MAINTENANCE_RESOURCE_TYPE), - help='Name of resource.') - c.argument('resource_type', help="Type of the azure resource e.g. virtualmachines, hosts etc.") - - with self.argument_context('maintenance assignment') as c: - c.argument('provider_name', help='Maintenance resource provider - Microsoft.Maintenance') - c.argument('resource_id', help="Fully qualified identifier of the Azure resource.") - c.argument('resource_parent_name', help="Name of the parent resource e.g. for dedicated hosts this would be the name of the dedicated host group, for VMSS VMs this would be the VMSS name") - c.argument('resource_parent_type', help="Type of the parent resource e.g. for dedicated hosts this would be hostGroups, for VMSS VMs this would be virtualmachinescalesets") - c.argument('resource_name', completer=get_resource_name_completion_list(MAINTENANCE_RESOURCE_TYPE), - help='Name of resource.') - c.argument('resource_type', help="Type of the azure resource e.g. virtualmachines, hosts etc.") - c.argument('provider_name', help='Maintenance resource provider - Microsoft.Maintenance') - c.argument('maintenance_configuration_id', help='Fully qualified id of the maintenance configuration e.g. /subscriptions/2b4ce620-bb0f-4964-8428-dea4aefec295/resourceGroups/smdtest/providers/Microsoft.Maintenance/maintenanceConfigurations/config1') - c.argument('configuration_assignment_name', help='Configuration assignment name. Same as the configuration name') diff --git a/src/maintenance/azext_maintenance/action.py b/src/maintenance/azext_maintenance/action.py new file mode 100644 index 00000000000..d95d53bf711 --- /dev/null +++ b/src/maintenance/azext_maintenance/action.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------- +# 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=wildcard-import +# pylint: disable=unused-wildcard-import + +from .generated.action import * # noqa: F403 +try: + from .manual.action import * # noqa: F403 +except ImportError: + pass diff --git a/src/maintenance/azext_maintenance/azext_metadata.json b/src/maintenance/azext_maintenance/azext_metadata.json index eb20a2fd2cc..8cfc6da9485 100644 --- a/src/maintenance/azext_maintenance/azext_metadata.json +++ b/src/maintenance/azext_maintenance/azext_metadata.json @@ -1,3 +1,4 @@ { - "azext.minCliCoreVersion": "2.0.47" + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.3.1" } \ No newline at end of file diff --git a/src/maintenance/azext_maintenance/commands.py b/src/maintenance/azext_maintenance/commands.py deleted file mode 100644 index 94693bfdbd4..00000000000 --- a/src/maintenance/azext_maintenance/commands.py +++ /dev/null @@ -1,53 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -# pylint: disable=line-too-long - -from azure.cli.core.commands import CliCommandType - -from ._client_factory import (cf_maintenance_configurations, cf_maintenance_updates, cf_configuration_assignments, cf_apply_updates) - - -def load_command_table(self, _): - - maintenance_configurations_mgmt_util = CliCommandType( - operations_tmpl='azext_maintenance.vendored_sdks.operations.maintenance_configurations_operations#MaintenanceConfigurationsOperations.{}', - client_factory=cf_maintenance_configurations - ) - - maintenance_updates_mgmt_util = CliCommandType( - operations_tmpl='azext_maintenance.vendored_sdks.operations.updates_operations#UpdatesOperations.{}', - client_factory=cf_maintenance_updates - ) - - configuration_assignments_mgmt_util = CliCommandType( - operations_tmpl='azext_maintenance.vendored_sdks.operations.configuration_assignments_operations#ConfigurationAssignmentsOperations.{}', - client_factory=cf_configuration_assignments - ) - - apply_updates_mgmt_util = CliCommandType( - operations_tmpl='azext_maintenance.vendored_sdks.operations.apply_updates_operations#ApplyUpdatesOperations.{}', - client_factory=cf_apply_updates - ) - - with self.command_group('maintenance configuration', maintenance_configurations_mgmt_util, client_factory=cf_maintenance_configurations) as g: - g.custom_command('create', 'cli_configuration_create') - g.command('delete', 'delete') - g.custom_command('update', 'cli_configuration_create') - g.show_command('show', 'get') - g.command('list', 'list') - - with self.command_group('maintenance update', maintenance_updates_mgmt_util, client_factory=cf_maintenance_updates) as g: - g.custom_command('list', 'cli_update_list') - - with self.command_group('maintenance assignment', configuration_assignments_mgmt_util, client_factory=cf_configuration_assignments) as g: - g.custom_command('create', 'cli_assignment_create') - g.custom_command('delete', 'cli_assignment_delete') - g.custom_command('list', 'cli_assignment_list') - - with self.command_group('maintenance applyupdate', apply_updates_mgmt_util, client_factory=cf_apply_updates) as g: - g.custom_command('create', 'cli_applyupdate_create') - g.custom_command('get', 'cli_applyupdate_get', deprecate_info=g.deprecate(redirect='maintenance applyupdate show')) - g.custom_show_command('show', 'cli_applyupdate_get') diff --git a/src/maintenance/azext_maintenance/custom.py b/src/maintenance/azext_maintenance/custom.py index 33788f540e5..dbe9d5f9742 100644 --- a/src/maintenance/azext_maintenance/custom.py +++ b/src/maintenance/azext_maintenance/custom.py @@ -1,238 +1,17 @@ -# pylint: disable=import-error,relative-import,unused-import -# -------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import re -from six.moves.urllib.parse import quote -from knack.log import get_logger -from knack.util import CLIError -from msrestazure.tools import parse_resource_id -from dateutil.parser import parse - -from azure.cli.core.commands.client_factory import get_subscription_id -from azext_maintenance.vendored_sdks.models import ( - ApplyUpdate, - ConfigurationAssignment, - MaintenanceConfiguration, - Update, - UpdateStatus, - MaintenanceScope, - ImpactType) - -logger = get_logger(__name__) - -MAINTENANCE_NAMESPACE = "Microsoft.Maintenance" -RESOURCES_NAMESPACE = "Microsoft.Resources" -SUBSCRIPTIONS = "subscriptions" -RESOURCE_GROUPS = "resourcegroups" -EVENTGRID_DOMAINS = "domains" -EVENTGRID_TOPICS = "topics" -WEBHOOK_DESTINATION = "webhook" -EVENTHUB_DESTINATION = "eventhub" -STORAGEQUEUE_DESTINATION = "storagequeue" -HYBRIDCONNECTION_DESTINATION = "hybridconnection" -EVENTGRID_SCHEMA = "EventGridSchema" -CLOUDEVENTV01_SCHEMA = "CloudEventV01Schema" -CUSTOM_EVENT_SCHEMA = "CustomEventSchema" -CUSTOM_INPUT_SCHEMA = "CustomInputSchema" -GLOBAL = "global" - -# Deprecated event delivery schema value (starting 2018-09-15-preview) -INPUT_EVENT_SCHEMA = "InputEventSchema" - -# Constants for the target field names of the mapping -CONFIGURATION = "configuration" -SUBJECT = "subject" -ID = "id" -DEFAULT_SCOPE = "All" - - -def cli_configuration_create( - client, - resource_group_name, - resource_name, - location, - tags=None, - maintenanceScope=DEFAULT_SCOPE): - - configuration = MaintenanceConfiguration( - location=location, - tags=tags, - namespace=MAINTENANCE_NAMESPACE, - maintenance_scope=maintenanceScope) - - return client.create_or_update( - resource_group_name=resource_group_name, - resource_name=resource_name, - configuration=configuration) - - -def cli_assignment_create( - client, - resource_group_name, - provider_name, - resource_type, - resource_name, - configuration_assignment_name, - location, - maintenance_configuration_id, - resource_parent_type=None, - resource_parent_name=None, - resource_id=None): - - configuration_assignment = ConfigurationAssignment( - location=location, - maintenance_configuration_id=maintenance_configuration_id, - resource_id=resource_id) - - if not resource_parent_type: - return client.create_or_update( - resource_group_name=resource_group_name, - provider_name=provider_name, - resource_type=resource_type, - resource_name=resource_name, - configuration_assignment_name=configuration_assignment_name, - configuration_assignment=configuration_assignment) - - return client.create_or_update_parent( - resource_group_name=resource_group_name, - provider_name=provider_name, - resource_parent_type=resource_parent_type, - resource_parent_name=resource_parent_name, - resource_type=resource_type, - resource_name=resource_name, - configuration_assignment_name=configuration_assignment_name, - configuration_assignment=configuration_assignment) - - -def cli_assignment_delete( - client, - resource_group_name, - provider_name, - resource_type, - resource_name, - configuration_assignment_name, - resource_parent_type=None, - resource_parent_name=None): - - if not resource_parent_type: - return client.delete( - resource_group_name=resource_group_name, - provider_name=provider_name, - resource_type=resource_type, - resource_name=resource_name, - configuration_assignment_name=configuration_assignment_name) - - return client.delete_parent( - resource_group_name=resource_group_name, - provider_name=provider_name, - resource_parent_type=resource_parent_type, - resource_parent_name=resource_parent_name, - resource_type=resource_type, - resource_name=resource_name, - configuration_assignment_name=configuration_assignment_name) - - -def cli_assignment_list( - client, - resource_group_name, - provider_name, - resource_type, - resource_name, - resource_parent_type=None, - resource_parent_name=None): - - if not resource_parent_type: - return client.list( - resource_group_name=resource_group_name, - provider_name=provider_name, - resource_type=resource_type, - resource_name=resource_name) - - return client.list_parent( - resource_group_name=resource_group_name, - provider_name=provider_name, - resource_parent_type=resource_parent_type, - resource_parent_name=resource_parent_name, - resource_type=resource_type, - resource_name=resource_name) - - -def cli_applyupdate_create( - client, - resource_group_name, - provider_name, - resource_type, - resource_name, - resource_parent_type=None, - resource_parent_name=None): - - if not resource_parent_type: - return client.create_or_update( - resource_group_name=resource_group_name, - provider_name=provider_name, - resource_type=resource_type, - resource_name=resource_name) - - return client.create_or_update_parent( - resource_group_name=resource_group_name, - provider_name=provider_name, - resource_parent_type=resource_parent_type, - resource_parent_name=resource_parent_name, - resource_type=resource_type, - resource_name=resource_name) - - -def cli_applyupdate_get( - client, - resource_group_name, - provider_name, - resource_type, - resource_name, - apply_update_name, - resource_parent_type=None, - resource_parent_name=None): - - if not resource_parent_type: - return client.get( - resource_group_name=resource_group_name, - provider_name=provider_name, - resource_type=resource_type, - resource_name=resource_name, - apply_update_name=apply_update_name) - - return client.get_parent( - resource_group_name=resource_group_name, - provider_name=provider_name, - resource_parent_type=resource_parent_type, - resource_parent_name=resource_parent_name, - resource_type=resource_type, - resource_name=resource_name, - apply_update_name=apply_update_name) - - -def cli_update_list( - client, - resource_group_name, - provider_name, - resource_type, - resource_name, - resource_parent_type=None, - resource_parent_name=None): - - if not resource_parent_type: - return client.list( - resource_group_name=resource_group_name, - provider_name=provider_name, - resource_type=resource_type, - resource_name=resource_name) - - return client.list_parent( - resource_group_name=resource_group_name, - provider_name=provider_name, - resource_parent_type=resource_parent_type, - resource_parent_name=resource_parent_name, - resource_type=resource_type, - resource_name=resource_name) +# 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=wildcard-import +# pylint: disable=unused-wildcard-import + +from .generated.custom import * # noqa: F403 +try: + from .manual.custom import * # noqa: F403 +except ImportError: + pass diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_management_client_enums.py b/src/maintenance/azext_maintenance/generated/__init__.py similarity index 51% rename from src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_management_client_enums.py rename to src/maintenance/azext_maintenance/generated/__init__.py index 83ce8e7ded5..c9cfdc73e77 100644 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_management_client_enums.py +++ b/src/maintenance/azext_maintenance/generated/__init__.py @@ -9,29 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -from enum import Enum - - -class UpdateStatus(str, Enum): - - pending = "Pending" - in_progress = "InProgress" - completed = "Completed" - retry_now = "RetryNow" - retry_later = "RetryLater" - - -class MaintenanceScope(str, Enum): - - all = "All" - host = "Host" - resource = "Resource" - in_resource = "InResource" - - -class ImpactType(str, Enum): - - none = "None" - freeze = "Freeze" - restart = "Restart" - redeploy = "Redeploy" +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/maintenance/azext_maintenance/generated/_client_factory.py b/src/maintenance/azext_maintenance/generated/_client_factory.py new file mode 100644 index 00000000000..caba0b6d68b --- /dev/null +++ b/src/maintenance/azext_maintenance/generated/_client_factory.py @@ -0,0 +1,36 @@ +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + + +def cf_maintenance_cl(cli_ctx, *_): + from azure.cli.core.commands.client_factory import get_mgmt_service_client + from ..vendored_sdks.maintenance import MaintenanceClient + return get_mgmt_service_client(cli_ctx, + MaintenanceClient) + + +def cf_public_maintenance_configuration(cli_ctx, *_): + return cf_maintenance_cl(cli_ctx).public_maintenance_configuration + + +def cf_apply_update(cli_ctx, *_): + return cf_maintenance_cl(cli_ctx).apply_update + + +def cf_configuration_assignment(cli_ctx, *_): + return cf_maintenance_cl(cli_ctx).configuration_assignment + + +def cf_maintenance_configuration(cli_ctx, *_): + return cf_maintenance_cl(cli_ctx).maintenance_configuration + + +def cf_update(cli_ctx, *_): + return cf_maintenance_cl(cli_ctx).update diff --git a/src/maintenance/azext_maintenance/generated/_help.py b/src/maintenance/azext_maintenance/generated/_help.py new file mode 100644 index 00000000000..6b2bd9d2b1d --- /dev/null +++ b/src/maintenance/azext_maintenance/generated/_help.py @@ -0,0 +1,216 @@ +# -------------------------------------------------------------------------- +# 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=too-many-lines + +from knack.help_files import helps + + +helps['maintenance public-configuration'] = """ + type: group + short-summary: maintenance public-configuration +""" + +helps['maintenance public-configuration list'] = """ + type: command + short-summary: "Get Public Maintenance Configuration records" + examples: + - name: PublicMaintenanceConfigurations_List + text: |- + az maintenance public-configuration list +""" + +helps['maintenance public-configuration show'] = """ + type: command + short-summary: "Get Public Maintenance Configuration record" + examples: + - name: PublicMaintenanceConfigurations_GetForResource + text: |- + az maintenance public-configuration show --resource-name "configuration1" +""" + +helps['maintenance applyupdate'] = """ + type: group + short-summary: maintenance applyupdate +""" + +helps['maintenance applyupdate show'] = """ + type: command + short-summary: "Track maintenance updates to resource" + examples: + - name: ApplyUpdates_Get + text: |- + az maintenance applyupdate show --name "e9b9685d-78e4-44c4-a81c-64a14f9b87b6" --provider-name \ +"Microsoft.Compute" --resource-group "examplerg" --resource-name "smdtest1" --resource-type "virtualMachineScaleSets" +""" + +helps['maintenance applyupdate create'] = """ + type: command + short-summary: "Apply maintenance updates to resource" + examples: + - name: ApplyUpdates_CreateOrUpdateParent + text: |- + az maintenance applyupdate create --provider-name "Microsoft.Compute" --resource-group "examplerg" \ +--resource-name "smdvm1" --resource-parent-name "smdtest1" --resource-parent-type "virtualMachineScaleSets" \ +--resource-type "virtualMachines" +""" + +helps['maintenance applyupdate update'] = """ + type: command + short-summary: "Apply maintenance updates to resource" +""" + +helps['maintenance applyupdate get-parent'] = """ + type: command + short-summary: "Track maintenance updates to resource with parent" + examples: + - name: ApplyUpdates_GetParent + text: |- + az maintenance applyupdate get-parent --name "e9b9685d-78e4-44c4-a81c-64a14f9b87b6" --provider-name \ +"Microsoft.Compute" --resource-group "examplerg" --resource-name "smdvm1" --resource-parent-name "smdtest1" \ +--resource-parent-type "virtualMachineScaleSets" --resource-type "virtualMachines" +""" + +helps['maintenance assignment'] = """ + type: group + short-summary: maintenance assignment +""" + +helps['maintenance assignment list'] = """ + type: command + short-summary: "List configurationAssignments for resource." + examples: + - name: ConfigurationAssignments_List + text: |- + az maintenance assignment list --provider-name "Microsoft.Compute" --resource-group "examplerg" \ +--resource-name "smdtest1" --resource-type "virtualMachineScaleSets" +""" + +helps['maintenance assignment create'] = """ + type: command + short-summary: "Register configuration for resource." + examples: + - name: ConfigurationAssignments_CreateOrUpdateParent + text: |- + az maintenance assignment create --maintenance-configuration-id "/subscriptions/5b4b650e-28b9-4790-b3ab-\ +ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/policy1" --name \ +"workervmPolicy" --provider-name "Microsoft.Compute" --resource-group "examplerg" --resource-name "smdvm1" \ +--resource-parent-name "smdtest1" --resource-parent-type "virtualMachineScaleSets" --resource-type "virtualMachines" +""" + +helps['maintenance assignment update'] = """ + type: command + short-summary: "Register configuration for resource." +""" + +helps['maintenance assignment delete'] = """ + type: command + short-summary: "Unregister configuration for resource." + examples: + - name: ConfigurationAssignments_DeleteParent + text: |- + az maintenance assignment delete --name "workervmConfiguration" --provider-name "Microsoft.Compute" \ +--resource-group "examplerg" --resource-name "smdvm1" --resource-parent-name "smdtest1" --resource-parent-type \ +"virtualMachineScaleSets" --resource-type "virtualMachines" +""" + +helps['maintenance assignment list-parent'] = """ + type: command + short-summary: "List configurationAssignments for resource." + examples: + - name: ConfigurationAssignments_ListParent + text: |- + az maintenance assignment list-parent --provider-name "Microsoft.Compute" --resource-group "examplerg" \ +--resource-name "smdtestvm1" --resource-parent-name "smdtest1" --resource-parent-type "virtualMachineScaleSets" \ +--resource-type "virtualMachines" +""" + +helps['maintenance configuration'] = """ + type: group + short-summary: maintenance configuration +""" + +helps['maintenance configuration list'] = """ + type: command + short-summary: "Get Configuration records within a subscription" + examples: + - name: MaintenanceConfigurations_List + text: |- + az maintenance configuration list +""" + +helps['maintenance configuration show'] = """ + type: command + short-summary: "Get Configuration record" + examples: + - name: MaintenanceConfigurations_GetForResource + text: |- + az maintenance configuration show --resource-group "examplerg" --resource-name "configuration1" +""" + +helps['maintenance configuration create'] = """ + type: command + short-summary: "Create or Update configuration record" + examples: + - name: MaintenanceConfigurations_CreateOrUpdateForResource + text: |- + az maintenance configuration create --location "westus2" --maintenance-scope "OSImage" \ +--maintenance-window-duration "05:00" --maintenance-window-expiration-date-time "9999-12-31 00:00" \ +--maintenance-window-recur-every "Day" --maintenance-window-start-date-time "2020-04-30 08:00" \ +--maintenance-window-time-zone "Pacific Standard Time" --namespace "Microsoft.Maintenance" --visibility "Custom" \ +--resource-group "examplerg" --resource-name "configuration1" +""" + +helps['maintenance configuration update'] = """ + type: command + short-summary: "Patch configuration record" + examples: + - name: MaintenanceConfigurations_UpdateForResource + text: |- + az maintenance configuration update --location "westus2" --maintenance-scope "OSImage" \ +--maintenance-window-duration "05:00" --maintenance-window-expiration-date-time "9999-12-31 00:00" \ +--maintenance-window-recur-every "Month Third Sunday" --maintenance-window-start-date-time "2020-04-30 08:00" \ +--maintenance-window-time-zone "Pacific Standard Time" --namespace "Microsoft.Maintenance" --visibility "Custom" \ +--resource-group "examplerg" --resource-name "configuration1" +""" + +helps['maintenance configuration delete'] = """ + type: command + short-summary: "Delete Configuration record" + examples: + - name: MaintenanceConfigurations_DeleteForResource + text: |- + az maintenance configuration delete --resource-group "examplerg" --resource-name "example1" +""" + +helps['maintenance update'] = """ + type: group + short-summary: maintenance update +""" + +helps['maintenance update list'] = """ + type: command + short-summary: "Get updates to resources." + examples: + - name: Updates_List + text: |- + az maintenance update list --provider-name "Microsoft.Compute" --resource-group "examplerg" \ +--resource-name "smdtest1" --resource-type "virtualMachineScaleSets" +""" + +helps['maintenance update list-parent'] = """ + type: command + short-summary: "Get updates to resources." + examples: + - name: Updates_ListParent + text: |- + az maintenance update list-parent --provider-name "Microsoft.Compute" --resource-group "examplerg" \ +--resource-name "1" --resource-parent-name "smdtest1" --resource-parent-type "virtualMachineScaleSets" --resource-type \ +"virtualMachines" +""" diff --git a/src/maintenance/azext_maintenance/generated/_params.py b/src/maintenance/azext_maintenance/generated/_params.py new file mode 100644 index 00000000000..a019b1b9744 --- /dev/null +++ b/src/maintenance/azext_maintenance/generated/_params.py @@ -0,0 +1,210 @@ +# -------------------------------------------------------------------------- +# 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=too-many-lines +# pylint: disable=too-many-statements + +from azure.cli.core.commands.parameters import ( + tags_type, + get_enum_type, + resource_group_name_type, + get_location_type +) +from azure.cli.core.commands.validators import get_default_location_from_resource_group +from azext_maintenance.action import AddExtensionProperties + + +def load_arguments(self, _): + + with self.argument_context('maintenance public-configuration show') as c: + c.argument('resource_name', type=str, help='Resource Identifier', id_part='name') + + with self.argument_context('maintenance applyupdate show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + c.argument('apply_update_name', options_list=['--name', '-n', '--apply-update-name'], type=str, help='' + 'applyUpdate Id') + + with self.argument_context('maintenance applyupdate create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_parent_type', type=str, help='Resource parent type') + c.argument('resource_parent_name', type=str, help='Resource parent identifier') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + + with self.argument_context('maintenance applyupdate update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + + with self.argument_context('maintenance applyupdate get-parent') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_parent_type', type=str, help='Resource parent type') + c.argument('resource_parent_name', type=str, help='Resource parent identifier') + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + c.argument('apply_update_name', options_list=['--name', '-n', '--apply-update-name'], type=str, help='' + 'applyUpdate Id') + + with self.argument_context('maintenance assignment list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + + with self.argument_context('maintenance assignment create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_parent_type', type=str, help='Resource parent type') + c.argument('resource_parent_name', type=str, help='Resource parent identifier') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + c.argument('configuration_assignment_name', options_list=['--name', '-n', '--configuration-assignment-name'], + type=str, help='Configuration assignment name') + c.argument('location', arg_type=get_location_type(self.cli_ctx), + validator=get_default_location_from_resource_group) + c.argument('maintenance_configuration_id', type=str, help='The maintenance configuration Id') + c.argument('resource_id', type=str, help='The unique resourceId') + + with self.argument_context('maintenance assignment update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + c.argument('configuration_assignment_name', options_list=['--name', '-n', '--configuration-assignment-name'], + type=str, help='Configuration assignment name') + c.argument('location', arg_type=get_location_type(self.cli_ctx), + validator=get_default_location_from_resource_group) + c.argument('maintenance_configuration_id', type=str, help='The maintenance configuration Id') + c.argument('resource_id', type=str, help='The unique resourceId') + + with self.argument_context('maintenance assignment delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_parent_type', type=str, help='Resource parent type') + c.argument('resource_parent_name', type=str, help='Resource parent identifier') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + c.argument('configuration_assignment_name', options_list=['--name', '-n', '--configuration-assignment-name'], + type=str, help='Unique configuration assignment name') + + with self.argument_context('maintenance assignment list-parent') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_parent_type', type=str, help='Resource parent type') + c.argument('resource_parent_name', type=str, help='Resource parent identifier') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + + with self.argument_context('maintenance configuration show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='Resource Identifier') + + with self.argument_context('maintenance configuration create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='Resource Identifier') + c.argument('location', arg_type=get_location_type(self.cli_ctx), + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('namespace', type=str, help='Gets or sets namespace of the resource') + c.argument('extension_properties', action=AddExtensionProperties, nargs='*', help='Gets or sets ' + 'extensionProperties of the maintenanceConfiguration Expect value: KEY1=VALUE1 KEY2=VALUE2 ...') + c.argument('maintenance_scope', arg_type=get_enum_type(['All', 'Host', 'Resource', 'InResource', 'OSImage', '' + 'Extension', 'InGuestPatch', 'SQLDB', '' + 'SQLManagedInstance']), help='Gets or sets ' + 'maintenanceScope of the configuration') + c.argument('visibility', arg_type=get_enum_type(['Custom', 'Public']), help='Gets or sets the visibility of ' + 'the configuration') + c.argument('maintenance_window_start_date_time', type=str, help='Effective start date of the maintenance ' + 'window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future ' + 'date. The window will be created in the time zone provided and adjusted to daylight savings ' + 'according to that time zone.') + c.argument('maintenance_window_expiration_date_time', type=str, help='Effective expiration date of the ' + 'maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone ' + 'provided and adjusted to daylight savings according to that time zone. Expiration date must be set ' + 'to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.') + c.argument('maintenance_window_duration', type=str, help='Duration of the maintenance window in HH:mm format. ' + 'If not provided, default value will be used based on maintenance scope provided. Example: 05:00.') + c.argument('maintenance_window_time_zone', type=str, help='Name of the timezone. List of timezones can be ' + 'obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific ' + 'Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.') + c.argument('maintenance_window_recur_every', type=str, help='Rate at which a Maintenance window is expected to ' + 'recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are ' + 'formatted as recurEvery: [Frequency as integer][\'Day(s)\']. If no frequency is provided, the ' + 'default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly ' + 'schedule are formatted as recurEvery: [Frequency as integer][\'Week(s)\'] [Optional comma ' + 'separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, ' + 'recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as ' + 'integer][\'Month(s)\'] [Comma separated list of month days] or [Frequency as ' + 'integer][\'Month(s)\'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday ' + 'Monday-Sunday]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: ' + 'Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday.') + + with self.argument_context('maintenance configuration update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='Resource Identifier') + c.argument('location', arg_type=get_location_type(self.cli_ctx), + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('namespace', type=str, help='Gets or sets namespace of the resource') + c.argument('extension_properties', action=AddExtensionProperties, nargs='*', help='Gets or sets ' + 'extensionProperties of the maintenanceConfiguration Expect value: KEY1=VALUE1 KEY2=VALUE2 ...') + c.argument('maintenance_scope', arg_type=get_enum_type(['All', 'Host', 'Resource', 'InResource', 'OSImage', '' + 'Extension', 'InGuestPatch', 'SQLDB', '' + 'SQLManagedInstance']), help='Gets or sets ' + 'maintenanceScope of the configuration') + c.argument('visibility', arg_type=get_enum_type(['Custom', 'Public']), help='Gets or sets the visibility of ' + 'the configuration') + c.argument('maintenance_window_start_date_time', type=str, help='Effective start date of the maintenance ' + 'window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future ' + 'date. The window will be created in the time zone provided and adjusted to daylight savings ' + 'according to that time zone.') + c.argument('maintenance_window_expiration_date_time', type=str, help='Effective expiration date of the ' + 'maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone ' + 'provided and adjusted to daylight savings according to that time zone. Expiration date must be set ' + 'to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.') + c.argument('maintenance_window_duration', type=str, help='Duration of the maintenance window in HH:mm format. ' + 'If not provided, default value will be used based on maintenance scope provided. Example: 05:00.') + c.argument('maintenance_window_time_zone', type=str, help='Name of the timezone. List of timezones can be ' + 'obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific ' + 'Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.') + c.argument('maintenance_window_recur_every', type=str, help='Rate at which a Maintenance window is expected to ' + 'recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are ' + 'formatted as recurEvery: [Frequency as integer][\'Day(s)\']. If no frequency is provided, the ' + 'default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly ' + 'schedule are formatted as recurEvery: [Frequency as integer][\'Week(s)\'] [Optional comma ' + 'separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, ' + 'recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as ' + 'integer][\'Month(s)\'] [Comma separated list of month days] or [Frequency as ' + 'integer][\'Month(s)\'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday ' + 'Monday-Sunday]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: ' + 'Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday.') + + with self.argument_context('maintenance configuration delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='Resource Identifier') + + with self.argument_context('maintenance update list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + + with self.argument_context('maintenance update list-parent') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_parent_type', type=str, help='Resource parent type') + c.argument('resource_parent_name', type=str, help='Resource parent identifier') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') diff --git a/src/maintenance/azext_maintenance/vendored_sdks/version.py b/src/maintenance/azext_maintenance/generated/_validators.py similarity index 93% rename from src/maintenance/azext_maintenance/vendored_sdks/version.py rename to src/maintenance/azext_maintenance/generated/_validators.py index 9ed7b1240a1..b33a44c1ebf 100644 --- a/src/maintenance/azext_maintenance/vendored_sdks/version.py +++ b/src/maintenance/azext_maintenance/generated/_validators.py @@ -1,4 +1,3 @@ -# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for @@ -8,5 +7,3 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- - -VERSION = "1.0.0" diff --git a/src/maintenance/azext_maintenance/generated/action.py b/src/maintenance/azext_maintenance/generated/action.py new file mode 100644 index 00000000000..409077136fb --- /dev/null +++ b/src/maintenance/azext_maintenance/generated/action.py @@ -0,0 +1,34 @@ +# -------------------------------------------------------------------------- +# 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=protected-access + +import argparse +from collections import defaultdict +from knack.util import CLIError + + +class AddExtensionProperties(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.extension_properties = 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 = {} + for k in properties: + v = properties[k] + d[k] = v[0] + return d diff --git a/src/maintenance/azext_maintenance/generated/commands.py b/src/maintenance/azext_maintenance/generated/commands.py new file mode 100644 index 00000000000..98fe74f50ae --- /dev/null +++ b/src/maintenance/azext_maintenance/generated/commands.py @@ -0,0 +1,73 @@ +# -------------------------------------------------------------------------- +# 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=too-many-statements +# pylint: disable=too-many-locals + +from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): + + from azext_maintenance.generated._client_factory import cf_public_maintenance_configuration + maintenance_public_maintenance_configuration = CliCommandType( + operations_tmpl='azext_maintenance.vendored_sdks.maintenance.operations._public_maintenance_configuration_opera' + 'tions#PublicMaintenanceConfigurationOperations.{}', + client_factory=cf_public_maintenance_configuration) + with self.command_group('maintenance public-configuration', maintenance_public_maintenance_configuration, + client_factory=cf_public_maintenance_configuration, is_experimental=True) as g: + g.custom_command('list', 'maintenance_public_configuration_list') + g.custom_show_command('show', 'maintenance_public_configuration_show') + + from azext_maintenance.generated._client_factory import cf_apply_update + maintenance_apply_update = CliCommandType( + operations_tmpl='azext_maintenance.vendored_sdks.maintenance.operations._apply_update_operations#ApplyUpdateOpe' + 'rations.{}', + client_factory=cf_apply_update) + with self.command_group('maintenance applyupdate', maintenance_apply_update, client_factory=cf_apply_update, + is_experimental=True) as g: + g.custom_show_command('show', 'maintenance_applyupdate_show') + g.custom_command('create', 'maintenance_applyupdate_create') + g.custom_command('update', 'maintenance_applyupdate_update') + g.custom_command('get-parent', 'maintenance_applyupdate_get_parent') + + from azext_maintenance.generated._client_factory import cf_configuration_assignment + maintenance_configuration_assignment = CliCommandType( + operations_tmpl='azext_maintenance.vendored_sdks.maintenance.operations._configuration_assignment_operations#Co' + 'nfigurationAssignmentOperations.{}', + client_factory=cf_configuration_assignment) + with self.command_group('maintenance assignment', maintenance_configuration_assignment, + client_factory=cf_configuration_assignment, is_experimental=True) as g: + g.custom_command('list', 'maintenance_assignment_list') + g.custom_command('create', 'maintenance_assignment_create') + g.custom_command('update', 'maintenance_assignment_update') + g.custom_command('delete', 'maintenance_assignment_delete', confirmation=True) + g.custom_command('list-parent', 'maintenance_assignment_list_parent') + + from azext_maintenance.generated._client_factory import cf_maintenance_configuration + maintenance_maintenance_configuration = CliCommandType( + operations_tmpl='azext_maintenance.vendored_sdks.maintenance.operations._maintenance_configuration_operations#M' + 'aintenanceConfigurationOperations.{}', + client_factory=cf_maintenance_configuration) + with self.command_group('maintenance configuration', maintenance_maintenance_configuration, + client_factory=cf_maintenance_configuration, is_experimental=True) as g: + g.custom_command('list', 'maintenance_configuration_list') + g.custom_show_command('show', 'maintenance_configuration_show') + g.custom_command('create', 'maintenance_configuration_create') + g.custom_command('update', 'maintenance_configuration_update') + g.custom_command('delete', 'maintenance_configuration_delete', confirmation=True) + + from azext_maintenance.generated._client_factory import cf_update + maintenance_update = CliCommandType( + operations_tmpl='azext_maintenance.vendored_sdks.maintenance.operations._update_operations#UpdateOperations.{}', + client_factory=cf_update) + with self.command_group('maintenance update', maintenance_update, client_factory=cf_update, + is_experimental=True) as g: + g.custom_command('list', 'maintenance_update_list') + g.custom_command('list-parent', 'maintenance_update_list_parent') diff --git a/src/maintenance/azext_maintenance/generated/custom.py b/src/maintenance/azext_maintenance/generated/custom.py new file mode 100644 index 00000000000..37c5c5073ce --- /dev/null +++ b/src/maintenance/azext_maintenance/generated/custom.py @@ -0,0 +1,283 @@ +# -------------------------------------------------------------------------- +# 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 +# pylint: disable=too-many-lines + + +def maintenance_public_configuration_list(client): + return client.list() + + +def maintenance_public_configuration_show(client, + resource_name): + return client.get(resource_name=resource_name) + + +def maintenance_applyupdate_show(client, + resource_group_name, + provider_name, + resource_type, + resource_name, + apply_update_name): + return client.get(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_type=resource_type, + resource_name=resource_name, + apply_update_name=apply_update_name) + + +def maintenance_applyupdate_create(client, + resource_group_name, + provider_name, + resource_type, + resource_name, + resource_parent_type=None, + resource_parent_name=None): + if resource_group_name and all(v is not None for v in [provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name]): + return client.create_or_update_parent(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_parent_type=resource_parent_type, + resource_parent_name=resource_parent_name, + resource_type=resource_type, + resource_name=resource_name) + return client.create_or_update(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_type=resource_type, + resource_name=resource_name) + + +def maintenance_applyupdate_update(client, + resource_group_name, + provider_name, + resource_type, + resource_name): + return client.create_or_update(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_type=resource_type, + resource_name=resource_name) + + +def maintenance_applyupdate_get_parent(client, + resource_group_name, + resource_parent_type, + resource_parent_name, + provider_name, + resource_type, + resource_name, + apply_update_name): + return client.get_parent(resource_group_name=resource_group_name, + resource_parent_type=resource_parent_type, + resource_parent_name=resource_parent_name, + provider_name=provider_name, + resource_type=resource_type, + resource_name=resource_name, + apply_update_name=apply_update_name) + + +def maintenance_assignment_list(client, + resource_group_name, + provider_name, + resource_type, + resource_name): + return client.list(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_type=resource_type, + resource_name=resource_name) + + +def maintenance_assignment_create(client, + resource_group_name, + provider_name, + resource_type, + resource_name, + configuration_assignment_name, + resource_parent_type=None, + resource_parent_name=None, + location=None, + maintenance_configuration_id=None, + resource_id=None): + if resource_group_name and all(v is not None for v in [provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, configuration_assignment_name]): + return client.create_or_update_parent(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_parent_type=resource_parent_type, + resource_parent_name=resource_parent_name, + resource_type=resource_type, + resource_name=resource_name, + configuration_assignment_name=configuration_assignment_name, + location=location, + maintenance_configuration_id=maintenance_configuration_id, + resource_id=resource_id) + return client.create_or_update(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_type=resource_type, + resource_name=resource_name, + configuration_assignment_name=configuration_assignment_name, + location=location, + maintenance_configuration_id=maintenance_configuration_id, + resource_id=resource_id) + + +def maintenance_assignment_update(client, + resource_group_name, + provider_name, + resource_type, + resource_name, + configuration_assignment_name, + location=None, + maintenance_configuration_id=None, + resource_id=None): + return client.create_or_update(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_type=resource_type, + resource_name=resource_name, + configuration_assignment_name=configuration_assignment_name, + location=location, + maintenance_configuration_id=maintenance_configuration_id, + resource_id=resource_id) + + +def maintenance_assignment_delete(client, + resource_group_name, + provider_name, + resource_type, + resource_name, + configuration_assignment_name, + resource_parent_type=None, + resource_parent_name=None): + if resource_group_name and all(v is not None for v in [provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, configuration_assignment_name]): + return client.delete_parent(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_parent_type=resource_parent_type, + resource_parent_name=resource_parent_name, + resource_type=resource_type, + resource_name=resource_name, + configuration_assignment_name=configuration_assignment_name) + return client.delete(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_type=resource_type, + resource_name=resource_name, + configuration_assignment_name=configuration_assignment_name) + + +def maintenance_assignment_list_parent(client, + resource_group_name, + provider_name, + resource_parent_type, + resource_parent_name, + resource_type, + resource_name): + return client.list_parent(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_parent_type=resource_parent_type, + resource_parent_name=resource_parent_name, + resource_type=resource_type, + resource_name=resource_name) + + +def maintenance_configuration_list(client): + return client.list() + + +def maintenance_configuration_show(client, + resource_group_name, + resource_name): + return client.get(resource_group_name=resource_group_name, + resource_name=resource_name) + + +def maintenance_configuration_create(client, + resource_group_name, + resource_name, + location=None, + tags=None, + namespace=None, + extension_properties=None, + maintenance_scope=None, + visibility=None, + maintenance_window_start_date_time=None, + maintenance_window_expiration_date_time=None, + maintenance_window_duration=None, + maintenance_window_time_zone=None, + maintenance_window_recur_every=None): + return client.create_or_update(resource_group_name=resource_group_name, + resource_name=resource_name, + location=location, + tags=tags, + namespace=namespace, + extension_properties=extension_properties, + maintenance_scope=maintenance_scope, + visibility=visibility, + start_date_time=maintenance_window_start_date_time, + expiration_date_time=maintenance_window_expiration_date_time, + duration=maintenance_window_duration, + time_zone=maintenance_window_time_zone, + recur_every=maintenance_window_recur_every) + + +def maintenance_configuration_update(client, + resource_group_name, + resource_name, + location=None, + tags=None, + namespace=None, + extension_properties=None, + maintenance_scope=None, + visibility=None, + maintenance_window_start_date_time=None, + maintenance_window_expiration_date_time=None, + maintenance_window_duration=None, + maintenance_window_time_zone=None, + maintenance_window_recur_every=None): + return client.update(resource_group_name=resource_group_name, + resource_name=resource_name, + location=location, + tags=tags, + namespace=namespace, + extension_properties=extension_properties, + maintenance_scope=maintenance_scope, + visibility=visibility, + start_date_time=maintenance_window_start_date_time, + expiration_date_time=maintenance_window_expiration_date_time, + duration=maintenance_window_duration, + time_zone=maintenance_window_time_zone, + recur_every=maintenance_window_recur_every) + + +def maintenance_configuration_delete(client, + resource_group_name, + resource_name): + return client.delete(resource_group_name=resource_group_name, + resource_name=resource_name) + + +def maintenance_update_list(client, + resource_group_name, + provider_name, + resource_type, + resource_name): + return client.list(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_type=resource_type, + resource_name=resource_name) + + +def maintenance_update_list_parent(client, + resource_group_name, + provider_name, + resource_parent_type, + resource_parent_name, + resource_type, + resource_name): + return client.list_parent(resource_group_name=resource_group_name, + provider_name=provider_name, + resource_parent_type=resource_parent_type, + resource_parent_name=resource_parent_name, + resource_type=resource_type, + resource_name=resource_name) diff --git a/src/maintenance/azext_maintenance/manual/__init__.py b/src/maintenance/azext_maintenance/manual/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/maintenance/azext_maintenance/manual/__init__.py @@ -0,0 +1,12 @@ +# 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. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/maintenance/azext_maintenance/manual/_params.py b/src/maintenance/azext_maintenance/manual/_params.py new file mode 100644 index 00000000000..ed543971556 --- /dev/null +++ b/src/maintenance/azext_maintenance/manual/_params.py @@ -0,0 +1,226 @@ +# -------------------------------------------------------------------------- +# 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=too-many-lines +# pylint: disable=too-many-statements + +from azure.cli.core.commands.parameters import ( + tags_type, + get_enum_type, + resource_group_name_type, + get_location_type +) +from azure.cli.core.commands.validators import get_default_location_from_resource_group +from azext_maintenance.action import AddExtensionProperties + + +def load_arguments(self, _): + + with self.argument_context('maintenance public-configuration show') as c: + c.argument('resource_name', type=str, help='Resource Identifier', id_part='name') + + with self.argument_context('maintenance applyupdate show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + c.argument('apply_update_name', options_list=['--name', '-n', '--apply-update-name'], type=str, help='' + 'applyUpdate Id') + + with self.argument_context('maintenance applyupdate create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_parent_type', type=str, help='Resource parent type') + c.argument('resource_parent_name', type=str, help='Resource parent identifier') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + + with self.argument_context('maintenance applyupdate update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + + with self.argument_context('maintenance applyupdate get-parent') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_parent_type', type=str, help='Resource parent type') + c.argument('resource_parent_name', type=str, help='Resource parent identifier') + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + c.argument('apply_update_name', options_list=['--name', '-n', '--apply-update-name'], type=str, help='' + 'applyUpdate Id') + + with self.argument_context('maintenance assignment list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + + with self.argument_context('maintenance assignment create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_parent_type', type=str, help='Resource parent type') + c.argument('resource_parent_name', type=str, help='Resource parent identifier') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + c.argument('configuration_assignment_name', options_list=['--name', '-n', '--configuration-assignment-name'], + type=str, help='Configuration assignment name') + c.argument('location', arg_type=get_location_type(self.cli_ctx), + validator=get_default_location_from_resource_group) + c.argument('maintenance_configuration_id', options_list=['--maintenance-configuration-id', '--config-id'], + type=str, help='The maintenance configuration Id') + c.argument('resource_id', type=str, help='The unique resourceId') + + with self.argument_context('maintenance assignment update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + c.argument('configuration_assignment_name', options_list=['--name', '-n', '--configuration-assignment-name'], + type=str, help='Configuration assignment name') + c.argument('location', arg_type=get_location_type(self.cli_ctx), + validator=get_default_location_from_resource_group) + c.argument('maintenance_configuration_id', options_list=['--maintenance-configuration-id', '--config-id'], + type=str, help='The maintenance configuration Id') + c.argument('resource_id', type=str, help='The unique resourceId') + + with self.argument_context('maintenance assignment delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_parent_type', type=str, help='Resource parent type') + c.argument('resource_parent_name', type=str, help='Resource parent identifier') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + c.argument('configuration_assignment_name', options_list=['--name', '-n', '--configuration-assignment-name'], + type=str, help='Unique configuration assignment name') + + with self.argument_context('maintenance assignment list-parent') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_parent_type', type=str, help='Resource parent type') + c.argument('resource_parent_name', type=str, help='Resource parent identifier') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + + with self.argument_context('maintenance configuration show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='Resource Identifier') + + with self.argument_context('maintenance configuration create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='Resource Identifier') + c.argument('location', arg_type=get_location_type(self.cli_ctx), + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('namespace', type=str, help='Gets or sets namespace of the resource') + c.argument('extension_properties', action=AddExtensionProperties, nargs='*', help='Gets or sets ' + 'extensionProperties of the maintenanceConfiguration Expect value: KEY1=VALUE1 KEY2=VALUE2 ...') + c.argument('maintenance_scope', arg_type=get_enum_type(['All', 'Host', 'Resource', 'InResource', 'OSImage', '' + 'Extension', 'InGuestPatch', 'SQLDB', '' + 'SQLManagedInstance']), help='Gets or sets ' + 'maintenanceScope of the configuration') + c.argument('visibility', arg_type=get_enum_type(['Custom', 'Public']), help='Gets or sets the visibility of ' + 'the configuration') + c.argument('maintenance_window_start_date_time', + options_list=['--maintenance-window-start-date-time', '--start-datetime'], + type=str, help='Effective start date of the maintenance ' + 'window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future ' + 'date. The window will be created in the time zone provided and adjusted to daylight savings ' + 'according to that time zone.') + c.argument('maintenance_window_expiration_date_time', + options_list=['--maintenance-window-expiration-date-time', '--expiration-datetime'], + type=str, help='Effective expiration date of the ' + 'maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone ' + 'provided and adjusted to daylight savings according to that time zone. Expiration date must be set ' + 'to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.') + c.argument('maintenance_window_duration', options_list=['--maintenance-window-duration', '--duration'], + type=str, help='Duration of the maintenance window in HH:mm format. ' + 'If not provided, default value will be used based on maintenance scope provided. Example: 05:00.') + c.argument('maintenance_window_time_zone', options_list=['--maintenance-window-time-zone', '--time-zone'], + type=str, help='Name of the timezone. List of timezones can be ' + 'obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific ' + 'Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.') + c.argument('maintenance_window_recur_every', options_list=['--maintenance-window-recur-every', '--recur-every'], + type=str, help='Rate at which a Maintenance window is expected to ' + 'recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are ' + 'formatted as recurEvery: [Frequency as integer][\'Day(s)\']. If no frequency is provided, the ' + 'default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly ' + 'schedule are formatted as recurEvery: [Frequency as integer][\'Week(s)\'] [Optional comma ' + 'separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, ' + 'recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as ' + 'integer][\'Month(s)\'] [Comma separated list of month days] or [Frequency as ' + 'integer][\'Month(s)\'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday ' + 'Monday-Sunday]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: ' + 'Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday.') + + with self.argument_context('maintenance configuration update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='Resource Identifier') + c.argument('location', arg_type=get_location_type(self.cli_ctx), + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('namespace', type=str, help='Gets or sets namespace of the resource') + c.argument('extension_properties', action=AddExtensionProperties, nargs='*', help='Gets or sets ' + 'extensionProperties of the maintenanceConfiguration Expect value: KEY1=VALUE1 KEY2=VALUE2 ...') + c.argument('maintenance_scope', arg_type=get_enum_type(['All', 'Host', 'Resource', 'InResource', 'OSImage', '' + 'Extension', 'InGuestPatch', 'SQLDB', '' + 'SQLManagedInstance']), help='Gets or sets ' + 'maintenanceScope of the configuration') + c.argument('visibility', arg_type=get_enum_type(['Custom', 'Public']), help='Gets or sets the visibility of ' + 'the configuration') + c.argument('maintenance_window_start_date_time', + options_list=['--maintenance-window-start-date-time', '--start-datetime'], + type=str, help='Effective start date of the maintenance ' + 'window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future ' + 'date. The window will be created in the time zone provided and adjusted to daylight savings ' + 'according to that time zone.') + c.argument('maintenance_window_expiration_date_time', + options_list=['--maintenance-window-expiration-date-time', '--expiration-datetime'], + type=str, help='Effective expiration date of the ' + 'maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone ' + 'provided and adjusted to daylight savings according to that time zone. Expiration date must be set ' + 'to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.') + c.argument('maintenance_window_duration', options_list=['--maintenance-window-duration', '--duration'], + type=str, help='Duration of the maintenance window in HH:mm format. ' + 'If not provided, default value will be used based on maintenance scope provided. Example: 05:00.') + c.argument('maintenance_window_time_zone', options_list=['--maintenance-window-time-zone', '--time-zone'], + type=str, help='Name of the timezone. List of timezones can be ' + 'obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific ' + 'Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.') + c.argument('maintenance_window_recur_every', options_list=['--maintenance-window-recur-every', '--recur-every'], + type=str, help='Rate at which a Maintenance window is expected to ' + 'recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are ' + 'formatted as recurEvery: [Frequency as integer][\'Day(s)\']. If no frequency is provided, the ' + 'default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly ' + 'schedule are formatted as recurEvery: [Frequency as integer][\'Week(s)\'] [Optional comma ' + 'separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, ' + 'recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as ' + 'integer][\'Month(s)\'] [Comma separated list of month days] or [Frequency as ' + 'integer][\'Month(s)\'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday ' + 'Monday-Sunday]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: ' + 'Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday.') + + with self.argument_context('maintenance configuration delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='Resource Identifier') + + with self.argument_context('maintenance update list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') + + with self.argument_context('maintenance update list-parent') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('provider_name', type=str, help='Resource provider name') + c.argument('resource_parent_type', type=str, help='Resource parent type') + c.argument('resource_parent_name', type=str, help='Resource parent identifier') + c.argument('resource_type', type=str, help='Resource type') + c.argument('resource_name', type=str, help='Resource identifier') diff --git a/src/maintenance/azext_maintenance/manual/commands.py b/src/maintenance/azext_maintenance/manual/commands.py new file mode 100644 index 00000000000..022fc1cec35 --- /dev/null +++ b/src/maintenance/azext_maintenance/manual/commands.py @@ -0,0 +1,71 @@ +# -------------------------------------------------------------------------- +# 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=too-many-statements +# pylint: disable=too-many-locals + +from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): + + from azext_maintenance.generated._client_factory import cf_public_maintenance_configuration + maintenance_public_maintenance_configuration = CliCommandType( + operations_tmpl='azext_maintenance.vendored_sdks.maintenance.operations._public_maintenance_configuration_opera' + 'tions#PublicMaintenanceConfigurationOperations.{}', + client_factory=cf_public_maintenance_configuration) + with self.command_group('maintenance public-configuration', maintenance_public_maintenance_configuration, + client_factory=cf_public_maintenance_configuration, is_preview=True) as g: + g.custom_command('list', 'maintenance_public_configuration_list') + g.custom_show_command('show', 'maintenance_public_configuration_show') + + from azext_maintenance.generated._client_factory import cf_apply_update + maintenance_apply_update = CliCommandType( + operations_tmpl='azext_maintenance.vendored_sdks.maintenance.operations._apply_update_operations#ApplyUpdateOpe' + 'rations.{}', + client_factory=cf_apply_update) + with self.command_group('maintenance applyupdate', maintenance_apply_update, client_factory=cf_apply_update) as g: + g.custom_show_command('show', 'maintenance_applyupdate_show') + g.custom_command('create', 'maintenance_applyupdate_create') + g.custom_command('update', 'maintenance_applyupdate_update') + g.custom_command('get-parent', 'maintenance_applyupdate_get_parent') + + from azext_maintenance.generated._client_factory import cf_configuration_assignment + maintenance_configuration_assignment = CliCommandType( + operations_tmpl='azext_maintenance.vendored_sdks.maintenance.operations._configuration_assignment_operations#Co' + 'nfigurationAssignmentOperations.{}', + client_factory=cf_configuration_assignment) + with self.command_group('maintenance assignment', maintenance_configuration_assignment, + client_factory=cf_configuration_assignment) as g: + g.custom_command('list', 'maintenance_assignment_list') + g.custom_command('create', 'maintenance_assignment_create') + g.custom_command('update', 'maintenance_assignment_update') + g.custom_command('delete', 'maintenance_assignment_delete', confirmation=True) + g.custom_command('list-parent', 'maintenance_assignment_list_parent') + + from azext_maintenance.generated._client_factory import cf_maintenance_configuration + maintenance_maintenance_configuration = CliCommandType( + operations_tmpl='azext_maintenance.vendored_sdks.maintenance.operations._maintenance_configuration_operations#M' + 'aintenanceConfigurationOperations.{}', + client_factory=cf_maintenance_configuration) + with self.command_group('maintenance configuration', maintenance_maintenance_configuration, + client_factory=cf_maintenance_configuration) as g: + g.custom_command('list', 'maintenance_configuration_list') + g.custom_show_command('show', 'maintenance_configuration_show') + g.custom_command('create', 'maintenance_configuration_create') + g.custom_command('update', 'maintenance_configuration_update') + g.custom_command('delete', 'maintenance_configuration_delete', confirmation=True) + + from azext_maintenance.generated._client_factory import cf_update + maintenance_update = CliCommandType( + operations_tmpl='azext_maintenance.vendored_sdks.maintenance.operations._update_operations#UpdateOperations.{}', + client_factory=cf_update) + with self.command_group('maintenance update', maintenance_update, client_factory=cf_update) as g: + g.custom_command('list', 'maintenance_update_list') + g.custom_command('list-parent', 'maintenance_update_list_parent') diff --git a/src/maintenance/azext_maintenance/manual/tests/__init__.py b/src/maintenance/azext_maintenance/manual/tests/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/maintenance/azext_maintenance/manual/tests/__init__.py @@ -0,0 +1,12 @@ +# 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. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/maintenance/azext_maintenance/manual/tests/latest/__init__.py b/src/maintenance/azext_maintenance/manual/tests/latest/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/maintenance/azext_maintenance/manual/tests/latest/__init__.py @@ -0,0 +1,12 @@ +# 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. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/maintenance/azext_maintenance/manual/tests/latest/recordings/test_maintenance.yaml b/src/maintenance/azext_maintenance/manual/tests/latest/recordings/test_maintenance.yaml new file mode 100644 index 00000000000..28ed380e73d --- /dev/null +++ b/src/maintenance/azext_maintenance/manual/tests/latest/recordings/test_maintenance.yaml @@ -0,0 +1,1959 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2020-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-09-02T02:11:33Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:11:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.23.0 + method: GET + uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json + response: + body: + string: "{\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\",\n + \ \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {},\n \"variables\": + {},\n \"resources\": [],\n \"outputs\": {\n \"aliases\": {\n \"type\": + \"object\",\n \"value\": {\n \"Linux\": {\n \"CentOS\": + {\n \"publisher\": \"OpenLogic\",\n \"offer\": \"CentOS\",\n + \ \"sku\": \"7.5\",\n \"version\": \"latest\"\n },\n + \ \"CoreOS\": {\n \"publisher\": \"CoreOS\",\n \"offer\": + \"CoreOS\",\n \"sku\": \"Stable\",\n \"version\": \"latest\"\n + \ },\n \"Debian\": {\n \"publisher\": \"Debian\",\n + \ \"offer\": \"debian-10\",\n \"sku\": \"10\",\n \"version\": + \"latest\"\n },\n \"openSUSE-Leap\": {\n \"publisher\": + \"SUSE\",\n \"offer\": \"openSUSE-Leap\",\n \"sku\": + \"42.3\",\n \"version\": \"latest\"\n },\n \"RHEL\": + {\n \"publisher\": \"RedHat\",\n \"offer\": \"RHEL\",\n + \ \"sku\": \"7-LVM\",\n \"version\": \"latest\"\n },\n + \ \"SLES\": {\n \"publisher\": \"SUSE\",\n \"offer\": + \"SLES\",\n \"sku\": \"15\",\n \"version\": \"latest\"\n + \ },\n \"UbuntuLTS\": {\n \"publisher\": \"Canonical\",\n + \ \"offer\": \"UbuntuServer\",\n \"sku\": \"18.04-LTS\",\n + \ \"version\": \"latest\"\n }\n },\n \"Windows\": + {\n \"Win2019Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2019-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2016Datacenter\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2016-Datacenter\",\n \"version\": + \"latest\"\n },\n \"Win2012R2Datacenter\": {\n \"publisher\": + \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n \"sku\": + \"2012-R2-Datacenter\",\n \"version\": \"latest\"\n },\n + \ \"Win2012Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2012-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2008R2SP1\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2008-R2-SP1\",\n \"version\": + \"latest\"\n }\n }\n }\n }\n }\n}\n" + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + cache-control: + - max-age=300 + connection: + - keep-alive + content-length: + - '2501' + content-security-policy: + - default-src 'none'; style-src 'unsafe-inline'; sandbox + content-type: + - text/plain; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:11:34 GMT + etag: + - W/"540044b4084c3c314537f1baa1770f248628b2bc9ba0328f1004c33862e049da" + expires: + - Wed, 02 Sep 2020 02:16:34 GMT + source-age: + - '0' + strict-transport-security: + - max-age=31536000 + vary: + - Authorization,Accept-Encoding + via: + - 1.1 varnish (Varnish/6.0) + - 1.1 varnish + x-cache: + - HIT, HIT + x-cache-hits: + - 2, 1 + x-content-type-options: + - nosniff + x-fastly-request-id: + - 8579b6c0eba58178640b5ab3f76cb4b1406a9551 + x-frame-options: + - deny + x-github-request-id: + - CFDE:4809:5D89DA:6D773C:5F4EF1BC + x-served-by: + - cache-mdw17357-MDW + x-timer: + - S1599012695.534568,VS0,VE118 + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-network/11.0.0 Azure-SDK-For-Python AZURECLI/2.11.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:11:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", + "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, "resources": + [{"name": "clitestvmssVNET", "type": "Microsoft.Network/virtualNetworks", "location": + "westus", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": + {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": + "clitestvmssSubnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"apiVersion": + "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", "name": "clitestvmssLBPublicIP", + "location": "westus", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": + "Dynamic"}}, {"type": "Microsoft.Network/loadBalancers", "name": "clitestvmssLB", + "location": "westus", "tags": {}, "apiVersion": "2018-01-01", "dependsOn": ["Microsoft.Network/virtualNetworks/clitestvmssVNET", + "Microsoft.Network/publicIpAddresses/clitestvmssLBPublicIP"], "properties": + {"backendAddressPools": [{"name": "clitestvmssLBBEPool"}], "inboundNatPools": + [{"name": "clitestvmssLBNatPool", "properties": {"frontendIPConfiguration": + {"id": "[concat(resourceId(''Microsoft.Network/loadBalancers'', ''clitestvmssLB''), + ''/frontendIPConfigurations/'', ''loadBalancerFrontEnd'')]"}, "protocol": "tcp", + "frontendPortRangeStart": "50000", "frontendPortRangeEnd": "50119", "backendPort": + 3389}}], "frontendIPConfigurations": [{"name": "loadBalancerFrontEnd", "properties": + {"publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/clitestvmssLBPublicIP"}}}]}}, + {"type": "Microsoft.Compute/virtualMachineScaleSets", "name": "clitestvmss", + "location": "westus", "tags": {}, "apiVersion": "2020-06-01", "dependsOn": ["Microsoft.Network/virtualNetworks/clitestvmssVNET", + "Microsoft.Network/loadBalancers/clitestvmssLB"], "sku": {"name": "Standard_DS1_v2", + "capacity": 1}, "properties": {"overprovision": true, "upgradePolicy": {"mode": + "manual"}, "virtualMachineProfile": {"storageProfile": {"osDisk": {"createOption": + "FromImage", "caching": "ReadWrite", "managedDisk": {"storageAccountType": null}}, + "imageReference": {"publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", + "sku": "2016-Datacenter", "version": "latest"}, "dataDisks": [{"lun": 0, "managedDisk": + {"storageAccountType": null}, "createOption": "empty", "diskSizeGB": 2}]}, "networkProfile": + {"networkInterfaceConfigurations": [{"name": "clite3953Nic", "properties": {"primary": + "true", "ipConfigurations": [{"name": "clite3953IPConfig", "properties": {"subnet": + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET/subnets/clitestvmssSubnet"}, + "loadBalancerBackendAddressPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB/backendAddressPools/clitestvmssLBBEPool"}], + "loadBalancerInboundNatPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB/inboundNatPools/clitestvmssLBNatPool"}]}}]}}]}, + "osProfile": {"computerNamePrefix": "clite3953", "adminUsername": "azureuser", + "adminPassword": "[parameters(''adminPassword'')]"}}, "singlePlacementGroup": + null}}], "outputs": {"VMSS": {"type": "object", "value": "[reference(resourceId(''Microsoft.Compute/virtualMachineScaleSets'', + ''clitestvmss''),providers(''Microsoft.Compute'', ''virtualMachineScaleSets'').apiVersions[0])]"}}}, + "parameters": {"adminPassword": {"value": "PasswordCLIMaintenanceRP8!"}}, "mode": + "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + Content-Length: + - '4085' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/vmss_deploy_kgiZuXZn7diwXlq8NQwT2xBeVr0t8Hqn","name":"vmss_deploy_kgiZuXZn7diwXlq8NQwT2xBeVr0t8Hqn","type":"Microsoft.Resources/deployments","properties":{"templateHash":"2606780367408474299","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2020-09-02T02:11:36.2685717Z","duration":"PT0.6467681S","correlationId":"d812fc6b-de40-4289-b657-d25bb76609ef","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"loadBalancers","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"clitestvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/clitestvmssLBPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"clitestvmssLBPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"clitestvmssLB"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"clitestvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"clitestvmssLB"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"clitestvmss"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/vmss_deploy_kgiZuXZn7diwXlq8NQwT2xBeVr0t8Hqn/operationStatuses/08586025941898558427?api-version=2020-06-01 + cache-control: + - no-cache + content-length: + - '2803' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:11:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:12:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:12:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:13:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:13:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:14:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:14:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:15:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:15:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:16:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:16:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:17:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:17:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025941898558427?api-version=2020-06-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/vmss_deploy_kgiZuXZn7diwXlq8NQwT2xBeVr0t8Hqn","name":"vmss_deploy_kgiZuXZn7diwXlq8NQwT2xBeVr0t8Hqn","type":"Microsoft.Resources/deployments","properties":{"templateHash":"2606780367408474299","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2020-09-02T02:18:05.3398615Z","duration":"PT6M29.7180579S","correlationId":"d812fc6b-de40-4289-b657-d25bb76609ef","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"loadBalancers","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"clitestvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/clitestvmssLBPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"clitestvmssLBPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"clitestvmssLB"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"clitestvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"clitestvmssLB"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"clitestvmss"}],"outputs":{"vmss":{"type":"Object","value":{"singlePlacementGroup":true,"upgradePolicy":{"mode":"Manual"},"virtualMachineProfile":{"osProfile":{"computerNamePrefix":"clite3953","adminUsername":"azureuser","windowsConfiguration":{"provisionVMAgent":true,"enableAutomaticUpdates":true},"secrets":[],"allowExtensionOperations":true,"requireGuestProvisionSignal":true},"storageProfile":{"osDisk":{"createOption":"FromImage","caching":"ReadWrite","managedDisk":{"storageAccountType":"Premium_LRS"},"diskSizeGB":127},"imageReference":{"publisher":"MicrosoftWindowsServer","offer":"WindowsServer","sku":"2016-Datacenter","version":"latest"},"dataDisks":[{"lun":0,"createOption":"Empty","caching":"None","managedDisk":{"storageAccountType":"Premium_LRS"},"diskSizeGB":2}]},"networkProfile":{"networkInterfaceConfigurations":[{"name":"clite3953Nic","properties":{"primary":true,"enableAcceleratedNetworking":false,"dnsSettings":{"dnsServers":[]},"enableIPForwarding":false,"ipConfigurations":[{"name":"clite3953IPConfig","properties":{"subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET/subnets/clitestvmssSubnet"},"privateIPAddressVersion":"IPv4","loadBalancerBackendAddressPools":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB/backendAddressPools/clitestvmssLBBEPool"}],"loadBalancerInboundNatPools":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB/inboundNatPools/clitestvmssLBNatPool"}]}}]}}]},"extensionProfile":{"extensions":[{"name":"Microsoft.Azure.Geneva.GenevaMonitoring","properties":{"autoUpgradeMinorVersion":true,"publisher":"Microsoft.Azure.Geneva","type":"GenevaMonitoring","typeHandlerVersion":"2.0","settings":{}}}]}},"provisioningState":"Succeeded","overprovision":true,"doNotRunExtensionsOnOverprovisionedVMs":false,"uniqueId":"5cf122fd-355d-4adc-b07d-3f6484fc07d7"}}},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/clitestvmssLBPublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '5948' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "properties": {"namespace": "Microsoft.Maintenance", + "maintenanceScope": "OSImage", "visibility": "Custom", "maintenanceWindow": + {"startDateTime": "2020-09-30 08:00", "expirationDateTime": "9999-12-31 00:00", + "duration": "05:00", "timeZone": "Pacific Standard Time", "recurEvery": "Day"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration create + Connection: + - keep-alive + Content-Length: + - '313' + Content-Type: + - application/json + ParameterSetName: + - --location --maintenance-scope --maintenance-window-duration --maintenance-window-expiration-date-time + --maintenance-window-recur-every --maintenance-window-start-date-time --maintenance-window-time-zone + --namespace --visibility --resource-group --resource-name + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"properties\": + {\r\n \"namespace\": \"Microsoft.Maintenance\",\r\n \"extensionProperties\": + {},\r\n \"maintenanceScope\": \"OSImage\",\r\n \"maintenanceWindow\": + {\r\n \"startDateTime\": \"2020-09-30 08:00\",\r\n \"expirationDateTime\": + \"9999-12-31 00:00\",\r\n \"duration\": \"05:00\",\r\n \"timeZone\": + \"Pacific Standard Time\",\r\n \"recurEvery\": \"Day\"\r\n },\r\n + \ \"visibility\": \"Custom\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1\",\r\n + \ \"name\": \"configuration1\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '755' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --resource-name + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"properties\": + {\r\n \"namespace\": \"Microsoft.Maintenance\",\r\n \"extensionProperties\": + {},\r\n \"maintenanceScope\": \"OSImage\",\r\n \"maintenanceWindow\": + {\r\n \"startDateTime\": \"2020-09-30 08:00\",\r\n \"expirationDateTime\": + \"9999-12-31 00:00\",\r\n \"duration\": \"05:00\",\r\n \"timeZone\": + \"Pacific Standard Time\",\r\n \"recurEvery\": \"Day\"\r\n },\r\n + \ \"visibility\": \"Custom\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.maintenance/maintenanceconfigurations/configuration1\",\r\n + \ \"name\": \"configuration1\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '755' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration list + Connection: + - keep-alive + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Maintenance/maintenanceConfigurations?api-version=2020-07-01-preview + response: + body: + string: '{"value":[{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedkoreacentral","name":"policydgnsrsharedkoreacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedkoreasouth","name":"policydgnsrsharedkoreasouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedjapaneast","name":"policydgnsrsharedjapaneast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedsouthcentralus","name":"policydgnsrsharedsouthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsoutH/providers/Microsoft.Maintenance/maintenanceConfigurations/configsotaneja","name":"configsotaneja","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouTH/providers/Microsoft.Maintenance/maintenanceConfigurations/configsotaneja","name":"configsotaneja","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedeastasia","name":"policydgnsrsharedeastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedwestindia","name":"policydgnsrsharedwestindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiaeast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliaeast/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedaustraliaeast","name":"policydgnsrsharedaustraliaeast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southeastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsoutheastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedsoutheastasia","name":"policydgnsrsharedsoutheastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedaustraliasoutheast","name":"policydgnsrsharedaustraliasoutheast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedcentralus","name":"policydgnsrsharedcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedcanadacentral","name":"policydgnsrsharedcanadacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedeastus","name":"policydgnsrsharedeastus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestus2/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedwestus2","name":"policydgnsrsharedwestus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedbrazilsouth","name":"policydgnsrsharedbrazilsouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedeastus2","name":"policydgnsrsharedeastus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharednorthcentralus","name":"policydgnsrsharednorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnortheurope/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharednortheurope","name":"policydgnsrsharednortheurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrshareduksouth","name":"policydgnsrshareduksouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"ukwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrukwest/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedukwest","name":"policydgnsrsharedukwest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"francecentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrfrancecentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedfrancecentral","name":"policydgnsrsharedfrancecentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwesteurope/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedwesteurope","name":"policydgnsrsharedwesteurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southafricanorth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthafricanorth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedsouthafricanorth","name":"policydgnsrsharedsouthafricanorth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedaustraliacentral","name":"policydgnsrsharedaustraliacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southafricanorth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthafricanorth/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever15","name":"configjusiever15","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southafricanorth","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthafricanorth/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever","name":"configjusiever","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever","name":"configjusiever","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadaeast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadaeast/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever","name":"configjusiever","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/pseastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/psconfigeastasia","name":"psconfigeastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clinorthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/clinorthusconfiguration","name":"clinorthusconfiguration","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clieastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/clieastasiaconfigurationdh","name":"clieastasiaconfigurationdh","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clieastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/clieastasiaconfigurationdng","name":"clieastasiaconfigurationdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/pseastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/pseastasiaconfigurationdh","name":"pseastasiaconfigurationdh","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/pseastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/pseastasiaconfigurationdng","name":"pseastasiaconfigurationdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhsouthcentralus","name":"policydgnsrdhsouthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japanwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapanwest/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhjapanwest","name":"policydgnsrdhjapanwest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhjapaneast","name":"policydgnsrdhjapaneast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhkoreasouth","name":"policydgnsrdhkoreasouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southeastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsoutheastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhwestindia","name":"policydgnsrdhwestindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhaustraliasoutheast","name":"policydgnsrdhaustraliasoutheast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhaustraliacentral","name":"policydgnsrdhaustraliacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrfullwestindia","name":"policydgnsrfullwestindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiaeast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliaeast/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southeastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsoutheastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhsoutheastasia","name":"policydgnsrdhsoutheastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"francecentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrfrancecentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhfrancecentral","name":"policydgnsrdhfrancecentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhcanadacentral","name":"policydgnsrdhcanadacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"francecentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrfrancecentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrfullnorthcentralus","name":"policydgnsrfullnorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwesteurope/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhwesteurope","name":"policydgnsrdhwesteurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrfullbrazilsouth","name":"policydgnsrfullbrazilsouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestus2/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhwestus2","name":"policydgnsrdhwestus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhnorthcentralus","name":"policydgnsrdhnorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhuksouth","name":"policydgnsrdhuksouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnortheurope/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever131","name":"configjusiever131","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever131","name":"configjusiever131","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever131","name":"configjusiever131","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever131","name":"configjusiever131","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever131","name":"configjusiever131","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever131","name":"configjusiever131","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedsouthcentralus","name":"policydgnsrsharedsouthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharednorthcentralus","name":"policydgnsrsharednorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedaustraliasoutheast","name":"policydgnsrsharedaustraliasoutheast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedaustraliacentral","name":"policydgnsrsharedaustraliacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwesteurope/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedwesteurope","name":"policydgnsrsharedwesteurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestus2/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedwestus2","name":"policydgnsrsharedwestus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedbrazilsouth","name":"policydgnsrsharedbrazilsouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southafricanorth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthafricanorth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedsouthafricanorth","name":"policydgnsrsharedsouthafricanorth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrshareduksouth","name":"policydgnsrshareduksouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedcentralus","name":"policydgnsrsharedcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedeastus2","name":"policydgnsrsharedeastus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnortheurope/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharednortheurope","name":"policydgnsrsharednortheurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedkoreasouth","name":"policydgnsrsharedkoreasouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedeastus","name":"policydgnsrsharedeastus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedwestindia","name":"policydgnsrsharedwestindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastasia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedeastasia","name":"policydgnsrsharedeastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedcanadacentral","name":"policydgnsrsharedcanadacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiaeast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliaeast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedaustraliaeast","name":"policydgnsrsharedaustraliaeast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedjapaneast","name":"policydgnsrsharedjapaneast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedkoreacentral","name":"policydgnsrsharedkoreacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"francecentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrfrancecentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedfrancecentral","name":"policydgnsrsharedfrancecentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"ukwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrukwest/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedukwest","name":"policydgnsrsharedukwest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southeastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsoutheastasia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedsoutheastasia","name":"policydgnsrsharedsoutheastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbgkoreasouth/providers/microsoft.maintenance/maintenanceconfigurations/defaultmaintenanceconfiguration-koreasouth","name":"defaultMaintenanceConfiguration-koreasouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbgkoreacentral/providers/microsoft.maintenance/maintenanceconfigurations/defaultmaintenanceconfiguration-koreacentral","name":"defaultMaintenanceConfiguration-koreacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testatrg/providers/microsoft.maintenance/maintenanceconfigurations/defaultmcwestus2","name":"defaultmcwestus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testatrg/providers/microsoft.maintenance/maintenanceconfigurations/defaultmcnorthcentralus","name":"defaultmcnorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/psnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/defaultmcnorthcentralus","name":"defaultmcnorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testatrg/providers/microsoft.maintenance/maintenanceconfigurations/defaultmaintenanceconfiguration","name":"defaultMaintenanceConfiguration","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/psnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/defaultmaintenanceconfiguration","name":"defaultMaintenanceConfiguration","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clinorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/portaltestconfig","name":"portaltestconfig","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/netsdknorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/netsdknorthcentralusconfigurationfull","name":"netsdknorthcentralusconfigurationfull","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/abtest/providers/microsoft.maintenance/maintenanceconfigurations/testconfigfromportal","name":"testconfigfromportal","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralus","tags":{"tag1":"bugbash"},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/portalbugbash/providers/microsoft.maintenance/maintenanceconfigurations/scenario1","name":"scenario1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/microsoft.maintenance/maintenanceconfigurations/defaultmaintenanceconfiguration-koreacentral","name":"defaultMaintenanceConfiguration-koreacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwesteurope/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnortheurope/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/psnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/psnorthusconfigurationfull","name":"psnorthusconfigurationfull","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/pseastasia/providers/microsoft.maintenance/maintenanceconfigurations/pseastasiaconfigurationdh","name":"pseastasiaconfigurationdh","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Resource","maintenanceWindow":{"startDateTime":"0001-01-01 + 00:00","expirationDateTime":"0001-01-01 00:00","duration":"05:00","timeZone":"India + Standard Time","recurEvery":"0"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/afecflagkoreasouth","name":"afecFlagKoreaSouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Resource","maintenanceWindow":{"startDateTime":"0001-01-01 + 00:00","expirationDateTime":"0001-01-01 00:00","duration":"05:00","timeZone":"Eastern + Standard Time","recurEvery":"0"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/afecflagcanada","name":"afecFlagCanada","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"WESTEUROPE","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Resource","maintenanceWindow":{"startDateTime":"0001-01-01 + 00:00","expirationDateTime":"0001-01-01 00:00","duration":"05:00","timeZone":"Central + Europe standard Time","recurEvery":"0"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/afecflageurope","name":"afecFlagEurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Resource, + InResource","maintenanceWindow":{"startDateTime":"0001-01-01 00:00","expirationDateTime":"0001-01-01 + 00:00","duration":"05:00","timeZone":"Central standard Time","recurEvery":"0"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/afecflagus3","name":"afecFlagUS3","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/microsoft.maintenance/maintenanceconfigurations/testargconfiguration1","name":"testARGConfiguration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","maintenanceWindow":{"startDateTime":"2020-08-09 + 20:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"week sunday,monday"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/hosttestingscope","name":"HostTestingscope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/microsoft.maintenance/maintenanceconfigurations/testpowershellconfig","name":"testpowershellconfig","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/microsoft.maintenance/maintenanceconfigurations/soniapowershell","name":"soniapowershell","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps8596/providers/microsoft.maintenance/maintenanceconfigurations/ps5164","name":"ps5164","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps9969/providers/microsoft.maintenance/maintenanceconfigurations/ps227","name":"ps227","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps4851/providers/microsoft.maintenance/maintenanceconfigurations/ps132","name":"ps132","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps5895/providers/microsoft.maintenance/maintenanceconfigurations/ps4366","name":"ps4366","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps3332/providers/microsoft.maintenance/maintenanceconfigurations/ps404","name":"ps404","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps9548/providers/microsoft.maintenance/maintenanceconfigurations/ps567","name":"ps567","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps3221/providers/microsoft.maintenance/maintenanceconfigurations/ps5992","name":"ps5992","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps9573/providers/microsoft.maintenance/maintenanceconfigurations/ps575","name":"ps575","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{"publicMaintenanceConfigurationId":"ps4509","isAvailable":"true"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Public"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps7939/providers/microsoft.maintenance/maintenanceconfigurations/ps4509","name":"ps4509","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{"isAvailable":"true","publicMaintenanceConfigurationId":"randomc"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Public"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/randogroup/providers/microsoft.maintenance/maintenanceconfigurations/randomc","name":"randomc","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{"isAvailable":"true","publicMaintenanceConfigurationId":"soniaps"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Public"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/randogroup/providers/microsoft.maintenance/maintenanceconfigurations/soniaps","name":"soniaps","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"OSImage","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Month Third Sunday"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitests5f7aik4kielzdkgwmkwjyxpjzokzgfpgfivhyj7wne4w7wl6shvtm3xsunnzt76rcet/providers/microsoft.maintenance/maintenanceconfigurations/configuration1","name":"configuration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{"publicMaintenanceConfigurationId":"configurationsql","isAvailable":"true"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Public"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/configurationsql","name":"configurationsql","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"OSImage","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Month Third Sunday"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitestbjnoqkenrf5azew3kgnabym44odg7prhbgld62256xzyrysux4j7uag3cjosjnh4vr6o/providers/microsoft.maintenance/maintenanceconfigurations/configuration1","name":"configuration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"OSImage","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Month Third Sunday"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest4m7giv6zpf3q5vef7j3msfh3nsgpzqdfsh4sh3daxxvfrnmb6guxwefrdjrgxeo3ojvw/providers/microsoft.maintenance/maintenanceconfigurations/configuration1","name":"configuration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"OSImage","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Month Third Sunday"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitestqm2p2j4y45bdhruz5u22egugnh2mbsfo7ycpzsy33taklfoaa7u4jte2dz2nghrd56oq/providers/microsoft.maintenance/maintenanceconfigurations/configuration1","name":"configuration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","maintenanceWindow":{"startDateTime":"2020-09-01 + 00:00","expirationDateTime":"2021-08-04 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/pstest","name":"pstest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japanwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapanwest/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhjapanwest","name":"policydgnsrdhjapanwest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"OSImage","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Month Third Sunday"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitestf5ivvpypbhqgzkft234pqqqm3rmaueztclxupbsi4it2tknktbbt5dogcp74ybrjjnmd/providers/microsoft.maintenance/maintenanceconfigurations/configuration1","name":"configuration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastasia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhsouthindia","name":"policydgnsrdhsouthindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southeastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsoutheastasia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhsoutheastasia","name":"policydgnsrdhsoutheastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"ukwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrukwest/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhsouthcentralus","name":"policydgnsrdhsouthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhuksouth","name":"policydgnsrdhuksouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhbrazilsouth","name":"policydgnsrdhbrazilsouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfulljapaneast","name":"policydgnsrfulljapaneast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullsouthindia","name":"policydgnsrfullsouthindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwesteurope/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhwesteurope","name":"policydgnsrdhwesteurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhcanadacentral","name":"policydgnsrdhcanadacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhkoreacentral","name":"policydgnsrdhkoreacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southafricanorth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthafricanorth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhsouthafricanorth","name":"policydgnsrdhsouthafricanorth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"ukwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrukwest/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhukwest","name":"policydgnsrdhukwest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastasia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdheastasia","name":"policydgnsrdheastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhwestus","name":"policydgnsrdhwestus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiaeast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliaeast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullkoreasouth","name":"policydgnsrfullkoreasouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhjapaneast","name":"policydgnsrdhjapaneast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullaustraliasoutheast","name":"policydgnsrfullaustraliasoutheast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullbrazilsouth","name":"policydgnsrfullbrazilsouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestus2/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhnorthcentralus","name":"policydgnsrdhnorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdheastus2","name":"policydgnsrdheastus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadaeast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadaeast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhcanadaeast","name":"policydgnsrdhcanadaeast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"ukwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrukwest/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullukwest","name":"policydgnsrfullukwest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullnorthcentralus","name":"policydgnsrfullnorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnortheurope/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhnortheurope","name":"policydgnsrdhnortheurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhkoreasouth","name":"policydgnsrdhkoreasouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdheastus","name":"policydgnsrdheastus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullwestindia","name":"policydgnsrfullwestindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullkoreacentral","name":"policydgnsrfullkoreacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentralindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhcentralindia","name":"policydgnsrdhcentralindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhaustraliasoutheast","name":"policydgnsrdhaustraliasoutheast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestus2/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhwestus2","name":"policydgnsrdhwestus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhaustraliacentral","name":"policydgnsrdhaustraliacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullcanadacentral","name":"policydgnsrfullcanadacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfulluksouth","name":"policydgnsrfulluksouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"francecentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrfrancecentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhfrancecentral","name":"policydgnsrdhfrancecentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southeastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsoutheastasia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhwestindia","name":"policydgnsrdhwestindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhcentralus","name":"policydgnsrdhcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"francecentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrfrancecentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southafricanorth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthafricanorth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"OSImage","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.maintenance/maintenanceconfigurations/configuration1","name":"configuration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedeastus2euap","name":"policydgnsrsharedeastus2euap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedcentraluseuap","name":"policydgnsrsharedcentraluseuap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever","name":"configjusiever","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/Microsoft.Maintenance/maintenanceConfigurations/configshvenk","name":"configshvenk","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdheastus2euap","name":"policydgnsrdheastus2euap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrfulleastus2euap","name":"policydgnsrfulleastus2euap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedcentraluseuap","name":"policydgnsrsharedcentraluseuap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/Microsoft.Maintenance/maintenanceConfigurations/testARGConfiguration3","name":"testARGConfiguration3","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/Microsoft.Maintenance/maintenanceConfigurations/gautamdPolicy","name":"gautamdPolicy","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfulleastus2euap","name":"policydgnsrfulleastus2euap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedeastus2euap","name":"policydgnsrsharedeastus2euap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdheastus2euap","name":"policydgnsrdheastus2euap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhcentraluseuap","name":"policydgnsrdhcentraluseuap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/microsoft.maintenance/maintenanceconfigurations/testargconfiguration9","name":"testARGConfiguration9","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{"publicMaintenanceConfigurationId":"soniasql","isAvailable":"false"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-08-19 + 03:00","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Public"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/soniasql","name":"soniasql","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{"publicMaintenanceConfigurationId":"sqlcli","isAvailable":"true"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Public"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/sqlcli","name":"sqlcli","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{"publicMaintenanceConfigurationId":"[''sqlcliv2'']","isAvailable":"[''true'']"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/sqlcliv2","name":"sqlcliv2","type":"Microsoft.Maintenance/maintenanceConfigurations"}]}' + headers: + cache-control: + - no-cache + content-length: + - '85789' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - 98fe099e-755b-425c-a675-994a4e539d37 + - 98fe099e-755b-425c-a675-994a4e539d37 + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "properties": {"namespace": "Microsoft.Maintenance", + "maintenanceScope": "OSImage", "visibility": "Custom", "maintenanceWindow": + {"startDateTime": "2020-09-30 08:00", "expirationDateTime": "9999-12-31 00:00", + "duration": "05:00", "timeZone": "Pacific Standard Time", "recurEvery": "Month + Third Sunday"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration update + Connection: + - keep-alive + Content-Length: + - '328' + Content-Type: + - application/json + ParameterSetName: + - --location --maintenance-scope --maintenance-window-duration --maintenance-window-expiration-date-time + --maintenance-window-recur-every --maintenance-window-start-date-time --maintenance-window-time-zone + --namespace --visibility --resource-group --resource-name + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"properties\": + {\r\n \"namespace\": \"Microsoft.Maintenance\",\r\n \"extensionProperties\": + {},\r\n \"maintenanceScope\": \"OSImage\",\r\n \"maintenanceWindow\": + {\r\n \"startDateTime\": \"2020-09-30 08:00\",\r\n \"expirationDateTime\": + \"9999-12-31 00:00\",\r\n \"duration\": \"05:00\",\r\n \"timeZone\": + \"Pacific Standard Time\",\r\n \"recurEvery\": \"Month Third Sunday\"\r\n + \ },\r\n \"visibility\": \"Custom\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.maintenance/maintenanceconfigurations/configuration1\",\r\n + \ \"name\": \"configuration1\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '770' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance assignment create + Connection: + - keep-alive + ParameterSetName: + - --maintenance-configuration-id --provider-name --resource-group --resource-name + --name --resource-type + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2020-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-09-02T02:11:33Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "properties": {"maintenanceConfigurationId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance assignment create + Connection: + - keep-alive + Content-Length: + - '287' + Content-Type: + - application/json + ParameterSetName: + - --maintenance-configuration-id --provider-name --resource-group --resource-name + --name --resource-type + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/configurationAssignments/configuration1?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"maintenanceConfigurationId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1\",\r\n + \ \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.compute/virtualmachinescalesets/clitestvmss\"\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.compute/virtualmachinescalesets/clitestvmss/providers/Microsoft.Maintenance/configurationAssignments/configuration1\",\r\n + \ \"name\": \"configuration1\",\r\n \"type\": \"Microsoft.Maintenance/configurationAssignments\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '916' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance assignment list + Connection: + - keep-alive + ParameterSetName: + - --provider-name --resource-group --resource-name --resource-type + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/configurationAssignments?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"maintenanceConfigurationId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1\"\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/configurationAssignments/configuration1\",\r\n + \ \"name\": \"configuration1\",\r\n \"type\": \"Microsoft.Maintenance/configurationAssignments\"\r\n + \ }\r\n ]\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '719' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance public-configuration show + Connection: + - keep-alive + ParameterSetName: + - --resource-name + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/sql2?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"properties\": + {\r\n \"extensionProperties\": {\r\n \"publicMaintenanceConfigurationId\": + \"sql2\",\r\n \"isAvailable\": \"true\"\r\n },\r\n \"maintenanceScope\": + \"SQLDB\",\r\n \"maintenanceWindow\": {\r\n \"startDateTime\": \"2020-08-12 + 03:00\",\r\n \"expirationDateTime\": \"9999-12-31 23:59\",\r\n \"duration\": + \"05:00\",\r\n \"timeZone\": \"Pacific Standard Time\",\r\n \"recurEvery\": + \"Day\"\r\n },\r\n \"visibility\": \"Public\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/smdtest/providers/microsoft.maintenance/maintenanceconfigurations/sql2\",\r\n + \ \"name\": \"sql2\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '712' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance public-configuration list + Connection: + - keep-alive + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Maintenance/publicMaintenanceConfigurations?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"value\": [\r\n {\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"extensionProperties\": + {\r\n \"publicMaintenanceConfigurationId\": \"sql2\",\r\n \"isAvailable\": + \"true\"\r\n },\r\n \"maintenanceScope\": \"SQLDB\",\r\n \"maintenanceWindow\": + {\r\n \"startDateTime\": \"2020-08-12 03:00\",\r\n \"expirationDateTime\": + \"9999-12-31 23:59\",\r\n \"duration\": \"05:00\",\r\n \"timeZone\": + \"Pacific Standard Time\",\r\n \"recurEvery\": \"Day\"\r\n },\r\n + \ \"visibility\": \"Public\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/smdtest/providers/microsoft.maintenance/maintenanceconfigurations/sql2\",\r\n + \ \"name\": \"sql2\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n + \ },\r\n {\r\n \"location\": \"eastus2euap\",\r\n \"tags\": + {},\r\n \"properties\": {\r\n \"extensionProperties\": {\r\n \"publicMaintenanceConfigurationId\": + \"randomc\",\r\n \"isAvailable\": \"true\"\r\n },\r\n \"maintenanceScope\": + \"SQLDB\",\r\n \"maintenanceWindow\": {\r\n \"startDateTime\": + \"2020-08-13 03:00\",\r\n \"expirationDateTime\": \"9999-12-31 23:59\",\r\n + \ \"duration\": \"05:00\",\r\n \"timeZone\": \"Pacific Standard + Time\",\r\n \"recurEvery\": \"Day\"\r\n },\r\n \"visibility\": + \"Public\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/smdtest/providers/microsoft.maintenance/maintenanceconfigurations/randomc\",\r\n + \ \"name\": \"randomc\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n + \ },\r\n {\r\n \"location\": \"eastus2euap\",\r\n \"tags\": + {},\r\n \"properties\": {\r\n \"namespace\": \"Microsoft.Maintenance\",\r\n + \ \"extensionProperties\": {\r\n \"publicMaintenanceConfigurationId\": + \"sqlcli\",\r\n \"isAvailable\": \"true\"\r\n },\r\n \"maintenanceScope\": + \"SQLDB\",\r\n \"maintenanceWindow\": {\r\n \"startDateTime\": + \"2020-09-30 08:00\",\r\n \"expirationDateTime\": \"9999-12-31 00:00\",\r\n + \ \"duration\": \"05:00\",\r\n \"timeZone\": \"Pacific Standard + Time\",\r\n \"recurEvery\": \"Day\"\r\n },\r\n \"visibility\": + \"Public\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/sqlcli\",\r\n + \ \"name\": \"sqlcli\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n + \ }\r\n ]\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2497' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance update list + Connection: + - keep-alive + ParameterSetName: + - --provider-name --resource-group --resource-name --resource-type + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/updates?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"value\": []\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '19' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance applyupdate create + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --provider-name --resource-group --resource-name --resource-type + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/applyUpdates/default?api-version=2020-07-01-preview + response: + body: + string: 'null' + headers: + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance applyupdate show + Connection: + - keep-alive + ParameterSetName: + - --name --provider-name --resource-group --resource-name --resource-type + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/applyUpdates/default?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"status\": \"Completed\",\r\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss\",\r\n + \ \"lastUpdateTime\": \"0001-01-01T00:00:00\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/applyUpdates/default\",\r\n + \ \"name\": \"default\",\r\n \"type\": \"Microsoft.Maintenance/applyUpdates\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '673' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance assignment delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --provider-name --resource-group --resource-name --resource-type --yes + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/configurationAssignments/configuration1?api-version=2020-07-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 02:18:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --resource-name --yes + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1?api-version=2020-07-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 02:18:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2euap", "properties": {"namespace": "Microsoft.Maintenance", + "extensionProperties": {"publicMaintenanceConfigurationId": "sqlcli", "isAvailable": + "true"}, "maintenanceScope": "SQLDB", "visibility": "Public", "maintenanceWindow": + {"startDateTime": "2020-09-30 08:00", "expirationDateTime": "9999-12-31 00:00", + "duration": "05:00", "timeZone": "Pacific Standard Time", "recurEvery": "Day"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration create + Connection: + - keep-alive + Content-Length: + - '409' + Content-Type: + - application/json + ParameterSetName: + - --location --maintenance-scope --maintenance-window-duration --maintenance-window-expiration-date-time + --maintenance-window-recur-every --maintenance-window-start-date-time --maintenance-window-time-zone + --namespace --visibility --resource-group --resource-name --extension-properties + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/sqlcli?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"properties\": + {\r\n \"namespace\": \"Microsoft.Maintenance\",\r\n \"extensionProperties\": + {\r\n \"publicMaintenanceConfigurationId\": \"sqlcli\",\r\n \"isAvailable\": + \"true\"\r\n },\r\n \"maintenanceScope\": \"SQLDB\",\r\n \"maintenanceWindow\": + {\r\n \"startDateTime\": \"2020-09-30 08:00\",\r\n \"expirationDateTime\": + \"9999-12-31 00:00\",\r\n \"duration\": \"05:00\",\r\n \"timeZone\": + \"Pacific Standard Time\",\r\n \"recurEvery\": \"Day\"\r\n },\r\n + \ \"visibility\": \"Public\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/sqlcli\",\r\n + \ \"name\": \"sqlcli\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '829' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --resource-name --yes + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/sqlcli?api-version=2020-07-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 02:18:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-compute/13.0.0 Azure-SDK-For-Python AZURECLI/2.11.1 + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss?api-version=2020-06-01 + response: + body: + string: '' + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/7932b62f-846d-46ae-a9b7-20a8853c8c11?api-version=2020-06-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 02:18:27 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/7932b62f-846d-46ae-a9b7-20a8853c8c11?monitor=true&api-version=2020-06-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/DeleteVMScaleSet3Min;79,Microsoft.Compute/DeleteVMScaleSet30Min;398,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;1198,Microsoft.Compute/VmssQueuedVMOperations;4798 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-ms-request-charge: + - '2' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss delete + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-compute/13.0.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/7932b62f-846d-46ae-a9b7-20a8853c8c11?api-version=2020-06-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-09-02T02:18:27.5039331+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"7932b62f-846d-46ae-a9b7-20a8853c8c11\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14995,Microsoft.Compute/GetOperation30Min;29979 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss delete + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-compute/13.0.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/7932b62f-846d-46ae-a9b7-20a8853c8c11?api-version=2020-06-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-09-02T02:18:27.5039331+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"7932b62f-846d-46ae-a9b7-20a8853c8c11\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:18:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29978 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss delete + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-compute/13.0.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/7932b62f-846d-46ae-a9b7-20a8853c8c11?api-version=2020-06-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-09-02T02:18:27.5039331+00:00\",\r\n \"endTime\": + \"2020-09-02T02:18:57.4728431+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"7932b62f-846d-46ae-a9b7-20a8853c8c11\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:19:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14992,Microsoft.Compute/GetOperation30Min;29976 + status: + code: 200 + message: OK +version: 1 diff --git a/src/maintenance/azext_maintenance/manual/tests/latest/test_maintenance_scenario.py b/src/maintenance/azext_maintenance/manual/tests/latest/test_maintenance_scenario.py new file mode 100644 index 00000000000..9c614b036bd --- /dev/null +++ b/src/maintenance/azext_maintenance/manual/tests/latest/test_maintenance_scenario.py @@ -0,0 +1,191 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import os +from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ResourceGroupPreparer + + +def setup(test, rg): + test.cmd('az vmss create -n "clitestvmss" -g "{rg}" --instance-count 1 --image "Win2016Datacenter" --data-disk-sizes-gb 2 --admin-password "PasswordCLIMaintenanceRP8!"', checks=[]) + pass + + +def step__applyupdates_put_applyupdates_createorupdate(test, rg): + test.cmd('az maintenance applyupdate create ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "clitestvmss" ' + '--resource-type "virtualMachineScaleSets"', + checks=[]) + + +def step__applyupdates_get_applyupdates_get(test, rg): + test.cmd('az maintenance applyupdate show ' + '--name "default" ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "clitestvmss" ' + '--resource-type "virtualMachineScaleSets"', + checks=[]) + + +def step__maintenanceconfigurations_put_maintenanceconfigurations_createorupdateforresource(test, rg): + test.cmd('az maintenance configuration create ' + '--location "westus2" ' + '--maintenance-scope "OSImage" ' + '--maintenance-window-duration "05:00" ' + '--maintenance-window-expiration-date-time "9999-12-31 00:00" ' + '--maintenance-window-recur-every "Day" ' + '--maintenance-window-start-date-time "2020-09-30 08:00" ' + '--maintenance-window-time-zone "Pacific Standard Time" ' + '--namespace "Microsoft.Maintenance" ' + '--visibility "Custom" ' + '--resource-group "{rg}" ' + '--resource-name "configuration1"', + checks=[]) + + +def step__maintenanceconfigurations_get_maintenanceconfigurations_getforresource(test, rg): + test.cmd('az maintenance configuration show ' + '--resource-group "{rg}" ' + '--resource-name "configuration1"', + checks=[]) + + +def step__maintenanceconfigurations_get_maintenanceconfigurations_list(test, rg): + test.cmd('az maintenance configuration list', + checks=[]) + + +def step__maintenanceconfigurations_patch_maintenanceconfigurations_updateforresource(test, rg): + test.cmd('az maintenance configuration update ' + '--location "westus2" ' + '--maintenance-scope "OSImage" ' + '--maintenance-window-duration "05:00" ' + '--maintenance-window-expiration-date-time "9999-12-31 00:00" ' + '--maintenance-window-recur-every "Month Third Sunday" ' + '--maintenance-window-start-date-time "2020-09-30 08:00" ' + '--maintenance-window-time-zone "Pacific Standard Time" ' + '--namespace "Microsoft.Maintenance" ' + '--visibility "Custom" ' + '--resource-group "{rg}" ' + '--resource-name "configuration1"', + checks=[]) + + +def step__configurationassignments_put_configurationassignments_createorupdate(test, rg): + test.cmd('az maintenance assignment create ' + '--maintenance-configuration-id "/subscriptions/{subscription_id}/resourcegroups/{rg}/providers/Microsoft.' + 'Maintenance/maintenanceConfigurations/{MaintenanceConfigurations_2}" ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "clitestvmss" ' + '--name "{MaintenanceConfigurations_2}" ' + '--resource-type "virtualMachineScaleSets"', + checks=[]) + + +def step__configurationassignments_get_configurationassignments_list(test, rg): + test.cmd('az maintenance assignment list ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "clitestvmss" ' + '--resource-type "virtualMachineScaleSets"', + checks=[]) + + +def step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_getforresource(test, rg): + test.cmd('az maintenance public-configuration show ' + '--resource-name "sql2"', + checks=[]) + + +def step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_list(test, rg): + test.cmd('az maintenance public-configuration list', + checks=[]) + + +def step__updates_get_updates_list(test, rg): + test.cmd('az maintenance update list ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "clitestvmss" ' + '--resource-type "virtualMachineScaleSets"', + checks=[]) + + +def step__configurationassignments_delete_configurationassignments_delete(test, rg): + test.cmd('az maintenance assignment delete ' + '--name "{MaintenanceConfigurations_2}" ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "clitestvmss" ' + '--resource-type "virtualMachineScaleSets" ' + '--yes', + checks=[]) + + +def step__maintenanceconfigurations_delete_maintenanceconfigurations_deleteforresource(test, rg): + test.cmd('az maintenance configuration delete ' + '--resource-group "{rg}" ' + '--resource-name "configuration1" ' + '--yes', + checks=[]) + + +def step__maintenanceconfigurations_delete_publicmaintenanceconfigurations_delete(test, rg): + test.cmd('az maintenance configuration delete ' + '--resource-group "{rg}" ' + '--resource-name "sqlcli" ' + '--yes', + checks=[]) + + +def step__maintenanceconfigurations_put_publicmaintenanceconfigurations_createorupdateforresource(test, rg): + test.cmd('az maintenance configuration create ' + '--location "eastus2euap" ' + '--maintenance-scope "SQLDB" ' + '--maintenance-window-duration "05:00" ' + '--maintenance-window-expiration-date-time "9999-12-31 00:00" ' + '--maintenance-window-recur-every "Day" ' + '--maintenance-window-start-date-time "2020-09-30 08:00" ' + '--maintenance-window-time-zone "Pacific Standard Time" ' + '--namespace "Microsoft.Maintenance" ' + '--visibility "Public" ' + '--resource-group "{rg}" ' + '--resource-name "sqlcli" ' + '--extension-properties publicMaintenanceConfigurationId=sqlcli isAvailable=true', + checks=[]) + + +def cleanup(test, rg): + test.cmd('az vmss delete -n "clitestvmss" -g "{rg}"', checks=[]) + pass + + +def call_scenario(test, rg): + setup(test, rg) + step__maintenanceconfigurations_put_maintenanceconfigurations_createorupdateforresource(test, rg) + step__maintenanceconfigurations_get_maintenanceconfigurations_getforresource(test, rg) + step__maintenanceconfigurations_get_maintenanceconfigurations_list(test, rg) + step__maintenanceconfigurations_patch_maintenanceconfigurations_updateforresource(test, rg) + step__configurationassignments_put_configurationassignments_createorupdate(test, rg) + step__configurationassignments_get_configurationassignments_list(test, rg) + step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_getforresource(test, rg) + step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_list(test, rg) + step__updates_get_updates_list(test, rg) + step__applyupdates_put_applyupdates_createorupdate(test, rg) + step__applyupdates_get_applyupdates_get(test, rg) + step__configurationassignments_delete_configurationassignments_delete(test, rg) + step__maintenanceconfigurations_delete_maintenanceconfigurations_deleteforresource(test, rg) + step__maintenanceconfigurations_put_publicmaintenanceconfigurations_createorupdateforresource(test, rg) + step__maintenanceconfigurations_delete_publicmaintenanceconfigurations_delete(test, rg) + cleanup(test, rg) diff --git a/src/maintenance/azext_maintenance/tests/__init__.py b/src/maintenance/azext_maintenance/tests/__init__.py index 34913fb394d..50e0627daff 100644 --- a/src/maintenance/azext_maintenance/tests/__init__.py +++ b/src/maintenance/azext_maintenance/tests/__init__.py @@ -1,4 +1,114 @@ -# -------------------------------------------------------------------------------------------- +# 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. -# -------------------------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +import 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] + if not decorated_path.startswith(module_path): + raise Exception("Decorator can only be used in submodules!") + manual_path = os.path.join( + decorated_path[module_path.rfind(os.path.sep) + 1:]) + manual_file_path, manual_file_name = os.path.split(manual_path) + module_name, _ = os.path.splitext(manual_file_name) + manual_module = "..manual." + \ + ".".join(manual_file_path.split(os.path.sep) + [module_name, ]) + return getattr(import_module(manual_module, package=__name__), origin_func.__name__) + + def get_func_to_call(): + func_to_call = func + try: + func_to_call = import_manual_function(func) + func_to_call = import_manual_function(func) + logger.info("Found manual override for %s(...)", func.__name__) + except (ImportError, AttributeError): + pass + return func_to_call + + def wrapper(*args, **kwargs): + func_to_call = get_func_to_call() + logger.info("running %s()...", func.__name__) + try: + test_map[func.__name__] = dict() + test_map[func.__name__]["result"] = SUCCESSED + test_map[func.__name__]["error_message"] = "" + test_map[func.__name__]["error_stack"] = "" + test_map[func.__name__]["error_normalized"] = "" + test_map[func.__name__]["start_dt"] = dt.datetime.utcnow() + ret = func_to_call(*args, **kwargs) + except (AssertionError, AzureError, CliTestError, CliExecutionError, SystemExit, + JMESPathCheckAssertionError) as e: + test_map[func.__name__]["end_dt"] = dt.datetime.utcnow() + test_map[func.__name__]["result"] = FAILED + test_map[func.__name__]["error_message"] = str(e).replace("\r\n", " ").replace("\n", " ")[:500] + test_map[func.__name__]["error_stack"] = traceback.format_exc().replace( + "\r\n", " ").replace("\n", " ")[:500] + logger.info("--------------------------------------") + logger.info("step exception: %s", e) + logger.error("--------------------------------------") + logger.error("step exception in %s: %s", func.__name__, e) + logger.info(traceback.format_exc()) + exceptions.append((func.__name__, sys.exc_info())) + else: + test_map[func.__name__]["end_dt"] = dt.datetime.utcnow() + return ret + + if inspect.isclass(func): + return get_func_to_call() + return wrapper + + +def calc_coverage(filename): + filename = filename.split(".")[0] + coverage_name = filename + "_coverage.md" + with open(coverage_name, "w") as f: + f.write("|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt|\n") + total = len(test_map) + covered = 0 + for k, v in test_map.items(): + if not k.startswith("step_"): + total -= 1 + continue + if v["result"] == SUCCESSED: + covered += 1 + f.write("|{step_name}|{result}|{error_message}|{error_stack}|{error_normalized}|{start_dt}|" + "{end_dt}|\n".format(step_name=k, **v)) + f.write("Coverage: {}/{}\n".format(covered, total)) + print("Create coverage\n", file=sys.stderr) + + +def raise_if(): + if exceptions: + if len(exceptions) <= 1: + raise exceptions[0][1][1] + message = "{}\nFollowed with exceptions in other steps:\n".format(str(exceptions[0][1][1])) + message += "\n".join(["{}: {}".format(h[0], h[1][1]) for h in exceptions[1:]]) + raise exceptions[0][1][0](message).with_traceback(exceptions[0][1][2]) diff --git a/src/maintenance/azext_maintenance/tests/latest/__init__.py b/src/maintenance/azext_maintenance/tests/latest/__init__.py index 34913fb394d..c9cfdc73e77 100644 --- a/src/maintenance/azext_maintenance/tests/latest/__init__.py +++ b/src/maintenance/azext_maintenance/tests/latest/__init__.py @@ -1,4 +1,12 @@ -# -------------------------------------------------------------------------------------------- +# 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. -# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/maintenance/azext_maintenance/tests/latest/preparers.py b/src/maintenance/azext_maintenance/tests/latest/preparers.py new file mode 100644 index 00000000000..0879e51945a --- /dev/null +++ b/src/maintenance/azext_maintenance/tests/latest/preparers.py @@ -0,0 +1,159 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import os +from datetime import datetime +from azure_devtools.scenario_tests import SingleValueReplacer +from azure.cli.testsdk.preparers import NoTrafficRecordingPreparer +from azure.cli.testsdk.exceptions import CliTestError +from azure.cli.testsdk.reverse_dependency import get_dummy_cli + + +KEY_RESOURCE_GROUP = 'rg' +KEY_VIRTUAL_NETWORK = 'vnet' +KEY_VNET_SUBNET = 'subnet' +KEY_VNET_NIC = 'nic' + + +class VirtualNetworkPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest.vn', + parameter_name='virtual_network', + resource_group_name=None, + resource_group_key=KEY_RESOURCE_GROUP, + dev_setting_name='AZURE_CLI_TEST_DEV_VIRTUAL_NETWORK_NAME', + random_name_length=24, key=KEY_VIRTUAL_NETWORK): + if ' ' in name_prefix: + raise CliTestError( + 'Error: Space character in name prefix \'%s\'' % name_prefix) + super(VirtualNetworkPreparer, self).__init__( + name_prefix, random_name_length) + self.cli_ctx = get_dummy_cli() + self.parameter_name = parameter_name + self.key = key + self.resource_group_name = resource_group_name + self.resource_group_key = resource_group_key + self.dev_setting_name = os.environ.get(dev_setting_name, None) + + def create_resource(self, name, **_): + if self.dev_setting_name: + return {self.parameter_name: self.dev_setting_name, } + + if not self.resource_group_name: + self.resource_group_name = self.test_class_instance.kwargs.get( + self.resource_group_key) + if not self.resource_group_name: + raise CliTestError("Error: No resource group configured!") + + tags = {'product': 'azurecli', 'cause': 'automation', + 'date': datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')} + if 'ENV_JOB_NAME' in os.environ: + tags['job'] = os.environ['ENV_JOB_NAME'] + tags = ' '.join(['{}={}'.format(key, value) + for key, value in tags.items()]) + template = 'az network vnet create --resource-group {} --name {} --subnet-name default --tag ' + tags + self.live_only_execute(self.cli_ctx, template.format( + self.resource_group_name, name)) + + self.test_class_instance.kwargs[self.key] = name + return {self.parameter_name: name} + + def remove_resource(self, name, **_): + # delete vnet if test is being recorded and if the vnet is not a dev rg + if not self.dev_setting_name: + self.live_only_execute( + self.cli_ctx, + 'az network vnet delete --name {} --resource-group {}'.format(name, self.resource_group_name)) + + +class VnetSubnetPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest.vn', + parameter_name='subnet', + resource_group_key=KEY_RESOURCE_GROUP, + vnet_key=KEY_VIRTUAL_NETWORK, + address_prefixes="11.0.0.0/24", + dev_setting_name='AZURE_CLI_TEST_DEV_VNET_SUBNET_NAME', + key=KEY_VNET_SUBNET): + if ' ' in name_prefix: + raise CliTestError( + 'Error: Space character in name prefix \'%s\'' % name_prefix) + super(VnetSubnetPreparer, self).__init__(name_prefix, 15) + self.cli_ctx = get_dummy_cli() + self.parameter_name = parameter_name + self.key = key + self.resource_group = [resource_group_key, None] + self.vnet = [vnet_key, None] + self.address_prefixes = address_prefixes + self.dev_setting_name = os.environ.get(dev_setting_name, None) + + def create_resource(self, name, **_): + if self.dev_setting_name: + return {self.parameter_name: self.dev_setting_name, } + + if not self.resource_group[1]: + self.resource_group[1] = self.test_class_instance.kwargs.get( + self.resource_group[0]) + if not self.resource_group[1]: + raise CliTestError("Error: No resource group configured!") + if not self.vnet[1]: + self.vnet[1] = self.test_class_instance.kwargs.get(self.vnet[0]) + if not self.vnet[1]: + raise CliTestError("Error: No vnet configured!") + + self.test_class_instance.kwargs[self.key] = 'default' + return {self.parameter_name: name} + + def remove_resource(self, name, **_): + pass + + +class VnetNicPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest.nic', + parameter_name='subnet', + resource_group_key=KEY_RESOURCE_GROUP, + vnet_key=KEY_VIRTUAL_NETWORK, + dev_setting_name='AZURE_CLI_TEST_DEV_VNET_NIC_NAME', + key=KEY_VNET_NIC): + if ' ' in name_prefix: + raise CliTestError( + 'Error: Space character in name prefix \'%s\'' % name_prefix) + super(VnetNicPreparer, self).__init__(name_prefix, 15) + self.cli_ctx = get_dummy_cli() + self.parameter_name = parameter_name + self.key = key + self.resource_group = [resource_group_key, None] + self.vnet = [vnet_key, None] + self.dev_setting_name = os.environ.get(dev_setting_name, None) + + def create_resource(self, name, **_): + if self.dev_setting_name: + return {self.parameter_name: self.dev_setting_name, } + + if not self.resource_group[1]: + self.resource_group[1] = self.test_class_instance.kwargs.get( + self.resource_group[0]) + if not self.resource_group[1]: + raise CliTestError("Error: No resource group configured!") + if not self.vnet[1]: + self.vnet[1] = self.test_class_instance.kwargs.get(self.vnet[0]) + if not self.vnet[1]: + raise CliTestError("Error: No vnet configured!") + + template = 'az network nic create --resource-group {} --name {} --vnet-name {} --subnet default ' + self.live_only_execute(self.cli_ctx, template.format( + self.resource_group[1], name, self.vnet[1])) + + self.test_class_instance.kwargs[self.key] = name + return {self.parameter_name: name} + + def remove_resource(self, name, **_): + if not self.dev_setting_name: + self.live_only_execute( + self.cli_ctx, + 'az network nic delete --name {} --resource-group {}'.format(name, self.resource_group[1])) diff --git a/src/maintenance/azext_maintenance/tests/latest/recordings/test_maintenance.yaml b/src/maintenance/azext_maintenance/tests/latest/recordings/test_maintenance.yaml new file mode 100644 index 00000000000..945d6e28680 --- /dev/null +++ b/src/maintenance/azext_maintenance/tests/latest/recordings/test_maintenance.yaml @@ -0,0 +1,2004 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2020-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-09-02T02:22:02Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:22:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.23.0 + method: GET + uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json + response: + body: + string: "{\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\",\n + \ \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {},\n \"variables\": + {},\n \"resources\": [],\n \"outputs\": {\n \"aliases\": {\n \"type\": + \"object\",\n \"value\": {\n \"Linux\": {\n \"CentOS\": + {\n \"publisher\": \"OpenLogic\",\n \"offer\": \"CentOS\",\n + \ \"sku\": \"7.5\",\n \"version\": \"latest\"\n },\n + \ \"CoreOS\": {\n \"publisher\": \"CoreOS\",\n \"offer\": + \"CoreOS\",\n \"sku\": \"Stable\",\n \"version\": \"latest\"\n + \ },\n \"Debian\": {\n \"publisher\": \"Debian\",\n + \ \"offer\": \"debian-10\",\n \"sku\": \"10\",\n \"version\": + \"latest\"\n },\n \"openSUSE-Leap\": {\n \"publisher\": + \"SUSE\",\n \"offer\": \"openSUSE-Leap\",\n \"sku\": + \"42.3\",\n \"version\": \"latest\"\n },\n \"RHEL\": + {\n \"publisher\": \"RedHat\",\n \"offer\": \"RHEL\",\n + \ \"sku\": \"7-LVM\",\n \"version\": \"latest\"\n },\n + \ \"SLES\": {\n \"publisher\": \"SUSE\",\n \"offer\": + \"SLES\",\n \"sku\": \"15\",\n \"version\": \"latest\"\n + \ },\n \"UbuntuLTS\": {\n \"publisher\": \"Canonical\",\n + \ \"offer\": \"UbuntuServer\",\n \"sku\": \"18.04-LTS\",\n + \ \"version\": \"latest\"\n }\n },\n \"Windows\": + {\n \"Win2019Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2019-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2016Datacenter\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2016-Datacenter\",\n \"version\": + \"latest\"\n },\n \"Win2012R2Datacenter\": {\n \"publisher\": + \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n \"sku\": + \"2012-R2-Datacenter\",\n \"version\": \"latest\"\n },\n + \ \"Win2012Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2012-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2008R2SP1\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2008-R2-SP1\",\n \"version\": + \"latest\"\n }\n }\n }\n }\n }\n}\n" + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + cache-control: + - max-age=300 + connection: + - keep-alive + content-length: + - '2501' + content-security-policy: + - default-src 'none'; style-src 'unsafe-inline'; sandbox + content-type: + - text/plain; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:22:03 GMT + etag: + - W/"540044b4084c3c314537f1baa1770f248628b2bc9ba0328f1004c33862e049da" + expires: + - Wed, 02 Sep 2020 02:27:03 GMT + source-age: + - '177' + strict-transport-security: + - max-age=31536000 + vary: + - Authorization,Accept-Encoding + via: + - 1.1 varnish (Varnish/6.0) + - 1.1 varnish + x-cache: + - HIT, HIT + x-cache-hits: + - 4, 1 + x-content-type-options: + - nosniff + x-fastly-request-id: + - 97c85f4297b0f50270b5ad17c7452b837d5b853e + x-frame-options: + - deny + x-github-request-id: + - 27E6:47E1:27615D:3369B0:5F4EF159 + x-served-by: + - cache-sea4420-SEA + x-timer: + - S1599013324.823782,VS0,VE1 + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-network/11.0.0 Azure-SDK-For-Python AZURECLI/2.11.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:22:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", + "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, "resources": + [{"name": "clitestvmssVNET", "type": "Microsoft.Network/virtualNetworks", "location": + "westus", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": + {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": + "clitestvmssSubnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"apiVersion": + "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", "name": "clitestvmssLBPublicIP", + "location": "westus", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": + "Dynamic"}}, {"type": "Microsoft.Network/loadBalancers", "name": "clitestvmssLB", + "location": "westus", "tags": {}, "apiVersion": "2018-01-01", "dependsOn": ["Microsoft.Network/virtualNetworks/clitestvmssVNET", + "Microsoft.Network/publicIpAddresses/clitestvmssLBPublicIP"], "properties": + {"backendAddressPools": [{"name": "clitestvmssLBBEPool"}], "inboundNatPools": + [{"name": "clitestvmssLBNatPool", "properties": {"frontendIPConfiguration": + {"id": "[concat(resourceId(''Microsoft.Network/loadBalancers'', ''clitestvmssLB''), + ''/frontendIPConfigurations/'', ''loadBalancerFrontEnd'')]"}, "protocol": "tcp", + "frontendPortRangeStart": "50000", "frontendPortRangeEnd": "50119", "backendPort": + 3389}}], "frontendIPConfigurations": [{"name": "loadBalancerFrontEnd", "properties": + {"publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/clitestvmssLBPublicIP"}}}]}}, + {"type": "Microsoft.Compute/virtualMachineScaleSets", "name": "clitestvmss", + "location": "westus", "tags": {}, "apiVersion": "2020-06-01", "dependsOn": ["Microsoft.Network/virtualNetworks/clitestvmssVNET", + "Microsoft.Network/loadBalancers/clitestvmssLB"], "sku": {"name": "Standard_DS1_v2", + "capacity": 1}, "properties": {"overprovision": true, "upgradePolicy": {"mode": + "manual"}, "virtualMachineProfile": {"storageProfile": {"osDisk": {"createOption": + "FromImage", "caching": "ReadWrite", "managedDisk": {"storageAccountType": null}}, + "imageReference": {"publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", + "sku": "2016-Datacenter", "version": "latest"}, "dataDisks": [{"lun": 0, "managedDisk": + {"storageAccountType": null}, "createOption": "empty", "diskSizeGB": 2}]}, "networkProfile": + {"networkInterfaceConfigurations": [{"name": "cliteb8c8Nic", "properties": {"primary": + "true", "ipConfigurations": [{"name": "cliteb8c8IPConfig", "properties": {"subnet": + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET/subnets/clitestvmssSubnet"}, + "loadBalancerBackendAddressPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB/backendAddressPools/clitestvmssLBBEPool"}], + "loadBalancerInboundNatPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB/inboundNatPools/clitestvmssLBNatPool"}]}}]}}]}, + "osProfile": {"computerNamePrefix": "cliteb8c8", "adminUsername": "azureuser", + "adminPassword": "[parameters(''adminPassword'')]"}}, "singlePlacementGroup": + null}}], "outputs": {"VMSS": {"type": "object", "value": "[reference(resourceId(''Microsoft.Compute/virtualMachineScaleSets'', + ''clitestvmss''),providers(''Microsoft.Compute'', ''virtualMachineScaleSets'').apiVersions[0])]"}}}, + "parameters": {"adminPassword": {"value": "PasswordCLIMaintenanceRP8!"}}, "mode": + "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + Content-Length: + - '4085' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/vmss_deploy_tHrtHs9va12B6dVhmjzQvXd6KXEA3Kli","name":"vmss_deploy_tHrtHs9va12B6dVhmjzQvXd6KXEA3Kli","type":"Microsoft.Resources/deployments","properties":{"templateHash":"13981659799554997302","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2020-09-02T02:22:05.4772059Z","duration":"PT0.6258802S","correlationId":"51a44ee2-a84b-4218-8d78-13ba6b289011","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"loadBalancers","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"clitestvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/clitestvmssLBPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"clitestvmssLBPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"clitestvmssLB"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"clitestvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"clitestvmssLB"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"clitestvmss"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/vmss_deploy_tHrtHs9va12B6dVhmjzQvXd6KXEA3Kli/operationStatuses/08586025935606263293?api-version=2020-06-01 + cache-control: + - no-cache + content-length: + - '2804' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:22:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:22:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:23:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:23:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:24:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:24:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:25:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:25:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:26:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:26:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:27:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:27:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:28:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586025935606263293?api-version=2020-06-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:28:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --instance-count --image --data-disk-sizes-gb --admin-password + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/vmss_deploy_tHrtHs9va12B6dVhmjzQvXd6KXEA3Kli","name":"vmss_deploy_tHrtHs9va12B6dVhmjzQvXd6KXEA3Kli","type":"Microsoft.Resources/deployments","properties":{"templateHash":"13981659799554997302","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2020-09-02T02:28:15.496844Z","duration":"PT6M10.6455183S","correlationId":"51a44ee2-a84b-4218-8d78-13ba6b289011","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"loadBalancers","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"clitestvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/clitestvmssLBPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"clitestvmssLBPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"clitestvmssLB"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"clitestvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"clitestvmssLB"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"clitestvmss"}],"outputs":{"vmss":{"type":"Object","value":{"singlePlacementGroup":true,"upgradePolicy":{"mode":"Manual"},"virtualMachineProfile":{"osProfile":{"computerNamePrefix":"cliteb8c8","adminUsername":"azureuser","windowsConfiguration":{"provisionVMAgent":true,"enableAutomaticUpdates":true},"secrets":[],"allowExtensionOperations":true,"requireGuestProvisionSignal":true},"storageProfile":{"osDisk":{"createOption":"FromImage","caching":"ReadWrite","managedDisk":{"storageAccountType":"Premium_LRS"},"diskSizeGB":127},"imageReference":{"publisher":"MicrosoftWindowsServer","offer":"WindowsServer","sku":"2016-Datacenter","version":"latest"},"dataDisks":[{"lun":0,"createOption":"Empty","caching":"None","managedDisk":{"storageAccountType":"Premium_LRS"},"diskSizeGB":2}]},"networkProfile":{"networkInterfaceConfigurations":[{"name":"cliteb8c8Nic","properties":{"primary":true,"enableAcceleratedNetworking":false,"dnsSettings":{"dnsServers":[]},"enableIPForwarding":false,"ipConfigurations":[{"name":"cliteb8c8IPConfig","properties":{"subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET/subnets/clitestvmssSubnet"},"privateIPAddressVersion":"IPv4","loadBalancerBackendAddressPools":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB/backendAddressPools/clitestvmssLBBEPool"}],"loadBalancerInboundNatPools":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB/inboundNatPools/clitestvmssLBNatPool"}]}}]}}]},"extensionProfile":{"extensions":[{"name":"Microsoft.Azure.Geneva.GenevaMonitoring","properties":{"autoUpgradeMinorVersion":true,"publisher":"Microsoft.Azure.Geneva","type":"GenevaMonitoring","typeHandlerVersion":"2.0","settings":{}}}]}},"provisioningState":"Succeeded","overprovision":true,"doNotRunExtensionsOnOverprovisionedVMs":false,"uniqueId":"18368aad-094c-4414-ae42-ff38e4b596c2"}}},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/loadBalancers/clitestvmssLB"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/clitestvmssLBPublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitestvmssVNET"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '5948' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:28:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "properties": {"namespace": "Microsoft.Maintenance", + "maintenanceScope": "OSImage", "visibility": "Custom", "maintenanceWindow": + {"startDateTime": "2020-09-30 08:00", "expirationDateTime": "9999-12-31 00:00", + "duration": "05:00", "timeZone": "Pacific Standard Time", "recurEvery": "Day"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration create + Connection: + - keep-alive + Content-Length: + - '313' + Content-Type: + - application/json + ParameterSetName: + - --location --maintenance-scope --maintenance-window-duration --maintenance-window-expiration-date-time + --maintenance-window-recur-every --maintenance-window-start-date-time --maintenance-window-time-zone + --namespace --visibility --resource-group --resource-name + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"properties\": + {\r\n \"namespace\": \"Microsoft.Maintenance\",\r\n \"extensionProperties\": + {},\r\n \"maintenanceScope\": \"OSImage\",\r\n \"maintenanceWindow\": + {\r\n \"startDateTime\": \"2020-09-30 08:00\",\r\n \"expirationDateTime\": + \"9999-12-31 00:00\",\r\n \"duration\": \"05:00\",\r\n \"timeZone\": + \"Pacific Standard Time\",\r\n \"recurEvery\": \"Day\"\r\n },\r\n + \ \"visibility\": \"Custom\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1\",\r\n + \ \"name\": \"configuration1\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '755' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:28:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --resource-name + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"properties\": + {\r\n \"namespace\": \"Microsoft.Maintenance\",\r\n \"extensionProperties\": + {},\r\n \"maintenanceScope\": \"OSImage\",\r\n \"maintenanceWindow\": + {\r\n \"startDateTime\": \"2020-09-30 08:00\",\r\n \"expirationDateTime\": + \"9999-12-31 00:00\",\r\n \"duration\": \"05:00\",\r\n \"timeZone\": + \"Pacific Standard Time\",\r\n \"recurEvery\": \"Day\"\r\n },\r\n + \ \"visibility\": \"Custom\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.maintenance/maintenanceconfigurations/configuration1\",\r\n + \ \"name\": \"configuration1\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '755' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:28:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration list + Connection: + - keep-alive + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Maintenance/maintenanceConfigurations?api-version=2020-07-01-preview + response: + body: + string: '{"error":{"code":"InternalServerError","message":"Encountered internal + server error. Diagnostic information: timestamp ''20200902T022858Z'', subscription + id ''eee2cef4-bc47-4278-b4f8-cfc65f25dfd8'', tracking id ''2ec53f11-0dfb-4c5b-8726-8d445454952b'', + request correlation id ''2ec53f11-0dfb-4c5b-8726-8d445454952b''."}}' + headers: + cache-control: + - no-cache + connection: + - close + content-length: + - '312' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:28:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 500 + message: Internal Server Error +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration list + Connection: + - keep-alive + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Maintenance/maintenanceConfigurations?api-version=2020-07-01-preview + response: + body: + string: '{"value":[{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedkoreacentral","name":"policydgnsrsharedkoreacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedkoreasouth","name":"policydgnsrsharedkoreasouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedjapaneast","name":"policydgnsrsharedjapaneast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedsouthcentralus","name":"policydgnsrsharedsouthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsoutH/providers/Microsoft.Maintenance/maintenanceConfigurations/configsotaneja","name":"configsotaneja","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouTH/providers/Microsoft.Maintenance/maintenanceConfigurations/configsotaneja","name":"configsotaneja","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedeastasia","name":"policydgnsrsharedeastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedwestindia","name":"policydgnsrsharedwestindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiaeast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliaeast/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedaustraliaeast","name":"policydgnsrsharedaustraliaeast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southeastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsoutheastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedsoutheastasia","name":"policydgnsrsharedsoutheastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedaustraliasoutheast","name":"policydgnsrsharedaustraliasoutheast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedcentralus","name":"policydgnsrsharedcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedcanadacentral","name":"policydgnsrsharedcanadacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedeastus","name":"policydgnsrsharedeastus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestus2/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedwestus2","name":"policydgnsrsharedwestus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedbrazilsouth","name":"policydgnsrsharedbrazilsouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedeastus2","name":"policydgnsrsharedeastus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharednorthcentralus","name":"policydgnsrsharednorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnortheurope/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharednortheurope","name":"policydgnsrsharednortheurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrshareduksouth","name":"policydgnsrshareduksouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"ukwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrukwest/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedukwest","name":"policydgnsrsharedukwest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"francecentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrfrancecentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedfrancecentral","name":"policydgnsrsharedfrancecentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwesteurope/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedwesteurope","name":"policydgnsrsharedwesteurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southafricanorth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthafricanorth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedsouthafricanorth","name":"policydgnsrsharedsouthafricanorth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedaustraliacentral","name":"policydgnsrsharedaustraliacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southafricanorth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthafricanorth/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever15","name":"configjusiever15","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southafricanorth","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthafricanorth/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever","name":"configjusiever","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever","name":"configjusiever","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadaeast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadaeast/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever","name":"configjusiever","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/pseastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/psconfigeastasia","name":"psconfigeastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clinorthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/clinorthusconfiguration","name":"clinorthusconfiguration","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clieastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/clieastasiaconfigurationdh","name":"clieastasiaconfigurationdh","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clieastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/clieastasiaconfigurationdng","name":"clieastasiaconfigurationdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/pseastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/pseastasiaconfigurationdh","name":"pseastasiaconfigurationdh","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/pseastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/pseastasiaconfigurationdng","name":"pseastasiaconfigurationdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhsouthcentralus","name":"policydgnsrdhsouthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japanwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapanwest/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhjapanwest","name":"policydgnsrdhjapanwest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhjapaneast","name":"policydgnsrdhjapaneast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhkoreasouth","name":"policydgnsrdhkoreasouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southeastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsoutheastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhwestindia","name":"policydgnsrdhwestindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhaustraliasoutheast","name":"policydgnsrdhaustraliasoutheast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhaustraliacentral","name":"policydgnsrdhaustraliacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrfullwestindia","name":"policydgnsrfullwestindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiaeast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliaeast/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southeastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsoutheastasia/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhsoutheastasia","name":"policydgnsrdhsoutheastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"francecentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrfrancecentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhfrancecentral","name":"policydgnsrdhfrancecentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhcanadacentral","name":"policydgnsrdhcanadacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"francecentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrfrancecentral/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrfullnorthcentralus","name":"policydgnsrfullnorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwesteurope/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhwesteurope","name":"policydgnsrdhwesteurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrfullbrazilsouth","name":"policydgnsrfullbrazilsouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestus2/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhwestus2","name":"policydgnsrdhwestus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhnorthcentralus","name":"policydgnsrdhnorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdhuksouth","name":"policydgnsrdhuksouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnortheurope/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever131","name":"configjusiever131","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever131","name":"configjusiever131","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever131","name":"configjusiever131","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever131","name":"configjusiever131","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever131","name":"configjusiever131","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever131","name":"configjusiever131","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedsouthcentralus","name":"policydgnsrsharedsouthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharednorthcentralus","name":"policydgnsrsharednorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedaustraliasoutheast","name":"policydgnsrsharedaustraliasoutheast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedaustraliacentral","name":"policydgnsrsharedaustraliacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwesteurope/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedwesteurope","name":"policydgnsrsharedwesteurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestus2/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedwestus2","name":"policydgnsrsharedwestus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedbrazilsouth","name":"policydgnsrsharedbrazilsouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southafricanorth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthafricanorth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedsouthafricanorth","name":"policydgnsrsharedsouthafricanorth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrshareduksouth","name":"policydgnsrshareduksouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedcentralus","name":"policydgnsrsharedcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedeastus2","name":"policydgnsrsharedeastus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnortheurope/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharednortheurope","name":"policydgnsrsharednortheurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedkoreasouth","name":"policydgnsrsharedkoreasouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedeastus","name":"policydgnsrsharedeastus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedwestindia","name":"policydgnsrsharedwestindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastasia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedeastasia","name":"policydgnsrsharedeastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedcanadacentral","name":"policydgnsrsharedcanadacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiaeast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliaeast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedaustraliaeast","name":"policydgnsrsharedaustraliaeast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedjapaneast","name":"policydgnsrsharedjapaneast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedkoreacentral","name":"policydgnsrsharedkoreacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"francecentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrfrancecentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedfrancecentral","name":"policydgnsrsharedfrancecentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"ukwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrukwest/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedukwest","name":"policydgnsrsharedukwest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southeastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsoutheastasia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedsoutheastasia","name":"policydgnsrsharedsoutheastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbgkoreasouth/providers/microsoft.maintenance/maintenanceconfigurations/defaultmaintenanceconfiguration-koreasouth","name":"defaultMaintenanceConfiguration-koreasouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbgkoreacentral/providers/microsoft.maintenance/maintenanceconfigurations/defaultmaintenanceconfiguration-koreacentral","name":"defaultMaintenanceConfiguration-koreacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testatrg/providers/microsoft.maintenance/maintenanceconfigurations/defaultmcwestus2","name":"defaultmcwestus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testatrg/providers/microsoft.maintenance/maintenanceconfigurations/defaultmcnorthcentralus","name":"defaultmcnorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/psnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/defaultmcnorthcentralus","name":"defaultmcnorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testatrg/providers/microsoft.maintenance/maintenanceconfigurations/defaultmaintenanceconfiguration","name":"defaultMaintenanceConfiguration","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/psnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/defaultmaintenanceconfiguration","name":"defaultMaintenanceConfiguration","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clinorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/portaltestconfig","name":"portaltestconfig","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/netsdknorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/netsdknorthcentralusconfigurationfull","name":"netsdknorthcentralusconfigurationfull","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/abtest/providers/microsoft.maintenance/maintenanceconfigurations/testconfigfromportal","name":"testconfigfromportal","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralus","tags":{"tag1":"bugbash"},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/portalbugbash/providers/microsoft.maintenance/maintenanceconfigurations/scenario1","name":"scenario1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/microsoft.maintenance/maintenanceconfigurations/defaultmaintenanceconfiguration-koreacentral","name":"defaultMaintenanceConfiguration-koreacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwesteurope/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnortheurope/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/psnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/psnorthusconfigurationfull","name":"psnorthusconfigurationfull","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/pseastasia/providers/microsoft.maintenance/maintenanceconfigurations/pseastasiaconfigurationdh","name":"pseastasiaconfigurationdh","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Resource","maintenanceWindow":{"startDateTime":"0001-01-01 + 00:00","expirationDateTime":"0001-01-01 00:00","duration":"05:00","timeZone":"India + Standard Time","recurEvery":"0"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/afecflagkoreasouth","name":"afecFlagKoreaSouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Resource","maintenanceWindow":{"startDateTime":"0001-01-01 + 00:00","expirationDateTime":"0001-01-01 00:00","duration":"05:00","timeZone":"Eastern + Standard Time","recurEvery":"0"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/afecflagcanada","name":"afecFlagCanada","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"WESTEUROPE","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Resource","maintenanceWindow":{"startDateTime":"0001-01-01 + 00:00","expirationDateTime":"0001-01-01 00:00","duration":"05:00","timeZone":"Central + Europe standard Time","recurEvery":"0"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/afecflageurope","name":"afecFlagEurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Resource, + InResource","maintenanceWindow":{"startDateTime":"0001-01-01 00:00","expirationDateTime":"0001-01-01 + 00:00","duration":"05:00","timeZone":"Central standard Time","recurEvery":"0"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/afecflagus3","name":"afecFlagUS3","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/microsoft.maintenance/maintenanceconfigurations/testargconfiguration1","name":"testARGConfiguration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","maintenanceWindow":{"startDateTime":"2020-08-09 + 20:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"week sunday,monday"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/hosttestingscope","name":"HostTestingscope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/microsoft.maintenance/maintenanceconfigurations/testpowershellconfig","name":"testpowershellconfig","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/microsoft.maintenance/maintenanceconfigurations/soniapowershell","name":"soniapowershell","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps8596/providers/microsoft.maintenance/maintenanceconfigurations/ps5164","name":"ps5164","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps9969/providers/microsoft.maintenance/maintenanceconfigurations/ps227","name":"ps227","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps4851/providers/microsoft.maintenance/maintenanceconfigurations/ps132","name":"ps132","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps5895/providers/microsoft.maintenance/maintenanceconfigurations/ps4366","name":"ps4366","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps3332/providers/microsoft.maintenance/maintenanceconfigurations/ps404","name":"ps404","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps9548/providers/microsoft.maintenance/maintenanceconfigurations/ps567","name":"ps567","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps3221/providers/microsoft.maintenance/maintenanceconfigurations/ps5992","name":"ps5992","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps9573/providers/microsoft.maintenance/maintenanceconfigurations/ps575","name":"ps575","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{"publicMaintenanceConfigurationId":"ps4509","isAvailable":"true"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Public"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ps7939/providers/microsoft.maintenance/maintenanceconfigurations/ps4509","name":"ps4509","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{"isAvailable":"true","publicMaintenanceConfigurationId":"randomc"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Public"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/randogroup/providers/microsoft.maintenance/maintenanceconfigurations/randomc","name":"randomc","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{"isAvailable":"true","publicMaintenanceConfigurationId":"soniaps"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-09-01 + 12:30","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Public"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/randogroup/providers/microsoft.maintenance/maintenanceconfigurations/soniaps","name":"soniaps","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"OSImage","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Month Third Sunday"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitests5f7aik4kielzdkgwmkwjyxpjzokzgfpgfivhyj7wne4w7wl6shvtm3xsunnzt76rcet/providers/microsoft.maintenance/maintenanceconfigurations/configuration1","name":"configuration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{"publicMaintenanceConfigurationId":"configurationsql","isAvailable":"true"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Public"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/configurationsql","name":"configurationsql","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"OSImage","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Month Third Sunday"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitestbjnoqkenrf5azew3kgnabym44odg7prhbgld62256xzyrysux4j7uag3cjosjnh4vr6o/providers/microsoft.maintenance/maintenanceconfigurations/configuration1","name":"configuration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"OSImage","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Month Third Sunday"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest4m7giv6zpf3q5vef7j3msfh3nsgpzqdfsh4sh3daxxvfrnmb6guxwefrdjrgxeo3ojvw/providers/microsoft.maintenance/maintenanceconfigurations/configuration1","name":"configuration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"OSImage","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Month Third Sunday"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitestqm2p2j4y45bdhruz5u22egugnh2mbsfo7ycpzsy33taklfoaa7u4jte2dz2nghrd56oq/providers/microsoft.maintenance/maintenanceconfigurations/configuration1","name":"configuration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","maintenanceWindow":{"startDateTime":"2020-09-01 + 00:00","expirationDateTime":"2021-08-04 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/pstest","name":"pstest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"OSImage","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Month Third Sunday"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitestf5ivvpypbhqgzkft234pqqqm3rmaueztclxupbsi4it2tknktbbt5dogcp74ybrjjnmd/providers/microsoft.maintenance/maintenanceconfigurations/configuration1","name":"configuration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullkoreasouth","name":"policydgnsrfullkoreasouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhjapaneast","name":"policydgnsrdhjapaneast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullaustraliasoutheast","name":"policydgnsrfullaustraliasoutheast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullbrazilsouth","name":"policydgnsrfullbrazilsouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestus2/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhnorthcentralus","name":"policydgnsrdhnorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdheastus2","name":"policydgnsrdheastus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadaeast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadaeast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhcanadaeast","name":"policydgnsrdhcanadaeast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"ukwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrukwest/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullukwest","name":"policydgnsrfullukwest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullnorthcentralus","name":"policydgnsrfullnorthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnortheurope/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhnortheurope","name":"policydgnsrdhnortheurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreasouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreasouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhkoreasouth","name":"policydgnsrdhkoreasouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdheastus","name":"policydgnsrdheastus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullwestindia","name":"policydgnsrfullwestindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullkoreacentral","name":"policydgnsrfullkoreacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentralindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhcentralindia","name":"policydgnsrdhcentralindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhaustraliasoutheast","name":"policydgnsrdhaustraliasoutheast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestus2/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhwestus2","name":"policydgnsrdhwestus2","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhaustraliacentral","name":"policydgnsrdhaustraliacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullcanadacentral","name":"policydgnsrfullcanadacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfulluksouth","name":"policydgnsrfulluksouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"francecentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrfrancecentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhfrancecentral","name":"policydgnsrdhfrancecentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southeastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsoutheastasia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhwestindia","name":"policydgnsrdhwestindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhcentralus","name":"policydgnsrdhcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiasoutheast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliasoutheast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"francecentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrfrancecentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southafricanorth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthafricanorth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhwestus","name":"policydgnsrdhwestus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westeurope","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwesteurope/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhwesteurope","name":"policydgnsrdhwesteurope","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"canadacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcanadacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhcanadacentral","name":"policydgnsrdhcanadacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiaeast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliaeast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhbrazilsouth","name":"policydgnsrdhbrazilsouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhsouthcentralus","name":"policydgnsrdhsouthcentralus","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japanwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapanwest/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhjapanwest","name":"policydgnsrdhjapanwest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastasia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"koreacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrkoreacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhkoreacentral","name":"policydgnsrdhkoreacentral","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"northcentralus","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrnorthcentralus/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"uksouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsruksouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhuksouth","name":"policydgnsrdhuksouth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrwestindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"ukwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrukwest/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhukwest","name":"policydgnsrdhukwest","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"japaneast","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrjapaneast/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfulljapaneast","name":"policydgnsrfulljapaneast","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfullsouthindia","name":"policydgnsrfullsouthindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"ukwest","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrukwest/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southindia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthindia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhsouthindia","name":"policydgnsrdhsouthindia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"brazilsouth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrbrazilsouth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastasia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdheastasia","name":"policydgnsrdheastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"australiacentral","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsraustraliacentral/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"westus2","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{},"maintenanceScope":"OSImage","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.maintenance/maintenanceconfigurations/configuration1","name":"configuration1","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southafricanorth","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsouthafricanorth/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhsouthafricanorth","name":"policydgnsrdhsouthafricanorth","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"southeastasia","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrsoutheastasia/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhsoutheastasia","name":"policydgnsrdhsoutheastasia","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedeastus2euap","name":"policydgnsrsharedeastus2euap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrsharedcentraluseuap","name":"policydgnsrsharedcentraluseuap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/Microsoft.Maintenance/maintenanceConfigurations/configjusiever","name":"configjusiever","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/Microsoft.Maintenance/maintenanceConfigurations/configshvenk","name":"configshvenk","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrdheastus2euap","name":"policydgnsrdheastus2euap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/Microsoft.Maintenance/maintenanceConfigurations/policydgnsrfulleastus2euap","name":"policydgnsrfulleastus2euap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedcentraluseuap","name":"policydgnsrsharedcentraluseuap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/Microsoft.Maintenance/maintenanceConfigurations/testARGConfiguration3","name":"testARGConfiguration3","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/Microsoft.Maintenance/maintenanceConfigurations/gautamdPolicy","name":"gautamdPolicy","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrfulleastus2euap","name":"policydgnsrfulleastus2euap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"Host","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrsharedeastus2euap","name":"policydgnsrsharedeastus2euap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdheastus2euap","name":"policydgnsrdheastus2euap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdng","name":"policydgnsrdng","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"centraluseuap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsrcentraluseuap/providers/microsoft.maintenance/maintenanceconfigurations/policydgnsrdhcentraluseuap","name":"policydgnsrdhcentraluseuap","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{},"maintenanceScope":"All","visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dgnsreastus2euap/providers/microsoft.maintenance/maintenanceconfigurations/testargconfiguration9","name":"testARGConfiguration9","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"extensionProperties":{"publicMaintenanceConfigurationId":"soniasql","isAvailable":"false"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-08-19 + 03:00","expirationDateTime":"9999-12-31 23:59","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Public"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/soniasql","name":"soniasql","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{"publicMaintenanceConfigurationId":"sqlcli","isAvailable":"true"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Public"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/sqlcli","name":"sqlcli","type":"Microsoft.Maintenance/maintenanceConfigurations"},{"location":"eastus2euap","tags":{},"properties":{"namespace":"Microsoft.Maintenance","extensionProperties":{"publicMaintenanceConfigurationId":"[''sqlcliv2'']","isAvailable":"[''true'']"},"maintenanceScope":"SQLDB","maintenanceWindow":{"startDateTime":"2020-09-30 + 08:00","expirationDateTime":"9999-12-31 00:00","duration":"05:00","timeZone":"Pacific + Standard Time","recurEvery":"Day"},"visibility":"Custom"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/sqlcliv2","name":"sqlcliv2","type":"Microsoft.Maintenance/maintenanceConfigurations"}]}' + headers: + cache-control: + - no-cache + content-length: + - '85789' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:28:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - 353e354e-8afa-4a30-adc4-e14973858135 + - 353e354e-8afa-4a30-adc4-e14973858135 + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "properties": {"namespace": "Microsoft.Maintenance", + "maintenanceScope": "OSImage", "visibility": "Custom", "maintenanceWindow": + {"startDateTime": "2020-09-30 08:00", "expirationDateTime": "9999-12-31 00:00", + "duration": "05:00", "timeZone": "Pacific Standard Time", "recurEvery": "Month + Third Sunday"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration update + Connection: + - keep-alive + Content-Length: + - '328' + Content-Type: + - application/json + ParameterSetName: + - --location --maintenance-scope --maintenance-window-duration --maintenance-window-expiration-date-time + --maintenance-window-recur-every --maintenance-window-start-date-time --maintenance-window-time-zone + --namespace --visibility --resource-group --resource-name + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"properties\": + {\r\n \"namespace\": \"Microsoft.Maintenance\",\r\n \"extensionProperties\": + {},\r\n \"maintenanceScope\": \"OSImage\",\r\n \"maintenanceWindow\": + {\r\n \"startDateTime\": \"2020-09-30 08:00\",\r\n \"expirationDateTime\": + \"9999-12-31 00:00\",\r\n \"duration\": \"05:00\",\r\n \"timeZone\": + \"Pacific Standard Time\",\r\n \"recurEvery\": \"Month Third Sunday\"\r\n + \ },\r\n \"visibility\": \"Custom\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.maintenance/maintenanceconfigurations/configuration1\",\r\n + \ \"name\": \"configuration1\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '770' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:29:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance assignment create + Connection: + - keep-alive + ParameterSetName: + - --maintenance-configuration-id --provider-name --resource-group --resource-name + --name --resource-type + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.11.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2020-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-09-02T02:22:02Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:29:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "properties": {"maintenanceConfigurationId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance assignment create + Connection: + - keep-alive + Content-Length: + - '287' + Content-Type: + - application/json + ParameterSetName: + - --maintenance-configuration-id --provider-name --resource-group --resource-name + --name --resource-type + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/configurationAssignments/configuration1?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"maintenanceConfigurationId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1\",\r\n + \ \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.compute/virtualmachinescalesets/clitestvmss\"\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.compute/virtualmachinescalesets/clitestvmss/providers/Microsoft.Maintenance/configurationAssignments/configuration1\",\r\n + \ \"name\": \"configuration1\",\r\n \"type\": \"Microsoft.Maintenance/configurationAssignments\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '916' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:29:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance assignment list + Connection: + - keep-alive + ParameterSetName: + - --provider-name --resource-group --resource-name --resource-type + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/configurationAssignments?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"maintenanceConfigurationId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1\"\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/configurationAssignments/configuration1\",\r\n + \ \"name\": \"configuration1\",\r\n \"type\": \"Microsoft.Maintenance/configurationAssignments\"\r\n + \ }\r\n ]\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '719' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:29:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance public-configuration show + Connection: + - keep-alive + ParameterSetName: + - --resource-name + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/sql2?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"properties\": + {\r\n \"extensionProperties\": {\r\n \"publicMaintenanceConfigurationId\": + \"sql2\",\r\n \"isAvailable\": \"true\"\r\n },\r\n \"maintenanceScope\": + \"SQLDB\",\r\n \"maintenanceWindow\": {\r\n \"startDateTime\": \"2020-08-12 + 03:00\",\r\n \"expirationDateTime\": \"9999-12-31 23:59\",\r\n \"duration\": + \"05:00\",\r\n \"timeZone\": \"Pacific Standard Time\",\r\n \"recurEvery\": + \"Day\"\r\n },\r\n \"visibility\": \"Public\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/smdtest/providers/microsoft.maintenance/maintenanceconfigurations/sql2\",\r\n + \ \"name\": \"sql2\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '712' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:29:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance public-configuration list + Connection: + - keep-alive + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Maintenance/publicMaintenanceConfigurations?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"value\": [\r\n {\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"extensionProperties\": + {\r\n \"publicMaintenanceConfigurationId\": \"sql2\",\r\n \"isAvailable\": + \"true\"\r\n },\r\n \"maintenanceScope\": \"SQLDB\",\r\n \"maintenanceWindow\": + {\r\n \"startDateTime\": \"2020-08-12 03:00\",\r\n \"expirationDateTime\": + \"9999-12-31 23:59\",\r\n \"duration\": \"05:00\",\r\n \"timeZone\": + \"Pacific Standard Time\",\r\n \"recurEvery\": \"Day\"\r\n },\r\n + \ \"visibility\": \"Public\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/smdtest/providers/microsoft.maintenance/maintenanceconfigurations/sql2\",\r\n + \ \"name\": \"sql2\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n + \ },\r\n {\r\n \"location\": \"eastus2euap\",\r\n \"tags\": + {},\r\n \"properties\": {\r\n \"extensionProperties\": {\r\n \"publicMaintenanceConfigurationId\": + \"randomc\",\r\n \"isAvailable\": \"true\"\r\n },\r\n \"maintenanceScope\": + \"SQLDB\",\r\n \"maintenanceWindow\": {\r\n \"startDateTime\": + \"2020-08-13 03:00\",\r\n \"expirationDateTime\": \"9999-12-31 23:59\",\r\n + \ \"duration\": \"05:00\",\r\n \"timeZone\": \"Pacific Standard + Time\",\r\n \"recurEvery\": \"Day\"\r\n },\r\n \"visibility\": + \"Public\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/smdtest/providers/microsoft.maintenance/maintenanceconfigurations/randomc\",\r\n + \ \"name\": \"randomc\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n + \ },\r\n {\r\n \"location\": \"eastus2euap\",\r\n \"tags\": + {},\r\n \"properties\": {\r\n \"namespace\": \"Microsoft.Maintenance\",\r\n + \ \"extensionProperties\": {\r\n \"publicMaintenanceConfigurationId\": + \"sqlcli\",\r\n \"isAvailable\": \"true\"\r\n },\r\n \"maintenanceScope\": + \"SQLDB\",\r\n \"maintenanceWindow\": {\r\n \"startDateTime\": + \"2020-09-30 08:00\",\r\n \"expirationDateTime\": \"9999-12-31 00:00\",\r\n + \ \"duration\": \"05:00\",\r\n \"timeZone\": \"Pacific Standard + Time\",\r\n \"recurEvery\": \"Day\"\r\n },\r\n \"visibility\": + \"Public\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/schedulerrg/providers/microsoft.maintenance/maintenanceconfigurations/sqlcli\",\r\n + \ \"name\": \"sqlcli\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n + \ }\r\n ]\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2497' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:29:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance update list + Connection: + - keep-alive + ParameterSetName: + - --provider-name --resource-group --resource-name --resource-type + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/updates?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"value\": []\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '19' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:29:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance applyupdate create + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --provider-name --resource-group --resource-name --resource-type + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/applyUpdates/default?api-version=2020-07-01-preview + response: + body: + string: 'null' + headers: + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:29:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance applyupdate show + Connection: + - keep-alive + ParameterSetName: + - --name --provider-name --resource-group --resource-name --resource-type + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/applyUpdates/default?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"status\": \"Completed\",\r\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss\",\r\n + \ \"lastUpdateTime\": \"0001-01-01T00:00:00\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/applyUpdates/default\",\r\n + \ \"name\": \"default\",\r\n \"type\": \"Microsoft.Maintenance/applyUpdates\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '673' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:29:08 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance assignment delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --provider-name --resource-group --resource-name --resource-type --yes + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss/providers/Microsoft.Maintenance/configurationAssignments/configuration1?api-version=2020-07-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 02:29:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --resource-name --yes + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1?api-version=2020-07-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 02:29:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2euap", "properties": {"namespace": "Microsoft.Maintenance", + "extensionProperties": {"publicMaintenanceConfigurationId": "sqlcli", "isAvailable": + "true"}, "maintenanceScope": "SQLDB", "visibility": "Public", "maintenanceWindow": + {"startDateTime": "2020-09-30 08:00", "expirationDateTime": "9999-12-31 00:00", + "duration": "05:00", "timeZone": "Pacific Standard Time", "recurEvery": "Day"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration create + Connection: + - keep-alive + Content-Length: + - '409' + Content-Type: + - application/json + ParameterSetName: + - --location --maintenance-scope --maintenance-window-duration --maintenance-window-expiration-date-time + --maintenance-window-recur-every --maintenance-window-start-date-time --maintenance-window-time-zone + --namespace --visibility --resource-group --resource-name --extension-properties + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/sqlcli?api-version=2020-07-01-preview + response: + body: + string: "{\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"properties\": + {\r\n \"namespace\": \"Microsoft.Maintenance\",\r\n \"extensionProperties\": + {\r\n \"publicMaintenanceConfigurationId\": \"sqlcli\",\r\n \"isAvailable\": + \"true\"\r\n },\r\n \"maintenanceScope\": \"SQLDB\",\r\n \"maintenanceWindow\": + {\r\n \"startDateTime\": \"2020-09-30 08:00\",\r\n \"expirationDateTime\": + \"9999-12-31 00:00\",\r\n \"duration\": \"05:00\",\r\n \"timeZone\": + \"Pacific Standard Time\",\r\n \"recurEvery\": \"Day\"\r\n },\r\n + \ \"visibility\": \"Public\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/sqlcli\",\r\n + \ \"name\": \"sqlcli\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '829' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:29:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maintenance configuration delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --resource-name --yes + User-Agent: + - AZURECLI/2.11.1 azsdk-python-maintenanceclient/unknown Python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Maintenance/maintenanceConfigurations/sqlcli?api-version=2020-07-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 02:29:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-compute/13.0.0 Azure-SDK-For-Python AZURECLI/2.11.1 + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachineScaleSets/clitestvmss?api-version=2020-06-01 + response: + body: + string: '' + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/d9809f49-c6cd-4959-aaa1-8fde960349cd?api-version=2020-06-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 02:29:28 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/d9809f49-c6cd-4959-aaa1-8fde960349cd?monitor=true&api-version=2020-06-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/DeleteVMScaleSet3Min;79,Microsoft.Compute/DeleteVMScaleSet30Min;397,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;1199,Microsoft.Compute/VmssQueuedVMOperations;4799 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-ms-request-charge: + - '1' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss delete + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-compute/13.0.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/d9809f49-c6cd-4959-aaa1-8fde960349cd?api-version=2020-06-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-09-02T02:29:28.1762407+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"d9809f49-c6cd-4959-aaa1-8fde960349cd\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:29:38 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14997,Microsoft.Compute/GetOperation30Min;29969 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss delete + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-compute/13.0.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/d9809f49-c6cd-4959-aaa1-8fde960349cd?api-version=2020-06-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-09-02T02:29:28.1762407+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"d9809f49-c6cd-4959-aaa1-8fde960349cd\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:29:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29968 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss delete + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - python/3.7.6 (Linux-4.19.76-linuxkit-x86_64-with-debian-10.3) msrest/0.6.18 + msrest_azure/0.6.4 azure-mgmt-compute/13.0.0 Azure-SDK-For-Python AZURECLI/2.11.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/d9809f49-c6cd-4959-aaa1-8fde960349cd?api-version=2020-06-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-09-02T02:29:28.1762407+00:00\",\r\n \"endTime\": + \"2020-09-02T02:30:04.5825072+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"d9809f49-c6cd-4959-aaa1-8fde960349cd\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 02 Sep 2020 02:30:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29971 + status: + code: 200 + message: OK +version: 1 diff --git a/src/maintenance/azext_maintenance/tests/latest/recordings/test_maintenance_commands.yaml b/src/maintenance/azext_maintenance/tests/latest/recordings/test_maintenance_commands.yaml deleted file mode 100644 index 75ea072b4ab..00000000000 --- a/src/maintenance/azext_maintenance/tests/latest/recordings/test_maintenance_commands.yaml +++ /dev/null @@ -1,344 +0,0 @@ -interactions: -- request: - body: !!python/unicode '{"location": "westus", "tags": {"date": "2018-04-18T06:43:11Z", - "product": "azurecli", "cause": "automation"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group create] - Connection: [keep-alive] - Content-Length: ['110'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 resourcemanagementclient/1.2.1 Azure-SDK-For-Python - AZURECLI/2.0.32] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 - response: - body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"date":"2018-04-18T06:43:11Z","product":"azurecli","cause":"automation"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['274'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 06:43:16 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1185'] - status: {code: 201, message: Created} -- request: - body: !!python/unicode '{"sku": {"capacity": 1, "name": "Basic_DS2"}, "tags": - {"key": "value"}, "location": "eastus", "properties": {}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - Content-Length: ['111'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Creating","externalIP":null,"hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['507'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 06:43:22 GMT'] - expires: ['-1'] - location: ['/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1136'] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Creating","externalIP":null,"hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['507'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 06:43:54 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Creating","externalIP":null,"hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['507'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 06:44:24 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Creating","externalIP":"52.186.14.213","hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['518'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 06:44:56 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Creating","externalIP":"52.186.14.213","hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['518'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 06:45:27 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Succeeded","externalIP":"52.186.14.213","hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['519'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 06:45:57 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr show] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Succeeded","externalIP":"52.186.14.213","hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['519'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 06:46:00 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr list] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"value":[{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Succeeded","externalIP":"52.186.14.213","hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}]}'} - headers: - cache-control: [no-cache] - content-length: ['531'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 06:46:01 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr key list] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - accept-language: [en-US] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002/listKeys?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"primaryKey":"jcDZZ4MraKySuGlDHIQ7Risc4xnTyN3dEjy4lZFFnVk=","secondaryKey":"A4oMGrPpHOK7/CwumXobfiDVuWRpmvNpeYCDgWtxkjk="}'} - headers: - cache-control: [no-cache] - content-length: ['123'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 06:46:03 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1140'] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: !!python/unicode '{"keyType": "Secondary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr key renew] - Connection: [keep-alive] - Content-Length: ['24'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - accept-language: [en-US] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002/regenerateKey?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"primaryKey":"jcDZZ4MraKySuGlDHIQ7Risc4xnTyN3dEjy4lZFFnVk=","secondaryKey":"RzZiqdcre3PMa/77KfphUUnG+Ikgz+g2e2r+3ss6JPk="}'} - headers: - cache-control: [no-cache] - content-length: ['123'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 06:46:05 GMT'] - expires: ['-1'] - location: ['https://signalrprod.eastus.cloudapp.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/operationResults/signalr000002/operationresult/43c2cf59-a595-4fe2-9695-d8d1975ea89b?api-version=2018-03-01-preview'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1139'] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group delete] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 resourcemanagementclient/1.2.1 Azure-SDK-For-Python - AZURECLI/2.0.32] - accept-language: [en-US] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 - response: - body: {string: !!python/unicode ''} - headers: - cache-control: [no-cache] - content-length: ['0'] - date: ['Wed, 18 Apr 2018 06:46:08 GMT'] - expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkczNEM0V0hXU0pKLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1195'] - status: {code: 202, message: Accepted} -version: 1 diff --git a/src/maintenance/azext_maintenance/tests/latest/recordings/test_maintenance_configuration_create.yaml b/src/maintenance/azext_maintenance/tests/latest/recordings/test_maintenance_configuration_create.yaml deleted file mode 100644 index 13cc85e7dd2..00000000000 --- a/src/maintenance/azext_maintenance/tests/latest/recordings/test_maintenance_configuration_create.yaml +++ /dev/null @@ -1,371 +0,0 @@ -interactions: -- request: - body: !!python/unicode '{"location": "westus", "tags": {"date": "2018-04-18T03:06:18Z", - "product": "azurecli", "cause": "automation"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group create] - Connection: [keep-alive] - Content-Length: ['110'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 resourcemanagementclient/1.2.1 Azure-SDK-For-Python - AZURECLI/2.0.32] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 - response: - body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"date":"2018-04-18T03:06:18Z","product":"azurecli","cause":"automation"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['274'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 03:06:21 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1138'] - status: {code: 201, message: Created} -- request: - body: !!python/unicode '{"sku": {"capacity": 1, "name": "Basic_DS2"}, "tags": - {"key": "value"}, "location": "eastus", "properties": {}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - Content-Length: ['111'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Creating","externalIP":null,"hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['507'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 03:06:26 GMT'] - expires: ['-1'] - location: ['/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Creating","externalIP":null,"hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['507'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 03:06:57 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Creating","externalIP":null,"hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['507'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 03:07:28 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Creating","externalIP":null,"hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['507'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 03:07:59 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Creating","externalIP":"13.82.48.132","hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['517'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 03:08:30 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Creating","externalIP":"13.82.48.132","hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['517'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 03:09:00 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr create] - Connection: [keep-alive] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Succeeded","externalIP":"13.82.48.132","hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['518'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 03:09:31 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr show] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Succeeded","externalIP":"13.82.48.132","hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}'} - headers: - cache-control: [no-cache] - content-length: ['518'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 03:09:34 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr list] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"value":[{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Succeeded","externalIP":"13.82.48.132","hostName":"signalr000002.service.signalr.net","publicPort":5001,"serverPort":5002,"hostNamePrefix":null},"location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}]}'} - headers: - cache-control: [no-cache] - content-length: ['530'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 03:11:14 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr key list] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - accept-language: [en-US] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002/listKeys?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"primaryKey":"K96MqMucgXF3mcTj7oFjLiiQMRPjl5+wuTAeyntEK/w=","secondaryKey":"vAV/BSQGrA81JfPzi14bsdi9wc2EV8xgis6JruMzo94="}'} - headers: - cache-control: [no-cache] - content-length: ['123'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 03:11:16 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 200, message: OK} -- request: - body: !!python/unicode '{"keyType": "Secondary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [signalr key renew] - Connection: [keep-alive] - Content-Length: ['24'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 azure-mgmt-signalr/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.32] - accept-language: [en-US] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002/regenerateKey?api-version=2018-03-01-preview - response: - body: {string: !!python/unicode '{"primaryKey":"K96MqMucgXF3mcTj7oFjLiiQMRPjl5+wuTAeyntEK/w=","secondaryKey":"KAV5MtQTW/gXbNgEkcnluIuQLDqU7Ecpy1ljDtvOxi8="}'} - headers: - cache-control: [no-cache] - content-length: ['123'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 18 Apr 2018 03:11:18 GMT'] - expires: ['-1'] - location: ['https://signalrprod.eastus.cloudapp.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/operationResults/signalr000002/operationresult/22a6ffbd-e942-4f69-8de4-150feefbcea0?api-version=2018-03-01-preview'] - pragma: [no-cache] - server: [Kestrel] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1137'] - x-rp-server-mvid: [ce49f4a3-7c3a-4945-9c5c-73aa4062a6ec] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group delete] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.14 (Windows-10-10.0.17133) requests/2.18.4 msrest/0.4.27 - msrest_azure/0.4.25 resourcemanagementclient/1.2.1 Azure-SDK-For-Python - AZURECLI/2.0.32] - accept-language: [en-US] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 - response: - body: {string: !!python/unicode ''} - headers: - cache-control: [no-cache] - content-length: ['0'] - date: ['Wed, 18 Apr 2018 03:11:20 GMT'] - expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkc3WjY0N0JCT1NGLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 202, message: Accepted} -version: 1 diff --git a/src/maintenance/azext_maintenance/tests/latest/recordings/test_signalr_commands.yaml b/src/maintenance/azext_maintenance/tests/latest/recordings/test_signalr_commands.yaml deleted file mode 100644 index 2ec4d24de82..00000000000 --- a/src/maintenance/azext_maintenance/tests/latest/recordings/test_signalr_commands.yaml +++ /dev/null @@ -1,521 +0,0 @@ -interactions: -- request: - body: '{"location": "eastus", "tags": {"key": "value"}, "sku": {"name": "Basic_DS2", - "capacity": 1}, "properties": {"hostNamePrefix": "signalr000002", "features": - [{"flag": "ServiceMode", "value": "Default"}], "cors": {}, "networkACLs": {"defaultAction": - "Allow"}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - signalr create - Connection: - - keep-alive - Content-Length: - - '261' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -n -g --sku --unit-count -l --tags - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-signalr/0.4.0 - Azure-SDK-For-Python AZURECLI/2.10.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/signalR/signalr000002?api-version=2020-05-01 - response: - body: - string: '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Creating","externalIP":null,"hostName":"signalr000002.service.signalr.net","publicPort":443,"serverPort":443,"version":"1.0-preview","privateEndpointConnections":[],"hostNamePrefix":"signalr000002","features":[{"flag":"ServiceMode","value":"Default","properties":{}},{"flag":"EnableConnectivityLogs","value":"False","properties":{}},{"flag":"EnableMessagingLogs","value":"False","properties":{}}],"cors":{"allowedOrigins":["*"]},"upstream":{"templates":null},"networkACLs":{"defaultAction":"Allow","publicNetwork":{"allow":["ServerConnection","ClientConnection","RESTAPI"],"deny":null},"privateEndpoints":[]}},"kind":"SignalR","location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/locations/eastus/operationStatuses/signalr000002/operationId/4ae0cfb4-8675-4b87-a9cc-a037338222a0?api-version=2020-05-01 - cache-control: - - no-cache - content-length: - - '1003' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 17 Aug 2020 08:35:17 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/locations/eastus/operationResults/4ae0cfb4-8675-4b87-a9cc-a037338222a0/SignalR/signalr000002?api-version=2020-05-01 - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1190' - x-rp-server-mvid: - - 550a765b-13c2-41b5-b121-6b740f4e6137 - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - signalr create - Connection: - - keep-alive - ParameterSetName: - - -n -g --sku --unit-count -l --tags - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-signalr/0.4.0 - Azure-SDK-For-Python AZURECLI/2.10.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/locations/eastus/operationStatuses/signalr000002/operationId/4ae0cfb4-8675-4b87-a9cc-a037338222a0?api-version=2020-05-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/locations/eastus/operationStatuses/signalr000002/operationId/4ae0cfb4-8675-4b87-a9cc-a037338222a0","name":"4ae0cfb4-8675-4b87-a9cc-a037338222a0","status":"Running","startTime":"2020-08-17T08:35:15.5035921Z"}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 17 Aug 2020 08:35:48 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-rp-server-mvid: - - 550a765b-13c2-41b5-b121-6b740f4e6137 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - signalr create - Connection: - - keep-alive - ParameterSetName: - - -n -g --sku --unit-count -l --tags - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-signalr/0.4.0 - Azure-SDK-For-Python AZURECLI/2.10.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/locations/eastus/operationStatuses/signalr000002/operationId/4ae0cfb4-8675-4b87-a9cc-a037338222a0?api-version=2020-05-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/locations/eastus/operationStatuses/signalr000002/operationId/4ae0cfb4-8675-4b87-a9cc-a037338222a0","name":"4ae0cfb4-8675-4b87-a9cc-a037338222a0","status":"Running","startTime":"2020-08-17T08:35:15.5035921Z"}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 17 Aug 2020 08:36:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-rp-server-mvid: - - 550a765b-13c2-41b5-b121-6b740f4e6137 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - signalr create - Connection: - - keep-alive - ParameterSetName: - - -n -g --sku --unit-count -l --tags - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-signalr/0.4.0 - Azure-SDK-For-Python AZURECLI/2.10.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/locations/eastus/operationStatuses/signalr000002/operationId/4ae0cfb4-8675-4b87-a9cc-a037338222a0?api-version=2020-05-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/locations/eastus/operationStatuses/signalr000002/operationId/4ae0cfb4-8675-4b87-a9cc-a037338222a0","name":"4ae0cfb4-8675-4b87-a9cc-a037338222a0","status":"Running","startTime":"2020-08-17T08:35:15.5035921Z"}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 17 Aug 2020 08:36:48 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-rp-server-mvid: - - 550a765b-13c2-41b5-b121-6b740f4e6137 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - signalr create - Connection: - - keep-alive - ParameterSetName: - - -n -g --sku --unit-count -l --tags - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-signalr/0.4.0 - Azure-SDK-For-Python AZURECLI/2.10.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/locations/eastus/operationStatuses/signalr000002/operationId/4ae0cfb4-8675-4b87-a9cc-a037338222a0?api-version=2020-05-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/locations/eastus/operationStatuses/signalr000002/operationId/4ae0cfb4-8675-4b87-a9cc-a037338222a0","name":"4ae0cfb4-8675-4b87-a9cc-a037338222a0","status":"Succeeded","startTime":"2020-08-17T08:35:15.5035921Z","endTime":"2020-08-17T08:37:05.3340704Z"}' - headers: - cache-control: - - no-cache - content-length: - - '383' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 17 Aug 2020 08:37:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-rp-server-mvid: - - 550a765b-13c2-41b5-b121-6b740f4e6137 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - signalr create - Connection: - - keep-alive - ParameterSetName: - - -n -g --sku --unit-count -l --tags - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-signalr/0.4.0 - Azure-SDK-For-Python AZURECLI/2.10.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/signalR/signalr000002?api-version=2020-05-01 - response: - body: - string: '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Succeeded","externalIP":"40.71.15.8","hostName":"signalr000002.service.signalr.net","publicPort":443,"serverPort":443,"version":"1.0","privateEndpointConnections":[],"hostNamePrefix":"signalr000002","features":[{"flag":"ServiceMode","value":"Default","properties":{}},{"flag":"EnableConnectivityLogs","value":"False","properties":{}},{"flag":"EnableMessagingLogs","value":"False","properties":{}}],"cors":{"allowedOrigins":["*"]},"upstream":{"templates":null},"networkACLs":{"defaultAction":"Allow","publicNetwork":{"allow":["ServerConnection","ClientConnection","RESTAPI"],"deny":null},"privateEndpoints":[]}},"kind":"SignalR","location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}' - headers: - cache-control: - - no-cache - content-length: - - '1004' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 17 Aug 2020 08:37:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-rp-server-mvid: - - 550a765b-13c2-41b5-b121-6b740f4e6137 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - signalr show - Connection: - - keep-alive - ParameterSetName: - - -n -g - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-signalr/0.4.0 - Azure-SDK-For-Python AZURECLI/2.10.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/signalR/signalr000002?api-version=2020-05-01 - response: - body: - string: '{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Succeeded","externalIP":"40.71.15.8","hostName":"signalr000002.service.signalr.net","publicPort":443,"serverPort":443,"version":"1.0","privateEndpointConnections":[],"hostNamePrefix":"signalr000002","features":[{"flag":"ServiceMode","value":"Default","properties":{}},{"flag":"EnableConnectivityLogs","value":"False","properties":{}},{"flag":"EnableMessagingLogs","value":"False","properties":{}}],"cors":{"allowedOrigins":["*"]},"upstream":{"templates":null},"networkACLs":{"defaultAction":"Allow","publicNetwork":{"allow":["ServerConnection","ClientConnection","RESTAPI"],"deny":null},"privateEndpoints":[]}},"kind":"SignalR","location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}' - headers: - cache-control: - - no-cache - content-length: - - '1004' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 17 Aug 2020 08:37:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-rp-server-mvid: - - 550a765b-13c2-41b5-b121-6b740f4e6137 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - signalr list - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-signalr/0.4.0 - Azure-SDK-For-Python AZURECLI/2.10.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/signalR?api-version=2020-05-01 - response: - body: - string: '{"value":[{"sku":{"name":"Basic_DS2","tier":"Basic","size":"DS2","capacity":1},"properties":{"provisioningState":"Succeeded","externalIP":"40.71.15.8","hostName":"signalr000002.service.signalr.net","publicPort":443,"serverPort":443,"version":"1.0","privateEndpointConnections":[],"hostNamePrefix":"signalr000002","features":[{"flag":"ServiceMode","value":"Default","properties":{}},{"flag":"EnableConnectivityLogs","value":"False","properties":{}},{"flag":"EnableMessagingLogs","value":"False","properties":{}}],"cors":{"allowedOrigins":["*"]},"upstream":{"templates":null},"networkACLs":{"defaultAction":"Allow","publicNetwork":{"allow":["ServerConnection","ClientConnection","RESTAPI"],"deny":null},"privateEndpoints":[]}},"kind":"SignalR","location":"eastus","tags":{"key":"value"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/SignalR/signalr000002","name":"signalr000002","type":"Microsoft.SignalRService/SignalR"}]}' - headers: - cache-control: - - no-cache - content-length: - - '1016' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 17 Aug 2020 08:37:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-rp-server-mvid: - - 550a765b-13c2-41b5-b121-6b740f4e6137 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - signalr key list - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -n -g - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-signalr/0.4.0 - Azure-SDK-For-Python AZURECLI/2.10.0 - accept-language: - - en-US - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/signalR/signalr000002/listKeys?api-version=2020-05-01 - response: - body: - string: '{"primaryKey":"ywm2SYPFAQxFWdua3j6ftjyyy8n3O04PC9mAw2Q9UTM=","secondaryKey":"NoqGPOQxGoCFgirJFf522a9qiMvZeoOmqAwqwppu7IU=","primaryConnectionString":"Endpoint=https://signalr000002.service.signalr.net;AccessKey=ywm2SYPFAQxFWdua3j6ftjyyy8n3O04PC9mAw2Q9UTM=;Version=1.0;","secondaryConnectionString":"Endpoint=https://signalr000002.service.signalr.net;AccessKey=NoqGPOQxGoCFgirJFf522a9qiMvZeoOmqAwqwppu7IU=;Version=1.0;"}' - headers: - cache-control: - - no-cache - content-length: - - '425' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 17 Aug 2020 08:37:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - x-rp-server-mvid: - - 550a765b-13c2-41b5-b121-6b740f4e6137 - status: - code: 200 - message: OK -- request: - body: '{"keyType": "Secondary"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - signalr key renew - Connection: - - keep-alive - Content-Length: - - '24' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -n -g --key-type - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-signalr/0.4.0 - Azure-SDK-For-Python AZURECLI/2.10.0 - accept-language: - - en-US - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/signalR/signalr000002/regenerateKey?api-version=2020-05-01 - response: - body: - string: '{"primaryKey":"ywm2SYPFAQxFWdua3j6ftjyyy8n3O04PC9mAw2Q9UTM=","secondaryKey":"eYJNextta8yAw5JSCV6eFXa46VKaNH6FcRRYHBPzRpA=","primaryConnectionString":"Endpoint=https://signalr000002.service.signalr.net;AccessKey=ywm2SYPFAQxFWdua3j6ftjyyy8n3O04PC9mAw2Q9UTM=;Version=1.0;","secondaryConnectionString":"Endpoint=https://signalr000002.service.signalr.net;AccessKey=eYJNextta8yAw5JSCV6eFXa46VKaNH6FcRRYHBPzRpA=;Version=1.0;"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/locations/eastus/operationStatuses/signalr000002/operationId/f3e9b871-eb7f-4efb-ab57-dec623a13807?api-version=2020-05-01 - cache-control: - - no-cache - content-length: - - '425' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 17 Aug 2020 08:37:25 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.SignalRService/locations/eastus/operationResults/f3e9b871-eb7f-4efb-ab57-dec623a13807/SignalR/signalr000002?api-version=2020-05-01 - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-rp-server-mvid: - - 550a765b-13c2-41b5-b121-6b740f4e6137 - status: - code: 201 - message: Created -version: 1 diff --git a/src/maintenance/azext_maintenance/tests/latest/test_maintenance_commands.py b/src/maintenance/azext_maintenance/tests/latest/test_maintenance_commands.py deleted file mode 100644 index 3fcbc4d55b8..00000000000 --- a/src/maintenance/azext_maintenance/tests/latest/test_maintenance_commands.py +++ /dev/null @@ -1,79 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import time -import unittest -from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer - - -class AzureMaintenanceScenarioTest(ScenarioTest): - @ResourceGroupPreparer(random_name_length=20) - def test_signalr_commands(self, resource_group): - signalr_name = self.create_random_name('signalr', 16) - sku = 'Basic_DS2' - unit_count = 1 - location = 'eastus' - tags_key = 'key' - tags_val = 'value' - - self.kwargs.update({ - 'location': location, - 'signalr_name': signalr_name, - 'sku': sku, - 'unit_count': unit_count, - 'tags': '{}={}'.format(tags_key, tags_val) - }) - - # Test create - self.cmd('az signalr create -n {signalr_name} -g {rg} --sku {sku} --unit-count {unit_count} -l {location} --tags {tags}', - checks=[ - self.check('name', '{signalr_name}'), - self.check('location', '{location}'), - self.check('provisioningState', 'Succeeded'), - self.check('sku.name', '{sku}'), - self.check('sku.capacity', '{unit_count}'), - self.check('tags.{}'.format(tags_key), tags_val), - self.exists('hostName'), - self.exists('publicPort'), - self.exists('serverPort'), - ]) - - # Test show - self.cmd('az signalr show -n {signalr_name} -g {rg}', checks=[ - self.check('name', '{signalr_name}'), - self.check('location', '{location}'), - self.check('provisioningState', 'Succeeded'), - self.check('sku.name', '{sku}'), - self.check('sku.capacity', '{unit_count}'), - self.exists('hostName'), - self.exists('publicPort'), - self.exists('serverPort'), - self.exists('externalIp') - ]) - - # Test list - self.cmd('az signalr list -g {rg}', checks=[ - self.check('[0].name', '{signalr_name}'), - self.check('[0].location', '{location}'), - self.check('[0].provisioningState', 'Succeeded'), - self.check('[0].sku.name', '{sku}'), - self.check('[0].sku.capacity', '{unit_count}'), - self.exists('[0].hostName'), - self.exists('[0].publicPort'), - self.exists('[0].serverPort'), - self.exists('[0].externalIp') - ]) - - # Test key list - self.cmd('az signalr key list -n {signalr_name} -g {rg}', checks=[ - self.exists('primaryKey'), - self.exists('secondaryKey') - ]) - - # Test key renew - self.cmd('az signalr key renew -n {signalr_name} -g {rg} --key-type secondary', checks=[ - self.exists('primaryKey'), - self.exists('secondaryKey') - ]) diff --git a/src/maintenance/azext_maintenance/tests/latest/test_maintenance_scenario.py b/src/maintenance/azext_maintenance/tests/latest/test_maintenance_scenario.py new file mode 100644 index 00000000000..aba6a30c112 --- /dev/null +++ b/src/maintenance/azext_maintenance/tests/latest/test_maintenance_scenario.py @@ -0,0 +1,305 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import os +from azure.cli.testsdk import ScenarioTest +from .. import try_manual, raise_if, calc_coverage +from azure.cli.testsdk import ResourceGroupPreparer + + +TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + + +@try_manual +def setup(test, rg): + pass + + +# EXAMPLE: /ApplyUpdates/put/ApplyUpdates_CreateOrUpdate +@try_manual +def step__applyupdates_put_applyupdates_createorupdate(test, rg): + test.cmd('az maintenance applyupdate create ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "smdtest1" ' + '--resource-type "virtualMachineScaleSets"', + checks=[]) + + +# EXAMPLE: /ApplyUpdates/put/ApplyUpdates_CreateOrUpdateParent +@try_manual +def step__applyupdates_put_applyupdates_createorupdateparent(test, rg): + test.cmd('az maintenance applyupdate create ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "smdvm1" ' + '--resource-parent-name "smdtest1" ' + '--resource-parent-type "virtualMachineScaleSets" ' + '--resource-type "virtualMachines"', + checks=[]) + + +# EXAMPLE: /ApplyUpdates/get/ApplyUpdates_Get +@try_manual +def step__applyupdates_get_applyupdates_get(test, rg): + test.cmd('az maintenance applyupdate show ' + '--name "{myApplyUpdate}" ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "smdtest1" ' + '--resource-type "virtualMachineScaleSets"', + checks=[]) + + +# EXAMPLE: /ApplyUpdates/get/ApplyUpdates_GetParent +@try_manual +def step__applyupdates_get_applyupdates_getparent(test, rg): + test.cmd('az maintenance applyupdate get-parent ' + '--name "{myApplyUpdate}" ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "smdvm1" ' + '--resource-parent-name "smdtest1" ' + '--resource-parent-type "virtualMachineScaleSets" ' + '--resource-type "virtualMachines"', + checks=[]) + + +# EXAMPLE: /MaintenanceConfigurations/put/MaintenanceConfigurations_CreateOrUpdateForResource +@try_manual +def step__maintenanceconfigurations_put_maintenanceconfigurations_createorupdateforresource(test, rg): + test.cmd('az maintenance configuration create ' + '--location "westus2" ' + '--maintenance-scope "OSImage" ' + '--maintenance-window-duration "05:00" ' + '--maintenance-window-expiration-date-time "9999-12-31 00:00" ' + '--maintenance-window-recur-every "Day" ' + '--maintenance-window-start-date-time "2020-04-30 08:00" ' + '--maintenance-window-time-zone "Pacific Standard Time" ' + '--namespace "Microsoft.Maintenance" ' + '--visibility "Custom" ' + '--resource-group "{rg}" ' + '--resource-name "{myMaintenanceConfiguration2}"', + checks=[]) + + +# EXAMPLE: /MaintenanceConfigurations/get/MaintenanceConfigurations_GetForResource +@try_manual +def step__maintenanceconfigurations_get_maintenanceconfigurations_getforresource(test, rg): + test.cmd('az maintenance configuration show ' + '--resource-group "{rg}" ' + '--resource-name "{myMaintenanceConfiguration2}"', + checks=[]) + + +# EXAMPLE: /MaintenanceConfigurations/get/MaintenanceConfigurations_List +@try_manual +def step__maintenanceconfigurations_get_maintenanceconfigurations_list(test, rg): + test.cmd('az maintenance configuration list', + checks=[]) + + +# EXAMPLE: /MaintenanceConfigurations/patch/MaintenanceConfigurations_UpdateForResource +@try_manual +def step__maintenanceconfigurations_patch_maintenanceconfigurations_updateforresource(test, rg): + test.cmd('az maintenance configuration update ' + '--location "westus2" ' + '--maintenance-scope "OSImage" ' + '--maintenance-window-duration "05:00" ' + '--maintenance-window-expiration-date-time "9999-12-31 00:00" ' + '--maintenance-window-recur-every "Month Third Sunday" ' + '--maintenance-window-start-date-time "2020-04-30 08:00" ' + '--maintenance-window-time-zone "Pacific Standard Time" ' + '--namespace "Microsoft.Maintenance" ' + '--visibility "Custom" ' + '--resource-group "{rg}" ' + '--resource-name "{myMaintenanceConfiguration2}"', + checks=[]) + + +# EXAMPLE: /ConfigurationAssignments/put/ConfigurationAssignments_CreateOrUpdate +@try_manual +def step__configurationassignments_put_configurationassignments_createorupdate(test, rg): + test.cmd('az maintenance assignment create ' + '--maintenance-configuration-id "/subscriptions/{subscription_id}/resourcegroups/{rg}/providers/Microsoft.' + 'Maintenance/maintenanceConfigurations/{myMaintenanceConfiguration2}" ' + '--name "{myConfigurationAssignment2}" ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "smdtest1" ' + '--resource-type "virtualMachineScaleSets"', + checks=[]) + + +# EXAMPLE: /ConfigurationAssignments/put/ConfigurationAssignments_CreateOrUpdateParent +@try_manual +def step__configurationassignments_put_configurationassignments_createorupdateparent(test, rg): + test.cmd('az maintenance assignment create ' + '--maintenance-configuration-id "/subscriptions/{subscription_id}/resourcegroups/{rg}/providers/Microsoft.' + 'Maintenance/maintenanceConfigurations/{myMaintenanceConfiguration}" ' + '--name "{myConfigurationAssignment}" ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "smdvm1" ' + '--resource-parent-name "smdtest1" ' + '--resource-parent-type "virtualMachineScaleSets" ' + '--resource-type "virtualMachines"', + checks=[]) + + +# EXAMPLE: /ConfigurationAssignments/get/ConfigurationAssignments_List +@try_manual +def step__configurationassignments_get_configurationassignments_list(test, rg): + test.cmd('az maintenance assignment list ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "smdtest1" ' + '--resource-type "virtualMachineScaleSets"', + checks=[]) + + +# EXAMPLE: /ConfigurationAssignments/get/ConfigurationAssignments_ListParent +@try_manual +def step__configurationassignments_get_configurationassignments_listparent(test, rg): + test.cmd('az maintenance assignment list-parent ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "smdtestvm1" ' + '--resource-parent-name "smdtest1" ' + '--resource-parent-type "virtualMachineScaleSets" ' + '--resource-type "virtualMachines"', + checks=[]) + + +# EXAMPLE: /ConfigurationAssignments/delete/ConfigurationAssignments_DeleteParent +@try_manual +def step__configurationassignments_delete_configurationassignments_deleteparent(test, rg): + test.cmd('az maintenance assignment delete -y ' + '--name "{myConfigurationAssignment2}" ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "smdvm1" ' + '--resource-parent-name "smdtest1" ' + '--resource-parent-type "virtualMachineScaleSets" ' + '--resource-type "virtualMachines"', + checks=[]) + + +# EXAMPLE: /PublicMaintenanceConfigurations/get/PublicMaintenanceConfigurations_GetForResource +@try_manual +def step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_getforresource(test, rg): + test.cmd('az maintenance public-configuration show ' + '--resource-name "{myMaintenanceConfiguration2}"', + checks=[]) + + +# EXAMPLE: /PublicMaintenanceConfigurations/get/PublicMaintenanceConfigurations_List +@try_manual +def step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_list(test, rg): + test.cmd('az maintenance public-configuration list', + checks=[]) + + +# EXAMPLE: /Updates/get/Updates_List +@try_manual +def step__updates_get_updates_list(test, rg): + test.cmd('az maintenance update list ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "smdtest1" ' + '--resource-type "virtualMachineScaleSets"', + checks=[]) + + +# EXAMPLE: /Updates/get/Updates_ListParent +@try_manual +def step__updates_get_updates_listparent(test, rg): + test.cmd('az maintenance update list-parent ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "1" ' + '--resource-parent-name "smdtest1" ' + '--resource-parent-type "virtualMachineScaleSets" ' + '--resource-type "virtualMachines"', + checks=[]) + + +# EXAMPLE: /ConfigurationAssignments/delete/ConfigurationAssignments_Delete +@try_manual +def step__configurationassignments_delete_configurationassignments_delete(test, rg): + test.cmd('az maintenance assignment delete -y ' + '--name "{myConfigurationAssignment2}" ' + '--provider-name "Microsoft.Compute" ' + '--resource-group "{rg}" ' + '--resource-name "smdtest1" ' + '--resource-type "virtualMachineScaleSets"', + checks=[]) + + +# EXAMPLE: /MaintenanceConfigurations/delete/MaintenanceConfigurations_DeleteForResource +@try_manual +def step__maintenanceconfigurations_delete_maintenanceconfigurations_deleteforresource(test, rg): + test.cmd('az maintenance configuration delete -y ' + '--resource-group "{rg}" ' + '--resource-name "example1"', + checks=[]) + + +@try_manual +def cleanup(test, rg): + pass + + +@try_manual +def call_scenario(test, rg): + setup(test, rg) + step__applyupdates_put_applyupdates_createorupdate(test, rg) + step__applyupdates_put_applyupdates_createorupdateparent(test, rg) + step__applyupdates_get_applyupdates_get(test, rg) + step__applyupdates_get_applyupdates_getparent(test, rg) + step__maintenanceconfigurations_put_maintenanceconfigurations_createorupdateforresource(test, rg) + step__maintenanceconfigurations_get_maintenanceconfigurations_getforresource(test, rg) + step__maintenanceconfigurations_get_maintenanceconfigurations_list(test, rg) + step__maintenanceconfigurations_patch_maintenanceconfigurations_updateforresource(test, rg) + step__configurationassignments_put_configurationassignments_createorupdate(test, rg) + step__configurationassignments_put_configurationassignments_createorupdateparent(test, rg) + step__configurationassignments_get_configurationassignments_list(test, rg) + step__configurationassignments_get_configurationassignments_listparent(test, rg) + step__configurationassignments_delete_configurationassignments_deleteparent(test, rg) + step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_getforresource(test, rg) + step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_list(test, rg) + step__updates_get_updates_list(test, rg) + step__updates_get_updates_listparent(test, rg) + step__configurationassignments_delete_configurationassignments_delete(test, rg) + step__maintenanceconfigurations_delete_maintenanceconfigurations_deleteforresource(test, rg) + cleanup(test, rg) + + +@try_manual +class MaintenanceClientScenarioTest(ScenarioTest): + + @ResourceGroupPreparer(name_prefix='clitestmaintenance_examplerg'[:7], key='rg', parameter_name='rg') + def test_maintenance(self, rg): + + self.kwargs.update({ + 'subscription_id': self.get_subscription_id() + }) + + self.kwargs.update({ + 'e9b9685d-78e4-44c4-a81c-64a14f9b87b6': 'e9b9685d-78e4-44c4-a81c-64a14f9b87b6', + 'policy1': 'policy1', + 'MaintenanceConfigurations_2': 'configuration1', + 'workervmConfiguration': 'workervmConfiguration', + 'ConfigurationAssignments_2': 'workervmPolicy', + }) + + call_scenario(self, rg) + calc_coverage(__file__) + raise_if() diff --git a/src/maintenance/azext_maintenance/tests/latest/test_maintenance_scenario_coverage.md b/src/maintenance/azext_maintenance/tests/latest/test_maintenance_scenario_coverage.md new file mode 100644 index 00000000000..cb712843009 --- /dev/null +++ b/src/maintenance/azext_maintenance/tests/latest/test_maintenance_scenario_coverage.md @@ -0,0 +1,2 @@ +|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt| +Coverage: 0/0 diff --git a/src/maintenance/azext_maintenance/tests/res.json b/src/maintenance/azext_maintenance/tests/res.json deleted file mode 100644 index b2793c2c353..00000000000 Binary files a/src/maintenance/azext_maintenance/tests/res.json and /dev/null differ diff --git a/src/maintenance/azext_maintenance/vendored_sdks/__init__.py b/src/maintenance/azext_maintenance/vendored_sdks/__init__.py index 430734215b5..c9cfdc73e77 100644 --- a/src/maintenance/azext_maintenance/vendored_sdks/__init__.py +++ b/src/maintenance/azext_maintenance/vendored_sdks/__init__.py @@ -9,9 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -from .maintenance_management_client import MaintenanceManagementClient -from .version import VERSION - -__all__ = ['MaintenanceManagementClient'] - -__version__ = VERSION +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/__init__.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/__init__.py new file mode 100644 index 00000000000..986c9f75bfb --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/__init__.py @@ -0,0 +1,16 @@ +# 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 ._maintenance_client import MaintenanceClient +__all__ = ['MaintenanceClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/_configuration.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/_configuration.py new file mode 100644 index 00000000000..2625b159846 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class MaintenanceClientConfiguration(Configuration): + """Configuration for MaintenanceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(MaintenanceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2020-07-01-preview" + self.credential_scopes = ['https://management.azure.com/.default'] + self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + kwargs.setdefault('sdk_moniker', 'maintenanceclient/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.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) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/_maintenance_client.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/_maintenance_client.py new file mode 100644 index 00000000000..9a655692155 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/_maintenance_client.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + +from ._configuration import MaintenanceClientConfiguration +from .operations import PublicMaintenanceConfigurationOperations +from .operations import ApplyUpdateOperations +from .operations import ConfigurationAssignmentOperations +from .operations import MaintenanceConfigurationOperations +from .operations import OperationOperations +from .operations import UpdateOperations +from . import models + + +class MaintenanceClient(object): + """Maintenance Client. + + :ivar public_maintenance_configuration: PublicMaintenanceConfigurationOperations operations + :vartype public_maintenance_configuration: maintenance_client.operations.PublicMaintenanceConfigurationOperations + :ivar apply_update: ApplyUpdateOperations operations + :vartype apply_update: maintenance_client.operations.ApplyUpdateOperations + :ivar configuration_assignment: ConfigurationAssignmentOperations operations + :vartype configuration_assignment: maintenance_client.operations.ConfigurationAssignmentOperations + :ivar maintenance_configuration: MaintenanceConfigurationOperations operations + :vartype maintenance_configuration: maintenance_client.operations.MaintenanceConfigurationOperations + :ivar operation: OperationOperations operations + :vartype operation: maintenance_client.operations.OperationOperations + :ivar update: UpdateOperations operations + :vartype update: maintenance_client.operations.UpdateOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials that uniquely identify a 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__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = MaintenanceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.public_maintenance_configuration = PublicMaintenanceConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.apply_update = ApplyUpdateOperations( + self._client, self._config, self._serialize, self._deserialize) + self.configuration_assignment = ConfigurationAssignmentOperations( + self._client, self._config, self._serialize, self._deserialize) + self.maintenance_configuration = MaintenanceConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation = OperationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.update = UpdateOperations( + self._client, self._config, self._serialize, self._deserialize) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> MaintenanceClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/maintenance/azext_maintenance/_constants.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/__init__.py similarity index 50% rename from src/maintenance/azext_maintenance/_constants.py rename to src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/__init__.py index 06d2bac1d54..0819299aee3 100644 --- a/src/maintenance/azext_maintenance/_constants.py +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/__init__.py @@ -1,9 +1,10 @@ -# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- - -MAINTENANCE_SCOPE = ['Host', 'Resource'] -MAINTENANCE_RESOURCE_TYPE = 'Microsoft.Maintenance/maintenanceConfigurations' -UNIT_COUNT_MAXIMUM = 10 +from ._maintenance_client_async import MaintenanceClient +__all__ = ['MaintenanceClient'] diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/_configuration_async.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/_configuration_async.py new file mode 100644 index 00000000000..2742c40df71 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/_configuration_async.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class MaintenanceClientConfiguration(Configuration): + """Configuration for MaintenanceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(MaintenanceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2020-07-01-preview" + self.credential_scopes = ['https://management.azure.com/.default'] + self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + kwargs.setdefault('sdk_moniker', 'maintenanceclient/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/_maintenance_client_async.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/_maintenance_client_async.py new file mode 100644 index 00000000000..b04b86b6e96 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/_maintenance_client_async.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration_async import MaintenanceClientConfiguration +from .operations_async import PublicMaintenanceConfigurationOperations +from .operations_async import ApplyUpdateOperations +from .operations_async import ConfigurationAssignmentOperations +from .operations_async import MaintenanceConfigurationOperations +from .operations_async import OperationOperations +from .operations_async import UpdateOperations +from .. import models + + +class MaintenanceClient(object): + """Maintenance Client. + + :ivar public_maintenance_configuration: PublicMaintenanceConfigurationOperations operations + :vartype public_maintenance_configuration: maintenance_client.aio.operations_async.PublicMaintenanceConfigurationOperations + :ivar apply_update: ApplyUpdateOperations operations + :vartype apply_update: maintenance_client.aio.operations_async.ApplyUpdateOperations + :ivar configuration_assignment: ConfigurationAssignmentOperations operations + :vartype configuration_assignment: maintenance_client.aio.operations_async.ConfigurationAssignmentOperations + :ivar maintenance_configuration: MaintenanceConfigurationOperations operations + :vartype maintenance_configuration: maintenance_client.aio.operations_async.MaintenanceConfigurationOperations + :ivar operation: OperationOperations operations + :vartype operation: maintenance_client.aio.operations_async.OperationOperations + :ivar update: UpdateOperations operations + :vartype update: maintenance_client.aio.operations_async.UpdateOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials that uniquely identify a 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__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = MaintenanceClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.public_maintenance_configuration = PublicMaintenanceConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.apply_update = ApplyUpdateOperations( + self._client, self._config, self._serialize, self._deserialize) + self.configuration_assignment = ConfigurationAssignmentOperations( + self._client, self._config, self._serialize, self._deserialize) + self.maintenance_configuration = MaintenanceConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation = OperationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.update = UpdateOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "MaintenanceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/__init__.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/__init__.py new file mode 100644 index 00000000000..32e852e6b67 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/__init__.py @@ -0,0 +1,23 @@ +# 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 ._public_maintenance_configuration_operations_async import PublicMaintenanceConfigurationOperations +from ._apply_update_operations_async import ApplyUpdateOperations +from ._configuration_assignment_operations_async import ConfigurationAssignmentOperations +from ._maintenance_configuration_operations_async import MaintenanceConfigurationOperations +from ._operation_operations_async import OperationOperations +from ._update_operations_async import UpdateOperations + +__all__ = [ + 'PublicMaintenanceConfigurationOperations', + 'ApplyUpdateOperations', + 'ConfigurationAssignmentOperations', + 'MaintenanceConfigurationOperations', + 'OperationOperations', + 'UpdateOperations', +] diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_apply_update_operations_async.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_apply_update_operations_async.py new file mode 100644 index 00000000000..41976323244 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_apply_update_operations_async.py @@ -0,0 +1,325 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ApplyUpdateOperations: + """ApplyUpdateOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~maintenance_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get_parent( + self, + resource_group_name: str, + resource_parent_type: str, + resource_parent_name: str, + provider_name: str, + resource_type: str, + resource_name: str, + apply_update_name: str, + **kwargs + ) -> "models.ApplyUpdate": + """Track Updates to resource with parent. + + Track maintenance updates to resource with parent. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param resource_parent_type: Resource parent type. + :type resource_parent_type: str + :param resource_parent_name: Resource parent identifier. + :type resource_parent_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :param apply_update_name: applyUpdate Id. + :type apply_update_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplyUpdate, or the result of cls(response) + :rtype: ~maintenance_client.models.ApplyUpdate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ApplyUpdate"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.get_parent.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), + 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'applyUpdateName': self._serialize.url("apply_update_name", apply_update_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplyUpdate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/{applyUpdateName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + provider_name: str, + resource_type: str, + resource_name: str, + apply_update_name: str, + **kwargs + ) -> "models.ApplyUpdate": + """Track Updates to resource. + + Track maintenance updates to resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :param apply_update_name: applyUpdate Id. + :type apply_update_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplyUpdate, or the result of cls(response) + :rtype: ~maintenance_client.models.ApplyUpdate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ApplyUpdate"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'applyUpdateName': self._serialize.url("apply_update_name", apply_update_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplyUpdate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/{applyUpdateName}'} # type: ignore + + async def create_or_update_parent( + self, + resource_group_name: str, + provider_name: str, + resource_parent_type: str, + resource_parent_name: str, + resource_type: str, + resource_name: str, + **kwargs + ) -> "models.ApplyUpdate": + """Apply Updates to resource with parent. + + Apply maintenance updates to resource with parent. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_parent_type: Resource parent type. + :type resource_parent_type: str + :param resource_parent_name: Resource parent identifier. + :type resource_parent_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplyUpdate, or the result of cls(response) + :rtype: ~maintenance_client.models.ApplyUpdate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ApplyUpdate"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.create_or_update_parent.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), + 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.put(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplyUpdate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/default'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + provider_name: str, + resource_type: str, + resource_name: str, + **kwargs + ) -> "models.ApplyUpdate": + """Apply Updates to resource. + + Apply maintenance updates to resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplyUpdate, or the result of cls(response) + :rtype: ~maintenance_client.models.ApplyUpdate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ApplyUpdate"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.put(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplyUpdate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/default'} # type: ignore diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_configuration_assignment_operations_async.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_configuration_assignment_operations_async.py new file mode 100644 index 00000000000..a8848aa2f66 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_configuration_assignment_operations_async.py @@ -0,0 +1,538 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ConfigurationAssignmentOperations: + """ConfigurationAssignmentOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~maintenance_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def create_or_update_parent( + self, + resource_group_name: str, + provider_name: str, + resource_parent_type: str, + resource_parent_name: str, + resource_type: str, + resource_name: str, + configuration_assignment_name: str, + location: Optional[str] = None, + maintenance_configuration_id: Optional[str] = None, + resource_id: Optional[str] = None, + **kwargs + ) -> "models.ConfigurationAssignment": + """Create configuration assignment. + + Register configuration for resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_parent_type: Resource parent type. + :type resource_parent_type: str + :param resource_parent_name: Resource parent identifier. + :type resource_parent_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :param configuration_assignment_name: Configuration assignment name. + :type configuration_assignment_name: str + :param location: Location of the resource. + :type location: str + :param maintenance_configuration_id: The maintenance configuration Id. + :type maintenance_configuration_id: str + :param resource_id: The unique resourceId. + :type resource_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConfigurationAssignment, or the result of cls(response) + :rtype: ~maintenance_client.models.ConfigurationAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _configuration_assignment = models.ConfigurationAssignment(location=location, maintenance_configuration_id=maintenance_configuration_id, resource_id=resource_id) + api_version = "2020-07-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create_or_update_parent.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), + 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_configuration_assignment, 'ConfigurationAssignment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConfigurationAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore + + async def delete_parent( + self, + resource_group_name: str, + provider_name: str, + resource_parent_type: str, + resource_parent_name: str, + resource_type: str, + resource_name: str, + configuration_assignment_name: str, + **kwargs + ) -> "models.ConfigurationAssignment": + """Unregister configuration for resource. + + Unregister configuration for resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_parent_type: Resource parent type. + :type resource_parent_type: str + :param resource_parent_name: Resource parent identifier. + :type resource_parent_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :param configuration_assignment_name: Unique configuration assignment name. + :type configuration_assignment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConfigurationAssignment, or the result of cls(response) + :rtype: ~maintenance_client.models.ConfigurationAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.delete_parent.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), + 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConfigurationAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + provider_name: str, + resource_type: str, + resource_name: str, + configuration_assignment_name: str, + location: Optional[str] = None, + maintenance_configuration_id: Optional[str] = None, + resource_id: Optional[str] = None, + **kwargs + ) -> "models.ConfigurationAssignment": + """Create configuration assignment. + + Register configuration for resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :param configuration_assignment_name: Configuration assignment name. + :type configuration_assignment_name: str + :param location: Location of the resource. + :type location: str + :param maintenance_configuration_id: The maintenance configuration Id. + :type maintenance_configuration_id: str + :param resource_id: The unique resourceId. + :type resource_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConfigurationAssignment, or the result of cls(response) + :rtype: ~maintenance_client.models.ConfigurationAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _configuration_assignment = models.ConfigurationAssignment(location=location, maintenance_configuration_id=maintenance_configuration_id, resource_id=resource_id) + api_version = "2020-07-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_configuration_assignment, 'ConfigurationAssignment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConfigurationAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + provider_name: str, + resource_type: str, + resource_name: str, + configuration_assignment_name: str, + **kwargs + ) -> "models.ConfigurationAssignment": + """Unregister configuration for resource. + + Unregister configuration for resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :param configuration_assignment_name: Unique configuration assignment name. + :type configuration_assignment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConfigurationAssignment, or the result of cls(response) + :rtype: ~maintenance_client.models.ConfigurationAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConfigurationAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore + + def list_parent( + self, + resource_group_name: str, + provider_name: str, + resource_parent_type: str, + resource_parent_name: str, + resource_type: str, + resource_name: str, + **kwargs + ) -> AsyncIterable["models.ListConfigurationAssignmentsResult"]: + """List configurationAssignments for resource. + + List configurationAssignments for resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_parent_type: Resource parent type. + :type resource_parent_type: str + :param resource_parent_name: Resource parent identifier. + :type resource_parent_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListConfigurationAssignmentsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~maintenance_client.models.ListConfigurationAssignmentsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ListConfigurationAssignmentsResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_parent.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), + 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListConfigurationAssignmentsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments'} # type: ignore + + def list( + self, + resource_group_name: str, + provider_name: str, + resource_type: str, + resource_name: str, + **kwargs + ) -> AsyncIterable["models.ListConfigurationAssignmentsResult"]: + """List configurationAssignments for resource. + + List configurationAssignments for resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListConfigurationAssignmentsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~maintenance_client.models.ListConfigurationAssignmentsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ListConfigurationAssignmentsResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListConfigurationAssignmentsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments'} # type: ignore diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_maintenance_configuration_operations_async.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_maintenance_configuration_operations_async.py new file mode 100644 index 00000000000..8d9967c415b --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_maintenance_configuration_operations_async.py @@ -0,0 +1,458 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MaintenanceConfigurationOperations: + """MaintenanceConfigurationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~maintenance_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "models.MaintenanceConfiguration": + """Get Configuration record. + + Get Configuration record. + + :param resource_group_name: Resource Group Name. + :type resource_group_name: str + :param resource_name: Resource Identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~maintenance_client.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MaintenanceConfiguration"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.MaintenanceError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + namespace: Optional[str] = None, + extension_properties: Optional[Dict[str, str]] = None, + maintenance_scope: Optional[Union[str, "models.MaintenanceScope"]] = None, + visibility: Optional[Union[str, "models.Visibility"]] = None, + start_date_time: Optional[str] = None, + expiration_date_time: Optional[str] = None, + duration: Optional[str] = None, + time_zone: Optional[str] = None, + recur_every: Optional[str] = None, + **kwargs + ) -> "models.MaintenanceConfiguration": + """Create or Update configuration record. + + Create or Update configuration record. + + :param resource_group_name: Resource Group Name. + :type resource_group_name: str + :param resource_name: Resource Identifier. + :type resource_name: str + :param location: Gets or sets location of the resource. + :type location: str + :param tags: Gets or sets tags of the resource. + :type tags: dict[str, str] + :param namespace: Gets or sets namespace of the resource. + :type namespace: str + :param extension_properties: Gets or sets extensionProperties of the maintenanceConfiguration. + :type extension_properties: dict[str, str] + :param maintenance_scope: Gets or sets maintenanceScope of the configuration. + :type maintenance_scope: str or ~maintenance_client.models.MaintenanceScope + :param visibility: Gets or sets the visibility of the configuration. + :type visibility: str or ~maintenance_client.models.Visibility + :param start_date_time: Effective start date of the maintenance window in YYYY-MM-DD hh:mm + format. The start date can be set to either the current date or future date. The window will be + created in the time zone provided and adjusted to daylight savings according to that time zone. + :type start_date_time: str + :param expiration_date_time: Effective expiration date of the maintenance window in YYYY-MM-DD + hh:mm format. The window will be created in the time zone provided and adjusted to daylight + savings according to that time zone. Expiration date must be set to a future date. If not + provided, it will be set to the maximum datetime 9999-12-31 23:59:59. + :type expiration_date_time: str + :param duration: Duration of the maintenance window in HH:mm format. If not provided, default + value will be used based on maintenance scope provided. Example: 05:00. + :type duration: str + :param time_zone: Name of the timezone. List of timezones can be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, + W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time. + :type time_zone: str + :param recur_every: Rate at which a Maintenance window is expected to recur. The rate can be + expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: + [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. + Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted + as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays + Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week + Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma + separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, + Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are + recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last + Sunday, recurEvery: Month Fourth Monday. + :type recur_every: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~maintenance_client.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MaintenanceConfiguration"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _configuration = models.MaintenanceConfiguration(location=location, tags=tags, namespace=namespace, extension_properties=extension_properties, maintenance_scope=maintenance_scope, visibility=visibility, start_date_time=start_date_time, expiration_date_time=expiration_date_time, duration=duration, time_zone=time_zone, recur_every=recur_every) + api_version = "2020-07-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_configuration, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.MaintenanceError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "models.MaintenanceConfiguration": + """Delete Configuration record. + + Delete Configuration record. + + :param resource_group_name: Resource Group Name. + :type resource_group_name: str + :param resource_name: Resource Identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~maintenance_client.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MaintenanceConfiguration"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.MaintenanceError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + resource_name: str, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + namespace: Optional[str] = None, + extension_properties: Optional[Dict[str, str]] = None, + maintenance_scope: Optional[Union[str, "models.MaintenanceScope"]] = None, + visibility: Optional[Union[str, "models.Visibility"]] = None, + start_date_time: Optional[str] = None, + expiration_date_time: Optional[str] = None, + duration: Optional[str] = None, + time_zone: Optional[str] = None, + recur_every: Optional[str] = None, + **kwargs + ) -> "models.MaintenanceConfiguration": + """Patch configuration record. + + Patch configuration record. + + :param resource_group_name: Resource Group Name. + :type resource_group_name: str + :param resource_name: Resource Identifier. + :type resource_name: str + :param location: Gets or sets location of the resource. + :type location: str + :param tags: Gets or sets tags of the resource. + :type tags: dict[str, str] + :param namespace: Gets or sets namespace of the resource. + :type namespace: str + :param extension_properties: Gets or sets extensionProperties of the maintenanceConfiguration. + :type extension_properties: dict[str, str] + :param maintenance_scope: Gets or sets maintenanceScope of the configuration. + :type maintenance_scope: str or ~maintenance_client.models.MaintenanceScope + :param visibility: Gets or sets the visibility of the configuration. + :type visibility: str or ~maintenance_client.models.Visibility + :param start_date_time: Effective start date of the maintenance window in YYYY-MM-DD hh:mm + format. The start date can be set to either the current date or future date. The window will be + created in the time zone provided and adjusted to daylight savings according to that time zone. + :type start_date_time: str + :param expiration_date_time: Effective expiration date of the maintenance window in YYYY-MM-DD + hh:mm format. The window will be created in the time zone provided and adjusted to daylight + savings according to that time zone. Expiration date must be set to a future date. If not + provided, it will be set to the maximum datetime 9999-12-31 23:59:59. + :type expiration_date_time: str + :param duration: Duration of the maintenance window in HH:mm format. If not provided, default + value will be used based on maintenance scope provided. Example: 05:00. + :type duration: str + :param time_zone: Name of the timezone. List of timezones can be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, + W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time. + :type time_zone: str + :param recur_every: Rate at which a Maintenance window is expected to recur. The rate can be + expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: + [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. + Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted + as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays + Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week + Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma + separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, + Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are + recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last + Sunday, recurEvery: Month Fourth Monday. + :type recur_every: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~maintenance_client.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MaintenanceConfiguration"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _configuration = models.MaintenanceConfiguration(location=location, tags=tags, namespace=namespace, extension_properties=extension_properties, maintenance_scope=maintenance_scope, visibility=visibility, start_date_time=start_date_time, expiration_date_time=expiration_date_time, duration=duration, time_zone=time_zone, recur_every=recur_every) + api_version = "2020-07-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_configuration, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.MaintenanceError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}'} # type: ignore + + def list( + self, + **kwargs + ) -> AsyncIterable["models.ListMaintenanceConfigurationsResult"]: + """Get Configuration records within a subscription. + + Get Configuration records within a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListMaintenanceConfigurationsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~maintenance_client.models.ListMaintenanceConfigurationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ListMaintenanceConfigurationsResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListMaintenanceConfigurationsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.MaintenanceError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Maintenance/maintenanceConfigurations'} # type: ignore diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_operation_operations_async.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_operation_operations_async.py new file mode 100644 index 00000000000..3f727b6422e --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_operation_operations_async.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OperationOperations: + """OperationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~maintenance_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["models.OperationsListResult"]: + """List available operations. + + List the available operations supported by the Microsoft.Maintenance resource provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationsListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~maintenance_client.models.OperationsListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationsListResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationsListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.MaintenanceError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.Maintenance/operations'} # type: ignore diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_public_maintenance_configuration_operations_async.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_public_maintenance_configuration_operations_async.py new file mode 100644 index 00000000000..0c700661962 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_public_maintenance_configuration_operations_async.py @@ -0,0 +1,162 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PublicMaintenanceConfigurationOperations: + """PublicMaintenanceConfigurationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~maintenance_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["models.ListMaintenanceConfigurationsResult"]: + """Get Public Maintenance Configuration records. + + Get Public Maintenance Configuration records. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListMaintenanceConfigurationsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~maintenance_client.models.ListMaintenanceConfigurationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ListMaintenanceConfigurationsResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListMaintenanceConfigurationsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.MaintenanceError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Maintenance/publicMaintenanceConfigurations'} # type: ignore + + async def get( + self, + resource_name: str, + **kwargs + ) -> "models.MaintenanceConfiguration": + """Get Public Maintenance Configuration record. + + Get Public Maintenance Configuration record. + + :param resource_name: Resource Identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~maintenance_client.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MaintenanceConfiguration"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.MaintenanceError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/{resourceName}'} # type: ignore diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_update_operations_async.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_update_operations_async.py new file mode 100644 index 00000000000..660aaea0a6f --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/aio/operations_async/_update_operations_async.py @@ -0,0 +1,212 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class UpdateOperations: + """UpdateOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~maintenance_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_parent( + self, + resource_group_name: str, + provider_name: str, + resource_parent_type: str, + resource_parent_name: str, + resource_type: str, + resource_name: str, + **kwargs + ) -> AsyncIterable["models.ListUpdatesResult"]: + """Get Updates to resource. + + Get updates to resources. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_parent_type: Resource parent type. + :type resource_parent_type: str + :param resource_parent_name: Resource parent identifier. + :type resource_parent_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListUpdatesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~maintenance_client.models.ListUpdatesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ListUpdatesResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_parent.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), + 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListUpdatesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/updates'} # type: ignore + + def list( + self, + resource_group_name: str, + provider_name: str, + resource_type: str, + resource_name: str, + **kwargs + ) -> AsyncIterable["models.ListUpdatesResult"]: + """Get Updates to resource. + + Get updates to resources. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListUpdatesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~maintenance_client.models.ListUpdatesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ListUpdatesResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListUpdatesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/updates'} # type: ignore diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/__init__.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/__init__.py new file mode 100644 index 00000000000..56f8e539b54 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/__init__.py @@ -0,0 +1,63 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ApplyUpdate + from ._models_py3 import ConfigurationAssignment + from ._models_py3 import ErrorDetails + from ._models_py3 import ListConfigurationAssignmentsResult + from ._models_py3 import ListMaintenanceConfigurationsResult + from ._models_py3 import ListUpdatesResult + from ._models_py3 import MaintenanceConfiguration + from ._models_py3 import MaintenanceError + from ._models_py3 import Operation + from ._models_py3 import OperationInfo + from ._models_py3 import OperationsListResult + from ._models_py3 import Resource + from ._models_py3 import Update +except (SyntaxError, ImportError): + from ._models import ApplyUpdate # type: ignore + from ._models import ConfigurationAssignment # type: ignore + from ._models import ErrorDetails # type: ignore + from ._models import ListConfigurationAssignmentsResult # type: ignore + from ._models import ListMaintenanceConfigurationsResult # type: ignore + from ._models import ListUpdatesResult # type: ignore + from ._models import MaintenanceConfiguration # type: ignore + from ._models import MaintenanceError # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationInfo # type: ignore + from ._models import OperationsListResult # type: ignore + from ._models import Resource # type: ignore + from ._models import Update # type: ignore + +from ._maintenance_client_enums import ( + ImpactType, + MaintenanceScope, + UpdateStatus, + Visibility, +) + +__all__ = [ + 'ApplyUpdate', + 'ConfigurationAssignment', + 'ErrorDetails', + 'ListConfigurationAssignmentsResult', + 'ListMaintenanceConfigurationsResult', + 'ListUpdatesResult', + 'MaintenanceConfiguration', + 'MaintenanceError', + 'Operation', + 'OperationInfo', + 'OperationsListResult', + 'Resource', + 'Update', + 'ImpactType', + 'MaintenanceScope', + 'UpdateStatus', + 'Visibility', +] diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/_maintenance_client_enums.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/_maintenance_client_enums.py new file mode 100644 index 00000000000..ed541885949 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/_maintenance_client_enums.py @@ -0,0 +1,67 @@ +# 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 enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class ImpactType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The impact type + """ + + NONE = "None" + FREEZE = "Freeze" + RESTART = "Restart" + REDEPLOY = "Redeploy" + +class MaintenanceScope(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets maintenanceScope of the configuration + """ + + ALL = "All" + HOST = "Host" + RESOURCE = "Resource" + IN_RESOURCE = "InResource" + OS_IMAGE = "OSImage" + EXTENSION = "Extension" + IN_GUEST_PATCH = "InGuestPatch" + SQLDB = "SQLDB" + SQL_MANAGED_INSTANCE = "SQLManagedInstance" + +class UpdateStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The status + """ + + PENDING = "Pending" + IN_PROGRESS = "InProgress" + COMPLETED = "Completed" + RETRY_NOW = "RetryNow" + RETRY_LATER = "RetryLater" + +class Visibility(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets the visibility of the configuration + """ + + CUSTOM = "Custom" + PUBLIC = "Public" diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/_models.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/_models.py new file mode 100644 index 00000000000..d48038d28b8 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/_models.py @@ -0,0 +1,455 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class Resource(msrest.serialization.Model): + """Definition of a Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :ivar type: Type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ApplyUpdate(Resource): + """Apply Update request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :ivar type: Type of the resource. + :vartype type: str + :param status: The status. Possible values include: "Pending", "InProgress", "Completed", + "RetryNow", "RetryLater". + :type status: str or ~maintenance_client.models.UpdateStatus + :param resource_id: The resourceId. + :type resource_id: str + :param last_update_time: Last Update time. + :type last_update_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'last_update_time': {'key': 'properties.lastUpdateTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplyUpdate, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.resource_id = kwargs.get('resource_id', None) + self.last_update_time = kwargs.get('last_update_time', None) + + +class ConfigurationAssignment(Resource): + """Configuration Assignment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :ivar type: Type of the resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param maintenance_configuration_id: The maintenance configuration Id. + :type maintenance_configuration_id: str + :param resource_id: The unique resourceId. + :type resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigurationAssignment, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.maintenance_configuration_id = kwargs.get('maintenance_configuration_id', None) + self.resource_id = kwargs.get('resource_id', None) + + +class ErrorDetails(msrest.serialization.Model): + """An error response details received from the Azure Maintenance service. + + :param code: Service-defined error code. This code serves as a sub-status for the HTTP error + code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetails, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ListConfigurationAssignmentsResult(msrest.serialization.Model): + """Response for ConfigurationAssignments list. + + :param value: The list of configuration Assignments. + :type value: list[~maintenance_client.models.ConfigurationAssignment] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConfigurationAssignment]'}, + } + + def __init__( + self, + **kwargs + ): + super(ListConfigurationAssignmentsResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ListMaintenanceConfigurationsResult(msrest.serialization.Model): + """Response for MaintenanceConfigurations list. + + :param value: The list of maintenance Configurations. + :type value: list[~maintenance_client.models.MaintenanceConfiguration] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MaintenanceConfiguration]'}, + } + + def __init__( + self, + **kwargs + ): + super(ListMaintenanceConfigurationsResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ListUpdatesResult(msrest.serialization.Model): + """Response for Updates list. + + :param value: The pending updates. + :type value: list[~maintenance_client.models.Update] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Update]'}, + } + + def __init__( + self, + **kwargs + ): + super(ListUpdatesResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class MaintenanceConfiguration(Resource): + """Maintenance configuration record type. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :ivar type: Type of the resource. + :vartype type: str + :param location: Gets or sets location of the resource. + :type location: str + :param tags: A set of tags. Gets or sets tags of the resource. + :type tags: dict[str, str] + :param namespace: Gets or sets namespace of the resource. + :type namespace: str + :param extension_properties: Gets or sets extensionProperties of the maintenanceConfiguration. + :type extension_properties: dict[str, str] + :param maintenance_scope: Gets or sets maintenanceScope of the configuration. Possible values + include: "All", "Host", "Resource", "InResource", "OSImage", "Extension", "InGuestPatch", + "SQLDB", "SQLManagedInstance". + :type maintenance_scope: str or ~maintenance_client.models.MaintenanceScope + :param visibility: Gets or sets the visibility of the configuration. Possible values include: + "Custom", "Public". + :type visibility: str or ~maintenance_client.models.Visibility + :param start_date_time: Effective start date of the maintenance window in YYYY-MM-DD hh:mm + format. The start date can be set to either the current date or future date. The window will be + created in the time zone provided and adjusted to daylight savings according to that time zone. + :type start_date_time: str + :param expiration_date_time: Effective expiration date of the maintenance window in YYYY-MM-DD + hh:mm format. The window will be created in the time zone provided and adjusted to daylight + savings according to that time zone. Expiration date must be set to a future date. If not + provided, it will be set to the maximum datetime 9999-12-31 23:59:59. + :type expiration_date_time: str + :param duration: Duration of the maintenance window in HH:mm format. If not provided, default + value will be used based on maintenance scope provided. Example: 05:00. + :type duration: str + :param time_zone: Name of the timezone. List of timezones can be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, + W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time. + :type time_zone: str + :param recur_every: Rate at which a Maintenance window is expected to recur. The rate can be + expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: + [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. + Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted + as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays + Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week + Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma + separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, + Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are + recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last + Sunday, recurEvery: Month Fourth Monday. + :type recur_every: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'namespace': {'key': 'properties.namespace', 'type': 'str'}, + 'extension_properties': {'key': 'properties.extensionProperties', 'type': '{str}'}, + 'maintenance_scope': {'key': 'properties.maintenanceScope', 'type': 'str'}, + 'visibility': {'key': 'properties.visibility', 'type': 'str'}, + 'start_date_time': {'key': 'properties.maintenanceWindow.startDateTime', 'type': 'str'}, + 'expiration_date_time': {'key': 'properties.maintenanceWindow.expirationDateTime', 'type': 'str'}, + 'duration': {'key': 'properties.maintenanceWindow.duration', 'type': 'str'}, + 'time_zone': {'key': 'properties.maintenanceWindow.timeZone', 'type': 'str'}, + 'recur_every': {'key': 'properties.maintenanceWindow.recurEvery', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MaintenanceConfiguration, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.namespace = kwargs.get('namespace', None) + self.extension_properties = kwargs.get('extension_properties', None) + self.maintenance_scope = kwargs.get('maintenance_scope', None) + self.visibility = kwargs.get('visibility', None) + self.start_date_time = kwargs.get('start_date_time', None) + self.expiration_date_time = kwargs.get('expiration_date_time', None) + self.duration = kwargs.get('duration', None) + self.time_zone = kwargs.get('time_zone', None) + self.recur_every = kwargs.get('recur_every', None) + + +class MaintenanceError(msrest.serialization.Model): + """An error response received from the Azure Maintenance service. + + :param error: Details of the error. + :type error: ~maintenance_client.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(MaintenanceError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class Operation(msrest.serialization.Model): + """Represents an operation returned by the GetOperations request. + + :param name: Name of the operation. + :type name: str + :param display: Display name of the operation. + :type display: ~maintenance_client.models.OperationInfo + :param origin: Origin of the operation. + :type origin: str + :param properties: Properties of the operation. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationInfo'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class OperationInfo(msrest.serialization.Model): + """Information about an operation. + + :param provider: Name of the provider. + :type provider: str + :param resource: Name of the resource type. + :type resource: str + :param operation: Name of the operation. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationInfo, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationsListResult(msrest.serialization.Model): + """Result of the List Operations operation. + + :param value: A collection of operations. + :type value: list[~maintenance_client.models.Operation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class Update(msrest.serialization.Model): + """Maintenance update on a resource. + + :param maintenance_scope: The impact area. Possible values include: "All", "Host", "Resource", + "InResource", "OSImage", "Extension", "InGuestPatch", "SQLDB", "SQLManagedInstance". + :type maintenance_scope: str or ~maintenance_client.models.MaintenanceScope + :param impact_type: The impact type. Possible values include: "None", "Freeze", "Restart", + "Redeploy". + :type impact_type: str or ~maintenance_client.models.ImpactType + :param status: The status. Possible values include: "Pending", "InProgress", "Completed", + "RetryNow", "RetryLater". + :type status: str or ~maintenance_client.models.UpdateStatus + :param impact_duration_in_sec: Duration of impact in seconds. + :type impact_duration_in_sec: int + :param not_before: Time when Azure will start force updates if not self-updated by customer + before this time. + :type not_before: ~datetime.datetime + :param resource_id: The resourceId. + :type resource_id: str + """ + + _attribute_map = { + 'maintenance_scope': {'key': 'maintenanceScope', 'type': 'str'}, + 'impact_type': {'key': 'impactType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'impact_duration_in_sec': {'key': 'impactDurationInSec', 'type': 'int'}, + 'not_before': {'key': 'notBefore', 'type': 'iso-8601'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Update, self).__init__(**kwargs) + self.maintenance_scope = kwargs.get('maintenance_scope', None) + self.impact_type = kwargs.get('impact_type', None) + self.status = kwargs.get('status', None) + self.impact_duration_in_sec = kwargs.get('impact_duration_in_sec', None) + self.not_before = kwargs.get('not_before', None) + self.resource_id = kwargs.get('resource_id', None) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/_models_py3.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/_models_py3.py new file mode 100644 index 00000000000..0536271dece --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/_models_py3.py @@ -0,0 +1,510 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._maintenance_client_enums import * + + +class Resource(msrest.serialization.Model): + """Definition of a Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :ivar type: Type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ApplyUpdate(Resource): + """Apply Update request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :ivar type: Type of the resource. + :vartype type: str + :param status: The status. Possible values include: "Pending", "InProgress", "Completed", + "RetryNow", "RetryLater". + :type status: str or ~maintenance_client.models.UpdateStatus + :param resource_id: The resourceId. + :type resource_id: str + :param last_update_time: Last Update time. + :type last_update_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'last_update_time': {'key': 'properties.lastUpdateTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "UpdateStatus"]] = None, + resource_id: Optional[str] = None, + last_update_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(ApplyUpdate, self).__init__(**kwargs) + self.status = status + self.resource_id = resource_id + self.last_update_time = last_update_time + + +class ConfigurationAssignment(Resource): + """Configuration Assignment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :ivar type: Type of the resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param maintenance_configuration_id: The maintenance configuration Id. + :type maintenance_configuration_id: str + :param resource_id: The unique resourceId. + :type resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + maintenance_configuration_id: Optional[str] = None, + resource_id: Optional[str] = None, + **kwargs + ): + super(ConfigurationAssignment, self).__init__(**kwargs) + self.location = location + self.maintenance_configuration_id = maintenance_configuration_id + self.resource_id = resource_id + + +class ErrorDetails(msrest.serialization.Model): + """An error response details received from the Azure Maintenance service. + + :param code: Service-defined error code. This code serves as a sub-status for the HTTP error + code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(ErrorDetails, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ListConfigurationAssignmentsResult(msrest.serialization.Model): + """Response for ConfigurationAssignments list. + + :param value: The list of configuration Assignments. + :type value: list[~maintenance_client.models.ConfigurationAssignment] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConfigurationAssignment]'}, + } + + def __init__( + self, + *, + value: Optional[List["ConfigurationAssignment"]] = None, + **kwargs + ): + super(ListConfigurationAssignmentsResult, self).__init__(**kwargs) + self.value = value + + +class ListMaintenanceConfigurationsResult(msrest.serialization.Model): + """Response for MaintenanceConfigurations list. + + :param value: The list of maintenance Configurations. + :type value: list[~maintenance_client.models.MaintenanceConfiguration] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MaintenanceConfiguration]'}, + } + + def __init__( + self, + *, + value: Optional[List["MaintenanceConfiguration"]] = None, + **kwargs + ): + super(ListMaintenanceConfigurationsResult, self).__init__(**kwargs) + self.value = value + + +class ListUpdatesResult(msrest.serialization.Model): + """Response for Updates list. + + :param value: The pending updates. + :type value: list[~maintenance_client.models.Update] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Update]'}, + } + + def __init__( + self, + *, + value: Optional[List["Update"]] = None, + **kwargs + ): + super(ListUpdatesResult, self).__init__(**kwargs) + self.value = value + + +class MaintenanceConfiguration(Resource): + """Maintenance configuration record type. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :ivar type: Type of the resource. + :vartype type: str + :param location: Gets or sets location of the resource. + :type location: str + :param tags: A set of tags. Gets or sets tags of the resource. + :type tags: dict[str, str] + :param namespace: Gets or sets namespace of the resource. + :type namespace: str + :param extension_properties: Gets or sets extensionProperties of the maintenanceConfiguration. + :type extension_properties: dict[str, str] + :param maintenance_scope: Gets or sets maintenanceScope of the configuration. Possible values + include: "All", "Host", "Resource", "InResource", "OSImage", "Extension", "InGuestPatch", + "SQLDB", "SQLManagedInstance". + :type maintenance_scope: str or ~maintenance_client.models.MaintenanceScope + :param visibility: Gets or sets the visibility of the configuration. Possible values include: + "Custom", "Public". + :type visibility: str or ~maintenance_client.models.Visibility + :param start_date_time: Effective start date of the maintenance window in YYYY-MM-DD hh:mm + format. The start date can be set to either the current date or future date. The window will be + created in the time zone provided and adjusted to daylight savings according to that time zone. + :type start_date_time: str + :param expiration_date_time: Effective expiration date of the maintenance window in YYYY-MM-DD + hh:mm format. The window will be created in the time zone provided and adjusted to daylight + savings according to that time zone. Expiration date must be set to a future date. If not + provided, it will be set to the maximum datetime 9999-12-31 23:59:59. + :type expiration_date_time: str + :param duration: Duration of the maintenance window in HH:mm format. If not provided, default + value will be used based on maintenance scope provided. Example: 05:00. + :type duration: str + :param time_zone: Name of the timezone. List of timezones can be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, + W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time. + :type time_zone: str + :param recur_every: Rate at which a Maintenance window is expected to recur. The rate can be + expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: + [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. + Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted + as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays + Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week + Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma + separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, + Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are + recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last + Sunday, recurEvery: Month Fourth Monday. + :type recur_every: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'namespace': {'key': 'properties.namespace', 'type': 'str'}, + 'extension_properties': {'key': 'properties.extensionProperties', 'type': '{str}'}, + 'maintenance_scope': {'key': 'properties.maintenanceScope', 'type': 'str'}, + 'visibility': {'key': 'properties.visibility', 'type': 'str'}, + 'start_date_time': {'key': 'properties.maintenanceWindow.startDateTime', 'type': 'str'}, + 'expiration_date_time': {'key': 'properties.maintenanceWindow.expirationDateTime', 'type': 'str'}, + 'duration': {'key': 'properties.maintenanceWindow.duration', 'type': 'str'}, + 'time_zone': {'key': 'properties.maintenanceWindow.timeZone', 'type': 'str'}, + 'recur_every': {'key': 'properties.maintenanceWindow.recurEvery', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + namespace: Optional[str] = None, + extension_properties: Optional[Dict[str, str]] = None, + maintenance_scope: Optional[Union[str, "MaintenanceScope"]] = None, + visibility: Optional[Union[str, "Visibility"]] = None, + start_date_time: Optional[str] = None, + expiration_date_time: Optional[str] = None, + duration: Optional[str] = None, + time_zone: Optional[str] = None, + recur_every: Optional[str] = None, + **kwargs + ): + super(MaintenanceConfiguration, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.namespace = namespace + self.extension_properties = extension_properties + self.maintenance_scope = maintenance_scope + self.visibility = visibility + self.start_date_time = start_date_time + self.expiration_date_time = expiration_date_time + self.duration = duration + self.time_zone = time_zone + self.recur_every = recur_every + + +class MaintenanceError(msrest.serialization.Model): + """An error response received from the Azure Maintenance service. + + :param error: Details of the error. + :type error: ~maintenance_client.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetails"] = None, + **kwargs + ): + super(MaintenanceError, self).__init__(**kwargs) + self.error = error + + +class Operation(msrest.serialization.Model): + """Represents an operation returned by the GetOperations request. + + :param name: Name of the operation. + :type name: str + :param display: Display name of the operation. + :type display: ~maintenance_client.models.OperationInfo + :param origin: Origin of the operation. + :type origin: str + :param properties: Properties of the operation. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationInfo'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["OperationInfo"] = None, + origin: Optional[str] = None, + properties: Optional[object] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class OperationInfo(msrest.serialization.Model): + """Information about an operation. + + :param provider: Name of the provider. + :type provider: str + :param resource: Name of the resource type. + :type resource: str + :param operation: Name of the operation. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(OperationInfo, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationsListResult(msrest.serialization.Model): + """Result of the List Operations operation. + + :param value: A collection of operations. + :type value: list[~maintenance_client.models.Operation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__( + self, + *, + value: Optional[List["Operation"]] = None, + **kwargs + ): + super(OperationsListResult, self).__init__(**kwargs) + self.value = value + + +class Update(msrest.serialization.Model): + """Maintenance update on a resource. + + :param maintenance_scope: The impact area. Possible values include: "All", "Host", "Resource", + "InResource", "OSImage", "Extension", "InGuestPatch", "SQLDB", "SQLManagedInstance". + :type maintenance_scope: str or ~maintenance_client.models.MaintenanceScope + :param impact_type: The impact type. Possible values include: "None", "Freeze", "Restart", + "Redeploy". + :type impact_type: str or ~maintenance_client.models.ImpactType + :param status: The status. Possible values include: "Pending", "InProgress", "Completed", + "RetryNow", "RetryLater". + :type status: str or ~maintenance_client.models.UpdateStatus + :param impact_duration_in_sec: Duration of impact in seconds. + :type impact_duration_in_sec: int + :param not_before: Time when Azure will start force updates if not self-updated by customer + before this time. + :type not_before: ~datetime.datetime + :param resource_id: The resourceId. + :type resource_id: str + """ + + _attribute_map = { + 'maintenance_scope': {'key': 'maintenanceScope', 'type': 'str'}, + 'impact_type': {'key': 'impactType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'impact_duration_in_sec': {'key': 'impactDurationInSec', 'type': 'int'}, + 'not_before': {'key': 'notBefore', 'type': 'iso-8601'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + maintenance_scope: Optional[Union[str, "MaintenanceScope"]] = None, + impact_type: Optional[Union[str, "ImpactType"]] = None, + status: Optional[Union[str, "UpdateStatus"]] = None, + impact_duration_in_sec: Optional[int] = None, + not_before: Optional[datetime.datetime] = None, + resource_id: Optional[str] = None, + **kwargs + ): + super(Update, self).__init__(**kwargs) + self.maintenance_scope = maintenance_scope + self.impact_type = impact_type + self.status = status + self.impact_duration_in_sec = impact_duration_in_sec + self.not_before = not_before + self.resource_id = resource_id diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/__init__.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/__init__.py new file mode 100644 index 00000000000..4abcf25d27c --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/__init__.py @@ -0,0 +1,23 @@ +# 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 ._public_maintenance_configuration_operations import PublicMaintenanceConfigurationOperations +from ._apply_update_operations import ApplyUpdateOperations +from ._configuration_assignment_operations import ConfigurationAssignmentOperations +from ._maintenance_configuration_operations import MaintenanceConfigurationOperations +from ._operation_operations import OperationOperations +from ._update_operations import UpdateOperations + +__all__ = [ + 'PublicMaintenanceConfigurationOperations', + 'ApplyUpdateOperations', + 'ConfigurationAssignmentOperations', + 'MaintenanceConfigurationOperations', + 'OperationOperations', + 'UpdateOperations', +] diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_apply_update_operations.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_apply_update_operations.py new file mode 100644 index 00000000000..e659a0bcad2 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_apply_update_operations.py @@ -0,0 +1,333 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import 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 + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ApplyUpdateOperations(object): + """ApplyUpdateOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~maintenance_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_parent( + self, + resource_group_name, # type: str + resource_parent_type, # type: str + resource_parent_name, # type: str + provider_name, # type: str + resource_type, # type: str + resource_name, # type: str + apply_update_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ApplyUpdate" + """Track Updates to resource with parent. + + Track maintenance updates to resource with parent. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param resource_parent_type: Resource parent type. + :type resource_parent_type: str + :param resource_parent_name: Resource parent identifier. + :type resource_parent_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :param apply_update_name: applyUpdate Id. + :type apply_update_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplyUpdate, or the result of cls(response) + :rtype: ~maintenance_client.models.ApplyUpdate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ApplyUpdate"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.get_parent.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), + 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'applyUpdateName': self._serialize.url("apply_update_name", apply_update_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplyUpdate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/{applyUpdateName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + provider_name, # type: str + resource_type, # type: str + resource_name, # type: str + apply_update_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ApplyUpdate" + """Track Updates to resource. + + Track maintenance updates to resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :param apply_update_name: applyUpdate Id. + :type apply_update_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplyUpdate, or the result of cls(response) + :rtype: ~maintenance_client.models.ApplyUpdate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ApplyUpdate"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'applyUpdateName': self._serialize.url("apply_update_name", apply_update_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplyUpdate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/{applyUpdateName}'} # type: ignore + + def create_or_update_parent( + self, + resource_group_name, # type: str + provider_name, # type: str + resource_parent_type, # type: str + resource_parent_name, # type: str + resource_type, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ApplyUpdate" + """Apply Updates to resource with parent. + + Apply maintenance updates to resource with parent. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_parent_type: Resource parent type. + :type resource_parent_type: str + :param resource_parent_name: Resource parent identifier. + :type resource_parent_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplyUpdate, or the result of cls(response) + :rtype: ~maintenance_client.models.ApplyUpdate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ApplyUpdate"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.create_or_update_parent.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), + 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.put(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplyUpdate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/default'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + provider_name, # type: str + resource_type, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ApplyUpdate" + """Apply Updates to resource. + + Apply maintenance updates to resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplyUpdate, or the result of cls(response) + :rtype: ~maintenance_client.models.ApplyUpdate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ApplyUpdate"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.put(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplyUpdate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/default'} # type: ignore diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_configuration_assignment_operations.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_configuration_assignment_operations.py new file mode 100644 index 00000000000..974f31215f9 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_configuration_assignment_operations.py @@ -0,0 +1,548 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ConfigurationAssignmentOperations(object): + """ConfigurationAssignmentOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~maintenance_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def create_or_update_parent( + self, + resource_group_name, # type: str + provider_name, # type: str + resource_parent_type, # type: str + resource_parent_name, # type: str + resource_type, # type: str + resource_name, # type: str + configuration_assignment_name, # type: str + location=None, # type: Optional[str] + maintenance_configuration_id=None, # type: Optional[str] + resource_id=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.ConfigurationAssignment" + """Create configuration assignment. + + Register configuration for resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_parent_type: Resource parent type. + :type resource_parent_type: str + :param resource_parent_name: Resource parent identifier. + :type resource_parent_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :param configuration_assignment_name: Configuration assignment name. + :type configuration_assignment_name: str + :param location: Location of the resource. + :type location: str + :param maintenance_configuration_id: The maintenance configuration Id. + :type maintenance_configuration_id: str + :param resource_id: The unique resourceId. + :type resource_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConfigurationAssignment, or the result of cls(response) + :rtype: ~maintenance_client.models.ConfigurationAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _configuration_assignment = models.ConfigurationAssignment(location=location, maintenance_configuration_id=maintenance_configuration_id, resource_id=resource_id) + api_version = "2020-07-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create_or_update_parent.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), + 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_configuration_assignment, 'ConfigurationAssignment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConfigurationAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore + + def delete_parent( + self, + resource_group_name, # type: str + provider_name, # type: str + resource_parent_type, # type: str + resource_parent_name, # type: str + resource_type, # type: str + resource_name, # type: str + configuration_assignment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ConfigurationAssignment" + """Unregister configuration for resource. + + Unregister configuration for resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_parent_type: Resource parent type. + :type resource_parent_type: str + :param resource_parent_name: Resource parent identifier. + :type resource_parent_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :param configuration_assignment_name: Unique configuration assignment name. + :type configuration_assignment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConfigurationAssignment, or the result of cls(response) + :rtype: ~maintenance_client.models.ConfigurationAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.delete_parent.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), + 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConfigurationAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + provider_name, # type: str + resource_type, # type: str + resource_name, # type: str + configuration_assignment_name, # type: str + location=None, # type: Optional[str] + maintenance_configuration_id=None, # type: Optional[str] + resource_id=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.ConfigurationAssignment" + """Create configuration assignment. + + Register configuration for resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :param configuration_assignment_name: Configuration assignment name. + :type configuration_assignment_name: str + :param location: Location of the resource. + :type location: str + :param maintenance_configuration_id: The maintenance configuration Id. + :type maintenance_configuration_id: str + :param resource_id: The unique resourceId. + :type resource_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConfigurationAssignment, or the result of cls(response) + :rtype: ~maintenance_client.models.ConfigurationAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _configuration_assignment = models.ConfigurationAssignment(location=location, maintenance_configuration_id=maintenance_configuration_id, resource_id=resource_id) + api_version = "2020-07-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_configuration_assignment, 'ConfigurationAssignment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConfigurationAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + provider_name, # type: str + resource_type, # type: str + resource_name, # type: str + configuration_assignment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ConfigurationAssignment" + """Unregister configuration for resource. + + Unregister configuration for resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :param configuration_assignment_name: Unique configuration assignment name. + :type configuration_assignment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConfigurationAssignment, or the result of cls(response) + :rtype: ~maintenance_client.models.ConfigurationAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConfigurationAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore + + def list_parent( + self, + resource_group_name, # type: str + provider_name, # type: str + resource_parent_type, # type: str + resource_parent_name, # type: str + resource_type, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.ListConfigurationAssignmentsResult"] + """List configurationAssignments for resource. + + List configurationAssignments for resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_parent_type: Resource parent type. + :type resource_parent_type: str + :param resource_parent_name: Resource parent identifier. + :type resource_parent_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListConfigurationAssignmentsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~maintenance_client.models.ListConfigurationAssignmentsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ListConfigurationAssignmentsResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_parent.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), + 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListConfigurationAssignmentsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments'} # type: ignore + + def list( + self, + resource_group_name, # type: str + provider_name, # type: str + resource_type, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.ListConfigurationAssignmentsResult"] + """List configurationAssignments for resource. + + List configurationAssignments for resource. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListConfigurationAssignmentsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~maintenance_client.models.ListConfigurationAssignmentsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ListConfigurationAssignmentsResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListConfigurationAssignmentsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments'} # type: ignore diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_maintenance_configuration_operations.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_maintenance_configuration_operations.py new file mode 100644 index 00000000000..b9848a0ab46 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_maintenance_configuration_operations.py @@ -0,0 +1,467 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class MaintenanceConfigurationOperations(object): + """MaintenanceConfigurationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~maintenance_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.MaintenanceConfiguration" + """Get Configuration record. + + Get Configuration record. + + :param resource_group_name: Resource Group Name. + :type resource_group_name: str + :param resource_name: Resource Identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~maintenance_client.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MaintenanceConfiguration"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.MaintenanceError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + location=None, # type: Optional[str] + tags=None, # type: Optional[Dict[str, str]] + namespace=None, # type: Optional[str] + extension_properties=None, # type: Optional[Dict[str, str]] + maintenance_scope=None, # type: Optional[Union[str, "models.MaintenanceScope"]] + visibility=None, # type: Optional[Union[str, "models.Visibility"]] + start_date_time=None, # type: Optional[str] + expiration_date_time=None, # type: Optional[str] + duration=None, # type: Optional[str] + time_zone=None, # type: Optional[str] + recur_every=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.MaintenanceConfiguration" + """Create or Update configuration record. + + Create or Update configuration record. + + :param resource_group_name: Resource Group Name. + :type resource_group_name: str + :param resource_name: Resource Identifier. + :type resource_name: str + :param location: Gets or sets location of the resource. + :type location: str + :param tags: Gets or sets tags of the resource. + :type tags: dict[str, str] + :param namespace: Gets or sets namespace of the resource. + :type namespace: str + :param extension_properties: Gets or sets extensionProperties of the maintenanceConfiguration. + :type extension_properties: dict[str, str] + :param maintenance_scope: Gets or sets maintenanceScope of the configuration. + :type maintenance_scope: str or ~maintenance_client.models.MaintenanceScope + :param visibility: Gets or sets the visibility of the configuration. + :type visibility: str or ~maintenance_client.models.Visibility + :param start_date_time: Effective start date of the maintenance window in YYYY-MM-DD hh:mm + format. The start date can be set to either the current date or future date. The window will be + created in the time zone provided and adjusted to daylight savings according to that time zone. + :type start_date_time: str + :param expiration_date_time: Effective expiration date of the maintenance window in YYYY-MM-DD + hh:mm format. The window will be created in the time zone provided and adjusted to daylight + savings according to that time zone. Expiration date must be set to a future date. If not + provided, it will be set to the maximum datetime 9999-12-31 23:59:59. + :type expiration_date_time: str + :param duration: Duration of the maintenance window in HH:mm format. If not provided, default + value will be used based on maintenance scope provided. Example: 05:00. + :type duration: str + :param time_zone: Name of the timezone. List of timezones can be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, + W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time. + :type time_zone: str + :param recur_every: Rate at which a Maintenance window is expected to recur. The rate can be + expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: + [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. + Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted + as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays + Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week + Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma + separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, + Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are + recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last + Sunday, recurEvery: Month Fourth Monday. + :type recur_every: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~maintenance_client.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MaintenanceConfiguration"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _configuration = models.MaintenanceConfiguration(location=location, tags=tags, namespace=namespace, extension_properties=extension_properties, maintenance_scope=maintenance_scope, visibility=visibility, start_date_time=start_date_time, expiration_date_time=expiration_date_time, duration=duration, time_zone=time_zone, recur_every=recur_every) + api_version = "2020-07-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_configuration, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.MaintenanceError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.MaintenanceConfiguration" + """Delete Configuration record. + + Delete Configuration record. + + :param resource_group_name: Resource Group Name. + :type resource_group_name: str + :param resource_name: Resource Identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~maintenance_client.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MaintenanceConfiguration"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.MaintenanceError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + resource_name, # type: str + location=None, # type: Optional[str] + tags=None, # type: Optional[Dict[str, str]] + namespace=None, # type: Optional[str] + extension_properties=None, # type: Optional[Dict[str, str]] + maintenance_scope=None, # type: Optional[Union[str, "models.MaintenanceScope"]] + visibility=None, # type: Optional[Union[str, "models.Visibility"]] + start_date_time=None, # type: Optional[str] + expiration_date_time=None, # type: Optional[str] + duration=None, # type: Optional[str] + time_zone=None, # type: Optional[str] + recur_every=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.MaintenanceConfiguration" + """Patch configuration record. + + Patch configuration record. + + :param resource_group_name: Resource Group Name. + :type resource_group_name: str + :param resource_name: Resource Identifier. + :type resource_name: str + :param location: Gets or sets location of the resource. + :type location: str + :param tags: Gets or sets tags of the resource. + :type tags: dict[str, str] + :param namespace: Gets or sets namespace of the resource. + :type namespace: str + :param extension_properties: Gets or sets extensionProperties of the maintenanceConfiguration. + :type extension_properties: dict[str, str] + :param maintenance_scope: Gets or sets maintenanceScope of the configuration. + :type maintenance_scope: str or ~maintenance_client.models.MaintenanceScope + :param visibility: Gets or sets the visibility of the configuration. + :type visibility: str or ~maintenance_client.models.Visibility + :param start_date_time: Effective start date of the maintenance window in YYYY-MM-DD hh:mm + format. The start date can be set to either the current date or future date. The window will be + created in the time zone provided and adjusted to daylight savings according to that time zone. + :type start_date_time: str + :param expiration_date_time: Effective expiration date of the maintenance window in YYYY-MM-DD + hh:mm format. The window will be created in the time zone provided and adjusted to daylight + savings according to that time zone. Expiration date must be set to a future date. If not + provided, it will be set to the maximum datetime 9999-12-31 23:59:59. + :type expiration_date_time: str + :param duration: Duration of the maintenance window in HH:mm format. If not provided, default + value will be used based on maintenance scope provided. Example: 05:00. + :type duration: str + :param time_zone: Name of the timezone. List of timezones can be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, + W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time. + :type time_zone: str + :param recur_every: Rate at which a Maintenance window is expected to recur. The rate can be + expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: + [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. + Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted + as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays + Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week + Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma + separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, + Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are + recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last + Sunday, recurEvery: Month Fourth Monday. + :type recur_every: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~maintenance_client.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MaintenanceConfiguration"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _configuration = models.MaintenanceConfiguration(location=location, tags=tags, namespace=namespace, extension_properties=extension_properties, maintenance_scope=maintenance_scope, visibility=visibility, start_date_time=start_date_time, expiration_date_time=expiration_date_time, duration=duration, time_zone=time_zone, recur_every=recur_every) + api_version = "2020-07-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_configuration, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.MaintenanceError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.ListMaintenanceConfigurationsResult"] + """Get Configuration records within a subscription. + + Get Configuration records within a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListMaintenanceConfigurationsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~maintenance_client.models.ListMaintenanceConfigurationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ListMaintenanceConfigurationsResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListMaintenanceConfigurationsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.MaintenanceError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Maintenance/maintenanceConfigurations'} # type: ignore diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_operation_operations.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_operation_operations.py new file mode 100644 index 00000000000..0a8fa2a7aee --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_operation_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class OperationOperations(object): + """OperationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~maintenance_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.OperationsListResult"] + """List available operations. + + List the available operations supported by the Microsoft.Maintenance resource provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationsListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~maintenance_client.models.OperationsListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationsListResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationsListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.MaintenanceError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.Maintenance/operations'} # type: ignore diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_public_maintenance_configuration_operations.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_public_maintenance_configuration_operations.py new file mode 100644 index 00000000000..dd8406a5446 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_public_maintenance_configuration_operations.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PublicMaintenanceConfigurationOperations(object): + """PublicMaintenanceConfigurationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~maintenance_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.ListMaintenanceConfigurationsResult"] + """Get Public Maintenance Configuration records. + + Get Public Maintenance Configuration records. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListMaintenanceConfigurationsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~maintenance_client.models.ListMaintenanceConfigurationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ListMaintenanceConfigurationsResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListMaintenanceConfigurationsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.MaintenanceError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Maintenance/publicMaintenanceConfigurations'} # type: ignore + + def get( + self, + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.MaintenanceConfiguration" + """Get Public Maintenance Configuration record. + + Get Public Maintenance Configuration record. + + :param resource_name: Resource Identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~maintenance_client.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MaintenanceConfiguration"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.MaintenanceError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/{resourceName}'} # type: ignore diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_update_operations.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_update_operations.py new file mode 100644 index 00000000000..fd193a4fef6 --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/operations/_update_operations.py @@ -0,0 +1,218 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class UpdateOperations(object): + """UpdateOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~maintenance_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_parent( + self, + resource_group_name, # type: str + provider_name, # type: str + resource_parent_type, # type: str + resource_parent_name, # type: str + resource_type, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.ListUpdatesResult"] + """Get Updates to resource. + + Get updates to resources. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_parent_type: Resource parent type. + :type resource_parent_type: str + :param resource_parent_name: Resource parent identifier. + :type resource_parent_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListUpdatesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~maintenance_client.models.ListUpdatesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ListUpdatesResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_parent.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), + 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListUpdatesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/updates'} # type: ignore + + def list( + self, + resource_group_name, # type: str + provider_name, # type: str + resource_type, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.ListUpdatesResult"] + """Get Updates to resource. + + Get updates to resources. + + :param resource_group_name: Resource group name. + :type resource_group_name: str + :param provider_name: Resource provider name. + :type provider_name: str + :param resource_type: Resource type. + :type resource_type: str + :param resource_name: Resource identifier. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListUpdatesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~maintenance_client.models.ListUpdatesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ListUpdatesResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-07-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'providerName': self._serialize.url("provider_name", provider_name, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListUpdatesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/updates'} # type: ignore diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance/py.typed b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/maintenance/azext_maintenance/vendored_sdks/maintenance/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/maintenance/azext_maintenance/vendored_sdks/maintenance_management_client.py b/src/maintenance/azext_maintenance/vendored_sdks/maintenance_management_client.py deleted file mode 100644 index 63a666bd608..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/maintenance_management_client.py +++ /dev/null @@ -1,106 +0,0 @@ -# pylint: disable=too-many-instance-attributes,too-few-public-methods -# 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 msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.apply_updates_operations import ApplyUpdatesOperations -from .operations.configuration_assignments_operations import ConfigurationAssignmentsOperations -from .operations.maintenance_configurations_operations import MaintenanceConfigurationsOperations -from .operations.operations import Operations -from .operations.updates_operations import UpdatesOperations -from . import models - - -class MaintenanceManagementClientConfiguration(AzureConfiguration): - """Configuration for MaintenanceManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials that uniquely identify a - 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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(MaintenanceManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-Maintenance/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class MaintenanceManagementClient(SDKClient): - """Azure Maintenance Management Client - - :ivar config: Configuration for client. - :vartype config: MaintenanceManagementClientConfiguration - - :ivar apply_updates: ApplyUpdates operations - :vartype apply_updates: azure.mgmt.maintenance.operations.ApplyUpdatesOperations - :ivar configuration_assignments: ConfigurationAssignments operations - :vartype configuration_assignments: azure.mgmt.maintenance.operations.ConfigurationAssignmentsOperations - :ivar maintenance_configurations: MaintenanceConfigurations operations - :vartype maintenance_configurations: azure.mgmt.maintenance.operations.MaintenanceConfigurationsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.maintenance.operations.Operations - :ivar updates: Updates operations - :vartype updates: azure.mgmt.maintenance.operations.UpdatesOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials that uniquely identify a - 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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = MaintenanceManagementClientConfiguration(credentials, subscription_id, base_url) - super(MaintenanceManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-06-01-preview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.apply_updates = ApplyUpdatesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.configuration_assignments = ConfigurationAssignmentsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.maintenance_configurations = MaintenanceConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.updates = UpdatesOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/__init__.py b/src/maintenance/azext_maintenance/vendored_sdks/models/__init__.py deleted file mode 100644 index 13b4a414936..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/__init__.py +++ /dev/null @@ -1,59 +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. -# -------------------------------------------------------------------------- - -try: - from .resource_py3 import Resource - from .apply_update_py3 import ApplyUpdate - from .configuration_assignment_py3 import ConfigurationAssignment - from .maintenance_configuration_py3 import MaintenanceConfiguration - from .error_details_py3 import ErrorDetails - from .maintenance_error_py3 import MaintenanceError, MaintenanceErrorException - from .operation_info_py3 import OperationInfo - from .operation_py3 import Operation - from .update_py3 import Update -except (SyntaxError, ImportError): - from .resource import Resource - from .apply_update import ApplyUpdate - from .configuration_assignment import ConfigurationAssignment - from .maintenance_configuration import MaintenanceConfiguration - from .error_details import ErrorDetails - from .maintenance_error import MaintenanceError, MaintenanceErrorException - from .operation_info import OperationInfo - from .operation import Operation - from .update import Update -from .configuration_assignment_paged import ConfigurationAssignmentPaged -from .maintenance_configuration_paged import MaintenanceConfigurationPaged -from .operation_paged import OperationPaged -from .update_paged import UpdatePaged -from .maintenance_management_client_enums import ( - UpdateStatus, - MaintenanceScope, - ImpactType, -) - -__all__ = [ - 'Resource', - 'ApplyUpdate', - 'ConfigurationAssignment', - 'MaintenanceConfiguration', - 'ErrorDetails', - 'MaintenanceError', 'MaintenanceErrorException', - 'OperationInfo', - 'Operation', - 'Update', - 'ConfigurationAssignmentPaged', - 'MaintenanceConfigurationPaged', - 'OperationPaged', - 'UpdatePaged', - 'UpdateStatus', - 'MaintenanceScope', - 'ImpactType', -] diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/apply_update.py b/src/maintenance/azext_maintenance/vendored_sdks/models/apply_update.py deleted file mode 100644 index 8eb0f9de95a..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/apply_update.py +++ /dev/null @@ -1,55 +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 .resource import Resource - - -class ApplyUpdate(Resource): - """Apply Update request. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier of the resource - :vartype id: str - :ivar name: Name of the resource - :vartype name: str - :ivar type: Type of the resource - :vartype type: str - :param status: The status. Possible values include: 'Pending', - 'InProgress', 'Completed', 'RetryNow', 'RetryLater' - :type status: str or ~azure.mgmt.maintenance.models.UpdateStatus - :param resource_id: The resourceId - :type resource_id: str - :param last_update_time: Last Update time - :type last_update_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'last_update_time': {'key': 'properties.lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ApplyUpdate, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.resource_id = kwargs.get('resource_id', None) - self.last_update_time = kwargs.get('last_update_time', None) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/apply_update_py3.py b/src/maintenance/azext_maintenance/vendored_sdks/models/apply_update_py3.py deleted file mode 100644 index 7630d88a575..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/apply_update_py3.py +++ /dev/null @@ -1,55 +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 .resource_py3 import Resource - - -class ApplyUpdate(Resource): - """Apply Update request. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier of the resource - :vartype id: str - :ivar name: Name of the resource - :vartype name: str - :ivar type: Type of the resource - :vartype type: str - :param status: The status. Possible values include: 'Pending', - 'InProgress', 'Completed', 'RetryNow', 'RetryLater' - :type status: str or ~azure.mgmt.maintenance.models.UpdateStatus - :param resource_id: The resourceId - :type resource_id: str - :param last_update_time: Last Update time - :type last_update_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'last_update_time': {'key': 'properties.lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, status=None, resource_id: str = None, last_update_time=None, **kwargs) -> None: - super(ApplyUpdate, self).__init__(**kwargs) - self.status = status - self.resource_id = resource_id - self.last_update_time = last_update_time diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/configuration_assignment.py b/src/maintenance/azext_maintenance/vendored_sdks/models/configuration_assignment.py deleted file mode 100644 index 6dcfed83e76..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/configuration_assignment.py +++ /dev/null @@ -1,54 +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 .resource import Resource - - -class ConfigurationAssignment(Resource): - """Configuration Assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier of the resource - :vartype id: str - :ivar name: Name of the resource - :vartype name: str - :ivar type: Type of the resource - :vartype type: str - :param location: Location of the resource - :type location: str - :param maintenance_configuration_id: The maintenance configuration Id - :type maintenance_configuration_id: str - :param resource_id: The unique resourceId - :type resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ConfigurationAssignment, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.maintenance_configuration_id = kwargs.get('maintenance_configuration_id', None) - self.resource_id = kwargs.get('resource_id', None) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/configuration_assignment_paged.py b/src/maintenance/azext_maintenance/vendored_sdks/models/configuration_assignment_paged.py deleted file mode 100644 index 3bc4778ffda..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/configuration_assignment_paged.py +++ /dev/null @@ -1,29 +0,0 @@ -# pylint: disable=line-too-long -# pylint: disable=too-many-ancestors -# 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 msrest.paging import Paged - - -class ConfigurationAssignmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`ConfigurationAssignment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ConfigurationAssignment]'} - } - - def __init__(self, *args, **kwargs): - - super(ConfigurationAssignmentPaged, self).__init__(*args, **kwargs) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/configuration_assignment_py3.py b/src/maintenance/azext_maintenance/vendored_sdks/models/configuration_assignment_py3.py deleted file mode 100644 index 58a3550d207..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/configuration_assignment_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# pylint: disable=line-too-long -# 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 .resource_py3 import Resource - - -class ConfigurationAssignment(Resource): - """Configuration Assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier of the resource - :vartype id: str - :ivar name: Name of the resource - :vartype name: str - :ivar type: Type of the resource - :vartype type: str - :param location: Location of the resource - :type location: str - :param maintenance_configuration_id: The maintenance configuration Id - :type maintenance_configuration_id: str - :param resource_id: The unique resourceId - :type resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, *, location: str = None, maintenance_configuration_id: str = None, resource_id: str = None, **kwargs) -> None: - super(ConfigurationAssignment, self).__init__(**kwargs) - self.location = location - self.maintenance_configuration_id = maintenance_configuration_id - self.resource_id = resource_id diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/error_details.py b/src/maintenance/azext_maintenance/vendored_sdks/models/error_details.py deleted file mode 100644 index 4047ccb42aa..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/error_details.py +++ /dev/null @@ -1,33 +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 msrest.serialization import Model - - -class ErrorDetails(Model): - """An error response details received from the Azure Maintenance service. - - :param code: Service-defined error code. This code serves as a sub-status - for the HTTP error code specified in the response. - :type code: str - :param message: Human-readable representation of the error. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetails, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/error_details_py3.py b/src/maintenance/azext_maintenance/vendored_sdks/models/error_details_py3.py deleted file mode 100644 index 2f167d99c59..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/error_details_py3.py +++ /dev/null @@ -1,33 +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 msrest.serialization import Model - - -class ErrorDetails(Model): - """An error response details received from the Azure Maintenance service. - - :param code: Service-defined error code. This code serves as a sub-status - for the HTTP error code specified in the response. - :type code: str - :param message: Human-readable representation of the error. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str = None, message: str = None, **kwargs) -> None: - super(ErrorDetails, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_configuration.py b/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_configuration.py deleted file mode 100644 index 8852b344935..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_configuration.py +++ /dev/null @@ -1,66 +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 .resource import Resource - - -class MaintenanceConfiguration(Resource): - """Maintenance configuration record type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier of the resource - :vartype id: str - :ivar name: Name of the resource - :vartype name: str - :ivar type: Type of the resource - :vartype type: str - :param location: Gets or sets location of the resource - :type location: str - :param tags: Gets or sets tags of the resource - :type tags: dict[str, str] - :param namespace: Gets or sets namespace of the resource - :type namespace: str - :param extension_properties: Gets or sets extensionProperties of the - maintenanceConfiguration - :type extension_properties: dict[str, str] - :param maintenance_scope: Gets or sets maintenanceScope of the - configuration. Possible values include: 'All', 'Host', 'Resource', - 'InResource' - :type maintenance_scope: str or - ~azure.mgmt.maintenance.models.MaintenanceScope - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'namespace': {'key': 'properties.namespace', 'type': 'str'}, - 'extension_properties': {'key': 'properties.extensionProperties', 'type': '{str}'}, - 'maintenance_scope': {'key': 'properties.maintenanceScope', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaintenanceConfiguration, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.namespace = kwargs.get('namespace', None) - self.extension_properties = kwargs.get('extension_properties', None) - self.maintenance_scope = kwargs.get('maintenance_scope', None) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_configuration_paged.py b/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_configuration_paged.py deleted file mode 100644 index 0913770a431..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_configuration_paged.py +++ /dev/null @@ -1,29 +0,0 @@ -# pylint: disable=line-too-long -# pylint: disable=too-many-ancestors -# 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 msrest.paging import Paged - - -class MaintenanceConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`MaintenanceConfiguration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MaintenanceConfiguration]'} - } - - def __init__(self, *args, **kwargs): - - super(MaintenanceConfigurationPaged, self).__init__(*args, **kwargs) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_configuration_py3.py b/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_configuration_py3.py deleted file mode 100644 index 36fa2aa307f..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_configuration_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# pylint: disable=line-too-long -# 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 .resource_py3 import Resource - - -class MaintenanceConfiguration(Resource): - """Maintenance configuration record type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier of the resource - :vartype id: str - :ivar name: Name of the resource - :vartype name: str - :ivar type: Type of the resource - :vartype type: str - :param location: Gets or sets location of the resource - :type location: str - :param tags: Gets or sets tags of the resource - :type tags: dict[str, str] - :param namespace: Gets or sets namespace of the resource - :type namespace: str - :param extension_properties: Gets or sets extensionProperties of the - maintenanceConfiguration - :type extension_properties: dict[str, str] - :param maintenance_scope: Gets or sets maintenanceScope of the - configuration. Possible values include: 'All', 'Host', 'Resource', - 'InResource' - :type maintenance_scope: str or - ~azure.mgmt.maintenance.models.MaintenanceScope - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'namespace': {'key': 'properties.namespace', 'type': 'str'}, - 'extension_properties': {'key': 'properties.extensionProperties', 'type': '{str}'}, - 'maintenance_scope': {'key': 'properties.maintenanceScope', 'type': 'str'}, - } - - def __init__(self, *, location: str = None, tags=None, namespace: str = None, extension_properties=None, maintenance_scope=None, **kwargs) -> None: - super(MaintenanceConfiguration, self).__init__(**kwargs) - self.location = location - self.tags = tags - self.namespace = namespace - self.extension_properties = extension_properties - self.maintenance_scope = maintenance_scope diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_error.py b/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_error.py deleted file mode 100644 index 005fd1ec7c2..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_error.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class MaintenanceError(Model): - """An error response received from the Azure Maintenance service. - - :param error: Details of the error - :type error: ~azure.mgmt.maintenance.models.ErrorDetails - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, - } - - def __init__(self, **kwargs): - super(MaintenanceError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class MaintenanceErrorException(HttpOperationError): - """Server responsed with exception of type: 'MaintenanceError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(MaintenanceErrorException, self).__init__(deserialize, response, 'MaintenanceError', *args) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_error_py3.py b/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_error_py3.py deleted file mode 100644 index 90c111e3030..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/maintenance_error_py3.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class MaintenanceError(Model): - """An error response received from the Azure Maintenance service. - - :param error: Details of the error - :type error: ~azure.mgmt.maintenance.models.ErrorDetails - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(MaintenanceError, self).__init__(**kwargs) - self.error = error - - -class MaintenanceErrorException(HttpOperationError): - """Server responsed with exception of type: 'MaintenanceError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(MaintenanceErrorException, self).__init__(deserialize, response, 'MaintenanceError', *args) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/operation.py b/src/maintenance/azext_maintenance/vendored_sdks/models/operation.py deleted file mode 100644 index a49db9af2e3..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/operation.py +++ /dev/null @@ -1,40 +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 msrest.serialization import Model - - -class Operation(Model): - """Represents an operation returned by the GetOperations request. - - :param name: Name of the operation - :type name: str - :param display: Display name of the operation - :type display: ~azure.mgmt.maintenance.models.OperationInfo - :param origin: Origin of the operation - :type origin: str - :param properties: Properties of the operation - :type properties: object - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationInfo'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.properties = kwargs.get('properties', None) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/operation_info.py b/src/maintenance/azext_maintenance/vendored_sdks/models/operation_info.py deleted file mode 100644 index 20c7286c095..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/operation_info.py +++ /dev/null @@ -1,40 +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 msrest.serialization import Model - - -class OperationInfo(Model): - """Information about an operation. - - :param provider: Name of the provider - :type provider: str - :param resource: Name of the resource type - :type resource: str - :param operation: Name of the operation - :type operation: str - :param description: Description of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationInfo, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/operation_info_py3.py b/src/maintenance/azext_maintenance/vendored_sdks/models/operation_info_py3.py deleted file mode 100644 index 7376965ab1e..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/operation_info_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# pylint: disable=line-too-long -# # 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 msrest.serialization import Model - - -class OperationInfo(Model): - """Information about an operation. - - :param provider: Name of the provider - :type provider: str - :param resource: Name of the resource type - :type resource: str - :param operation: Name of the operation - :type operation: str - :param description: Description of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str = None, resource: str = None, operation: str = None, description: str = None, **kwargs) -> None: - super(OperationInfo, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/operation_paged.py b/src/maintenance/azext_maintenance/vendored_sdks/models/operation_paged.py deleted file mode 100644 index 144a92a8c9d..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/operation_paged.py +++ /dev/null @@ -1,28 +0,0 @@ -# pylint: disable=too-many-ancestors -# # 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 msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/operation_py3.py b/src/maintenance/azext_maintenance/vendored_sdks/models/operation_py3.py deleted file mode 100644 index 521b2ceeadb..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/operation_py3.py +++ /dev/null @@ -1,40 +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 msrest.serialization import Model - - -class Operation(Model): - """Represents an operation returned by the GetOperations request. - - :param name: Name of the operation - :type name: str - :param display: Display name of the operation - :type display: ~azure.mgmt.maintenance.models.OperationInfo - :param origin: Origin of the operation - :type origin: str - :param properties: Properties of the operation - :type properties: object - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationInfo'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, *, name: str = None, display=None, origin: str = None, properties=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/resource.py b/src/maintenance/azext_maintenance/vendored_sdks/models/resource.py deleted file mode 100644 index b2d2b17be38..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/resource.py +++ /dev/null @@ -1,45 +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 msrest.serialization import Model - - -class Resource(Model): - """Definition of a Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier of the resource - :vartype id: str - :ivar name: Name of the resource - :vartype name: str - :ivar type: Type of the resource - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/resource_py3.py b/src/maintenance/azext_maintenance/vendored_sdks/models/resource_py3.py deleted file mode 100644 index 79dce3e5b3b..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/resource_py3.py +++ /dev/null @@ -1,45 +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 msrest.serialization import Model - - -class Resource(Model): - """Definition of a Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier of the resource - :vartype id: str - :ivar name: Name of the resource - :vartype name: str - :ivar type: Type of the resource - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/update.py b/src/maintenance/azext_maintenance/vendored_sdks/models/update.py deleted file mode 100644 index 85af753a955..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/update.py +++ /dev/null @@ -1,53 +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 msrest.serialization import Model - - -class Update(Model): - """Maintenance update on a resource. - - :param maintenance_scope: The impact area. Possible values include: 'All', - 'Host', 'Resource', 'InResource' - :type maintenance_scope: str or - ~azure.mgmt.maintenance.models.MaintenanceScope - :param impact_type: The impact type. Possible values include: 'None', - 'Freeze', 'Restart', 'Redeploy' - :type impact_type: str or ~azure.mgmt.maintenance.models.ImpactType - :param status: The status. Possible values include: 'Pending', - 'InProgress', 'Completed', 'RetryNow', 'RetryLater' - :type status: str or ~azure.mgmt.maintenance.models.UpdateStatus - :param impact_duration_in_sec: Duration of impact in seconds - :type impact_duration_in_sec: int - :param not_before: Time when Azure will start force updates if not - self-updated by customer before this time - :type not_before: datetime - :param resource_id: The resourceId - :type resource_id: str - """ - - _attribute_map = { - 'maintenance_scope': {'key': 'maintenanceScope', 'type': 'str'}, - 'impact_type': {'key': 'impactType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'impact_duration_in_sec': {'key': 'impactDurationInSec', 'type': 'int'}, - 'not_before': {'key': 'notBefore', 'type': 'iso-8601'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Update, self).__init__(**kwargs) - self.maintenance_scope = kwargs.get('maintenance_scope', None) - self.impact_type = kwargs.get('impact_type', None) - self.status = kwargs.get('status', None) - self.impact_duration_in_sec = kwargs.get('impact_duration_in_sec', None) - self.not_before = kwargs.get('not_before', None) - self.resource_id = kwargs.get('resource_id', None) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/update_paged.py b/src/maintenance/azext_maintenance/vendored_sdks/models/update_paged.py deleted file mode 100644 index 4e0a307fbcc..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/update_paged.py +++ /dev/null @@ -1,28 +0,0 @@ -# pylint: disable=too-many-ancestors -# # 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 msrest.paging import Paged - - -class UpdatePaged(Paged): - """ - A paging container for iterating over a list of :class:`Update ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Update]'} - } - - def __init__(self, *args, **kwargs): - - super(UpdatePaged, self).__init__(*args, **kwargs) diff --git a/src/maintenance/azext_maintenance/vendored_sdks/models/update_py3.py b/src/maintenance/azext_maintenance/vendored_sdks/models/update_py3.py deleted file mode 100644 index d8f4ba7ca7d..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/models/update_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# pylint: disable=line-too-long -# # 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 msrest.serialization import Model - - -class Update(Model): - """Maintenance update on a resource. - - :param maintenance_scope: The impact area. Possible values include: 'All', - 'Host', 'Resource', 'InResource' - :type maintenance_scope: str or - ~azure.mgmt.maintenance.models.MaintenanceScope - :param impact_type: The impact type. Possible values include: 'None', - 'Freeze', 'Restart', 'Redeploy' - :type impact_type: str or ~azure.mgmt.maintenance.models.ImpactType - :param status: The status. Possible values include: 'Pending', - 'InProgress', 'Completed', 'RetryNow', 'RetryLater' - :type status: str or ~azure.mgmt.maintenance.models.UpdateStatus - :param impact_duration_in_sec: Duration of impact in seconds - :type impact_duration_in_sec: int - :param not_before: Time when Azure will start force updates if not - self-updated by customer before this time - :type not_before: datetime - :param resource_id: The resourceId - :type resource_id: str - """ - - _attribute_map = { - 'maintenance_scope': {'key': 'maintenanceScope', 'type': 'str'}, - 'impact_type': {'key': 'impactType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'impact_duration_in_sec': {'key': 'impactDurationInSec', 'type': 'int'}, - 'not_before': {'key': 'notBefore', 'type': 'iso-8601'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, *, maintenance_scope=None, impact_type=None, status=None, impact_duration_in_sec: int = None, not_before=None, resource_id: str = None, **kwargs) -> None: - super(Update, self).__init__(**kwargs) - self.maintenance_scope = maintenance_scope - self.impact_type = impact_type - self.status = status - self.impact_duration_in_sec = impact_duration_in_sec - self.not_before = not_before - self.resource_id = resource_id diff --git a/src/maintenance/azext_maintenance/vendored_sdks/operations/__init__.py b/src/maintenance/azext_maintenance/vendored_sdks/operations/__init__.py deleted file mode 100644 index 6a398c8ffd0..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/operations/__init__.py +++ /dev/null @@ -1,24 +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 .apply_updates_operations import ApplyUpdatesOperations -from .configuration_assignments_operations import ConfigurationAssignmentsOperations -from .maintenance_configurations_operations import MaintenanceConfigurationsOperations -from .operations import Operations -from .updates_operations import UpdatesOperations - -__all__ = [ - 'ApplyUpdatesOperations', - 'ConfigurationAssignmentsOperations', - 'MaintenanceConfigurationsOperations', - 'Operations', - 'UpdatesOperations', -] diff --git a/src/maintenance/azext_maintenance/vendored_sdks/operations/apply_updates_operations.py b/src/maintenance/azext_maintenance/vendored_sdks/operations/apply_updates_operations.py deleted file mode 100644 index dcea9d421ef..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/operations/apply_updates_operations.py +++ /dev/null @@ -1,337 +0,0 @@ -# pylint: disable=line-too-long -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ApplyUpdatesOperations(object): - """ApplyUpdatesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - self.config = config - - def get_parent( - self, resource_group_name, resource_parent_type, resource_parent_name, provider_name, resource_type, resource_name, apply_update_name, custom_headers=None, raw=False, **operation_config): - """Track Updates to resource with parent. - - Track maintenance updates to resource with parent. - - :param resource_group_name: Resource group name - :type resource_group_name: str - :param resource_parent_type: Resource parent type - :type resource_parent_type: str - :param resource_parent_name: Resource parent identifier - :type resource_parent_name: str - :param provider_name: Resource provider name - :type provider_name: str - :param resource_type: Resource type - :type resource_type: str - :param resource_name: Resource identifier - :type resource_name: str - :param apply_update_name: applyUpdate Id - :type apply_update_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplyUpdate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.maintenance.models.ApplyUpdate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_parent.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), - 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'applyUpdateName': self._serialize.url("apply_update_name", apply_update_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplyUpdate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/{applyUpdateName}'} - - def get( - self, resource_group_name, provider_name, resource_type, resource_name, apply_update_name, custom_headers=None, raw=False, **operation_config): - """Track Updates to resource. - - Track maintenance updates to resource. - - :param resource_group_name: Resource group name - :type resource_group_name: str - :param provider_name: Resource provider name - :type provider_name: str - :param resource_type: Resource type - :type resource_type: str - :param resource_name: Resource identifier - :type resource_name: str - :param apply_update_name: applyUpdate Id - :type apply_update_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplyUpdate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.maintenance.models.ApplyUpdate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'applyUpdateName': self._serialize.url("apply_update_name", apply_update_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplyUpdate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/{applyUpdateName}'} - - def create_or_update_parent( - self, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): - """Apply Updates to resource with parent. - - Apply maintenance updates to resource with parent. - - :param resource_group_name: Resource group name - :type resource_group_name: str - :param provider_name: Resource provider name - :type provider_name: str - :param resource_parent_type: Resource parent type - :type resource_parent_type: str - :param resource_parent_name: Resource parent identifier - :type resource_parent_name: str - :param resource_type: Resource type - :type resource_type: str - :param resource_name: Resource identifier - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplyUpdate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.maintenance.models.ApplyUpdate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_parent.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), - 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplyUpdate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/default'} - - def create_or_update( - self, resource_group_name, provider_name, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): - """Apply Updates to resource. - - Apply maintenance updates to resource. - - :param resource_group_name: Resource group name - :type resource_group_name: str - :param provider_name: Resource provider name - :type provider_name: str - :param resource_type: Resource type - :type resource_type: str - :param resource_name: Resource identifier - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplyUpdate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.maintenance.models.ApplyUpdate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplyUpdate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/default'} diff --git a/src/maintenance/azext_maintenance/vendored_sdks/operations/configuration_assignments_operations.py b/src/maintenance/azext_maintenance/vendored_sdks/operations/configuration_assignments_operations.py deleted file mode 100644 index 9c9fa81346f..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/operations/configuration_assignments_operations.py +++ /dev/null @@ -1,521 +0,0 @@ -# pylint: disable=line-too-long -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ConfigurationAssignmentsOperations(object): - """ConfigurationAssignmentsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - self.config = config - - def create_or_update_parent( - self, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, configuration_assignment_name, configuration_assignment, custom_headers=None, raw=False, **operation_config): - """Create configuration assignment. - - Register configuration for resource. - - :param resource_group_name: Resource group name - :type resource_group_name: str - :param provider_name: Resource provider name - :type provider_name: str - :param resource_parent_type: Resource parent type - :type resource_parent_type: str - :param resource_parent_name: Resource parent identifier - :type resource_parent_name: str - :param resource_type: Resource type - :type resource_type: str - :param resource_name: Resource identifier - :type resource_name: str - :param configuration_assignment_name: Configuration assignment name - :type configuration_assignment_name: str - :param configuration_assignment: The configurationAssignment - :type configuration_assignment: - ~azure.mgmt.maintenance.models.ConfigurationAssignment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConfigurationAssignment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.maintenance.models.ConfigurationAssignment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_parent.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), - 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(configuration_assignment, 'ConfigurationAssignment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ConfigurationAssignment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} - - def delete_parent( - self, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, configuration_assignment_name, custom_headers=None, raw=False, **operation_config): - """Unregister configuration for resource. - - Unregister configuration for resource. - - :param resource_group_name: Resource group name - :type resource_group_name: str - :param provider_name: Resource provider name - :type provider_name: str - :param resource_parent_type: Resource parent type - :type resource_parent_type: str - :param resource_parent_name: Resource parent identifier - :type resource_parent_name: str - :param resource_type: Resource type - :type resource_type: str - :param resource_name: Resource identifier - :type resource_name: str - :param configuration_assignment_name: Unique configuration assignment - name - :type configuration_assignment_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConfigurationAssignment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.maintenance.models.ConfigurationAssignment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_parent.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), - 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ConfigurationAssignment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} - - def create_or_update( - self, resource_group_name, provider_name, resource_type, resource_name, configuration_assignment_name, configuration_assignment, custom_headers=None, raw=False, **operation_config): - """Create configuration assignment. - - Register configuration for resource. - - :param resource_group_name: Resource group name - :type resource_group_name: str - :param provider_name: Resource provider name - :type provider_name: str - :param resource_type: Resource type - :type resource_type: str - :param resource_name: Resource identifier - :type resource_name: str - :param configuration_assignment_name: Configuration assignment name - :type configuration_assignment_name: str - :param configuration_assignment: The configurationAssignment - :type configuration_assignment: - ~azure.mgmt.maintenance.models.ConfigurationAssignment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConfigurationAssignment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.maintenance.models.ConfigurationAssignment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(configuration_assignment, 'ConfigurationAssignment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ConfigurationAssignment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} - - def delete( - self, resource_group_name, provider_name, resource_type, resource_name, configuration_assignment_name, custom_headers=None, raw=False, **operation_config): - """Unregister configuration for resource. - - Unregister configuration for resource. - - :param resource_group_name: Resource group name - :type resource_group_name: str - :param provider_name: Resource provider name - :type provider_name: str - :param resource_type: Resource type - :type resource_type: str - :param resource_name: Resource identifier - :type resource_name: str - :param configuration_assignment_name: Unique configuration assignment - name - :type configuration_assignment_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConfigurationAssignment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.maintenance.models.ConfigurationAssignment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ConfigurationAssignment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} - - def list_parent( - self, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): - """List configurationAssignments for resource. - - List configurationAssignments for resource. - - :param resource_group_name: Resource group name - :type resource_group_name: str - :param provider_name: Resource provider name - :type provider_name: str - :param resource_parent_type: Resource parent type - :type resource_parent_type: str - :param resource_parent_name: Resource parent identifier - :type resource_parent_name: str - :param resource_type: Resource type - :type resource_type: str - :param resource_name: Resource identifier - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ConfigurationAssignment - :rtype: - ~azure.mgmt.maintenance.models.ConfigurationAssignmentPaged[~azure.mgmt.maintenance.models.ConfigurationAssignment] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): # pylint: disable=unused-argument - - if not next_link: - # Construct URL - url = self.list_parent.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), - 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ConfigurationAssignmentPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ConfigurationAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments'} - - def list( - self, resource_group_name, provider_name, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): - """List configurationAssignments for resource. - - List configurationAssignments for resource. - - :param resource_group_name: Resource group name - :type resource_group_name: str - :param provider_name: Resource provider name - :type provider_name: str - :param resource_type: Resource type - :type resource_type: str - :param resource_name: Resource identifier - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ConfigurationAssignment - :rtype: - ~azure.mgmt.maintenance.models.ConfigurationAssignmentPaged[~azure.mgmt.maintenance.models.ConfigurationAssignment] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): # pylint: disable=unused-argument - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ConfigurationAssignmentPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ConfigurationAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments'} diff --git a/src/maintenance/azext_maintenance/vendored_sdks/operations/maintenance_configurations_operations.py b/src/maintenance/azext_maintenance/vendored_sdks/operations/maintenance_configurations_operations.py deleted file mode 100644 index c828322f8c3..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/operations/maintenance_configurations_operations.py +++ /dev/null @@ -1,359 +0,0 @@ -# pylint: disable=line-too-long -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MaintenanceConfigurationsOperations(object): - """MaintenanceConfigurationsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - self.config = config - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Get Configuration record. - - :param resource_group_name: Resource Group Name - :type resource_group_name: str - :param resource_name: Resource Identifier - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MaintenanceConfiguration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.maintenance.models.MaintenanceConfiguration or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`MaintenanceErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.MaintenanceErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}'} - - def create_or_update( - self, resource_group_name, resource_name, configuration, custom_headers=None, raw=False, **operation_config): - """Create or Update configuration record. - - :param resource_group_name: Resource Group Name - :type resource_group_name: str - :param resource_name: Resource Identifier - :type resource_name: str - :param configuration: The configuration - :type configuration: - ~azure.mgmt.maintenance.models.MaintenanceConfiguration - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MaintenanceConfiguration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.maintenance.models.MaintenanceConfiguration or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`MaintenanceErrorException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(configuration, 'MaintenanceConfiguration') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.MaintenanceErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}'} - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Delete Configuration record. - - :param resource_group_name: Resource Group Name - :type resource_group_name: str - :param resource_name: Resource Identifier - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MaintenanceConfiguration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.maintenance.models.MaintenanceConfiguration or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`MaintenanceErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.MaintenanceErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}'} - - def update_method( - self, resource_group_name, resource_name, configuration, custom_headers=None, raw=False, **operation_config): - """Patch configuration record. - - :param resource_group_name: Resource Group Name - :type resource_group_name: str - :param resource_name: Resource Identifier - :type resource_name: str - :param configuration: The configuration - :type configuration: - ~azure.mgmt.maintenance.models.MaintenanceConfiguration - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MaintenanceConfiguration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.maintenance.models.MaintenanceConfiguration or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`MaintenanceErrorException` - """ - # Construct URL - url = self.update_method.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(configuration, 'MaintenanceConfiguration') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.MaintenanceErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_method.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get Configuration records within a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MaintenanceConfiguration - :rtype: - ~azure.mgmt.maintenance.models.MaintenanceConfigurationPaged[~azure.mgmt.maintenance.models.MaintenanceConfiguration] - :raises: - :class:`MaintenanceErrorException` - """ - def internal_paging(next_link=None, raw=False): # pylint: disable=unused-argument - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.MaintenanceErrorException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.MaintenanceConfigurationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.MaintenanceConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Maintenance/maintenanceConfigurations'} diff --git a/src/maintenance/azext_maintenance/vendored_sdks/operations/operations.py b/src/maintenance/azext_maintenance/vendored_sdks/operations/operations.py deleted file mode 100644 index b53a9be0dc3..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/operations/operations.py +++ /dev/null @@ -1,100 +0,0 @@ -# pylint: disable=line-too-long,unused-import,too-few-public-methods,unused-argument -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List available operations. - - List the available operations supported by the Microsoft.Maintenance - resource provider. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.maintenance.models.OperationPaged[~azure.mgmt.maintenance.models.Operation] - :raises: - :class:`MaintenanceErrorException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.MaintenanceErrorException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Maintenance/operations'} diff --git a/src/maintenance/azext_maintenance/vendored_sdks/operations/updates_operations.py b/src/maintenance/azext_maintenance/vendored_sdks/operations/updates_operations.py deleted file mode 100644 index 397bb74a29c..00000000000 --- a/src/maintenance/azext_maintenance/vendored_sdks/operations/updates_operations.py +++ /dev/null @@ -1,201 +0,0 @@ -# pylint: disable=line-too-long,unused-argument,unused-import -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class UpdatesOperations(object): - """UpdatesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01-preview" - - self.config = config - - def list_parent( - self, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): - """Get Updates to resource. - - Get updates to resources. - - :param resource_group_name: Resource group name - :type resource_group_name: str - :param provider_name: Resource provider name - :type provider_name: str - :param resource_parent_type: Resource parent type - :type resource_parent_type: str - :param resource_parent_name: Resource parent identifier - :type resource_parent_name: str - :param resource_type: Resource type - :type resource_type: str - :param resource_name: Resource identifier - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Update - :rtype: - ~azure.mgmt.maintenance.models.UpdatePaged[~azure.mgmt.maintenance.models.Update] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_parent.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), - 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UpdatePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UpdatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/updates'} - - def list( - self, resource_group_name, provider_name, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): - """Get Updates to resource. - - Get updates to resources. - - :param resource_group_name: Resource group name - :type resource_group_name: str - :param provider_name: Resource provider name - :type provider_name: str - :param resource_type: Resource type - :type resource_type: str - :param resource_name: Resource identifier - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Update - :rtype: - ~azure.mgmt.maintenance.models.UpdatePaged[~azure.mgmt.maintenance.models.Update] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UpdatePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UpdatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/updates'} diff --git a/src/maintenance/reinstall.cmd b/src/maintenance/reinstall.cmd deleted file mode 100644 index dc63c14ec5a..00000000000 --- a/src/maintenance/reinstall.cmd +++ /dev/null @@ -1,3 +0,0 @@ -cmd /c "az extension remove -n maintenance" -cmd /c "python setup.py bdist_wheel" -cmd /c "az extension add --source dist\maintenance-1.0.1-py2.py3-none-any.whl -y" \ No newline at end of file diff --git a/src/maintenance/report.md b/src/maintenance/report.md new file mode 100644 index 00000000000..e90e71c36a4 --- /dev/null +++ b/src/maintenance/report.md @@ -0,0 +1,426 @@ +# Azure CLI Module Creation Report + +### maintenance applyupdate create + +create a maintenance applyupdate. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance applyupdate|ApplyUpdates| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|create|CreateOrUpdateParent| +|create|CreateOrUpdate#Create| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource group name|resource_group_name|resourceGroupName| +|**--provider-name**|string|Resource provider name|provider_name|providerName| +|**--resource-parent-type**|string|Resource parent type|resource_parent_type|resourceParentType| +|**--resource-parent-name**|string|Resource parent identifier|resource_parent_name|resourceParentName| +|**--resource-type**|string|Resource type|resource_type|resourceType| +|**--resource-name**|string|Resource identifier|resource_name|resourceName| + +### maintenance applyupdate get-parent + +get-parent a maintenance applyupdate. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance applyupdate|ApplyUpdates| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|get-parent|GetParent| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource group name|resource_group_name|resourceGroupName| +|**--resource-parent-type**|string|Resource parent type|resource_parent_type|resourceParentType| +|**--resource-parent-name**|string|Resource parent identifier|resource_parent_name|resourceParentName| +|**--provider-name**|string|Resource provider name|provider_name|providerName| +|**--resource-type**|string|Resource type|resource_type|resourceType| +|**--resource-name**|string|Resource identifier|resource_name|resourceName| +|**--apply-update-name**|string|applyUpdate Id|apply_update_name|applyUpdateName| + +### maintenance applyupdate show + +show a maintenance applyupdate. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance applyupdate|ApplyUpdates| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|show|Get| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource group name|resource_group_name|resourceGroupName| +|**--provider-name**|string|Resource provider name|provider_name|providerName| +|**--resource-type**|string|Resource type|resource_type|resourceType| +|**--resource-name**|string|Resource identifier|resource_name|resourceName| +|**--apply-update-name**|string|applyUpdate Id|apply_update_name|applyUpdateName| + +### maintenance applyupdate update + +update a maintenance applyupdate. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance applyupdate|ApplyUpdates| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|update|CreateOrUpdate#Update| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource group name|resource_group_name|resourceGroupName| +|**--provider-name**|string|Resource provider name|provider_name|providerName| +|**--resource-type**|string|Resource type|resource_type|resourceType| +|**--resource-name**|string|Resource identifier|resource_name|resourceName| + +### maintenance assignment create + +create a maintenance assignment. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance assignment|ConfigurationAssignments| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|create|CreateOrUpdateParent| +|create|CreateOrUpdate#Create| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource group name|resource_group_name|resourceGroupName| +|**--provider-name**|string|Resource provider name|provider_name|providerName| +|**--resource-parent-type**|string|Resource parent type|resource_parent_type|resourceParentType| +|**--resource-parent-name**|string|Resource parent identifier|resource_parent_name|resourceParentName| +|**--resource-type**|string|Resource type|resource_type|resourceType| +|**--resource-name**|string|Resource identifier|resource_name|resourceName| +|**--configuration-assignment-name**|string|Configuration assignment name|configuration_assignment_name|configurationAssignmentName| +|**--location**|string|Location of the resource|location|location| +|**--maintenance-configuration-id**|string|The maintenance configuration Id|maintenance_configuration_id|maintenanceConfigurationId| +|**--resource-id**|string|The unique resourceId|resource_id|resourceId| + +### maintenance assignment delete + +delete a maintenance assignment. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance assignment|ConfigurationAssignments| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|delete|DeleteParent| +|delete|Delete| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource group name|resource_group_name|resourceGroupName| +|**--provider-name**|string|Resource provider name|provider_name|providerName| +|**--resource-parent-type**|string|Resource parent type|resource_parent_type|resourceParentType| +|**--resource-parent-name**|string|Resource parent identifier|resource_parent_name|resourceParentName| +|**--resource-type**|string|Resource type|resource_type|resourceType| +|**--resource-name**|string|Resource identifier|resource_name|resourceName| +|**--configuration-assignment-name**|string|Unique configuration assignment name|configuration_assignment_name|configurationAssignmentName| + +### maintenance assignment list + +list a maintenance assignment. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance assignment|ConfigurationAssignments| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|list|List| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource group name|resource_group_name|resourceGroupName| +|**--provider-name**|string|Resource provider name|provider_name|providerName| +|**--resource-type**|string|Resource type|resource_type|resourceType| +|**--resource-name**|string|Resource identifier|resource_name|resourceName| + +### maintenance assignment list-parent + +list-parent a maintenance assignment. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance assignment|ConfigurationAssignments| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|list-parent|ListParent| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource group name|resource_group_name|resourceGroupName| +|**--provider-name**|string|Resource provider name|provider_name|providerName| +|**--resource-parent-type**|string|Resource parent type|resource_parent_type|resourceParentType| +|**--resource-parent-name**|string|Resource parent identifier|resource_parent_name|resourceParentName| +|**--resource-type**|string|Resource type|resource_type|resourceType| +|**--resource-name**|string|Resource identifier|resource_name|resourceName| + +### maintenance assignment update + +update a maintenance assignment. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance assignment|ConfigurationAssignments| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|update|CreateOrUpdate#Update| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource group name|resource_group_name|resourceGroupName| +|**--provider-name**|string|Resource provider name|provider_name|providerName| +|**--resource-type**|string|Resource type|resource_type|resourceType| +|**--resource-name**|string|Resource identifier|resource_name|resourceName| +|**--configuration-assignment-name**|string|Configuration assignment name|configuration_assignment_name|configurationAssignmentName| +|**--location**|string|Location of the resource|location|location| +|**--maintenance-configuration-id**|string|The maintenance configuration Id|maintenance_configuration_id|maintenanceConfigurationId| +|**--resource-id**|string|The unique resourceId|resource_id|resourceId| + +### maintenance configuration create + +create a maintenance configuration. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance configuration|MaintenanceConfigurations| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|create|CreateOrUpdate#Create| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource Group Name|resource_group_name|resourceGroupName| +|**--resource-name**|string|Resource Identifier|resource_name|resourceName| +|**--location**|string|Gets or sets location of the resource|location|location| +|**--tags**|dictionary|Gets or sets tags of the resource|tags|tags| +|**--namespace**|string|Gets or sets namespace of the resource|namespace|namespace| +|**--extension-properties**|dictionary|Gets or sets extensionProperties of the maintenanceConfiguration|extension_properties|extensionProperties| +|**--maintenance-scope**|choice|Gets or sets maintenanceScope of the configuration|maintenance_scope|maintenanceScope| +|**--visibility**|choice|Gets or sets the visibility of the configuration|visibility|visibility| +|**--maintenance-window-start-date-time**|string|Effective start date of the maintenance window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future date. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone.|start_date_time|startDateTime| +|**--maintenance-window-expiration-date-time**|string|Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone. Expiration date must be set to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.|expiration_date_time|expirationDateTime| +|**--maintenance-window-duration**|string|Duration of the maintenance window in HH:mm format. If not provided, default value will be used based on maintenance scope provided. Example: 05:00.|duration|duration| +|**--maintenance-window-time-zone**|string|Name of the timezone. List of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.|time_zone|timeZone| +|**--maintenance-window-recur-every**|string|Rate at which a Maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday.|recur_every|recurEvery| + +### maintenance configuration delete + +delete a maintenance configuration. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance configuration|MaintenanceConfigurations| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|delete|Delete| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource Group Name|resource_group_name|resourceGroupName| +|**--resource-name**|string|Resource Identifier|resource_name|resourceName| + +### maintenance configuration list + +list a maintenance configuration. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance configuration|MaintenanceConfigurations| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|list|List| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| + +### maintenance configuration show + +show a maintenance configuration. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance configuration|MaintenanceConfigurations| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|show|Get| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource Group Name|resource_group_name|resourceGroupName| +|**--resource-name**|string|Resource Identifier|resource_name|resourceName| + +### maintenance configuration update + +update a maintenance configuration. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance configuration|MaintenanceConfigurations| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|update|Update| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource Group Name|resource_group_name|resourceGroupName| +|**--resource-name**|string|Resource Identifier|resource_name|resourceName| +|**--location**|string|Gets or sets location of the resource|location|location| +|**--tags**|dictionary|Gets or sets tags of the resource|tags|tags| +|**--namespace**|string|Gets or sets namespace of the resource|namespace|namespace| +|**--extension-properties**|dictionary|Gets or sets extensionProperties of the maintenanceConfiguration|extension_properties|extensionProperties| +|**--maintenance-scope**|choice|Gets or sets maintenanceScope of the configuration|maintenance_scope|maintenanceScope| +|**--visibility**|choice|Gets or sets the visibility of the configuration|visibility|visibility| +|**--maintenance-window-start-date-time**|string|Effective start date of the maintenance window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future date. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone.|start_date_time|startDateTime| +|**--maintenance-window-expiration-date-time**|string|Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone. Expiration date must be set to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.|expiration_date_time|expirationDateTime| +|**--maintenance-window-duration**|string|Duration of the maintenance window in HH:mm format. If not provided, default value will be used based on maintenance scope provided. Example: 05:00.|duration|duration| +|**--maintenance-window-time-zone**|string|Name of the timezone. List of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.|time_zone|timeZone| +|**--maintenance-window-recur-every**|string|Rate at which a Maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday Monday-Sunday]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday.|recur_every|recurEvery| + +### maintenance public-configuration list + +list a maintenance public-configuration. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance public-configuration|PublicMaintenanceConfigurations| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|list|List| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| + +### maintenance public-configuration show + +show a maintenance public-configuration. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance public-configuration|PublicMaintenanceConfigurations| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|show|Get| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-name**|string|Resource Identifier|resource_name|resourceName| + +### maintenance update list + +list a maintenance update. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance update|Updates| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|list|List| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource group name|resource_group_name|resourceGroupName| +|**--provider-name**|string|Resource provider name|provider_name|providerName| +|**--resource-type**|string|Resource type|resource_type|resourceType| +|**--resource-name**|string|Resource identifier|resource_name|resourceName| + +### maintenance update list-parent + +list-parent a maintenance update. + +#### Command group +|Name (az)|Swagger name| +|---------|------------| +|maintenance update|Updates| + +#### Methods +|Name (az)|Swagger name| +|---------|------------| +|list-parent|ListParent| + +#### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Resource group name|resource_group_name|resourceGroupName| +|**--provider-name**|string|Resource provider name|provider_name|providerName| +|**--resource-parent-type**|string|Resource parent type|resource_parent_type|resourceParentType| +|**--resource-parent-name**|string|Resource parent identifier|resource_parent_name|resourceParentName| +|**--resource-type**|string|Resource type|resource_type|resourceType| +|**--resource-name**|string|Resource identifier|resource_name|resourceName| diff --git a/src/maintenance/setup.cfg b/src/maintenance/setup.cfg index 11d9c44f6e0..2fdd96e5d39 100644 --- a/src/maintenance/setup.cfg +++ b/src/maintenance/setup.cfg @@ -1,3 +1 @@ -[bdist_wheel] -universal=1 - +#setup.cfg \ No newline at end of file diff --git a/src/maintenance/setup.py b/src/maintenance/setup.py index 271eea54fa3..3ec4d712c90 100644 --- a/src/maintenance/setup.py +++ b/src/maintenance/setup.py @@ -1,40 +1,57 @@ +#!/usr/bin/env python + # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +from codecs import open from setuptools import setup, find_packages +# HISTORY.rst entry. +VERSION = '1.1.0' +try: + from azext_maintenance.manual.version import VERSION +except ImportError: + pass -VERSION = "1.0.1" +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ] DEPENDENCIES = [] +try: + from .manual.dependency import DEPENDENCIES +except ImportError: + pass + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() setup( name='maintenance', version=VERSION, - description='Support for Azure maintenance management.', - long_description='Microsoft Azure Command-Line Extensions for Maintenance', + description='Microsoft Azure Command-Line Tools MaintenanceClient Extension', + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions/tree/master/src/maintenance', + long_description=README + '\n\n' + HISTORY, license='MIT', - author='Abhishek Kumar', - author_email='abkmr@microsoft.com', - url='https://github.com/Azure/azure-cli-extensions', classifiers=CLASSIFIERS, + packages=find_packages(), + install_requires=DEPENDENCIES, package_data={'azext_maintenance': ['azext_metadata.json']}, - packages=find_packages(exclude=['tests']), - install_requires=DEPENDENCIES )