public LinkConnectionResource CreateOrUpdateLinkConnection(string linkConnectionName, string rawJsonContent) { LinkConnectionResource linkConnection = JsonConvert.DeserializeObject <LinkConnectionResource>(rawJsonContent); var response = _linkConnectionClient.CreateOrUpdateLinkConnection(linkConnectionName, linkConnection); return(response.Value); }
public PSLinkConnectionResource(LinkConnectionResource linkConnectionResource, string workspaceName) { this.WorkspaceName = workspaceName; this.Id = linkConnectionResource?.Id; this.Name = linkConnectionResource?.Name; this.Type = linkConnectionResource?.Type; this.Properties = linkConnectionResource?.Properties; }
public virtual Response <LinkConnectionResource> CreateOrUpdateLinkConnection(string linkConnectionName, LinkConnectionResource linkConnection, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("LinkConnectionClient.CreateOrUpdateLinkConnection"); scope.Start(); try { return(RestClient.CreateOrUpdateLinkConnection(linkConnectionName, linkConnection, cancellationToken)); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual async Task <Response <LinkConnectionResource> > CreateOrUpdateLinkConnectionAsync(string linkConnectionName, LinkConnectionResource linkConnection, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("LinkConnectionClient.CreateOrUpdateLinkConnection"); scope.Start(); try { return(await RestClient.CreateOrUpdateLinkConnectionAsync(linkConnectionName, linkConnection, cancellationToken).ConfigureAwait(false)); } catch (Exception e) { scope.Failed(e); throw; } }