public void DeletePrivateDnsLink( PSPrivateDnsVirtualNetworkLink link, bool overwrite) { this.PrivateDnsManagementClient.VirtualNetworkLinks.Delete( link.ResourceGroupName, link.ZoneName, link.Name, ifMatch: overwrite ? "*" : link.Etag); }
public PSPrivateDnsVirtualNetworkLink GetLinkHandleNonExistentLink(string zoneName, string resourceGroupName, string linkName) { PSPrivateDnsVirtualNetworkLink retrievedLink = null; try { retrievedLink = this.GetPrivateDnsLink(linkName, resourceGroupName, zoneName); } catch (CloudException exception) { if (exception.Body.Code != "ResourceNotFound") { throw; } } return(retrievedLink); }
public PSPrivateDnsVirtualNetworkLink UpdatePrivateDnsLink(PSPrivateDnsVirtualNetworkLink link, bool overwrite) { var response = this.PrivateDnsManagementClient.VirtualNetworkLinks.CreateOrUpdate( link.ResourceGroupName, link.ZoneName, link.Name, new VirtualNetworkLink { Location = DnsResourceLocation, Tags = TagsConversionHelper.CreateTagDictionary(link.Tags, validate: true), VirtualNetwork = new SubResource() { Id = link.VirtualNetworkId, }, RegistrationEnabled = link.RegistrationEnabled, }, ifMatch: overwrite?null: link.Etag); return(ToPrivateDnsLink(response)); }