/// <summary> /// Lists all of the application packages in the specified application. /// </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 <ApplicationPackageInner> > ListNextAsync(this IApplicationPackageOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates an application package record. The record contains the SAS where /// the package should be uploaded to. Once it is uploaded the /// `ApplicationPackage` needs to be activated using `ApplicationPackageActive` /// before it can be used. /// </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='applicationName'> /// The name of the application. This must be unique within the account. /// </param> /// <param name='versionName'> /// The version of the application. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ApplicationPackageInner> CreateAsync(this IApplicationPackageOperations operations, string resourceGroupName, string accountName, string applicationName, string versionName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, accountName, applicationName, versionName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
///GENMHASH:1E4CA209B0AD4710E5C7F91ECC84511C:5B3AB401341688B60693658520A75514 internal ApplicationPackagesImpl(IApplicationPackageOperations client, ApplicationImpl parent) : base(parent, "ApplicationPackage") { this.client = client; this.parent = parent; CacheCollection(); }
/// <summary> /// Lists all of the application packages in 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='applicationName'> /// The name of the application. This must be unique within the 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 <ApplicationPackageInner> > ListAsync(this IApplicationPackageOperations operations, string resourceGroupName, string accountName, string applicationName, int?maxresults = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, applicationName, maxresults, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes an application package record and its associated binary file. /// </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='applicationName'> /// The name of the application. This must be unique within the account. /// </param> /// <param name='versionName'> /// The version of the application. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IApplicationPackageOperations operations, string resourceGroupName, string accountName, string applicationName, string versionName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, applicationName, versionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
///GENMHASH:C821FF91D77C2B3E93FA31DD47D5EA29:52876A7A5B8CFB81FC39CDD83E66AC9E internal static ApplicationPackageImpl NewApplicationPackage(string name, ApplicationImpl parent, IApplicationPackageOperations client) { return(new ApplicationPackageImpl(name, parent, new ApplicationPackageInner(), client)); }
///GENMHASH:5ABE0C6DFAB9C84B944D4C1A59824C2F:6759EA313F94C96A4A66A7653ACEA8F0 internal ApplicationPackageImpl(string name, ApplicationImpl parent, ApplicationPackageInner inner, IApplicationPackageOperations client) : base(name, parent, inner) { this.client = client; }
/// <summary> /// Activates the specified application package. This should be done after the /// `ApplicationPackage` was created and uploaded. This needs to be done before /// an `ApplicationPackage` can be used on Pools or Tasks. /// </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='applicationName'> /// The name of the application. This must be unique within the account. /// </param> /// <param name='versionName'> /// The version of the application. /// </param> /// <param name='format'> /// The format of the application package binary file. /// </param> public static ApplicationPackage Activate(this IApplicationPackageOperations operations, string resourceGroupName, string accountName, string applicationName, string versionName, string format) { return(operations.ActivateAsync(resourceGroupName, accountName, applicationName, versionName, format).GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the application packages in the specified application. /// </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 <ApplicationPackage> ListNext(this IApplicationPackageOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the application packages in 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='applicationName'> /// The name of the application. This must be unique within the account. /// </param> /// <param name='maxresults'> /// The maximum number of items to return in the response. /// </param> public static IPage <ApplicationPackage> List(this IApplicationPackageOperations operations, string resourceGroupName, string accountName, string applicationName, int?maxresults = default(int?)) { return(operations.ListAsync(resourceGroupName, accountName, applicationName, maxresults).GetAwaiter().GetResult()); }
/// <summary> /// Gets information about the specified application package. /// </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='applicationName'> /// The name of the application. This must be unique within the account. /// </param> /// <param name='versionName'> /// The version of the application. /// </param> public static ApplicationPackage Get(this IApplicationPackageOperations operations, string resourceGroupName, string accountName, string applicationName, string versionName) { return(operations.GetAsync(resourceGroupName, accountName, applicationName, versionName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes an application package record and its associated binary file. /// </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='applicationName'> /// The name of the application. This must be unique within the account. /// </param> /// <param name='versionName'> /// The version of the application. /// </param> public static void Delete(this IApplicationPackageOperations operations, string resourceGroupName, string accountName, string applicationName, string versionName) { operations.DeleteAsync(resourceGroupName, accountName, applicationName, versionName).GetAwaiter().GetResult(); }
/// <summary> /// Activates the specified application package. /// </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='version'> /// The version of the application to activate. /// </param> /// <param name='parameters'> /// The parameters for the request. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task ActivateAsync(this IApplicationPackageOperations operations, string resourceGroupName, string accountName, string applicationId, string version, ActivateApplicationPackageParametersInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.ActivateWithHttpMessagesAsync(resourceGroupName, accountName, applicationId, version, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); }