Skip to content

Commit 7a20a7c

Browse files
author
REDMOND\v-ajnava
committed
Added ResourceGroup to Namespace Attribute
1 parent 00e9354 commit 7a20a7c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ResourceManager/Relay/Commands.Relay/Models/RelayNamespaceAttributes.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ namespace Microsoft.Azure.Commands.Relay.Models
1212
using Newtonsoft.Json;
1313
using System.Collections.Generic;
1414
using Azure.Management.Relay.Models;
15+
using System.Text.RegularExpressions;
1516

1617
/// <summary>
1718
/// Description of a Namespace resource.
@@ -63,8 +64,15 @@ public RelayNamespaceAttributes(RelayNamespace relaynamespace)
6364
UpdatedAt = relaynamespace.UpdatedAt;
6465
ServiceBusEndpoint = relaynamespace.ServiceBusEndpoint;
6566
MetricId = relaynamespace.MetricId;
67+
ResourceGroup = Regex.Split(relaynamespace.Id, @"/")[4];
6668
}
6769

70+
71+
/// <summary>
72+
/// Gets the resourcegroup name
73+
/// </summary>
74+
public string ResourceGroup { get; }
75+
6876
/// <summary>
6977
/// Static constructor for RelayNamespaceAttributes class.
7078
/// </summary>

0 commit comments

Comments
 (0)