diff --git a/src/azure-cli-core/azure/cli/core/commands/arm.py b/src/azure-cli-core/azure/cli/core/commands/arm.py index de89fc6fa41..d47f6be1d16 100644 --- a/src/azure-cli-core/azure/cli/core/commands/arm.py +++ b/src/azure-cli-core/azure/cli/core/commands/arm.py @@ -127,9 +127,13 @@ def resource_id(**kwargs): - grandchild_type Type of the grandchild resource - grandchild_name Name of the grandchild resource ''' + kwargs = {key: value for key, value in kwargs.items() if value is not None} rid = '/subscriptions/{subscription}'.format(**kwargs) try: - rid = '/'.join((rid, 'resourceGroups/{resource_group}'.format(**kwargs))) + try: + rid = '/'.join((rid, 'resourceGroups/{resource_group}'.format(**kwargs))) + except KeyError: + pass rid = '/'.join((rid, 'providers/{namespace}'.format(**kwargs))) rid = '/'.join((rid, '{type}/{name}'.format(**kwargs))) try: @@ -174,7 +178,6 @@ def parse_resource_id(rid): result = _populate_alternate_kwargs(result) else: result = dict(name=rid) - return {key: value for key, value in result.items() if value is not None} diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py index 0584fffe4a4..b5a11197ab2 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py @@ -12,7 +12,6 @@ from azure.cli.core.cloud import get_active_cloud from azure.cli.core.commands.validators import DefaultStr - logger = get_az_logger(__name__) _CLOUD_CONSOLE_WARNING_TEMPLATE = ("Azure Cloud Shell automatically authenticates the user account it was initially" diff --git a/src/command_modules/azure-cli-resource/HISTORY.rst b/src/command_modules/azure-cli-resource/HISTORY.rst index f6caba8ea5d..c97a0308358 100644 --- a/src/command_modules/azure-cli-resource/HISTORY.rst +++ b/src/command_modules/azure-cli-resource/HISTORY.rst @@ -5,7 +5,9 @@ Release History unreleased +++++++++++++++++++ * group: permit --resource-group/-g options for resource group name. - +* `account lock`: lock commands to work specifically with subscription level locks +* `group lock`: lock commands to work specifically with group level locks +* `resource lock`: lock command to work specifically with resource level locks 2.0.15 (2017-09-22) +++++++++++++++++++ diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py index a4a8856e47c..2eb9faa1901 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py @@ -81,20 +81,16 @@ type: command short-summary: Create a lock. long-summary: 'Locks can exist at three different scopes: subscription, resource group and resource.' - parameters: - - name: --notes - type: string - short-summary: Notes about this lock. examples: - name: Create a read-only subscription level lock. text: > az lock create --name lockName --resource-group group --lock-type ReadOnly """ helps['lock delete'] = """ - type: commands + type: command short-summary: Delete a lock. examples: - - name: Delete a resource-group-level lock + - name: Delete a resource group-level lock text: > az lock delete --name lockName --resource-group group """ @@ -120,15 +116,55 @@ helps['lock update'] = """ type: command short-summary: Update a lock. - parameters: - - name: --notes - type: string - short-summary: Notes about this lock. examples: - - name: Update a resource-group level lock with new notes and type + - name: Update a resource group level lock with new notes and type text: > az lock update --name lockName --resource-group group --notes newNotesHere --lock-type CanNotDelete """ +helps['account lock'] = """ + type: group + short-summary: Manage Azure subscription level locks. +""" +helps['account lock create'] = """ + type: command + short-summary: Create a subscription lock. + examples: + - name: Create a read-only subscription level lock. + text: > + az account lock create --lock-type ReadOnly -n lockName + """ +helps['account lock delete'] = """ + type: command + short-summary: Delete a subscription lock. + examples: + - name: Delete a subscription lock + text: > + az account lock delete --name lockName + """ +helps['account lock list'] = """ + type: command + short-summary: List lock information in the subscription. + examples: + - name: List out all locks on the subscription level + text: > + az account lock list + """ +helps['account lock show'] = """ + type: command + short-summary: Show the details of a subscription lock + examples: + - name: Show a subscription level lock + text: > + az account lock show -n lockname + """ +helps['account lock update'] = """ + type: command + short-summary: Update a subscription lock. + examples: + - name: Update a subscription lock with new notes and type + text: > + az account lock update --name lockName --notes newNotesHere --lock-type CanNotDelete + """ helps['policy'] = """ type: group short-summary: Manage resource policies. @@ -483,6 +519,50 @@ type: group short-summary: Manage deployment operations. """ +helps['group lock'] = """ + type: group + short-summary: Manage Azure resource group locks. +""" +helps['group lock create'] = """ + type: command + short-summary: Create a resource group lock. + examples: + - name: Create a read-only resource group level lock. + text: > + az group lock create --lock-type ReadOnly -n lockName -g MyResourceGroup + """ +helps['group lock delete'] = """ + type: command + short-summary: Delete a resource group lock. + examples: + - name: Delete a resource group lock + text: > + az group lock delete --name lockName -g MyResourceGroup + """ +helps['group lock list'] = """ + type: command + short-summary: List lock information in the resource-group. + examples: + - name: List out all locks on the resource group level + text: > + az group lock list -g MyResourceGroup + """ +helps['group lock show'] = """ + type: command + short-summary: Show the details of a resource group lock + examples: + - name: Show a resource group level lock + text: > + az group lock show -n lockname -g MyResourceGroup + """ +helps['group lock update'] = """ + type: command + short-summary: Update a resource group lock. + examples: + - name: Update a resource group lock with new notes and type + text: > + az group lock update --name lockName -g MyResourceGroup --notes newNotesHere --lock-type CanNotDelete + """ helps['provider'] = """ type: group short-summary: Manage resource providers. @@ -575,3 +655,47 @@ text: > az resource link show --link-id """ +helps['resource lock'] = """ + type: group + short-summary: Manage Azure resource level locks. +""" +helps['resource lock create'] = """ + type: command + short-summary: Create a resource-level lock. + examples: + - name: Create a read-only resource level lock on a vnet. + text: > + az resource lock create --lock-type ReadOnly -n lockName -g MyResourceGroup --resource-name myvnet --resource-type Microsoft.Network/virtualNetworks + """ +helps['resource lock delete'] = """ + type: command + short-summary: Delete a resource-level lock. + examples: + - name: Delete a resource level lock + text: > + az resource lock delete --name lockName -g MyResourceGroup --resource-name myvnet --resource-type Microsoft.Network/virtualNetworks + """ +helps['resource lock list'] = """ + type: command + short-summary: List lock information in the resource-level. + examples: + - name: List out all locks on a vnet + text: > + az resource lock list -g MyResourceGroup --resource-name myvnet --resource-type Microsoft.Network/virtualNetworks + """ +helps['resource lock show'] = """ + type: command + short-summary: Show the details of a resource-level lock + examples: + - name: Show a resource level lock + text: > + az resource lock show -n lockname -g MyResourceGroup --resource-name myvnet --resource-type Microsoft.Network/virtualNetworks + """ +helps['resource lock update'] = """ + type: command + short-summary: Update a resource-level lock. + examples: + - name: Update a resource level lock with new notes and type + text: > + az resource lock update --name lockName -g MyResourceGroup --resource-name myvnet --resource-type Microsoft.Network/virtualNetworks --notes newNotesHere --lock-type CanNotDelete + """ diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py index ad452ad8761..b8ad043c396 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py @@ -17,7 +17,8 @@ from .custom import (get_policy_completion_list, get_policy_set_completion_list, get_policy_assignment_completion_list, get_resource_types_completion_list, get_providers_completion_list) -from ._validators import process_deployment_create_namespace, validate_lock_parameters +from ._validators import (process_deployment_create_namespace, validate_lock_parameters, validate_subscription_lock, + validate_group_lock, validate_resource_lock) # BASIC PARAMETER CONFIGURATION @@ -134,15 +135,6 @@ register_cli_argument('tag', 'tag_name', options_list=('--name', '-n')) register_cli_argument('tag', 'tag_value', options_list=('--value',)) -register_cli_argument('lock', 'lock_name', options_list=('--name', '-n'), validator=validate_lock_parameters) -register_cli_argument('lock', 'level', options_list=('--lock-type', '-t'), **enum_choice_list(LockLevel)) -register_cli_argument('lock', 'parent_resource_path', resource_parent_type) -register_cli_argument('lock', 'resource_provider_namespace', resource_namespace_type) -register_cli_argument('lock', 'resource_type', arg_type=resource_type_type, - completer=get_resource_types_completion_list,) -register_cli_argument('lock', 'resource_name', options_list=('--resource-name')) -register_cli_argument('lock', 'ids', nargs='+', options_list=('--ids'), help='One or more resource IDs (space delimited). If provided, no other "Resource Id" arguments should be specified.') - register_cli_argument('managedapp', 'resource_group_name', arg_type=resource_group_name_type, help='the resource group of the managed application', id_part='resource_group') register_cli_argument('managedapp', 'application_name', options_list=('--name', '-n'), id_part='name') @@ -159,3 +151,28 @@ register_cli_argument('managedapp definition create', 'authorizations', options_list=('--authorizations', '-a'), nargs='+', help="space separated authorization pairs in a format of :") register_cli_argument('managedapp definition create', 'createUiDefinition', options_list=('--create-ui-definition', '-c'), help='JSON formatted string or a path to a file with such content', type=file_type, completer=FilesCompleter()) register_cli_argument('managedapp definition create', 'mainTemplate', options_list=('--main-template', '-t'), help='JSON formatted string or a path to a file with such content', type=file_type, completer=FilesCompleter()) + +register_cli_argument('lock', 'parent_resource_path', resource_parent_type) +register_cli_argument('lock', 'resource_provider_namespace', resource_namespace_type) +register_cli_argument('lock', 'resource_type', arg_type=resource_type_type, completer=get_resource_types_completion_list) +register_cli_argument('lock', 'resource_name', options_list=('--resource-name'), help='Name of the resource being locked.') +register_cli_argument('lock', 'resource_group', resource_group_name_type, validator=validate_lock_parameters) + +register_cli_argument('resource lock', 'resource_group', resource_group_name_type) +register_cli_argument('resource lock', 'resource_name', options_list=('--resource-name'), validator=validate_resource_lock) + +register_cli_argument('group lock', 'resource_group', resource_group_name_type, validator=validate_group_lock) + +register_cli_argument('account lock', 'resource_group', ignore_type, validator=validate_subscription_lock) + +for scope in ['account', 'group']: + register_cli_argument('{} lock'.format(scope), 'resource_provider_namespace', ignore_type) + register_cli_argument('{} lock'.format(scope), 'parent_resource_path', ignore_type) + register_cli_argument('{} lock'.format(scope), 'resource_type', ignore_type) + register_cli_argument('{} lock'.format(scope), 'resource_name', ignore_type) + +for command_name in ['lock', 'account lock', 'group lock', 'resource lock']: + register_cli_argument(command_name, 'lock_name', options_list=('--name', '-n'), help='Name of the lock') + register_cli_argument(command_name, 'level', options_list=('--lock-type', '-t'), **enum_choice_list([LockLevel.can_not_delete, LockLevel.read_only])) + register_cli_argument(command_name, 'ids', nargs='+', options_list=('--ids'), help='One or more resource IDs (space delimited). If provided, no other "Resource Id" arguments should be specified.') + register_cli_argument(command_name, 'notes', help='Notes about this lock.') diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py index 0f8b37e5f99..16f5360ec4e 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py @@ -12,6 +12,7 @@ from azure.cli.core.util import CLIError +from .custom import _parse_lock_id def _validate_deployment_name(namespace): @@ -35,9 +36,9 @@ def process_deployment_create_namespace(namespace): _validate_deployment_name(namespace) -def internal_validate_lock_parameters(resource_group_name, resource_provider_namespace, +def internal_validate_lock_parameters(resource_group, resource_provider_namespace, parent_resource_path, resource_type, resource_name): - if resource_group_name is None: + if resource_group is None: if resource_name is not None: raise CLIError('--resource-name is ignored if --resource-group is not given.') if resource_type is not None: @@ -70,8 +71,46 @@ def internal_validate_lock_parameters(resource_group_name, resource_provider_nam def validate_lock_parameters(namespace): - internal_validate_lock_parameters(getattr(namespace, 'resource_group_name', None), + internal_validate_lock_parameters(getattr(namespace, 'resource_group', None), getattr(namespace, 'resource_provider_namespace', None), getattr(namespace, 'parent_resource_path', None), getattr(namespace, 'resource_type', None), getattr(namespace, 'resource_name', None)) + + +def validate_subscription_lock(namespace): + if getattr(namespace, 'ids', None): + for lock_id in getattr(namespace, 'ids'): + if _parse_lock_id(lock_id).get('resource_group'): + raise CLIError('{} is not a valid subscription-level lock id.'.format(lock_id)) + + +def validate_group_lock(namespace): + if getattr(namespace, 'ids', None): + for lock_id in getattr(namespace, 'ids'): + lock_id_dict = _parse_lock_id(lock_id) + if not lock_id_dict.get('resource_group') or lock_id_dict.get('resource_name'): + raise CLIError('{} is not a valid group-level lock id.'.format(lock_id)) + else: + if not getattr(namespace, 'resource_group', None): + raise CLIError('Missing required resource_group parameter.') + + +def validate_resource_lock(namespace): + if getattr(namespace, 'ids', None): + for lock_id in getattr(namespace, 'ids'): + lock_id_dict = _parse_lock_id(lock_id) + if not all((lock_id_dict.get(param)) for param in ['resource_group', + 'resource_provider_namespace', + 'resource_type', + 'resource_name']): + raise CLIError('{} is not a valid resource-level lock id.'.format(lock_id)) + else: + kwargs = {} + for param in ['resource_group', 'resource_type', 'resource_name']: + if not getattr(namespace, param, None): + raise CLIError('Missing required {} parameter.'.format(param)) + kwargs[param] = getattr(namespace, param) + kwargs['resource_provider_namespace'] = getattr(namespace, 'resource_provider_namespace', None) + kwargs['parent_resource_path'] = getattr(namespace, 'parent_resource_path', None) + internal_validate_lock_parameters(**kwargs) diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/commands.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/commands.py index 7f732e38682..d65751cdee0 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/commands.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/commands.py @@ -27,6 +27,15 @@ cf_resource_managedappdefinitions) +# Subscription lock commands +cli_command(__name__, 'account lock create', 'azure.cli.command_modules.resource.custom#create_lock') +cli_command(__name__, 'account lock delete', 'azure.cli.command_modules.resource.custom#delete_lock') +cli_command(__name__, 'account lock list', 'azure.cli.command_modules.resource.custom#list_locks') +cli_command(__name__, 'account lock show', 'azure.cli.command_modules.resource.custom#get_lock', + exception_handler=empty_on_404) +cli_command(__name__, 'account lock update', 'azure.cli.command_modules.resource.custom#update_lock') + + # Resource group commands def transform_resource_group_list(result): return [OrderedDict([('Name', r['name']), ('Location', r['location']), ('Status', r['properties']['provisioningState'])]) for r in result] @@ -39,10 +48,15 @@ def transform_resource_group_list(result): cli_command(__name__, 'group list', 'azure.cli.command_modules.resource.custom#list_resource_groups', table_transformer=transform_resource_group_list) cli_command(__name__, 'group create', 'azure.cli.command_modules.resource.custom#create_resource_group') cli_command(__name__, 'group export', 'azure.cli.command_modules.resource.custom#export_group_as_template') +cli_command(__name__, 'group lock create', 'azure.cli.command_modules.resource.custom#create_lock') +cli_command(__name__, 'group lock delete', 'azure.cli.command_modules.resource.custom#delete_lock') +cli_command(__name__, 'group lock list', 'azure.cli.command_modules.resource.custom#list_locks') +cli_command(__name__, 'group lock show', 'azure.cli.command_modules.resource.custom#get_lock', + exception_handler=empty_on_404) +cli_command(__name__, 'group lock update', 'azure.cli.command_modules.resource.custom#update_lock') # Resource commands - def transform_resource_list(result): transformed = [] for r in result: @@ -62,6 +76,12 @@ def transform_resource_list(result): cli_command(__name__, 'resource tag', 'azure.cli.command_modules.resource.custom#tag_resource') cli_command(__name__, 'resource move', 'azure.cli.command_modules.resource.custom#move_resource') cli_command(__name__, 'resource invoke-action', 'azure.cli.command_modules.resource.custom#invoke_resource_action') +cli_command(__name__, 'resource lock create', 'azure.cli.command_modules.resource.custom#create_lock') +cli_command(__name__, 'resource lock delete', 'azure.cli.command_modules.resource.custom#delete_lock') +cli_command(__name__, 'resource lock list', 'azure.cli.command_modules.resource.custom#list_locks') +cli_command(__name__, 'resource lock show', 'azure.cli.command_modules.resource.custom#get_lock', + exception_handler=empty_on_404) +cli_command(__name__, 'resource lock update', 'azure.cli.command_modules.resource.custom#update_lock') # Resource provider commands cli_command(__name__, 'provider list', 'azure.mgmt.resource.resources.operations.providers_operations#ProvidersOperations.list', cf_providers) diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/custom.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/custom.py index d4477057faa..1adddd0a8ff 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/custom.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/custom.py @@ -1068,7 +1068,7 @@ def get_policy_assignment_completion_list(prefix, **kwargs): # pylint: disable= return [i.name for i in result] -def list_locks(resource_group_name=None, +def list_locks(resource_group=None, resource_provider_namespace=None, parent_resource_path=None, resource_type=None, resource_name=None, filter_string=None): """ @@ -1084,7 +1084,7 @@ def list_locks(resource_group_name=None, :type filter_string: str """ lock_client = _resource_lock_client_factory() - lock_resource = _extract_lock_params(resource_group_name, resource_provider_namespace, + lock_resource = _extract_lock_params(resource_group, resource_provider_namespace, resource_type, resource_name) resource_group_name = lock_resource[0] resource_name = lock_resource[1] @@ -1163,14 +1163,14 @@ def _parse_lock_id(id_arg): Lock ids look very different from regular resource ids, this function uses a regular expression that parses a lock's id and extracts the following parameters if available: -lock_name: the lock's name; always present in a lock id - -resource_group_name: the name of the resource group; present in group/resource level locks + -resource_group: the name of the resource group; present in group/resource level locks -resource_provider_namespace: the resource provider; present in resource level locks -resource_type: the resource type; present in resource level locks -resource_name: the resource name; present in resource level locks -parent_resource_path: the resource's parent path; present in child resources such as subnets """ regex = re.compile( - '/subscriptions/[^/]*(/resource[gG]roups/(?P[^/]*)' + '/subscriptions/[^/]*(/resource[gG]roups/(?P[^/]*)' '(/providers/(?P[^/]*)' '(/(?P.*))?/(?P[^/]*)/(?P[^/]*))?)?' '/providers/Microsoft.Authorization/locks/(?P[^/]*)') @@ -1184,7 +1184,7 @@ def _call_subscription_get(lock_client, *args): return lock_client.management_locks.get_at_subscription_level(*args) -def get_lock(lock_name=None, resource_group_name=None, resource_provider_namespace=None, +def get_lock(lock_name=None, resource_group=None, resource_provider_namespace=None, parent_resource_path=None, resource_type=None, resource_name=None, ids=None): """ :param name: The name of the lock. @@ -1203,7 +1203,7 @@ def get_lock(lock_name=None, resource_group_name=None, resource_provider_namespa lock_client = _resource_lock_client_factory() - lock_resource = _extract_lock_params(resource_group_name, resource_provider_namespace, + lock_resource = _extract_lock_params(resource_group, resource_provider_namespace, resource_type, resource_name) resource_group_name = lock_resource[0] @@ -1228,7 +1228,7 @@ def get_lock(lock_name=None, resource_group_name=None, resource_provider_namespa parent_resource_path or '', resource_type, resource_name, lock_name) -def delete_lock(lock_name=None, resource_group_name=None, resource_provider_namespace=None, +def delete_lock(lock_name=None, resource_group=None, resource_provider_namespace=None, parent_resource_path=None, resource_type=None, resource_name=None, ids=None): """ :param name: The name of the lock. @@ -1254,7 +1254,7 @@ def delete_lock(lock_name=None, resource_group_name=None, resource_provider_name return results[0] if len(results) == 1 else results lock_client = _resource_lock_client_factory() - lock_resource = _extract_lock_params(resource_group_name, resource_provider_namespace, + lock_resource = _extract_lock_params(resource_group, resource_provider_namespace, resource_type, resource_name) resource_group_name = lock_resource[0] resource_name = lock_resource[1] @@ -1290,9 +1290,9 @@ def _extract_lock_params(resource_group_name, resource_provider_namespace, return (resource_group_name, resource_name, resource_provider_namespace, resource_type) -def create_lock(lock_name, - resource_group_name=None, resource_provider_namespace=None, notes=None, - parent_resource_path=None, resource_type=None, resource_name=None, level=None): +def create_lock(lock_name, level, + resource_group=None, resource_provider_namespace=None, notes=None, + parent_resource_path=None, resource_type=None, resource_name=None): """ :param name: The name of the lock. :type name: str @@ -1307,12 +1307,10 @@ def create_lock(lock_name, :param notes: Notes about this lock. :type notes: str """ - if level != 'ReadOnly' and level != 'CanNotDelete': - raise CLIError('--lock-type must be one of "ReadOnly" or "CanNotDelete"') parameters = ManagementLockObject(level=level, notes=notes, name=lock_name) lock_client = _resource_lock_client_factory() - lock_resource = _extract_lock_params(resource_group_name, resource_provider_namespace, + lock_resource = _extract_lock_params(resource_group, resource_provider_namespace, resource_type, resource_name) resource_group_name = lock_resource[0] resource_name = lock_resource[1] @@ -1338,7 +1336,7 @@ def _update_lock_parameters(parameters, level, notes): parameters.notes = notes -def update_lock(lock_name=None, resource_group_name=None, resource_provider_namespace=None, notes=None, +def update_lock(lock_name=None, resource_group=None, resource_provider_namespace=None, notes=None, parent_resource_path=None, resource_type=None, resource_name=None, level=None, ids=None): """ Allows updates to the lock-type(level) and the notes of the lock @@ -1356,7 +1354,7 @@ def update_lock(lock_name=None, resource_group_name=None, resource_provider_name lock_client = _resource_lock_client_factory() - lock_resource = _extract_lock_params(resource_group_name, resource_provider_namespace, + lock_resource = _extract_lock_params(resource_group, resource_provider_namespace, resource_type, resource_name) resource_group_name = lock_resource[0] diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/recordings/latest/test_group_lock_commands.yaml b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/recordings/latest/test_group_lock_commands.yaml new file mode 100644 index 00000000000..92c71b81412 --- /dev/null +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/recordings/latest/test_group_lock_commands.yaml @@ -0,0 +1,334 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 resourcemanagementclient/1.2.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_group_lock000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001","name":"cli_test_group_lock000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 20:52:57 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: 'b''{"properties": {"level": "CanNotDelete"}, "name": "cli-test-lock000002"}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group lock create] + Connection: [keep-alive] + Content-Length: ['101'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002","type":"Microsoft.Authorization/locks","name":"cli-test-lock000002"}'} + headers: + cache-control: [no-cache] + content-length: ['375'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 20:52:58 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group lock show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002","type":"Microsoft.Authorization/locks","name":"cli-test-lock000002"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilx-group/providers/Microsoft.Authorization/locks/mylock","type":"Microsoft.Authorization/locks","name":"mylock"},{"properties":{"level":"CanNotDelete","notes":"please + keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.KeyVault/vaults/cliautomationlab786/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending + support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"}]}'} + headers: + cache-control: [no-cache] + content-length: ['3885'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 20:53:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group lock show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002","type":"Microsoft.Authorization/locks","name":"cli-test-lock000002"}'} + headers: + cache-control: [no-cache] + content-length: ['375'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 20:53:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group lock list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002","type":"Microsoft.Authorization/locks","name":"cli-test-lock000002"}]}'} + headers: + cache-control: [no-cache] + content-length: ['387'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 20:53:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group lock update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002","type":"Microsoft.Authorization/locks","name":"cli-test-lock000002"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilx-group/providers/Microsoft.Authorization/locks/mylock","type":"Microsoft.Authorization/locks","name":"mylock"},{"properties":{"level":"CanNotDelete","notes":"please + keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.KeyVault/vaults/cliautomationlab786/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending + support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"}]}'} + headers: + cache-control: [no-cache] + content-length: ['3885'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 20:53:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group lock update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002","type":"Microsoft.Authorization/locks","name":"cli-test-lock000002"}'} + headers: + cache-control: [no-cache] + content-length: ['375'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 20:53:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: 'b''b\''{"properties": {"level": "ReadOnly", "notes": "notes000003"}, "name": + "cli-test-lock000002"}\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group lock update] + Connection: [keep-alive] + Content-Length: ['130'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"ReadOnly","notes":"notes000003"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002","type":"Microsoft.Authorization/locks","name":"cli-test-lock000002"}'} + headers: + cache-control: [no-cache] + content-length: ['402'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 20:53:04 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group lock delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"ReadOnly","notes":"notes000003"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002","type":"Microsoft.Authorization/locks","name":"cli-test-lock000002"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilx-group/providers/Microsoft.Authorization/locks/mylock","type":"Microsoft.Authorization/locks","name":"mylock"},{"properties":{"level":"CanNotDelete","notes":"please + keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.KeyVault/vaults/cliautomationlab786/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending + support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"}]}'} + headers: + cache-control: [no-cache] + content-length: ['3912'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 20:53:04 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group lock delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_group_lock000001/providers/Microsoft.Authorization/locks/cli-test-lock000002?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 03 Oct 2017 20:53:06 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- 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/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 resourcemanagementclient/1.2.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_group_lock000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 03 Oct 2017 20:53:11 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGR1JPVVA6NUZMT0NLQUNETjdQVU5FRDVBUFBGVDQ1VzdDMnw2MjM4MzM4MjdFMjUzQzRFLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/recordings/latest/test_resource_lock_commands.yaml b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/recordings/latest/test_resource_lock_commands.yaml new file mode 100644 index 00000000000..d31c764e19c --- /dev/null +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/recordings/latest/test_resource_lock_commands.yaml @@ -0,0 +1,465 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 resourcemanagementclient/1.2.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_resource_lock000001","name":"cli_test_resource_lock000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05:13 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 resourcemanagementclient/1.2.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_resource_lock000001","name":"cli_test_resource_lock000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05:14 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{"location": "westus", "tags": {}, "properties": {"addressSpace": {"addressPrefixes": + ["10.0.0.0/16"]}, "dhcpOptions": {}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] + Connection: [keep-alive] + Content-Length: ['123'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 networkmanagementclient/1.5.0rc3 Azure-SDK-For-Python + AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002?api-version=2017-09-01 + response: + body: {string: "{\r\n \"name\": \"cli.lock.rsrc000002\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002\"\ + ,\r\n \"etag\": \"W/\\\"90a8511a-c2ab-458d-89e1-b63629ac481b\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\"\ + ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ + \ \"Updating\",\r\n \"resourceGuid\": \"8392e54f-a4ff-4943-b381-aedfd3a243d2\"\ + ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ + 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ + : []\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\":\ + \ [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ + : false\r\n }\r\n}"} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/1665b940-857e-4be5-90c2-5a390cb43993?api-version=2017-09-01'] + cache-control: [no-cache] + content-length: ['816'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05:14 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 networkmanagementclient/1.5.0rc3 Azure-SDK-For-Python + AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/1665b940-857e-4be5-90c2-5a390cb43993?api-version=2017-09-01 + response: + body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['29'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05: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] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 networkmanagementclient/1.5.0rc3 Azure-SDK-For-Python + AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002?api-version=2017-09-01 + response: + body: {string: "{\r\n \"name\": \"cli.lock.rsrc000002\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002\"\ + ,\r\n \"etag\": \"W/\\\"7c6528ea-eb3b-4da0-9868-24ae3b2c7491\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\"\ + ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ + \ \"Succeeded\",\r\n \"resourceGuid\": \"8392e54f-a4ff-4943-b381-aedfd3a243d2\"\ + ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ + 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ + : []\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\":\ + \ [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ + : false\r\n }\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['817'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05:18 GMT'] + etag: [W/"7c6528ea-eb3b-4da0-9868-24ae3b2c7491"] + 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] + status: {code: 200, message: OK} +- request: + body: 'b''{"properties": {"level": "CanNotDelete"}, "name": "cli-test-lock000003"}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [resource lock create] + Connection: [keep-alive] + Content-Length: ['127'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"}'} + headers: + cache-control: [no-cache] + content-length: ['502'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [resource lock show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilx-group/providers/Microsoft.Authorization/locks/mylock","type":"Microsoft.Authorization/locks","name":"mylock"},{"properties":{"level":"CanNotDelete","notes":"lkdjljfsdjf"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/wilx-group/providers/Microsoft.Network/virtualNetworks/wilxvnet/providers/Microsoft.Authorization/locks/wiilxvnetlock","type":"Microsoft.Authorization/locks","name":"wiilxvnetlock"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cannotdelete_resource_locknjjwx4pfqc2egx5m52iigttvqkkuocmtpps3gbjs/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrctylxiu2tqjunnbf3e/providers/Microsoft.Authorization/locks/cli-test-lock3cphtxa7fekasr65nvagqjxhoxltypqgjkssognuudpn6y3i3x25t4ng2fafu","type":"Microsoft.Authorization/locks","name":"cli-test-lock3cphtxa7fekasr65nvagqjxhoxltypqgjkssognuudpn6y3i3x25t4ng2fafu"},{"properties":{"level":"CanNotDelete","notes":"please + keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.KeyVault/vaults/cliautomationlab786/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending + support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"}]}'} + headers: + cache-control: [no-cache] + content-length: ['4831'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05:25 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [resource lock show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"}'} + headers: + cache-control: [no-cache] + content-length: ['502'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05:25 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [resource lock list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"}]}'} + headers: + cache-control: [no-cache] + content-length: ['514'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [resource lock update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilx-group/providers/Microsoft.Authorization/locks/mylock","type":"Microsoft.Authorization/locks","name":"mylock"},{"properties":{"level":"CanNotDelete","notes":"lkdjljfsdjf"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/wilx-group/providers/Microsoft.Network/virtualNetworks/wilxvnet/providers/Microsoft.Authorization/locks/wiilxvnetlock","type":"Microsoft.Authorization/locks","name":"wiilxvnetlock"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cannotdelete_resource_locknjjwx4pfqc2egx5m52iigttvqkkuocmtpps3gbjs/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrctylxiu2tqjunnbf3e/providers/Microsoft.Authorization/locks/cli-test-lock3cphtxa7fekasr65nvagqjxhoxltypqgjkssognuudpn6y3i3x25t4ng2fafu","type":"Microsoft.Authorization/locks","name":"cli-test-lock3cphtxa7fekasr65nvagqjxhoxltypqgjkssognuudpn6y3i3x25t4ng2fafu"},{"properties":{"level":"CanNotDelete","notes":"please + keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.KeyVault/vaults/cliautomationlab786/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending + support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"}]}'} + headers: + cache-control: [no-cache] + content-length: ['4831'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [resource lock update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"}'} + headers: + cache-control: [no-cache] + content-length: ['502'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: 'b''b\''{"properties": {"level": "ReadOnly", "notes": "notes000004"}, "name": + "cli-test-lock000003"}\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [resource lock update] + Connection: [keep-alive] + Content-Length: ['156'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"ReadOnly","notes":"notes000004"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"}'} + headers: + cache-control: [no-cache] + content-length: ['529'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [resource lock delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilx-group/providers/Microsoft.Authorization/locks/mylock","type":"Microsoft.Authorization/locks","name":"mylock"},{"properties":{"level":"CanNotDelete","notes":"lkdjljfsdjf"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/wilx-group/providers/Microsoft.Network/virtualNetworks/wilxvnet/providers/Microsoft.Authorization/locks/wiilxvnetlock","type":"Microsoft.Authorization/locks","name":"wiilxvnetlock"},{"properties":{"level":"ReadOnly","notes":"notes000004"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cannotdelete_resource_locknjjwx4pfqc2egx5m52iigttvqkkuocmtpps3gbjs/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrctylxiu2tqjunnbf3e/providers/Microsoft.Authorization/locks/cli-test-lock3cphtxa7fekasr65nvagqjxhoxltypqgjkssognuudpn6y3i3x25t4ng2fafu","type":"Microsoft.Authorization/locks","name":"cli-test-lock3cphtxa7fekasr65nvagqjxhoxltypqgjkssognuudpn6y3i3x25t4ng2fafu"},{"properties":{"level":"CanNotDelete","notes":"please + keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.KeyVault/vaults/cliautomationlab786/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending + support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved + resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"}]}'} + headers: + cache-control: [no-cache] + content-length: ['4858'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 03 Oct 2017 22:05:27 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [resource lock delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrc000002/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 03 Oct 2017 22:05:28 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- 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/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 resourcemanagementclient/1.2.0rc2 Azure-SDK-For-Python + AZURECLI/2.0.17+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_resource_lock000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 03 Oct 2017 22:05:34 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGUkVTT1VSQ0U6NUZMT0NLUFlTUjdNVjZWVVNYTk1PUExLNXwyOTBGMjBEODVGQTc4QTBDLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/recordings/latest/test_subscription_locks.yaml b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/recordings/latest/test_subscription_locks.yaml index 531b9e3b0b8..bd440471c69 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/recordings/latest/test_subscription_locks.yaml +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/recordings/latest/test_subscription_locks.yaml @@ -1,25 +1,25 @@ interactions: - request: - body: 'b''{"name": "cli-test-lock000001", "properties": {"level": "ReadOnly"}}''' + body: 'b''{"properties": {"level": "CanNotDelete"}, "name": "cli-test-lock000001"}''' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock create] + CommandName: [account lock create] Connection: [keep-alive] - Content-Length: ['97'] + Content-Length: ['101'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 response: - body: {string: '{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} headers: cache-control: [no-cache] - content-length: ['280'] + content-length: ['284'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:20:55 GMT'] + date: ['Wed, 04 Oct 2017 18:39:48 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -30,57 +30,16 @@ interactions: headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock list] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 - response: - body: {string: '{"value":[{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4","type":"Microsoft.Authorization/locks","name":"cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_group_lockyg55mqk35gnyugailubkgryitidvrczwp5xsvj/providers/Microsoft.Authorization/locks/cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp","type":"Microsoft.Authorization/locks","name":"cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_group_lockshyn6vu4ouyymz7cn6eqcj3hngarh6ahhn/providers/Microsoft.Authorization/locks/cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl","type":"Microsoft.Authorization/locks","name":"cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw2/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_readonly_resource_lockgtrguxbytxj6d2mvdjo6pca5scgafx55no2tafhh77tg/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchjnwouiiaquvdi7js/providers/Microsoft.Authorization/locks/cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2","type":"Microsoft.Authorization/locks","name":"cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2"},{"properties":{"level":"CanNotDelete","notes":"please - keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.KeyVault/vaults/cliautomationlab786/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending - support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Authorization/locks/cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan","type":"Microsoft.Authorization/locks","name":"cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/providers/Microsoft.Authorization/locks/cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l","type":"Microsoft.Authorization/locks","name":"cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/subnets/cli-lock-subnetmhdfpf233zerobt/providers/Microsoft.Authorization/locks/cli-test-lockzf5vqre","type":"Microsoft.Authorization/locks","name":"cli-test-lockzf5vqre"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":"Until - work is done, keep this around!"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vpn/providers/Microsoft.Network/virtualNetworks/vnet1/providers/Microsoft.Authorization/locks/lock1","type":"Microsoft.Authorization/locks","name":"lock1"}]}'} - headers: - cache-control: [no-cache] - content-length: ['6920'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:20:56 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock show] + CommandName: [account lock list] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 response: - body: {string: '{"value":[{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4","type":"Microsoft.Authorization/locks","name":"cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_group_lockyg55mqk35gnyugailubkgryitidvrczwp5xsvj/providers/Microsoft.Authorization/locks/cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp","type":"Microsoft.Authorization/locks","name":"cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_group_lockshyn6vu4ouyymz7cn6eqcj3hngarh6ahhn/providers/Microsoft.Authorization/locks/cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl","type":"Microsoft.Authorization/locks","name":"cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw2/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_readonly_resource_lockgtrguxbytxj6d2mvdjo6pca5scgafx55no2tafhh77tg/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchjnwouiiaquvdi7js/providers/Microsoft.Authorization/locks/cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2","type":"Microsoft.Authorization/locks","name":"cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2"},{"properties":{"level":"CanNotDelete","notes":"please + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilx-group/providers/Microsoft.Authorization/locks/mylock","type":"Microsoft.Authorization/locks","name":"mylock"},{"properties":{"level":"CanNotDelete","notes":"please keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved @@ -88,45 +47,18 @@ interactions: Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending - support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Authorization/locks/cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan","type":"Microsoft.Authorization/locks","name":"cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/providers/Microsoft.Authorization/locks/cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l","type":"Microsoft.Authorization/locks","name":"cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/subnets/cli-lock-subnetmhdfpf233zerobt/providers/Microsoft.Authorization/locks/cli-test-lockzf5vqre","type":"Microsoft.Authorization/locks","name":"cli-test-lockzf5vqre"},{"properties":{"level":"CanNotDelete","notes":"Reserved + support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":"Until - work is done, keep this around!"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vpn/providers/Microsoft.Network/virtualNetworks/vnet1/providers/Microsoft.Authorization/locks/lock1","type":"Microsoft.Authorization/locks","name":"lock1"}]}'} - headers: - cache-control: [no-cache] - content-length: ['6920'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:20:56 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock show] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 - response: - body: {string: '{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"}]}'} headers: cache-control: [no-cache] - content-length: ['280'] + content-length: ['3794'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:20:56 GMT'] + date: ['Wed, 04 Oct 2017 18:39:48 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -138,16 +70,16 @@ interactions: headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock show] + CommandName: [account lock show] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 response: - body: {string: '{"value":[{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4","type":"Microsoft.Authorization/locks","name":"cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_group_lockyg55mqk35gnyugailubkgryitidvrczwp5xsvj/providers/Microsoft.Authorization/locks/cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp","type":"Microsoft.Authorization/locks","name":"cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_group_lockshyn6vu4ouyymz7cn6eqcj3hngarh6ahhn/providers/Microsoft.Authorization/locks/cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl","type":"Microsoft.Authorization/locks","name":"cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw2/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_readonly_resource_lockgtrguxbytxj6d2mvdjo6pca5scgafx55no2tafhh77tg/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchjnwouiiaquvdi7js/providers/Microsoft.Authorization/locks/cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2","type":"Microsoft.Authorization/locks","name":"cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2"},{"properties":{"level":"CanNotDelete","notes":"please + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilx-group/providers/Microsoft.Authorization/locks/mylock","type":"Microsoft.Authorization/locks","name":"mylock"},{"properties":{"level":"CanNotDelete","notes":"please keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved @@ -155,369 +87,44 @@ interactions: Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending - support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Authorization/locks/cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan","type":"Microsoft.Authorization/locks","name":"cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/providers/Microsoft.Authorization/locks/cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l","type":"Microsoft.Authorization/locks","name":"cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/subnets/cli-lock-subnetmhdfpf233zerobt/providers/Microsoft.Authorization/locks/cli-test-lockzf5vqre","type":"Microsoft.Authorization/locks","name":"cli-test-lockzf5vqre"},{"properties":{"level":"CanNotDelete","notes":"Reserved + support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":"Until - work is done, keep this around!"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vpn/providers/Microsoft.Network/virtualNetworks/vnet1/providers/Microsoft.Authorization/locks/lock1","type":"Microsoft.Authorization/locks","name":"lock1"}]}'} - headers: - cache-control: [no-cache] - content-length: ['6920'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:20:57 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock show] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 - response: - body: {string: '{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} - headers: - cache-control: [no-cache] - content-length: ['280'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:20:57 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock update] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 - response: - body: {string: '{"value":[{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4","type":"Microsoft.Authorization/locks","name":"cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_group_lockyg55mqk35gnyugailubkgryitidvrczwp5xsvj/providers/Microsoft.Authorization/locks/cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp","type":"Microsoft.Authorization/locks","name":"cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_group_lockshyn6vu4ouyymz7cn6eqcj3hngarh6ahhn/providers/Microsoft.Authorization/locks/cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl","type":"Microsoft.Authorization/locks","name":"cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw2/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_readonly_resource_lockgtrguxbytxj6d2mvdjo6pca5scgafx55no2tafhh77tg/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchjnwouiiaquvdi7js/providers/Microsoft.Authorization/locks/cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2","type":"Microsoft.Authorization/locks","name":"cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2"},{"properties":{"level":"CanNotDelete","notes":"please - keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.KeyVault/vaults/cliautomationlab786/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending - support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Authorization/locks/cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan","type":"Microsoft.Authorization/locks","name":"cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/providers/Microsoft.Authorization/locks/cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l","type":"Microsoft.Authorization/locks","name":"cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/subnets/cli-lock-subnetmhdfpf233zerobt/providers/Microsoft.Authorization/locks/cli-test-lockzf5vqre","type":"Microsoft.Authorization/locks","name":"cli-test-lockzf5vqre"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":"Until - work is done, keep this around!"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vpn/providers/Microsoft.Network/virtualNetworks/vnet1/providers/Microsoft.Authorization/locks/lock1","type":"Microsoft.Authorization/locks","name":"lock1"}]}'} - headers: - cache-control: [no-cache] - content-length: ['6920'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:20:58 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock update] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 - response: - body: {string: '{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} - headers: - cache-control: [no-cache] - content-length: ['280'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:20:57 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - status: {code: 200, message: OK} -- request: - body: 'b''b\''{"name": "cli-test-lock000001", "properties": {"notes": "notes000002", - "level": "CanNotDelete"}}\''''' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock update] - Connection: [keep-alive] - Content-Length: ['134'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 - response: - body: {string: '{"properties":{"level":"CanNotDelete","notes":"notes000002"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} - headers: - cache-control: [no-cache] - content-length: ['315'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:20:58 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock update] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 - response: - body: {string: '{"value":[{"properties":{"level":"CanNotDelete","notes":"notes000002"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4","type":"Microsoft.Authorization/locks","name":"cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_group_lockyg55mqk35gnyugailubkgryitidvrczwp5xsvj/providers/Microsoft.Authorization/locks/cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp","type":"Microsoft.Authorization/locks","name":"cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_group_lockshyn6vu4ouyymz7cn6eqcj3hngarh6ahhn/providers/Microsoft.Authorization/locks/cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl","type":"Microsoft.Authorization/locks","name":"cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw2/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_readonly_resource_lockgtrguxbytxj6d2mvdjo6pca5scgafx55no2tafhh77tg/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchjnwouiiaquvdi7js/providers/Microsoft.Authorization/locks/cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2","type":"Microsoft.Authorization/locks","name":"cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2"},{"properties":{"level":"CanNotDelete","notes":"please - keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.KeyVault/vaults/cliautomationlab786/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending - support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Authorization/locks/cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan","type":"Microsoft.Authorization/locks","name":"cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/providers/Microsoft.Authorization/locks/cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l","type":"Microsoft.Authorization/locks","name":"cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/subnets/cli-lock-subnetmhdfpf233zerobt/providers/Microsoft.Authorization/locks/cli-test-lockzf5vqre","type":"Microsoft.Authorization/locks","name":"cli-test-lockzf5vqre"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":"Until - work is done, keep this around!"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vpn/providers/Microsoft.Network/virtualNetworks/vnet1/providers/Microsoft.Authorization/locks/lock1","type":"Microsoft.Authorization/locks","name":"lock1"}]}'} - headers: - cache-control: [no-cache] - content-length: ['6955'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:20:58 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock update] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 - response: - body: {string: '{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} - headers: - cache-control: [no-cache] - content-length: ['280'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:20:58 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - status: {code: 200, message: OK} -- request: - body: 'b''{"name": "cli-test-lock000001", "properties": {"level": "ReadOnly"}}''' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock update] - Connection: [keep-alive] - Content-Length: ['97'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 - response: - body: {string: '{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"}]}'} headers: cache-control: [no-cache] - content-length: ['280'] + content-length: ['3794'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:00 GMT'] + date: ['Wed, 04 Oct 2017 18:39:49 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: ['Accept-Encoding,Accept-Encoding'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock delete] + CommandName: [account lock show] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 - response: - body: {string: '{"value":[{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4","type":"Microsoft.Authorization/locks","name":"cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_group_lockyg55mqk35gnyugailubkgryitidvrczwp5xsvj/providers/Microsoft.Authorization/locks/cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp","type":"Microsoft.Authorization/locks","name":"cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_group_lockshyn6vu4ouyymz7cn6eqcj3hngarh6ahhn/providers/Microsoft.Authorization/locks/cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl","type":"Microsoft.Authorization/locks","name":"cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw2/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_readonly_resource_lockgtrguxbytxj6d2mvdjo6pca5scgafx55no2tafhh77tg/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchjnwouiiaquvdi7js/providers/Microsoft.Authorization/locks/cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2","type":"Microsoft.Authorization/locks","name":"cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2"},{"properties":{"level":"CanNotDelete","notes":"please - keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.KeyVault/vaults/cliautomationlab786/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending - support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Authorization/locks/cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan","type":"Microsoft.Authorization/locks","name":"cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/providers/Microsoft.Authorization/locks/cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l","type":"Microsoft.Authorization/locks","name":"cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/subnets/cli-lock-subnetmhdfpf233zerobt/providers/Microsoft.Authorization/locks/cli-test-lockzf5vqre","type":"Microsoft.Authorization/locks","name":"cli-test-lockzf5vqre"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":"Until - work is done, keep this around!"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vpn/providers/Microsoft.Network/virtualNetworks/vnet1/providers/Microsoft.Authorization/locks/lock1","type":"Microsoft.Authorization/locks","name":"lock1"}]}'} - headers: - cache-control: [no-cache] - content-length: ['6920'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:00 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock delete] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 response: - body: {string: ''} - headers: - cache-control: [no-cache] - content-length: ['0'] - date: ['Tue, 19 Sep 2017 21:21:00 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - status: {code: 200, message: OK} -- request: - body: 'b''{"name": "cli-test-lock000003", "properties": {"level": "CanNotDelete"}}''' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock create] - Connection: [keep-alive] - Content-Length: ['101'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 - response: - body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"}'} + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} headers: cache-control: [no-cache] content-length: ['284'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:00 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock list] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 - response: - body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4","type":"Microsoft.Authorization/locks","name":"cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_group_lockyg55mqk35gnyugailubkgryitidvrczwp5xsvj/providers/Microsoft.Authorization/locks/cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp","type":"Microsoft.Authorization/locks","name":"cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_group_lockshyn6vu4ouyymz7cn6eqcj3hngarh6ahhn/providers/Microsoft.Authorization/locks/cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl","type":"Microsoft.Authorization/locks","name":"cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw2/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_readonly_resource_lockgtrguxbytxj6d2mvdjo6pca5scgafx55no2tafhh77tg/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchjnwouiiaquvdi7js/providers/Microsoft.Authorization/locks/cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2","type":"Microsoft.Authorization/locks","name":"cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2"},{"properties":{"level":"CanNotDelete","notes":"please - keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.KeyVault/vaults/cliautomationlab786/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending - support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Authorization/locks/cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan","type":"Microsoft.Authorization/locks","name":"cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/providers/Microsoft.Authorization/locks/cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l","type":"Microsoft.Authorization/locks","name":"cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/subnets/cli-lock-subnetmhdfpf233zerobt/providers/Microsoft.Authorization/locks/cli-test-lockzf5vqre","type":"Microsoft.Authorization/locks","name":"cli-test-lockzf5vqre"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":"Until - work is done, keep this around!"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vpn/providers/Microsoft.Network/virtualNetworks/vnet1/providers/Microsoft.Authorization/locks/lock1","type":"Microsoft.Authorization/locks","name":"lock1"}]}'} - headers: - cache-control: [no-cache] - content-length: ['7205'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:01 GMT'] + date: ['Wed, 04 Oct 2017 18:39:49 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -529,16 +136,16 @@ interactions: headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock show] + CommandName: [account lock show] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 response: - body: {string: '{"value":[{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4","type":"Microsoft.Authorization/locks","name":"cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_group_lockyg55mqk35gnyugailubkgryitidvrczwp5xsvj/providers/Microsoft.Authorization/locks/cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp","type":"Microsoft.Authorization/locks","name":"cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_group_lockshyn6vu4ouyymz7cn6eqcj3hngarh6ahhn/providers/Microsoft.Authorization/locks/cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl","type":"Microsoft.Authorization/locks","name":"cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw2/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_readonly_resource_lockgtrguxbytxj6d2mvdjo6pca5scgafx55no2tafhh77tg/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchjnwouiiaquvdi7js/providers/Microsoft.Authorization/locks/cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2","type":"Microsoft.Authorization/locks","name":"cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2"},{"properties":{"level":"CanNotDelete","notes":"please + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilx-group/providers/Microsoft.Authorization/locks/mylock","type":"Microsoft.Authorization/locks","name":"mylock"},{"properties":{"level":"CanNotDelete","notes":"please keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved @@ -546,19 +153,18 @@ interactions: Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending - support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Authorization/locks/cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan","type":"Microsoft.Authorization/locks","name":"cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/providers/Microsoft.Authorization/locks/cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l","type":"Microsoft.Authorization/locks","name":"cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/subnets/cli-lock-subnetmhdfpf233zerobt/providers/Microsoft.Authorization/locks/cli-test-lockzf5vqre","type":"Microsoft.Authorization/locks","name":"cli-test-lockzf5vqre"},{"properties":{"level":"CanNotDelete","notes":"Reserved + support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":"Until - work is done, keep this around!"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vpn/providers/Microsoft.Network/virtualNetworks/vnet1/providers/Microsoft.Authorization/locks/lock1","type":"Microsoft.Authorization/locks","name":"lock1"}]}'} + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"}]}'} headers: cache-control: [no-cache] - content-length: ['6639'] + content-length: ['3794'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:01 GMT'] + date: ['Wed, 04 Oct 2017 18:39:49 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -570,88 +176,21 @@ interactions: headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock show] + CommandName: [account lock show] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 - response: - body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"}'} - headers: - cache-control: [no-cache] - content-length: ['284'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:01 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock show] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 - response: - body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4","type":"Microsoft.Authorization/locks","name":"cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_group_lockyg55mqk35gnyugailubkgryitidvrczwp5xsvj/providers/Microsoft.Authorization/locks/cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp","type":"Microsoft.Authorization/locks","name":"cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_group_lockshyn6vu4ouyymz7cn6eqcj3hngarh6ahhn/providers/Microsoft.Authorization/locks/cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl","type":"Microsoft.Authorization/locks","name":"cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw2/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_readonly_resource_lockgtrguxbytxj6d2mvdjo6pca5scgafx55no2tafhh77tg/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchjnwouiiaquvdi7js/providers/Microsoft.Authorization/locks/cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2","type":"Microsoft.Authorization/locks","name":"cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2"},{"properties":{"level":"CanNotDelete","notes":"please - keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.KeyVault/vaults/cliautomationlab786/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending - support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Authorization/locks/cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan","type":"Microsoft.Authorization/locks","name":"cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/providers/Microsoft.Authorization/locks/cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l","type":"Microsoft.Authorization/locks","name":"cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/subnets/cli-lock-subnetmhdfpf233zerobt/providers/Microsoft.Authorization/locks/cli-test-lockzf5vqre","type":"Microsoft.Authorization/locks","name":"cli-test-lockzf5vqre"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":"Until - work is done, keep this around!"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vpn/providers/Microsoft.Network/virtualNetworks/vnet1/providers/Microsoft.Authorization/locks/lock1","type":"Microsoft.Authorization/locks","name":"lock1"}]}'} - headers: - cache-control: [no-cache] - content-length: ['7205'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:01 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [lock show] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 response: - body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"}'} + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} headers: cache-control: [no-cache] content-length: ['284'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:02 GMT'] + date: ['Wed, 04 Oct 2017 18:39:50 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -663,16 +202,16 @@ interactions: headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock update] + CommandName: [account lock update] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 response: - body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4","type":"Microsoft.Authorization/locks","name":"cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_group_lockyg55mqk35gnyugailubkgryitidvrczwp5xsvj/providers/Microsoft.Authorization/locks/cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp","type":"Microsoft.Authorization/locks","name":"cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_group_lockshyn6vu4ouyymz7cn6eqcj3hngarh6ahhn/providers/Microsoft.Authorization/locks/cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl","type":"Microsoft.Authorization/locks","name":"cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw2/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_readonly_resource_lockgtrguxbytxj6d2mvdjo6pca5scgafx55no2tafhh77tg/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchjnwouiiaquvdi7js/providers/Microsoft.Authorization/locks/cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2","type":"Microsoft.Authorization/locks","name":"cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2"},{"properties":{"level":"CanNotDelete","notes":"please + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilx-group/providers/Microsoft.Authorization/locks/mylock","type":"Microsoft.Authorization/locks","name":"mylock"},{"properties":{"level":"CanNotDelete","notes":"please keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved @@ -680,19 +219,18 @@ interactions: Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending - support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Authorization/locks/cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan","type":"Microsoft.Authorization/locks","name":"cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/providers/Microsoft.Authorization/locks/cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l","type":"Microsoft.Authorization/locks","name":"cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/subnets/cli-lock-subnetmhdfpf233zerobt/providers/Microsoft.Authorization/locks/cli-test-lockzf5vqre","type":"Microsoft.Authorization/locks","name":"cli-test-lockzf5vqre"},{"properties":{"level":"CanNotDelete","notes":"Reserved + support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":"Until - work is done, keep this around!"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vpn/providers/Microsoft.Network/virtualNetworks/vnet1/providers/Microsoft.Authorization/locks/lock1","type":"Microsoft.Authorization/locks","name":"lock1"}]}'} + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"}]}'} headers: cache-control: [no-cache] - content-length: ['6924'] + content-length: ['3794'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:02 GMT'] + date: ['Wed, 04 Oct 2017 18:39:50 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -704,21 +242,21 @@ interactions: headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock update] + CommandName: [account lock update] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 response: - body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"}'} + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} headers: cache-control: [no-cache] content-length: ['284'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:02 GMT'] + date: ['Wed, 04 Oct 2017 18:39:51 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -726,49 +264,49 @@ interactions: vary: ['Accept-Encoding,Accept-Encoding'] status: {code: 200, message: OK} - request: - body: 'b''b\''{"name": "cli-test-lock000003", "properties": {"notes": "notes000004", - "level": "ReadOnly"}}\''''' + body: 'b''b\''{"properties": {"level": "ReadOnly", "notes": "notes000002"}, "name": + "cli-test-lock000001"}\''''' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock update] + CommandName: [account lock update] Connection: [keep-alive] Content-Length: ['130'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 response: - body: {string: '{"properties":{"level":"ReadOnly","notes":"notes000004"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"}'} + body: {string: '{"properties":{"level":"ReadOnly","notes":"notes000002"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} headers: cache-control: [no-cache] content-length: ['311'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:02 GMT'] + date: ['Wed, 04 Oct 2017 18:39:51 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: ['Accept-Encoding,Accept-Encoding'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock update] + CommandName: [account lock update] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 response: - body: {string: '{"value":[{"properties":{"level":"ReadOnly","notes":"notes000004"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4","type":"Microsoft.Authorization/locks","name":"cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_group_lockyg55mqk35gnyugailubkgryitidvrczwp5xsvj/providers/Microsoft.Authorization/locks/cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp","type":"Microsoft.Authorization/locks","name":"cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_group_lockshyn6vu4ouyymz7cn6eqcj3hngarh6ahhn/providers/Microsoft.Authorization/locks/cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl","type":"Microsoft.Authorization/locks","name":"cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw2/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_readonly_resource_lockgtrguxbytxj6d2mvdjo6pca5scgafx55no2tafhh77tg/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchjnwouiiaquvdi7js/providers/Microsoft.Authorization/locks/cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2","type":"Microsoft.Authorization/locks","name":"cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2"},{"properties":{"level":"CanNotDelete","notes":"please + body: {string: '{"value":[{"properties":{"level":"ReadOnly","notes":"notes000002"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilx-group/providers/Microsoft.Authorization/locks/mylock","type":"Microsoft.Authorization/locks","name":"mylock"},{"properties":{"level":"CanNotDelete","notes":"please keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved @@ -776,19 +314,18 @@ interactions: Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending - support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Authorization/locks/cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan","type":"Microsoft.Authorization/locks","name":"cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/providers/Microsoft.Authorization/locks/cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l","type":"Microsoft.Authorization/locks","name":"cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/subnets/cli-lock-subnetmhdfpf233zerobt/providers/Microsoft.Authorization/locks/cli-test-lockzf5vqre","type":"Microsoft.Authorization/locks","name":"cli-test-lockzf5vqre"},{"properties":{"level":"CanNotDelete","notes":"Reserved + support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":"Until - work is done, keep this around!"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vpn/providers/Microsoft.Network/virtualNetworks/vnet1/providers/Microsoft.Authorization/locks/lock1","type":"Microsoft.Authorization/locks","name":"lock1"}]}'} + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"}]}'} headers: cache-control: [no-cache] - content-length: ['6951'] + content-length: ['3821'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:02 GMT'] + date: ['Wed, 04 Oct 2017 18:39:51 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -800,21 +337,21 @@ interactions: headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock update] + CommandName: [account lock update] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 response: - body: {string: '{"properties":{"level":"ReadOnly","notes":"notes000004"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"}'} + body: {string: '{"properties":{"level":"ReadOnly","notes":"notes000002"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} headers: cache-control: [no-cache] content-length: ['311'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:02 GMT'] + date: ['Wed, 04 Oct 2017 18:39:52 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -822,27 +359,27 @@ interactions: vary: ['Accept-Encoding,Accept-Encoding'] status: {code: 200, message: OK} - request: - body: 'b''b\''{"name": "cli-test-lock000003", "properties": {"notes": "notes000004", - "level": "CanNotDelete"}}\''''' + body: 'b''b\''{"properties": {"level": "CanNotDelete", "notes": "notes000002"}, + "name": "cli-test-lock000001"}\''''' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock update] + CommandName: [account lock update] Connection: [keep-alive] Content-Length: ['134'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 response: - body: {string: '{"properties":{"level":"CanNotDelete","notes":"notes000004"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"}'} + body: {string: '{"properties":{"level":"CanNotDelete","notes":"notes000002"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"}'} headers: cache-control: [no-cache] content-length: ['315'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:03 GMT'] + date: ['Wed, 04 Oct 2017 18:39:52 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -855,16 +392,16 @@ interactions: headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock delete] + CommandName: [account lock delete] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 response: - body: {string: '{"value":[{"properties":{"level":"CanNotDelete","notes":"notes000004"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003","type":"Microsoft.Authorization/locks","name":"cli-test-lock000003"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4","type":"Microsoft.Authorization/locks","name":"cli-test-lockrcpkcaneksxzcvjtqmrvj7vd4cf3mpwybe4"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_group_lockyg55mqk35gnyugailubkgryitidvrczwp5xsvj/providers/Microsoft.Authorization/locks/cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp","type":"Microsoft.Authorization/locks","name":"cli-test-lockmirbpraflhwmjkhcbmpimd2vlzjrcvkrnkp"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_group_lockshyn6vu4ouyymz7cn6eqcj3hngarh6ahhn/providers/Microsoft.Authorization/locks/cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl","type":"Microsoft.Authorization/locks","name":"cli-test-lockxljkeaunujkjx3ymbsgexg36nnd3cabthkl"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw2/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_readonly_resource_lockgtrguxbytxj6d2mvdjo6pca5scgafx55no2tafhh77tg/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchjnwouiiaquvdi7js/providers/Microsoft.Authorization/locks/cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2","type":"Microsoft.Authorization/locks","name":"cli-test-lockrx3wngzw6jdsnnyk4iyzpeyvqwc6ndwnl4thd7un75prfeznqaqazwdjnnbh2"},{"properties":{"level":"CanNotDelete","notes":"please + body: {string: '{"value":[{"properties":{"level":"CanNotDelete","notes":"notes000002"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001","type":"Microsoft.Authorization/locks","name":"cli-test-lock000001"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilx-group/providers/Microsoft.Authorization/locks/mylock","type":"Microsoft.Authorization/locks","name":"mylock"},{"properties":{"level":"CanNotDelete","notes":"please keep"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-test/providers/Microsoft.Authorization/locks/sdk-test-lock","type":"Microsoft.Authorization/locks","name":"sdk-test-lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Storage/storageAccounts/acliautomationlab2987/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved @@ -872,19 +409,18 @@ interactions: Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Pending - support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Authorization/locks/cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan","type":"Microsoft.Authorization/locks","name":"cli-test-locklsvjitahs5t7vtj7imsjhelzhofmwlit3xlan"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/providers/Microsoft.Authorization/locks/cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l","type":"Microsoft.Authorization/locks","name":"cli-test-lockyo4iyq5xl26e4u75fpt65srzhpieydriqkl7l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_lock_commands_with_ids4d6txrywdfjatmqhkralj2yadvydlrfz3shyafymhpbg/providers/Microsoft.Network/virtualNetworks/cli-lock-vneth52byta2c2bjk7wo6/subnets/cli-lock-subnetmhdfpf233zerobt/providers/Microsoft.Authorization/locks/cli-test-lockzf5vqre","type":"Microsoft.Authorization/locks","name":"cli-test-lockzf5vqre"},{"properties":{"level":"CanNotDelete","notes":"Reserved + support ticket: REG:117080316140410"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2del/providers/Microsoft.Authorization/locks/nottodelete","type":"Microsoft.Authorization/locks","name":"nottodelete"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Storage/storageAccounts/acliautomationlab2281/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.KeyVault/vaults/cliautomationlab6073/providers/Microsoft.Authorization/locks/DevTestLabs Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved resource locked by ''cliautomationlab'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliautomation01/providers/Microsoft.Network/virtualNetworks/Dtlcliautomationlab/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":"Until - work is done, keep this around!"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vpn/providers/Microsoft.Network/virtualNetworks/vnet1/providers/Microsoft.Authorization/locks/lock1","type":"Microsoft.Authorization/locks","name":"lock1"}]}'} + Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel/providers/Microsoft.Authorization/locks/nodelete","type":"Microsoft.Authorization/locks","name":"nodelete"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yugangw/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"}]}'} headers: cache-control: [no-cache] - content-length: ['6955'] + content-length: ['3825'] content-type: [application/json; charset=utf-8] - date: ['Tue, 19 Sep 2017 21:21:02 GMT'] + date: ['Wed, 04 Oct 2017 18:39:52 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -896,24 +432,24 @@ interactions: headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [lock delete] + CommandName: [account lock delete] Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 managementlockclient/1.2.0rc1 Azure-SDK-For-Python AZURECLI/2.0.16+dev] + User-Agent: [python/3.6.2 (Windows-10-10.0.14393-SP0) requests/2.18.4 msrest/0.4.14 + msrest_azure/0.4.14 managementlockclient/1.2.0rc2 Azure-SDK-For-Python AZURECLI/2.0.17+dev] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000003?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/cli-test-lock000001?api-version=2016-09-01 response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Tue, 19 Sep 2017 21:21:03 GMT'] + date: ['Wed, 04 Oct 2017 18:39:53 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} version: 1 diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_locks.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_locks.py index 7548a8f628c..f71a3ebfc7a 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_locks.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_locks.py @@ -119,6 +119,96 @@ def _lock_operation_with_resource(self, lock_type, resource_group): .format(lock_name, resource_group, rsrc_name, rsrc_type)) self._sleep_for_lock_operation() + @ResourceGroupPreparer(name_prefix='cli_test_group_lock') + def test_group_lock_commands(self, resource_group): + lock_name = self.create_random_name('cli-test-lock', 48) + + self.cmd('group lock create -n {} -g {} --lock-type CanNotDelete'.format(lock_name, resource_group)) + self._sleep_for_lock_operation() + + self.cmd('group lock show -g {} -n {}'.format(resource_group, lock_name)).assert_with_checks([ + JMESPathCheck('name', lock_name), + JMESPathCheck('level', 'CanNotDelete')]).get_output_in_json() + + locks_list = self.cmd("group lock list -g {} --query [].name -ojson" + .format(resource_group)).get_output_in_json() + self.assertTrue(locks_list) + self.assertIn(lock_name, locks_list) + + notes = self.create_random_name('notes', 20) + lock = self.cmd('group lock update -n {} -g {} --notes {} --lock-type ReadOnly' + .format(lock_name, resource_group, notes)).get_output_in_json() + + self.assertEqual(lock.get('notes', None), notes) + self.assertEqual(lock.get('level', None), 'ReadOnly') + + self.cmd('group lock delete -g {} -n {}'.format(resource_group, lock_name)) + self._sleep_for_lock_operation() + + @ResourceGroupPreparer(name_prefix='cli_test_resource_lock') + def test_resource_lock_commands(self, resource_group): + rsrc_name = self.create_random_name('cli.lock.rsrc', 30) + rsrc_type = 'Microsoft.Network/virtualNetworks' + lock_name = self.create_random_name('cli-test-lock', 74) + lock_type = 'CanNotDelete' + + self.cmd('network vnet create -n {} -g {}'.format(rsrc_name, resource_group)) + self.cmd('resource lock create -n {} -g {} --resource-type {} --resource-name {} --lock-type {}' + .format(lock_name, resource_group, rsrc_type, rsrc_name, lock_type)) + self._sleep_for_lock_operation() + + self.cmd('resource lock show --name {} -g {} --resource-type {} --resource-name {}' + .format(lock_name, resource_group, rsrc_type, rsrc_name)).assert_with_checks([ + JMESPathCheck('name', lock_name), + JMESPathCheck('level', lock_type)]) + + list_cmd = "resource lock list -g {} --resource-type {} --resource-name {} " \ + "--query [].name -ojson".format(resource_group, rsrc_type, rsrc_name) + locks_list = self.cmd(list_cmd).get_output_in_json() + self.assertTrue(locks_list) + self.assertIn(lock_name, locks_list) + + notes = self.create_random_name('notes', 20) + lock = self.cmd('resource lock update -n {} -g {} --resource-type {} --resource-name {} --notes {} ' + '--lock-type ReadOnly' + .format(lock_name, resource_group, rsrc_type, rsrc_name, notes)).get_output_in_json() + + self.assertEqual(lock.get('notes', None), notes) + self.assertEqual(lock.get('level', None), 'ReadOnly') + + self.cmd('resource lock delete --name {} -g {} --resource-name {} --resource-type {}' + .format(lock_name, resource_group, rsrc_name, rsrc_type)) + self._sleep_for_lock_operation() + + @record_only() + def test_subscription_locks(self): + lock_name = self.create_random_name('cli-test-lock', 48) + lock = self.cmd('az account lock create -n {} --lock-type CanNotDelete'.format(lock_name)).get_output_in_json() + lock_id = lock.get('id') + + locks_list = self.cmd('az account lock list --query [].name').get_output_in_json() + self.assertTrue(locks_list) + self.assertIn(lock_name, locks_list) + + lock = self.cmd('az account lock show -n {}'.format(lock_name)).get_output_in_json() + lock_from_id = self.cmd('az account lock show --ids {}'.format(lock_id)).get_output_in_json() + + self.assertEqual(lock.get('name', None), lock_name) + self.assertEqual(lock_from_id.get('name', None), lock_name) + self.assertEqual(lock.get('level', None), 'CanNotDelete') + + notes = self.create_random_name('notes', 20) + lock = self.cmd('az account lock update -n {} --notes {} --lock-type {}' + .format(lock_name, notes, 'ReadOnly')).get_output_in_json() + self.assertEqual(lock.get('notes', None), notes) + self.assertEqual(lock.get('level', None), 'ReadOnly') + + lock = self.cmd('az account lock update --ids {} --lock-type {}' + .format(lock_id, 'CanNotDelete')).get_output_in_json() + self.assertEqual(lock.get('level', None), 'CanNotDelete') + + self.cmd('az account lock delete -n {}'.format(lock_name)) + @ResourceGroupPreparer(name_prefix='cli_test_lock_commands_with_ids') def test_lock_commands_with_ids(self, resource_group): vnet_name = self.create_random_name('cli-lock-vnet', 30) @@ -175,7 +265,7 @@ def test_parsing_lock_ids(self): 'input': "/subscriptions/subId/providers/" "Microsoft.Authorization/locks/sublock", 'expected': { - 'resource_group_name': None, + 'resource_group': None, 'resource_provider_namespace': None, 'parent_resource_path': None, 'resource_type': None, @@ -187,7 +277,7 @@ def test_parsing_lock_ids(self): 'input': "/subscriptions/subId/resourceGroups/examplegroup/providers/" "Microsoft.Authorization/locks/grouplock", 'expected': { - 'resource_group_name': 'examplegroup', + 'resource_group': 'examplegroup', 'resource_provider_namespace': None, 'parent_resource_path': None, 'resource_type': None, @@ -200,7 +290,7 @@ def test_parsing_lock_ids(self): "Microsoft.Network/virtualNetworks/myvnet/providers/" "Microsoft.Authorization/locks/vnetlock", 'expected': { - 'resource_group_name': 'mygroup', + 'resource_group': 'mygroup', 'resource_provider_namespace': 'Microsoft.Network', 'parent_resource_path': None, 'resource_type': 'virtualNetworks', @@ -213,7 +303,7 @@ def test_parsing_lock_ids(self): "Microsoft.Network/virtualNetworks/myvnet/subnets/subnet/providers/" "Microsoft.Authorization/locks/subnetlock", 'expected': { - 'resource_group_name': 'mygroup', + 'resource_group': 'mygroup', 'resource_provider_namespace': 'Microsoft.Network', 'parent_resource_path': 'virtualNetworks/myvnet', 'resource_type': 'subnets', @@ -227,7 +317,7 @@ def test_parsing_lock_ids(self): "Microsoft.Provider2/resourceType2/name2/providers/" "Microsoft.Authorization/locks/somelock", 'expected': { - 'resource_group_name': 'mygroup', + 'resource_group': 'mygroup', 'resource_provider_namespace': 'Microsoft.Provider1', 'parent_resource_path': 'resourceType1/name1/providers/Microsoft.Provider2', 'resource_type': 'resourceType2', diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_resource_validators.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_resource_validators.py index 9ef089c86b9..de7a57d003f 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_resource_validators.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_resource_validators.py @@ -35,19 +35,19 @@ def test_validate_lock_params(self): { 'test': 'name and group', 'name': 'foo', - 'resource_group_name': 'foo', + 'resource_group': 'foo', }, { 'test': 'name, group, type [compact]', 'name': 'foo', - 'resource_group_name': 'bar', + 'resource_group': 'bar', 'resource_name': 'baz', 'resource_type': 'Microsoft.Compute/VirtualMachines' }, { 'test': 'name, group, type, namespace', 'name': 'foo', - 'resource_group_name': 'bar', + 'resource_group': 'bar', 'resource_name': 'baz', 'resource_type': 'VirtualMachines', 'resource_provider_namespace': 'Microsoft.Compute', @@ -55,7 +55,7 @@ def test_validate_lock_params(self): { 'test': 'name, group, type, namespace, parent', 'name': 'foo', - 'resource_group_name': 'bar', + 'resource_group': 'bar', 'resource_name': 'baz', 'resource_type': 'VirtualMachines', 'resource_provider_namespace': 'Microsoft.Compute', @@ -82,26 +82,26 @@ def test_validate_lock_params_invalid(self): { 'test': 'name and group and type', 'name': 'foo', - 'resource_group_name': 'foo', + 'resource_group': 'foo', 'resource_type': 'bar', }, { 'test': 'name, group, no type', 'name': 'foo', - 'resource_group_name': 'bar', + 'resource_group': 'bar', 'resource_name': 'baz', }, { 'test': 'name, group, type, namespace', 'name': 'foo', - 'resource_group_name': 'bar', + 'resource_group': 'bar', 'resource_name': 'baz', 'resource_provider_namespace': 'Microsoft.Compute', }, { 'test': 'name, group, type, namespace, parent', 'name': 'foo', - 'resource_group_name': 'bar', + 'resource_group': 'bar', 'resource_type': 'VirtualMachines', 'resource_provider_namespace': 'Microsoft.Compute', 'parent_resource_path': 'Foo.Bar/baz',