public async virtual Task <Response <BgpConnection> > GetAsync(string connectionName, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("BgpConnectionContainer.Get"); scope.Start(); try { if (connectionName == null) { throw new ArgumentNullException(nameof(connectionName)); } var response = await _restClient.GetAsync(Id.ResourceGroupName, Id.Name, connectionName, cancellationToken : cancellationToken).ConfigureAwait(false); if (response.Value == null) { throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(response.GetRawResponse()).ConfigureAwait(false); } return(Response.FromValue(new BgpConnection(Parent, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }