示例#1
0
 /// <summary>
 /// Triggers a refresh for the specified dataflow.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dataflow.ReadWrite.All &lt;br/&gt;To set the
 /// permissions scope, see [Register an
 /// app](https://docs.microsoft.com/power-bi/developer/register-app).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The workspace id
 /// </param>
 /// <param name='dataflowId'>
 /// The dataflow id
 /// </param>
 /// <param name='refreshRequest'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> RefreshDataflowAsync(this IDataflows operations, string groupId, string dataflowId, RefreshRequest refreshRequest = default(RefreshRequest), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RefreshDataflowWithHttpMessagesAsync(groupId, dataflowId, refreshRequest, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
        /// <summary>
        /// Exports the specified dataflow definition to a .json file.
        /// </summary>
        /// <remarks>
        /// &lt;br/&gt;**Required scope**: Dataflow.ReadWrite.All or Dataflow.Read.All
        /// &lt;br/&gt;To set the permissions scope, see [Register an
        /// app](https://docs.microsoft.com/power-bi/developer/register-app).
        /// </remarks>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='groupId'>
        /// The workspace id
        /// </param>
        /// <param name='dataflowId'>
        /// The dataflow id
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        public static async Task <Stream> GetDataflowAsync(this IDataflows operations, string groupId, string dataflowId, CancellationToken cancellationToken = default(CancellationToken))
        {
            var _result = await operations.GetDataflowWithHttpMessagesAsync(groupId, dataflowId, null, cancellationToken).ConfigureAwait(false);

            _result.Request.Dispose();
            return(_result.Body);
        }
示例#3
0
 /// <summary>
 /// Deletes a dataflow from the CDS for Analytics storage, including its
 /// definition file and actual model.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dataflow.ReadWrite.All &lt;br/&gt;To set the
 /// permissions scope, see [Register an
 /// app](https://docs.microsoft.com/power-bi/developer/register-app).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The workspace id
 /// </param>
 /// <param name='dataflowId'>
 /// The dataflow id
 /// </param>
 public static object DeleteDataflow(this IDataflows operations, string groupId, string dataflowId)
 {
     return(operations.DeleteDataflowAsync(groupId, dataflowId).GetAwaiter().GetResult());
 }
示例#4
0
 /// <summary>
 /// Exports the specified dataflow definition to a .json file.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dataflow.ReadWrite.All or Dataflow.Read.All
 /// &lt;br/&gt;To set the permissions scope, see [Register an
 /// app](https://docs.microsoft.com/power-bi/developer/register-app).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The workspace id
 /// </param>
 /// <param name='dataflowId'>
 /// The dataflow id
 /// </param>
 public static Stream GetDataflow(this IDataflows operations, string groupId, string dataflowId)
 {
     return(operations.GetDataflowAsync(groupId, dataflowId).GetAwaiter().GetResult());
 }
示例#5
0
 /// <summary>
 /// Returns a list of all dataflows from the specified workspace.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dataflow.ReadWrite.All or Dataflow.Read.All
 /// &lt;br/&gt;To set the permissions scope, see [Register an
 /// app](https://docs.microsoft.com/power-bi/developer/register-app).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The workspace id
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ODataResponseListDataflowMetadata> GetDataflowsAsync(this IDataflows operations, string groupId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetDataflowsWithHttpMessagesAsync(groupId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#6
0
 /// <summary>
 /// Returns a list of all dataflows from the specified workspace.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dataflow.ReadWrite.All or Dataflow.Read.All
 /// &lt;br/&gt;To set the permissions scope, see [Register an
 /// app](https://docs.microsoft.com/power-bi/developer/register-app).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The workspace id
 /// </param>
 public static ODataResponseListDataflowMetadata GetDataflows(this IDataflows operations, string groupId)
 {
     return(operations.GetDataflowsAsync(groupId).GetAwaiter().GetResult());
 }
示例#7
0
 /// <summary>
 /// Returns a list of all of datasources defined in the specified dataflow.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dataflow.ReadWrite.All or Dataflow.Read.All
 /// &lt;br/&gt;To set the permissions scope, see [Register an
 /// app](https://docs.microsoft.com/power-bi/developer/register-app).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The workspace id
 /// </param>
 /// <param name='dataflowId'>
 /// The dataflow id
 /// </param>
 public static ODataResponseListDatasource GetDataflowDataSources(this IDataflows operations, string groupId, string dataflowId)
 {
     return(operations.GetDataflowDataSourcesAsync(groupId, dataflowId).GetAwaiter().GetResult());
 }
示例#8
0
 /// <summary>
 /// Triggers a refresh for the specified dataflow.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dataflow.ReadWrite.All &lt;br/&gt;To set the
 /// permissions scope, see [Register an
 /// app](https://docs.microsoft.com/power-bi/developer/register-app).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The workspace id
 /// </param>
 /// <param name='dataflowId'>
 /// The dataflow id
 /// </param>
 /// <param name='refreshRequest'>
 /// </param>
 public static object RefreshDataflow(this IDataflows operations, string groupId, string dataflowId, RefreshRequest refreshRequest = default(RefreshRequest))
 {
     return(operations.RefreshDataflowAsync(groupId, dataflowId, refreshRequest).GetAwaiter().GetResult());
 }