/// <summary> /// Creates or updates a job agent. /// </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='serverName'> /// The name of the server. /// </param> /// <param name='jobAgentName'> /// The name of the job agent to be created or updated. /// </param> /// <param name='parameters'> /// The requested job agent resource state. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <JobAgentInner> CreateOrUpdateAsync(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, JobAgentInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a list of job agents in a server. /// </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 <JobAgentInner> > ListByServerNextAsync(this IJobAgentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServerNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a list of job agents in a server. /// </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='serverName'> /// The name of the server. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <JobAgentInner> > ListByServerAsync(this IJobAgentsOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates a job agent. /// </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='serverName'> /// The name of the server. /// </param> /// <param name='jobAgentName'> /// The name of the job agent to be updated. /// </param> /// <param name='tags'> /// Resource tags. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <JobAgentInner> BeginUpdateAsync(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, tags, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes a job agent. /// </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='serverName'> /// The name of the server. /// </param> /// <param name='jobAgentName'> /// The name of the job agent to be deleted. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets a job agent. /// </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='serverName'> /// The name of the server. /// </param> /// <param name='jobAgentName'> /// The name of the job agent to be retrieved. /// </param> public static JobAgent Get(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName) { return(operations.GetAsync(resourceGroupName, serverName, jobAgentName).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of job agents in a server. /// </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 <JobAgent> ListByServerNext(this IJobAgentsOperations operations, string nextPageLink) { return(operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Updates a job agent. /// </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='serverName'> /// The name of the server. /// </param> /// <param name='jobAgentName'> /// The name of the job agent to be updated. /// </param> /// <param name='parameters'> /// The update to the job agent. /// </param> public static JobAgent BeginUpdate(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, JobAgentUpdate parameters) { return(operations.BeginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of job agents in a server. /// </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='serverName'> /// The name of the server. /// </param> public static IPage <JobAgent> ListByServer(this IJobAgentsOperations operations, string resourceGroupName, string serverName) { return(operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a job agent. /// </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='serverName'> /// The name of the server. /// </param> /// <param name='jobAgentName'> /// The name of the job agent to be deleted. /// </param> public static void BeginDelete(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName) { operations.BeginDeleteAsync(resourceGroupName, serverName, jobAgentName).GetAwaiter().GetResult(); }