public override void ExecuteCmdlet() { RelayNamespaceAttirbutesUpdateParameter relayNamespace = new RelayNamespaceAttirbutesUpdateParameter(); if (InputObject != null) { relayNamespace = InputObject; } else { // Update a Relay namespace Dictionary <string, string> tagDictionary = TagsConversionHelper.CreateTagDictionary(Tag, validate: true); relayNamespace.Tags = tagDictionary; } if (ShouldProcess(target: Name, action: string.Format(Resources.UpdateRelayNamespace, Name, ResourceGroupName))) { WriteObject(Client.UpdateNamespace(ResourceGroupName, Name, relayNamespace)); } }
public PSRelayNamespaceAttributes UpdateNamespace(string resourceGroupName, string namespaceName, RelayNamespaceAttirbutesUpdateParameter relaynamespace) { var parameter = new RelayUpdateParameters(); if (relaynamespace.Tags != null && relaynamespace.Tags.Count() > 0) { parameter.Tags = new Dictionary <string, string>(relaynamespace.Tags); } var response = Client.Namespaces.Update(resourceGroupName, namespaceName, parameter); return(new PSRelayNamespaceAttributes(response)); }