Skip to content

azure-mgmt-resource returning properties as str instead of an obj #18763

@bmc-msft

Description

@bmc-msft
  • Package Name: azure-mgmt-resource
  • Package Version: 17.0.0
  • Operating System: linux
  • Python Version: 3.8.0

Describe the bug

Many methods in azure-mgmt-resource no longer provide the results as a nested object, rather the results are provided as a str. This was not included in the breaking change documentation in this release.

It appears that this change was made in #18686.

To Reproduce

resource = ResourceManagementClient(...).resources.get_by_id(resource_id, "2018-11-30")
resource.properties['principalId']

Expected behavior

Previously, this returned the dictionary with the keys tenantId, principalId, and clientId.

Now, this returns a string with the value {'tenantId': 'GUID', 'principalId': 'GUID', 'clientId': 'GUID'}.

Note, because this string uses single quotes, it can't be decoded as json, like many other resources from Azure.

Metadata

Metadata

Assignees

Labels

MgmtThis issue is related to a management-plane library.Resource HealthService AttentionWorkflow: This issue is responsible by Azure service team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions