/// <summary> /// Gets a linked service instance. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to get. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// Name of the Log Analytics Workspace that contains the linkedServices /// resource /// </param> /// <param name='linkedServiceName'> /// Name of the linked service. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <LinkedService> GetAsync(this ILinkedServicesOperations operations, string resourceGroupName, string workspaceName, string linkedServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, linkedServiceName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a linked service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='linkedServiceName'> /// The linked service name. /// </param> /// <param name='ifNoneMatch'> /// ETag of the linked service entity. Should only be specified for get. If the /// ETag matches the existing entity tag, or if * was provided, then no content /// will be returned. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <LinkedServiceResource> GetAsync(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName, string linkedServiceName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, linkedServiceName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists linked services. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <LinkedServiceResource> > ListByFactoryAsync(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create or update a linked service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to get. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// Name of the Log Analytics Workspace that will contain the linkedServices /// resource /// </param> /// <param name='linkedServiceName'> /// Name of the linkedServices resource /// </param> /// <param name='parameters'> /// The parameters required to create or update a linked service. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <LinkedService> CreateOrUpdateAsync(this ILinkedServicesOperations operations, string resourceGroupName, string workspaceName, string linkedServiceName, LinkedService parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, linkedServiceName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the linked services instances in a workspace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to get. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// Name of the Log Analytics Workspace that contains the linked services. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <LinkedService> > ListByWorkspaceAsync(this ILinkedServicesOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByWorkspaceWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes a linked service instance. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to get. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// Name of the Log Analytics Workspace that contains the linkedServices /// resource /// </param> /// <param name='linkedServiceName'> /// Name of the linked service. /// </param> public static void Delete(this ILinkedServicesOperations operations, string resourceGroupName, string workspaceName, string linkedServiceName) { System.Threading.Tasks.Task.Factory.StartNew(s => ((ILinkedServicesOperations)s).DeleteAsync(resourceGroupName, workspaceName, linkedServiceName), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Gets the linked services instances in a workspace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to get. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// Name of the Log Analytics Workspace that contains the linked services. /// </param> public static System.Collections.Generic.IEnumerable <LinkedService> ListByWorkspace(this ILinkedServicesOperations operations, string resourceGroupName, string workspaceName) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((ILinkedServicesOperations)s).ListByWorkspaceAsync(resourceGroupName, workspaceName), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Deletes a linked service instance. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to get. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// Name of the Log Analytics Workspace that contains the linkedServices /// resource /// </param> /// <param name='linkedServiceName'> /// Name of the linked service. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task DeleteAsync(this ILinkedServicesOperations operations, string resourceGroupName, string workspaceName, string linkedServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, linkedServiceName, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Creates or updates a linked service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='linkedServiceName'> /// The linked service name. /// </param> /// <param name='linkedService'> /// Linked service resource definition. /// </param> /// <param name='ifMatch'> /// ETag of the linkedService entity. Should only be specified for update, for /// which it should match existing entity or can be * for unconditional update. /// </param> public static LinkedServiceResource CreateOrUpdate(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName, string linkedServiceName, LinkedServiceResource linkedService, string ifMatch = default(string)) { return(operations.CreateOrUpdateAsync(resourceGroupName, factoryName, linkedServiceName, linkedService, ifMatch).GetAwaiter().GetResult()); }
/// <summary> /// Lists linked services. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> public static IPage <LinkedServiceResource> ListByFactory(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName) { return(operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult()); }
/// <summary> /// Lists linked services. /// </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 <LinkedServiceResource> ListByFactoryNext(this ILinkedServicesOperations operations, string nextPageLink) { return(operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a linked service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='linkedServiceName'> /// The linked service name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName, string linkedServiceName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, linkedServiceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a linked service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='linkedServiceName'> /// The linked service name. /// </param> public static void Delete(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName, string linkedServiceName) { operations.DeleteAsync(resourceGroupName, factoryName, linkedServiceName).GetAwaiter().GetResult(); }
/// <summary> /// Create or update a linked service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to get. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// Name of the Log Analytics Workspace that will contain the linkedServices /// resource /// </param> /// <param name='linkedServiceName'> /// Name of the linkedServices resource /// </param> /// <param name='parameters'> /// The parameters required to create or update a linked service. /// </param> public static LinkedService CreateOrUpdate(this ILinkedServicesOperations operations, string resourceGroupName, string workspaceName, string linkedServiceName, LinkedService parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, linkedServiceName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets the linked services instances in a workspace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to get. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// Name of the Log Analytics Workspace that contains the linked services. /// </param> public static IEnumerable <LinkedService> ListByWorkspace(this ILinkedServicesOperations operations, string resourceGroupName, string workspaceName) { return(operations.ListByWorkspaceAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult()); }
/// <summary> /// Gets a linked service instance. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to get. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// Name of the Log Analytics Workspace that contains the linkedServices /// resource /// </param> /// <param name='linkedServiceName'> /// Name of the linked service. /// </param> public static LinkedService Get(this ILinkedServicesOperations operations, string resourceGroupName, string workspaceName, string linkedServiceName) { return(operations.GetAsync(resourceGroupName, workspaceName, linkedServiceName).GetAwaiter().GetResult()); }