/// <summary>
 /// Creates a new datasource on the specified gateway.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dataset.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='gatewayId'>
 /// The gateway id
 /// </param>
 /// <param name='datasourceToGatewayRequest'>
 /// The datasource requested to create
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GatewayDatasource> CreateDatasourceAsync(this IGatewaysOperations operations, System.Guid gatewayId, PublishDatasourceToGatewayRequest datasourceToGatewayRequest, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateDatasourceWithHttpMessagesAsync(gatewayId, datasourceToGatewayRequest, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Handles requests to list all resources in a Service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <GatewayResource> > ListNextAsync(this IGatewaysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Get the Spring Cloud Gateway and its properties.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of Spring Cloud Gateway.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GatewayResource> GetAsync(this IGatewaysOperations operations, string resourceGroupName, string serviceName, string gatewayName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, gatewayName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Check the domains are valid as well as not in use.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of Spring Cloud Gateway.
 /// </param>
 /// <param name='validatePayload'>
 /// Custom domain payload to be validated
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CustomDomainValidateResult> ValidateDomainAsync(this IGatewaysOperations operations, string resourceGroupName, string serviceName, string gatewayName, CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ValidateDomainWithHttpMessagesAsync(resourceGroupName, serviceName, gatewayName, validatePayload, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates a new datasource on the specified gateway.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dataset.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='gatewayId'>
 /// The gateway id
 /// </param>
 /// <param name='datasourceToGatewayRequest'>
 /// The datasource requested to create
 /// </param>
 public static GatewayDatasource CreateDatasource(this IGatewaysOperations operations, System.Guid gatewayId, PublishDatasourceToGatewayRequest datasourceToGatewayRequest)
 {
     return(operations.CreateDatasourceAsync(gatewayId, datasourceToGatewayRequest).GetAwaiter().GetResult());
 }
예제 #6
0
 /// <summary>
 /// Delete a Log Analytics gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='gatewayId'>
 /// The Log Analytics gateway Id.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IGatewaysOperations operations, string resourceGroupName, string workspaceName, string gatewayId, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, gatewayId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
예제 #7
0
 /// <summary>
 /// Delete a Log Analytics gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='gatewayId'>
 /// The Log Analytics gateway Id.
 /// </param>
 public static void Delete(this IGatewaysOperations operations, string resourceGroupName, string workspaceName, string gatewayId)
 {
     operations.DeleteAsync(resourceGroupName, workspaceName, gatewayId).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Create the default Spring Cloud Gateway or update the existing Spring Cloud
 /// Gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of Spring Cloud Gateway.
 /// </param>
 /// <param name='gatewayResource'>
 /// The gateway for the create or update operation
 /// </param>
 public static GatewayResource CreateOrUpdate(this IGatewaysOperations operations, string resourceGroupName, string serviceName, string gatewayName, GatewayResource gatewayResource)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serviceName, gatewayName, gatewayResource).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Handles requests to list all resources in a Service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <GatewayResource> ListNext(this IGatewaysOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Disable the default Spring Cloud Gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of Spring Cloud Gateway.
 /// </param>
 public static void BeginDelete(this IGatewaysOperations operations, string resourceGroupName, string serviceName, string gatewayName)
 {
     operations.BeginDeleteAsync(resourceGroupName, serviceName, gatewayName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Check the domains are valid as well as not in use.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of Spring Cloud Gateway.
 /// </param>
 /// <param name='validatePayload'>
 /// Custom domain payload to be validated
 /// </param>
 public static CustomDomainValidateResult ValidateDomain(this IGatewaysOperations operations, string resourceGroupName, string serviceName, string gatewayName, CustomDomainValidatePayload validatePayload)
 {
     return(operations.ValidateDomainAsync(resourceGroupName, serviceName, gatewayName, validatePayload).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Handles requests to list all resources in a Service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 public static IPage <GatewayResource> List(this IGatewaysOperations operations, string resourceGroupName, string serviceName)
 {
     return(operations.ListAsync(resourceGroupName, serviceName).GetAwaiter().GetResult());
 }