You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name az policy assignment create
Errors:
The command failed with an unexpected error. Here is the traceback:
('Unable to build a model: (\'Unable to deserialize response data. Data: {\\\'allowedContainerImagesRegex\\\': \\\'asdasd\\\'}, {ParameterValuesValue}, DeserializationError: ("Unable to deserialize to object: type, AttributeError: \\\'str\\\' object has no attribute \\\'get\\\'", AttributeError("\\\'str\\\' object has no attribute \\\'get\\\'"))\', DeserializationError("Unable to deserialize to object: type, AttributeError: \'str\' object has no attribute \'get\'", AttributeError("\'str\' object has no attribute \'get\'"))), DeserializationError: (\'Unable to deserialize response data. Data: {\\\'allowedContainerImagesRegex\\\': \\\'asdasd\\\'}, {ParameterValuesValue}, DeserializationError: ("Unable to deserialize to object: type, AttributeError: \\\'str\\\' object has no attribute \\\'get\\\'", AttributeError("\\\'str\\\' object has no attribute \\\'get\\\'"))\', DeserializationError("Unable to deserialize to object: type, AttributeError: \'str\' object has no attribute \'get\'", AttributeError("\'str\' object has no attribute \'get\'")))', DeserializationError('Unable to deserialize response data. Data: {\'allowedContainerImagesRegex\': \'asdasd\'}, {ParameterValuesValue}, DeserializationError: ("Unable to deserialize to object: type, AttributeError: \'str\' object has no attribute \'get\'", AttributeError("\'str\' object has no attribute \'get\'"))', DeserializationError("Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'", AttributeError("'str' object has no attribute 'get'"))))
Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1436, in _deserialize
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1201, in rest_key_case_insensitive_extractor
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1230, in attribute_key_case_insensitive_extractor
AttributeError: 'str' object has no attribute 'get'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1626, in deserialize_data
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1673, in deserialize_dict
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1673, in <dictcomp>
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1639, in deserialize_data
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1454, in _deserialize
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/exceptions.py", line 51, in raise_with_traceback
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1436, in _deserialize
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1201, in rest_key_case_insensitive_extractor
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1230, in attribute_key_case_insensitive_extractor
azure.core.exceptions.DeserializationError: ("Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'", AttributeError("'str' object has no attribute 'get'"))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 622, in body
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1406, in _deserialize
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1415, in _deserialize
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1637, in deserialize_data
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/exceptions.py", line 51, in raise_with_traceback
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1626, in deserialize_data
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1673, in deserialize_dict
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1673, in <dictcomp>
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1639, in deserialize_data
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1454, in _deserialize
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/exceptions.py", line 51, in raise_with_traceback
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1436, in _deserialize
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1201, in rest_key_case_insensitive_extractor
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1230, in attribute_key_case_insensitive_extractor
azure.core.exceptions.DeserializationError: ('Unable to deserialize response data. Data: {\'allowedContainerImagesRegex\': \'asdasd\'}, {ParameterValuesValue}, DeserializationError: ("Unable to deserialize to object: type, AttributeError: \'str\' object has no attribute \'get\'", AttributeError("\'str\' object has no attribute \'get\'"))', DeserializationError("Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'", AttributeError("'str' object has no attribute 'get'")))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/custom.py", line 2262, in create_policy_assignment
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 73, in wrapper_use_tracer
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/resource/policy/v2021_06_01/operations/_operations.py", line 1845, in create
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 624, in body
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/exceptions.py", line 51, in raise_with_traceback
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 622, in body
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1406, in _deserialize
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1415, in _deserialize
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1637, in deserialize_data
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/exceptions.py", line 51, in raise_with_traceback
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1626, in deserialize_data
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1673, in deserialize_dict
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1673, in <dictcomp>
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1639, in deserialize_data
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1454, in _deserialize
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/exceptions.py", line 51, in raise_with_traceback
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1436, in _deserialize
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1201, in rest_key_case_insensitive_extractor
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1230, in attribute_key_case_insensitive_extractor
azure.core.exceptions.SerializationError: ('Unable to build a model: (\'Unable to deserialize response data. Data: {\\\'allowedContainerImagesRegex\\\': \\\'asdasd\\\'}, {ParameterValuesValue}, DeserializationError: ("Unable to deserialize to object: type, AttributeError: \\\'str\\\' object has no attribute \\\'get\\\'", AttributeError("\\\'str\\\' object has no attribute \\\'get\\\'"))\', DeserializationError("Unable to deserialize to object: type, AttributeError: \'str\' object has no attribute \'get\'", AttributeError("\'str\' object has no attribute \'get\'"))), DeserializationError: (\'Unable to deserialize response data. Data: {\\\'allowedContainerImagesRegex\\\': \\\'asdasd\\\'}, {ParameterValuesValue}, DeserializationError: ("Unable to deserialize to object: type, AttributeError: \\\'str\\\' object has no attribute \\\'get\\\'", AttributeError("\\\'str\\\' object has no attribute \\\'get\\\'"))\', DeserializationError("Unable to deserialize to object: type, AttributeError: \'str\' object has no attribute \'get\'", AttributeError("\'str\' object has no attribute \'get\'")))', DeserializationError('Unable to deserialize response data. Data: {\'allowedContainerImagesRegex\': \'asdasd\'}, {ParameterValuesValue}, DeserializationError: ("Unable to deserialize to object: type, AttributeError: \'str\' object has no attribute \'get\'", AttributeError("\'str\' object has no attribute \'get\'"))', DeserializationError("Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'", AttributeError("'str' object has no attribute 'get'"))))
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az policy assignment create
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az policy assignment create --name "restrict-container-registries" --scope "/subscriptions/subscription-id/resourceGroups/rg-demo" --policy "febd0533-8e55-448f-b837-bd0e06f16469" --params "{'allowedContainerImagesRegex': 'asdasd'}"
Expected Behavior
Azure CLI command successfully passes the argument as JSON to the Azure Policy.
Environment Summary
Additional Context
The same issue occurs if I pass the json as file
params.json
Copy from
https://github.com/Azure/azure-cli/issues/25522
The text was updated successfully, but these errors were encountered: