/// <summary> /// Lists all of the applications in the specified account. /// </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 <ApplicationInner> > ListNextAsync(this IApplicationOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all of the applications in the specified account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the Batch account. /// </param> /// <param name='accountName'> /// The name of the Batch account. /// </param> /// <param name='maxresults'> /// The maximum number of items to return in the response. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Application> > ListAsync(this IApplicationOperations operations, string resourceGroupName, string accountName, int?maxresults = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, maxresults, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all of the applications available in the specified account. /// </summary> /// <remarks> /// This operation returns only applications and versions that are available /// for use on compute nodes; that is, that can be used in an application /// package reference. For administrator information about applications and /// versions that are not yet available to compute nodes, use the Azure portal /// or the Azure Resource Manager API. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='applicationListOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ApplicationSummary> > ListAsync(this IApplicationOperations operations, ApplicationListOptions applicationListOptions = default(ApplicationListOptions), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(applicationListOptions, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets information about the specified Application. /// </summary> /// <remarks> /// This operation returns only Applications and versions that are available /// for use on Compute Nodes; that is, that can be used in an Package /// reference. For administrator information about Applications and versions /// that are not yet available to Compute Nodes, use the Azure portal or the /// Azure Resource Manager API. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='applicationId'> /// The ID of the Application. /// </param> /// <param name='applicationGetOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task<ApplicationSummary> GetAsync(this IApplicationOperations operations, string applicationId, ApplicationGetOptions applicationGetOptions = default(ApplicationGetOptions), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(applicationId, applicationGetOptions, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } }
/// <summary> /// Adds an application to the specified Batch account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the Batch account. /// </param> /// <param name='accountName'> /// The name of the Batch account. /// </param> /// <param name='applicationId'> /// The id of the application. /// </param> /// <param name='parameters'> /// The parameters for the request. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Application> AddApplicationAsync(this IApplicationOperations operations, string resourceGroupName, string accountName, string applicationId, AddApplicationParameters parameters = default(AddApplicationParameters), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.AddApplicationWithHttpMessagesAsync(resourceGroupName, accountName, applicationId, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates an application resource. /// </summary> /// <remarks> /// Creates an application resource with the specified name, description and /// properties. If an application resource with the same name exists, then it /// is updated with the specified description and properties. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Azure resource group name /// </param> /// <param name='applicationResourceName'> /// The identity of the application. /// </param> /// <param name='applicationResourceDescription'> /// Description for creating a Application resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ApplicationResourceDescription> CreateAsync(this IApplicationOperations operations, string resourceGroupName, string applicationResourceName, ApplicationResourceDescription applicationResourceDescription, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, applicationResourceName, applicationResourceDescription, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets information about the specified application. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the Batch account. /// </param> /// <param name='accountName'> /// The name of the Batch account. /// </param> /// <param name='applicationId'> /// The ID of the application. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ApplicationInner> GetAsync(this IApplicationOperations operations, string resourceGroupName, string accountName, string applicationId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, applicationId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Activates the specified application package. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Batch.IApplicationOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group that contains the Batch /// account. /// </param> /// <param name='accountName'> /// Required. The name of the Batch account. /// </param> /// <param name='id'> /// Required. The id of the application. /// </param> /// <param name='version'> /// Required. The version of the application to activate. /// </param> /// <param name='parameters'> /// Required. The parameters for the request. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse ActivateApplicationPackage(this IApplicationOperations operations, string resourceGroupName, string accountName, string id, string version, ActivateApplicationPackageParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IApplicationOperations)s).ActivateApplicationPackageAsync(resourceGroupName, accountName, id, version, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the applications in the specified account. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Batch.IApplicationOperations. /// </param> /// <param name='nextLink'> /// Required. A nextLink URL from a previous List response. /// </param> /// <returns> /// Response to an ApplicationOperations.ListApplications request. /// </returns> public static ListApplicationsResponse ListNext(this IApplicationOperations operations, string nextLink) { return(Task.Factory.StartNew((object s) => { return ((IApplicationOperations)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Delete an application. (see /// http://msdn.microsoft.com/en-us/library/azure/hh974476.aspx for /// more information) /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IApplicationOperations. /// </param> /// <param name='applicationObjectId'> /// Required. Application object id /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse Delete(this IApplicationOperations operations, string applicationObjectId) { return(Task.Factory.StartNew((object s) => { return ((IApplicationOperations)s).DeleteAsync(applicationObjectId); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets information about the specified application package. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Batch.IApplicationOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group that contains the Batch /// account. /// </param> /// <param name='accountName'> /// Required. The name of the Batch account. /// </param> /// <param name='applicationId'> /// Required. The id of the application. /// </param> /// <param name='version'> /// Required. The version of the application. /// </param> /// <returns> /// Response to an ApplicationOperations.GetApplicationPackage request. /// </returns> public static GetApplicationPackageResponse GetApplicationPackage(this IApplicationOperations operations, string resourceGroupName, string accountName, string applicationId, string version) { return(Task.Factory.StartNew((object s) => { return ((IApplicationOperations)s).GetApplicationPackageAsync(resourceGroupName, accountName, applicationId, version); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the applications in the specified account. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Batch.IApplicationOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group that contains the Batch /// account. /// </param> /// <param name='accountName'> /// Required. The name of the Batch account. /// </param> /// <param name='parameters'> /// Required. The parameters for the request. /// </param> /// <returns> /// Response to an ApplicationOperations.ListApplications request. /// </returns> public static ListApplicationsResponse List(this IApplicationOperations operations, string resourceGroupName, string accountName, ListApplicationsParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IApplicationOperations)s).ListAsync(resourceGroupName, accountName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Create a new application. (see /// http://msdn.microsoft.com/en-us/library/azure/hh974476.aspx for /// more information) /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IApplicationOperations. /// </param> /// <param name='parameters'> /// Required. Parameters to create an application. /// </param> /// <returns> /// Server response for Get application information API call /// </returns> public static ApplicationGetResult Create(this IApplicationOperations operations, ApplicationCreateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IApplicationOperations)s).CreateAsync(parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the BatchManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public BatchManagementClient(HttpClient httpClient) : base(httpClient) { this._accounts = new AccountOperations(this); this._applications = new ApplicationOperations(this); this._subscriptions = new SubscriptionOperations(this); this._apiVersion = "2015-12-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Initializes a new instance of the GraphRbacManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public GraphRbacManagementClient(HttpClient httpClient) : base(httpClient) { this._application = new ApplicationOperations(this); this._group = new GroupOperations(this); this._objects = new ObjectOperations(this); this._servicePrincipal = new ServicePrincipalOperations(this); this._user = new UserOperations(this); this._apiVersion = "1.42-previewInternal"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Gets all the application resources in a given resource group. /// </summary> /// <remarks> /// Gets the information about all application resources in a given resource /// group. The information include the description and other properties of the /// Application. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Azure resource group name /// </param> public static IPage <ApplicationResourceDescription> ListByResourceGroup(this IApplicationOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Create a new application. (see /// http://msdn.microsoft.com/en-us/library/azure/hh974476.aspx for /// more information) /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IApplicationOperations. /// </param> /// <param name='parameters'> /// Required. Parameters to create an application. /// </param> /// <returns> /// Server response for Get application information API call /// </returns> public static Task <ApplicationGetResult> CreateAsync(this IApplicationOperations operations, ApplicationCreateParameters parameters) { return(operations.CreateAsync(parameters, CancellationToken.None)); }
/// <summary> /// Update existing application. (see /// http://msdn.microsoft.com/en-us/library/azure/hh974476.aspx for /// more information) /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IApplicationOperations. /// </param> /// <param name='applicationObjectId'> /// Required. Application object id /// </param> /// <param name='parameters'> /// Required. Parameters to create an application. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> UpdateAsync(this IApplicationOperations operations, string applicationObjectId, ApplicationCreateParameters parameters) { return(operations.UpdateAsync(applicationObjectId, parameters, CancellationToken.None)); }
/// <summary> /// Get applications by filters. (see /// http://msdn.microsoft.com/en-us/library/azure/hh974476.aspx for /// more information) /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IApplicationOperations. /// </param> /// <param name='parameters'> /// Required. Application filter parameters /// </param> /// <returns> /// Server response for List application information API call /// </returns> public static Task <ApplicationListResult> ListAsync(this IApplicationOperations operations, ApplicationFilterParameters parameters) { return(operations.ListAsync(parameters, CancellationToken.None)); }
/// <summary> /// Get an application by object Id. (see /// http://msdn.microsoft.com/en-us/library/azure/hh974476.aspx for /// more information) /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IApplicationOperations. /// </param> /// <param name='applicationObjectId'> /// Required. Application object id /// </param> /// <returns> /// Server response for Get application information API call /// </returns> public static Task <ApplicationGetResult> GetAsync(this IApplicationOperations operations, string applicationObjectId) { return(operations.GetAsync(applicationObjectId, CancellationToken.None)); }
/// <summary> /// Delete an application. (see /// http://msdn.microsoft.com/en-us/library/azure/hh974476.aspx for /// more information) /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IApplicationOperations. /// </param> /// <param name='applicationObjectId'> /// Required. Application object id /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> DeleteAsync(this IApplicationOperations operations, string applicationObjectId) { return(operations.DeleteAsync(applicationObjectId, CancellationToken.None)); }
/// <summary> /// Gets the application resource with the given name. /// </summary> /// <remarks> /// Gets the information about the application resource with the given name. /// The information include the description and other properties of the /// application. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Azure resource group name /// </param> /// <param name='applicationResourceName'> /// The identity of the application. /// </param> public static ApplicationResourceDescription Get(this IApplicationOperations operations, string resourceGroupName, string applicationResourceName) { return(operations.GetAsync(resourceGroupName, applicationResourceName).GetAwaiter().GetResult()); }
/// <summary> /// Gets all the application resources in a given subscription. /// </summary> /// <remarks> /// Gets the information about all application resources in a given resource /// group. The information include the description and other properties of the /// application. /// </remarks> /// <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 <ApplicationResourceDescription> ListBySubscriptionNext(this IApplicationOperations operations, string nextPageLink) { return(operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the applications available in the specified account. /// </summary> /// <remarks> /// This operation returns only applications and versions that are available /// for use on compute nodes; that is, that can be used in an application /// package reference. For administrator information about applications and /// versions that are not yet available to compute nodes, use the Azure portal /// or the Azure Resource Manager API. /// </remarks> /// <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='applicationListNextOptions'> /// Additional parameters for the operation /// </param> public static IPage <ApplicationSummary> ListNext(this IApplicationOperations operations, string nextPageLink, ApplicationListNextOptions applicationListNextOptions = default(ApplicationListNextOptions)) { return(operations.ListNextAsync(nextPageLink, applicationListNextOptions).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the application resource. /// </summary> /// <remarks> /// Deletes the application resource identified by the name. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Azure resource group name /// </param> /// <param name='applicationResourceName'> /// The identity of the application. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IApplicationOperations operations, string resourceGroupName, string applicationResourceName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, applicationResourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes the application resource. /// </summary> /// <remarks> /// Deletes the application resource identified by the name. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Azure resource group name /// </param> /// <param name='applicationResourceName'> /// The identity of the application. /// </param> public static void Delete(this IApplicationOperations operations, string resourceGroupName, string applicationResourceName) { operations.DeleteAsync(resourceGroupName, applicationResourceName).GetAwaiter().GetResult(); }
/// <summary> /// Lists all of the applications available in the specified account. /// </summary> /// <remarks> /// This operation returns only applications and versions that are available /// for use on compute nodes; that is, that can be used in an application /// package reference. For administrator information about applications and /// versions that are not yet available to compute nodes, use the Azure portal /// or the Azure Resource Manager API. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='applicationListOptions'> /// Additional parameters for the operation /// </param> public static IPage <ApplicationSummary> List(this IApplicationOperations operations, ApplicationListOptions applicationListOptions = default(ApplicationListOptions)) { return(operations.ListAsync(applicationListOptions).GetAwaiter().GetResult()); }
/// <summary> /// Gets all the application resources in a given subscription. /// </summary> /// <remarks> /// Gets the information about all application resources in a given resource /// group. The information include the description and other properties of the /// application. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <ApplicationResourceDescription> ListBySubscription(this IApplicationOperations operations) { return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult()); }
/// <summary> /// Gets information about the specified application. /// </summary> /// <remarks> /// This operation returns only applications and versions that are available /// for use on compute nodes; that is, that can be used in an application /// package reference. For administrator information about applications and /// versions that are not yet available to compute nodes, use the Azure portal /// or the Azure Resource Manager API. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='applicationId'> /// The ID of the application. /// </param> /// <param name='applicationGetOptions'> /// Additional parameters for the operation /// </param> public static ApplicationSummary Get(this IApplicationOperations operations, string applicationId, ApplicationGetOptions applicationGetOptions = default(ApplicationGetOptions)) { return(operations.GetAsync(applicationId, applicationGetOptions).GetAwaiter().GetResult()); }
/// <summary> /// Gets all the application resources in a given subscription. /// </summary> /// <remarks> /// Gets the information about all application resources in a given resource /// group. The information include the description and other properties of the /// application. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ApplicationResourceDescription> > ListBySubscriptionAsync(this IApplicationOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }