Skip to content

Commit 7e0da4c

Browse files
committed
Merged conflict and updated cmdlet names
2 parents a1729c5 + 06248ee commit 7e0da4c

File tree

222 files changed

+480
-239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+480
-239
lines changed

src/CLU/Commands.Common/AzurePSCmdlet.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
using System.Linq;
3030
using System.Threading;
3131
using Microsoft.Azure.Commands.Common.Authentication.Factories;
32+
using Microsoft.Rest;
3233

3334
namespace Microsoft.Azure.Commands.Utilities.Common
3435
{
@@ -299,6 +300,8 @@ protected override void BeginProcessing()
299300
ModuleName, string.Format("v{0}", ModuleVersion));
300301
ClientFactory.UserAgents.Add(userAgentValue);
301302
ClientFactory.AddHandler(new CmdletInfoHandler(this.CommandRuntime.ToString(), this.ParameterSetName));
303+
ServiceClientTracing.AddTracingInterceptor(_adalListener);
304+
ServiceClientTracing.IsEnabled = true;
302305
base.BeginProcessing();
303306
}
304307

src/CLU/Commands.Common/DebugStreamTraceListener.cs

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using System;
1516
using System.Collections.Concurrent;
17+
using System.Collections.Generic;
1618
using System.Diagnostics;
19+
using System.Net.Http;
20+
using Microsoft.Azure.Commands.Common.Authentication;
21+
using Microsoft.Azure.Commands.Utilities.Common;
1722
using Microsoft.IdentityModel.Clients.ActiveDirectory;
23+
using Microsoft.Rest;
1824

