@@ -52,6 +52,19 @@ public static PSResourceGroup ToPSResourceGroup(this ResourceGroupExtended resou
52
52
return result ;
53
53
}
54
54
55
+ public static PSResourceGroupDeployment ToPSResourceGroupDeployment ( this DeploymentGetResult result , string resourceGroup )
56
+ {
57
+ PSResourceGroupDeployment deployment = new PSResourceGroupDeployment ( ) ;
58
+
59
+ if ( result != null )
60
+ {
61
+ deployment = CreatePSResourceGroupDeployment ( result . Deployment . Name , resourceGroup , result . Deployment . Properties ) ;
62
+ }
63
+
64
+ return deployment ;
65
+ }
66
+
67
+
55
68
public static PSResourceGroupDeployment ToPSResourceGroupDeployment ( this DeploymentExtended result , string resourceGroup )
56
69
{
57
70
PSResourceGroupDeployment deployment = new PSResourceGroupDeployment ( ) ;
@@ -75,7 +88,20 @@ public static PSResourceManagerError ToPSResourceManagerError(this ResourceManag
75
88
76
89
public static PSResource ToPSResource ( this GenericResourceExtended resource , ResourcesClient client , bool minimal )
77
90
{
78
- return resource . ToPSResource ( client , minimal ) ;
91
+ ResourceIdentifier identifier = new ResourceIdentifier ( resource . Id ) ;
92
+ return new PSResource
93
+ {
94
+ Name = identifier . ResourceName ,
95
+ Location = resource . Location ,
96
+ ResourceType = identifier . ResourceType ,
97
+ ResourceGroupName = identifier . ResourceGroupName ,
98
+ ParentResource = identifier . ParentResource ,
99
+ Properties = JsonUtilities . DeserializeJson ( resource . Properties ) ,
100
+ PropertiesText = resource . Properties ,
101
+ Tags = TagsConversionHelper . CreateTagHashtable ( resource . Tags ) ,
102
+ Permissions = minimal ? null : client . GetResourcePermissions ( identifier ) ,
103
+ ResourceId = identifier . ToString ( )
104
+ } ;
79
105
}
80
106
81
107
public static PSResourceProvider ToPSResourceProvider ( this Provider provider )
0 commit comments