1925
namespace Microsoft.Azure.Commands.Common
2026
{
21-
public class DebugStreamTraceListener : TraceListener
27+
public class DebugStreamTraceListener : TraceListener, IServiceClientTracingInterceptor
2228
{
2329
public DebugStreamTraceListener(ConcurrentQueue<string> queue)
2430
{
@@ -46,5 +52,40 @@ public static void RemoveAdalTracing(DebugStreamTraceListener listener)
4652
{
4753
//AdalTrace.TraceSource.Listeners.Remove(listener);
4854
}
55+
56+
public void Configuration(string source, string name, string value)
57+
{
58+
}
59+
60+
public void ExitMethod(string invocationId, object returnValue)
61+
{
62+
WriteLine($"{invocationId}: End method with return value {returnValue}");
63+
}
64+
65+
public void Information(string message)
66+
{
67+
}
68+
69+
public void TraceError(string invocationId, Exception exception)
70+
{
71+
WriteLine($"{invocationId}: Exception {exception}");
72+
}
73+
74+
public void SendRequest(string invocationId, HttpRequestMessage request)
75+
{
76+
WriteLine($"{invocationId} REQUEST:");
77+
WriteLine($"{GeneralUtilities.GetLog(request)}");
78+
}
79+
80+
public void ReceiveResponse(string invocationId, HttpResponseMessage response)
81+
{
82+
WriteLine($"{invocationId} RESPONSE:");
83+
WriteLine($"{GeneralUtilities.GetLog(response)}");
84+
}
85+
86+
public void EnterMethod(string invocationId, object instance, string method, IDictionary<string, object> parameters)
87+
{
88+
WriteLine($"{invocationId}: Start method {method} with return value");
89+
}
4990
}
5091
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Configuration>
3+
<ViewDefinitions>
4+
<View>
5+
<Name>Microsoft.Azure.Commands.ResourceManager.Cmdlets.Models.PSResourceObject</Name>
6+
<ViewSelectedBy>
7+
<TypeName>Microsoft.Azure.Commands.ResourceManager.Cmdlets.Models.PSResourceObject</TypeName>
8+
</ViewSelectedBy>
9+
<ListControl>
10+
<ListEntries>
11+
<ListEntry>
12+
<ListItems>
13+
<ListItem>
14+
<Label>Name</Label>
15+
<PropertyName>Name</PropertyName>
16+
</ListItem>
17+
<ListItem>
18+
<Label>ResourceId</Label>
19+
<PropertyName>ResourceId</PropertyName>
20+
</ListItem>
21+
<ListItem>
22+
<Label>ResourceName</Label>
23+
<PropertyName>ResourceName</PropertyName>
24+
</ListItem>
25+
<ListItem>
26+
<Label>ResourceType</Label>
27+
<PropertyName>ResourceType</PropertyName>
28+
</ListItem>
29+
<ListItem>
30+
<Label>ResourceGroupName</Label>
31+
<PropertyName>ResourceGroupName</PropertyName>
32+
</ListItem>
33+
<ListItem>
34+
<Label>Location</Label>
35+
<PropertyName>Location</PropertyName>
36+
</ListItem>
37+
<ListItem>
38+
<Label>SubscriptionId</Label>
39+
<PropertyName>SubscriptionId</PropertyName>
40+
</ListItem>
41+
<ListItem>
42+
<Label>Properties</Label>
43+
<PropertyName>PropertiesText</PropertyName>
44+
</ListItem>
45+
</ListItems>
46+
</ListEntry>
47+
</ListEntries>
48+
</ListControl>
49+
</View>
50+
</ViewDefinitions>
51+
</Configuration>

src/CLU/Commands.ResourceManager.Cmdlets/Extensions/ResourceExtensions.cs

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions
1717
using Commands.Utilities.Common;
1818
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1919
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources;
20+
using Models;
2021
using Newtonsoft.Json.Linq;
2122
using System.Collections.Generic;
2223
using System.Linq;
@@ -26,11 +27,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions
2627
/// </summary>
2728
internal static class ResourceExtensions
2829
{
29-
/// <summary>
30-
/// Converts a <see cref="Resource{JToken}"/> object into a <see cref="PSObject"/> object.
31-
/// </summary>
32-
/// <param name="resource">The <see cref="Resource{JToken}"/> object.</param>
33-
internal static PSObject ToPsObject(this Resource<JToken> resource)
30+
internal static PSResourceObject ToPSResourceObject(this Resource<JToken> resource)
3431
{
3532
var resourceType = string.IsNullOrEmpty(resource.Id)
3633
? null
@@ -42,28 +39,34 @@ internal static PSObject ToPsObject(this Resource<JToken> resource)
4239

4340
var objectDefinition = new Dictionary<string, object>
4441
{
45-
{ "Name", resource.Name },
46-
{ "ResourceId", string.IsNullOrEmpty(resource.Id) ? null : resource.Id },
47-
{ "ResourceName", string.IsNullOrEmpty(resource.Id) ? null : ResourceIdUtility.GetResourceName(resource.Id) },
48-
{ "ResourceType", resourceType },
4942
{ "ExtensionResourceName", string.IsNullOrEmpty(resource.Id) ? null : ResourceIdUtility.GetExtensionResourceName(resource.Id) },
5043
{ "ExtensionResourceType", extensionResourceType },
5144
{ "Kind", resource.Kind },
52-
{ "ResourceGroupName", string.IsNullOrEmpty(resource.Id) ? null : ResourceIdUtility.GetResourceGroupName(resource.Id) },
53-
{ "Location", resource.Location },
54-
{ "SubscriptionId", string.IsNullOrEmpty(resource.Id) ? null : ResourceIdUtility.GetSubscriptionId(resource.Id) },
5545
{ "Tags", TagsHelper.GetTagsHashtables(resource.Tags) },
56-
{ "Plan", resource.Plan == null ? null : resource.Plan.ToJToken().ToPsObject() },
46+
{ "Plan", resource.Plan == null ? null : resource.Plan.ToJToken() },
5747
{ "Properties", ResourceExtensions.GetProperties(resource) },
5848
{ "CreatedTime", resource.CreatedTime },
5949
{ "ChangedTime", resource.ChangedTime },
6050
{ "ETag", resource.ETag },
61-
{ "Sku", resource.Sku == null ? null : resource.Sku.ToJToken().ToPsObject() },
51+
{ "Sku", resource.Sku == null ? null : resource.Sku.ToJToken() },
6252
};
6353

64-
var psObject =
65-
PowerShellUtilities.ConstructPSObject(
66-
objectDefinition.Where(kvp => kvp.Value != null).SelectManyArray(kvp => new[] { kvp.Key, kvp.Value }));
54+
var psObject = new PSResourceObject();
55+
psObject.Name = resource.Name;
56+
psObject.ResourceId = string.IsNullOrEmpty(resource.Id) ? null : resource.Id;
57+
psObject.ResourceName = string.IsNullOrEmpty(resource.Id) ? null : ResourceIdUtility.GetResourceName(resource.Id);
58+
psObject.ResourceType = resourceType;
59+
psObject.ResourceGroupName = string.IsNullOrEmpty(resource.Id) ? null : ResourceIdUtility.GetResourceGroupName(resource.Id);
60+
psObject.Location = resource.Location;
61+
psObject.SubscriptionId = string.IsNullOrEmpty(resource.Id) ? null : ResourceIdUtility.GetSubscriptionId(resource.Id);
62+
63+
64+
var objectProperties = objectDefinition.Where(kvp => kvp.Value != null).SelectManyArray(kvp => new[] { kvp.Key, kvp.Value });
65+
66+
for(int i=0; i< objectProperties.Length; i+=2)
67+
{
68+
psObject.Properties.Add(objectProperties[i].ToString(), objectProperties[i + 1].ToString());
69+
}
6770

6871
return psObject;
6972
}

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/GetAzureResourceGroupDeploymentOperationCmdlet.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2121
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources;
2222
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
2323
using Newtonsoft.Json.Linq;
24-
24+
using Models;
2525
/// <summary>
2626
/// Gets the deployment operation.
2727
/// </summary>
28-
[Cmdlet(VerbsCommon.Get, "AzureRmResourceGroupDeploymentOperation"), OutputType(typeof(Resource<JToken>))]
28+
[Cmdlet(VerbsCommon.Get, "AzureRmResourceGroupDeploymentOperation"), OutputType(typeof(PSResourceObject))]
2929
[CliCommandAlias("resourcemanager;group;deployment;operation;ls")]
3030
public class GetAzureResourceGroupDeploymentOperationCmdlet : ResourceManagerCmdletBase
3131
{
@@ -82,7 +82,9 @@ private void RunCmdlet()
8282
getFirstPage: () => this.GetResources(),
8383
getNextPage: nextLink => this.GetNextLink<JObject>(nextLink),
8484
cancellationToken: this.CancellationToken,
85-
action: resources => this.WriteObject(sendToPipeline: resources.CoalesceEnumerable().SelectArray(resource => resource.ToResource()), enumerateCollection: true));
85+
action: resources => this.WriteObject(sendToPipeline: resources.CoalesceEnumerable()
86+
.SelectArray(resource => resource.ToResource().ToPSResourceObject()),
87+
enumerateCollection: true));
8688
}
8789

8890
/// <summary>

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/InvokeAzureResourceActionCmdlet.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1919
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
2020
using Newtonsoft.Json.Linq;
2121
using Commands.Common;
22+
using Models;
23+
2224
/// <summary>
2325
/// A cmdlet that invokes a resource action.
2426
/// </summary>
25-
[Cmdlet(VerbsLifecycle.Invoke, "AzureRmResourceAction", SupportsShouldProcess = true, DefaultParameterSetName = ResourceManipulationCmdletBase.ResourceIdParameterSet), OutputType(typeof(PSObject))]
27+
[Cmdlet(VerbsLifecycle.Invoke, "AzureRmResourceAction", SupportsShouldProcess = true, DefaultParameterSetName = ResourceManipulationCmdletBase.ResourceIdParameterSet),
28+
OutputType(typeof(PSResourceObject))]
2629
public sealed class InvokAzureResourceActionCmdlet : ResourceManipulationCmdletBase
2730
{
2831
/// <summary>

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/Policy/GetAzurePolicyAssignment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2424
/// Gets the policy assignment.
2525
/// </summary>
2626
[Cmdlet(VerbsCommon.Get, "AzureRmPolicyAssignment", DefaultParameterSetName = GetAzurePolicyAssignmentCmdlet.ParameterlessSet), OutputType(typeof(ResourcePolicyAssignment<JToken>))]
27-
[CliCommandAlias("security;policy;assignment;ls")]
27+
[CliCommandAlias("networksecurity;policy;assignment;ls")]
2828
public class GetAzurePolicyAssignmentCmdlet : PolicyAssignmentCmdletBase
2929
{
3030
/// <summary>

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/Policy/GetAzurePolicyDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2424
/// Gets the policy definition.
2525
/// </summary>
2626
[Cmdlet(VerbsCommon.Get, "AzureRmPolicyDefinition", DefaultParameterSetName = GetAzurePolicyDefinitionCmdlet.ParameterlessSet), OutputType(typeof(ResourcePolicyDefinition<JToken>))]
27-
[CliCommandAlias("security;policy;definition;ls")]
27+
[CliCommandAlias("networksecurity;policy;definition;ls")]
2828
public class GetAzurePolicyDefinitionCmdlet : PolicyDefinitionCmdletBase
2929
{
3030
/// <summary>

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/Policy/NewAzurePolicyAssignment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2424
/// Creates a policy assignment.
2525
/// </summary>
2626
[Cmdlet(VerbsCommon.New, "AzureRmPolicyAssignment"), OutputType(typeof(ResourcePolicyAssignment<JToken>))]
27-
[CliCommandAlias("security;policy;assignment;create")]
27+
[CliCommandAlias("networksecurity;policy;assignment;create")]
2828
public class NewAzurePolicyAssignmentCmdlet : PolicyAssignmentCmdletBase
2929
{
3030
/// <summary>

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/Policy/NewAzurePolicyDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2626
/// Creates the policy definition.
2727
/// </summary>
2828
[Cmdlet(VerbsCommon.New, "AzureRmPolicyDefinition"), OutputType(typeof(ResourcePolicyDefinition<JToken>))]
29-
[CliCommandAlias("security;policy;definition;create")]
29+
[CliCommandAlias("networksecurity;policy;definition;create")]
3030
public class NewAzurePolicyDefinitionCmdlet : PolicyDefinitionCmdletBase
3131
{
3232
/// <summary>

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/Policy/RemoveAzurePolicyAssignment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2121
/// Removes the policy assignment.
2222
/// </summary>
2323
[Cmdlet(VerbsCommon.Remove, "AzureRmPolicyAssignment", DefaultParameterSetName = RemoveAzurePolicyAssignmentCmdlet.PolicyAssignmentNameParameterSet), OutputType(typeof(bool))]
24-
[CliCommandAlias("security;policy;assignment;rm")]
24+
[CliCommandAlias("networksecurity;policy;assignment;rm")]
2525
public class RemoveAzurePolicyAssignmentCmdlet : PolicyAssignmentCmdletBase
2626
{
2727
/// <summary>

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/Policy/RemoveAzurePolicyDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2121
/// Removes the policy definition.
2222
/// </summary>
2323
[Cmdlet(VerbsCommon.Remove, "AzureRmPolicyDefinition", DefaultParameterSetName = RemoveAzurePolicyDefinitionCmdlet.PolicyDefinitionNameParameterSet), OutputType(typeof(bool))]
24-
[CliCommandAlias("security;policy;definition;rm")]
24+
[CliCommandAlias("networksecurity;policy;definition;rm")]
2525
public class RemoveAzurePolicyDefinitionCmdlet : PolicyDefinitionCmdletBase
2626
{
2727
/// <summary>

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/Policy/SetAzurePolicyAssignment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2525
/// Sets the policy assignment.
2626
/// </summary>
2727
[Cmdlet(VerbsCommon.Set, "AzureRmPolicyAssignment", DefaultParameterSetName = SetAzurePolicyAssignmentCmdlet.PolicyAssignmentNameParameterSet), OutputType(typeof(ResourcePolicyAssignment<JToken>))]
28-
[CliCommandAlias("security;policy;assignment;set")]
28+
[CliCommandAlias("networksecurity;policy;assignment;set")]
2929
public class SetAzurePolicyAssignmentCmdlet : PolicyAssignmentCmdletBase
3030
{
3131
/// <summary>

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/Policy/SetAzurePolicyDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2727
/// Sets the policy definition.
2828
/// </summary>
2929
[Cmdlet(VerbsCommon.Set, "AzureRmPolicyDefinition", DefaultParameterSetName = SetAzurePolicyDefinitionCmdlet.PolicyDefinitionNameParameterSet), OutputType(typeof(ResourcePolicyDefinition<JToken>))]
30-
[CliCommandAlias("security;policy;definition;set")]
30+
[CliCommandAlias("networksecurity;policy;definition;set")]
3131
public class SetAzurePolicyDefinitionCmdlet : PolicyDefinitionCmdletBase
3232
{
3333
/// <summary>

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/Resource/FindAzureResourceCmdlet.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2525
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources;
2626
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
2727
using Newtonsoft.Json.Linq;
28+
using Models;
2829

2930
/// <summary>
3031
/// Cmdlet to get existing resources from ARM cache.
3132
/// </summary>
32-
[Cmdlet(VerbsCommon.Find, "AzureRmResource", DefaultParameterSetName = FindAzureResourceCmdlet.ListResourcesParameterSet), OutputType(typeof(Resource<JToken>))]
33+
[Cmdlet(VerbsCommon.Find, "AzureRmResource", DefaultParameterSetName = FindAzureResourceCmdlet.ListResourcesParameterSet), OutputType(typeof(PSResourceObject))]
3334
public sealed class FindAzureResourceCmdlet : ResourceManagerCmdletBase
3435
{
3536
/// <summary>
@@ -191,14 +192,14 @@ private void RunCmdlet()
191192
items = this.GetPopulatedResource(batch).Result;
192193
}
193194

194-
var powerShellObjects = items.SelectArray(genericResource => genericResource);
195+
var powerShellObjects = items.SelectArray(genericResource => genericResource.ToPSResourceObject());
195196

196197
this.WriteObject(sendToPipeline: powerShellObjects, enumerateCollection: true);
197198
}
198199
}
199200
else
200201
{
201-
this.WriteObject(sendToPipeline: resources.CoalesceEnumerable().SelectArray(res => res.ToResource()), enumerateCollection: true);
202+
this.WriteObject(sendToPipeline: resources.CoalesceEnumerable().SelectArray(res => res.ToResource().ToPSResourceObject()), enumerateCollection: true);
202203
}
203204
});
204205

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/Resource/GetAzureResourceCmdlet.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2525
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources;
2626
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
2727
using Newtonsoft.Json.Linq;
28+
using Models;
2829

2930
/// <summary>
3031
/// Cmdlet to get existing resources.
3132
/// </summary>
32-
[Cmdlet(VerbsCommon.Get, "AzureRmResource", DefaultParameterSetName = GetAzureResourceCmdlet.ParameterlessSet), OutputType(typeof(Resource<JToken>))]
33+
[Cmdlet(VerbsCommon.Get, "AzureRmResource", DefaultParameterSetName = GetAzureResourceCmdlet.ParameterlessSet), OutputType(typeof(PSResourceObject))]
3334
public sealed class GetAzureResourceCmdlet : ResourceManagerCmdletBase
3435
{
3536
/// <summary>
@@ -228,14 +229,14 @@ private void RunCmdlet()
228229
items = this.GetPopulatedResource(batch).Result;
229230
}
230231

231-
var powerShellObjects = items.SelectArray(genericResource => genericResource);
232+
var powerShellObjects = items.SelectArray(genericResource => genericResource.ToPSResourceObject());
232233

233234
this.WriteObject(sendToPipeline: powerShellObjects, enumerateCollection: true);
234235
}
235236
}
236237
else
237238
{
238-
this.WriteObject(sendToPipeline: resources.CoalesceEnumerable().SelectArray(res => res.ToResource()), enumerateCollection: true);
239+
this.WriteObject(sendToPipeline: resources.CoalesceEnumerable().SelectArray(res => res.ToResource().ToPSResourceObject()), enumerateCollection: true);
239240
}
240241
});
241242

src/CLU/Commands.ResourceManager.Cmdlets/Implementation/Resource/NewAzureResourceCmdlet.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1818
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1919
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources;
2020
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
21+
using Models;
2122
using Newtonsoft.Json.Linq;
2223
using System.Collections;
2324
using System.Linq;
@@ -30,7 +31,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
3031
"AzureRmResource",
3132
SupportsShouldProcess = true,
3233
DefaultParameterSetName = ResourceManipulationCmdletBase.ResourceIdParameterSet),
33-
OutputType(typeof(Resource<JToken>))]
34+
OutputType(typeof(PSResourceObject))]
3435
public sealed class NewAzureResourceCmdlet : ResourceManipulationCmdletBase
3536
{
3637
/// <summary>

0 commit comments

Comments
 (0)