Beispiel #1
0
 /// <summary>
 /// Removes Compute Nodes from the specified Pool.
 /// </summary>
 /// <remarks>
 /// This operation can only run when the allocation state of the Pool is
 /// steady. When this operation runs, the allocation state changes from steady
 /// to resizing. Each request may remove up to 100 nodes.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool from which you want to remove Compute Nodes.
 /// </param>
 /// <param name='nodeRemoveParameter'>
 /// The parameters for the request.
 /// </param>
 /// <param name='poolRemoveNodesOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PoolRemoveNodesHeaders> RemoveNodesAsync(this IPoolOperations operations, string poolId, NodeRemoveParameter nodeRemoveParameter, PoolRemoveNodesOptions poolRemoveNodesOptions = default(PoolRemoveNodesOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RemoveNodesWithHttpMessagesAsync(poolId, nodeRemoveParameter, poolRemoveNodesOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Stops an ongoing resize operation on the Pool.
 /// </summary>
 /// <remarks>
 /// This does not restore the Pool to its previous state before the resize
 /// operation: it only stops any further changes being made, and the Pool
 /// maintains its current state. After stopping, the Pool stabilizes at the
 /// number of Compute Nodes it was at when the stop operation was done. During
 /// the stop operation, the Pool allocation state changes first to stopping and
 /// then to steady. A resize operation need not be an explicit resize Pool
 /// request; this API can also be used to halt the initial sizing of the Pool
 /// when it is created.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool whose resizing you want to stop.
 /// </param>
 /// <param name='poolStopResizeOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PoolStopResizeHeaders> StopResizeAsync(this IPoolOperations operations, string poolId, PoolStopResizeOptions poolStopResizeOptions = default(PoolStopResizeOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.StopResizeWithHttpMessagesAsync(poolId, poolStopResizeOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Lists all of the Pools 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='poolListNextOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <CloudPool> > ListNextAsync(this IPoolOperations operations, string nextPageLink, PoolListNextOptions poolListNextOptions = default(PoolListNextOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, poolListNextOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #4
0
 /// <summary>
 /// Gets information about the specified Pool.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool to get.
 /// </param>
 /// <param name='poolGetOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CloudPool> GetAsync(this IPoolOperations operations, string poolId, PoolGetOptions poolGetOptions = default(PoolGetOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(poolId, poolGetOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #5
0
 /// <summary>
 /// Gets lifetime summary statistics for all of the Pools in the specified
 /// Account.
 /// </summary>
 /// <remarks>
 /// Statistics are aggregated across all Pools that have ever existed in the
 /// Account, from Account creation to the last update time of the statistics.
 /// The statistics may not be immediately available. The Batch service performs
 /// periodic roll-up of statistics. The typical delay is about 30 minutes.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolGetAllLifetimeStatisticsOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PoolStatistics> GetAllLifetimeStatisticsAsync(this IPoolOperations operations, PoolGetAllLifetimeStatisticsOptions poolGetAllLifetimeStatisticsOptions = default(PoolGetAllLifetimeStatisticsOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAllLifetimeStatisticsWithHttpMessagesAsync(poolGetAllLifetimeStatisticsOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #6
0
 /// <summary>
 /// Adds a Pool to the specified Account.
 /// </summary>
 /// <remarks>
 /// When naming Pools, avoid including sensitive information such as user names
 /// or secret project names. This information may appear in telemetry logs
 /// accessible to Microsoft Support engineers.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='pool'>
 /// The Pool to be added.
 /// </param>
 /// <param name='poolAddOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PoolAddHeaders> AddAsync(this IPoolOperations operations, PoolAddParameter pool, PoolAddOptions poolAddOptions = default(PoolAddOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AddWithHttpMessagesAsync(pool, poolAddOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Lists all of the pools 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='select'>
 /// Comma separated list of properties that should be returned. e.g.
 /// "properties/provisioningState". Only top level properties under properties/
 /// are valid for selection.
 /// </param>
 /// <param name='filter'>
 /// OData filter expression. Valid properties for filtering are:
 ///
 /// name
 /// properties/allocationState
 /// properties/allocationStateTransitionTime
 /// properties/creationTime
 /// properties/provisioningState
 /// properties/provisioningStateTransitionTime
 /// properties/lastModified
 /// properties/vmSize
 /// properties/interNodeCommunication
 /// properties/scaleSettings/autoScale
 /// properties/scaleSettings/fixedScale
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <PoolInner> > ListByBatchAccountAsync(this IPoolOperations operations, string resourceGroupName, string accountName, int?maxresults = default(int?), string select = default(string), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByBatchAccountWithHttpMessagesAsync(resourceGroupName, accountName, maxresults, select, filter, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #8
0
 /// <summary>
 /// Gets the result of evaluating an automatic scaling formula on the Pool.
 /// </summary>
 /// <remarks>
 /// This API is primarily for validating an autoscale formula, as it simply
 /// returns the result without applying the formula to the Pool. The Pool must
 /// have auto scaling enabled in order to evaluate a formula.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool on which to evaluate the automatic scaling formula.
 /// </param>
 /// <param name='autoScaleFormula'>
 /// The formula for the desired number of Compute Nodes in the Pool. The
 /// formula is validated and its results calculated, but it is not applied to
 /// the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a
 /// Pool'. For more information about specifying this formula, see
 /// Automatically scale Compute Nodes in an Azure Batch Pool
 /// (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling).
 /// </param>
 /// <param name='poolEvaluateAutoScaleOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AutoScaleRun> EvaluateAutoScaleAsync(this IPoolOperations operations, string poolId, string autoScaleFormula, PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions = default(PoolEvaluateAutoScaleOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.EvaluateAutoScaleWithHttpMessagesAsync(poolId, autoScaleFormula, poolEvaluateAutoScaleOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Deletes the specified pool.
 /// </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='poolName'>
 /// The pool name. This must be unique within the account.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PoolDeleteHeaders> BeginDeleteAsync(this IPoolOperations operations, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, poolName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Lists all of the pools 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 <PoolInner> > ListByBatchAccountNextAsync(this IPoolOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByBatchAccountNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Stops an ongoing resize operation on the pool.
 /// </summary>
 /// <remarks>
 /// This does not restore the pool to its previous state before the resize
 /// operation: it only stops any further changes being made, and the pool
 /// maintains its current state. After stopping, the pool stabilizes at the
 /// number of nodes it was at when the stop operation was done. During the stop
 /// operation, the pool allocation state changes first to stopping and then to
 /// steady. A resize operation need not be an explicit resize pool request;
 /// this API can also be used to halt the initial sizing of the pool when it is
 /// created.
 /// </remarks>
 /// <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='poolName'>
 /// The pool name. This must be unique within the account.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PoolInner> StopResizeAsync(this IPoolOperations operations, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.StopResizeWithHttpMessagesAsync(resourceGroupName, accountName, poolName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets basic properties of a pool.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The id of the pool to get.
 /// </param>
 /// <param name='poolExistsOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task <bool> ExistsAsync(this IPoolOperations operations, string poolId, PoolExistsOptions poolExistsOptions = default(PoolExistsOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.ExistsWithHttpMessagesAsync(poolId, poolExistsOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all of the pools in the specified account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolListOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Microsoft.Rest.Azure.IPage <CloudPool> > ListAsync(this IPoolOperations operations, PoolListOptions poolListOptions = default(PoolListOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(poolListOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #14
0
 /// <summary>
 /// Lists the usage metrics, aggregated by Pool across individual time
 /// intervals, for the specified Account.
 /// </summary>
 /// <remarks>
 /// If you do not specify a $filter clause including a poolId, the response
 /// includes all Pools that existed in the Account in the time range of the
 /// returned aggregation intervals. If you do not specify a $filter clause
 /// including a startTime or endTime these filters default to the start and end
 /// times of the last aggregation interval currently available; that is, only
 /// the last aggregation interval is returned.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolListUsageMetricsOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <PoolUsageMetrics> > ListUsageMetricsAsync(this IPoolOperations operations, PoolListUsageMetricsOptions poolListUsageMetricsOptions = default(PoolListUsageMetricsOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListUsageMetricsWithHttpMessagesAsync(poolListUsageMetricsOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates a new pool inside 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='poolName'>
 /// The pool name. This must be unique within the account.
 /// </param>
 /// <param name='parameters'>
 /// Additional parameters for pool creation.
 /// </param>
 /// <param name='ifMatch'>
 /// The entity state (ETag) version of the pool to update. A value of "*" can
 /// be used to apply the operation only if the pool already exists. If omitted,
 /// this operation will always be applied.
 /// </param>
 /// <param name='ifNoneMatch'>
 /// Set to '*' to allow a new pool to be created, but to prevent updating an
 /// existing pool. Other values will be ignored.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PoolInner> CreateAsync(this IPoolOperations operations, string resourceGroupName, string accountName, string poolName, PoolInner parameters, string ifMatch = default(string), string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, accountName, poolName, parameters, ifMatch, ifNoneMatch, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #16
0
 /// <summary>
 /// Enables automatic scaling for a Pool.
 /// </summary>
 /// <remarks>
 /// You cannot enable automatic scaling on a Pool if a resize operation is in
 /// progress on the Pool. If automatic scaling of the Pool is currently
 /// disabled, you must specify a valid autoscale formula as part of the
 /// request. If automatic scaling of the Pool is already enabled, you may
 /// specify a new autoscale formula and/or a new evaluation interval. You
 /// cannot call this API for the same Pool more than once every 30 seconds.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool on which to enable automatic scaling.
 /// </param>
 /// <param name='poolEnableAutoScaleParameter'>
 /// The parameters for the request.
 /// </param>
 /// <param name='poolEnableAutoScaleOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PoolEnableAutoScaleHeaders> EnableAutoScaleAsync(this IPoolOperations operations, string poolId, PoolEnableAutoScaleParameter poolEnableAutoScaleParameter, PoolEnableAutoScaleOptions poolEnableAutoScaleOptions = default(PoolEnableAutoScaleOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.EnableAutoScaleWithHttpMessagesAsync(poolId, poolEnableAutoScaleParameter, poolEnableAutoScaleOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
Beispiel #17
0
 public TimerWorkers(ILogTracer log, IOnefuzzContext context)
 {
     _log         = log;
     _scaleSetOps = context.ScalesetOperations;
     _poolOps     = context.PoolOperations;
     _nodeOps     = context.NodeOperations;
 }
Beispiel #18
0
 public Scheduler(ITaskOperations taskOperations, IConfig config, IPoolOperations poolOperations, ILogTracer logTracer, IJobOperations jobOperations, IContainers containers)
 {
     _taskOperations = taskOperations;
     _config         = config;
     _poolOperations = poolOperations;
     _logTracer      = logTracer;
     _jobOperations  = jobOperations;
     _containers     = containers;
 }
Beispiel #19
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     BatchAccount              = new BatchAccountOperations(this);
     ApplicationPackage        = new ApplicationPackageOperations(this);
     Application               = new ApplicationOperations(this);
     Location                  = new LocationOperations(this);
     Operations                = new Operations(this);
     Certificate               = new CertificateOperations(this);
     PrivateLinkResource       = new PrivateLinkResourceOperations(this);
     PrivateEndpointConnection = new PrivateEndpointConnectionOperations(this);
     Pool           = new PoolOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2020-09-01";
     AcceptLanguage = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
Beispiel #20
0
 /// <summary>
 /// Enables automatic scaling for a Pool.
 /// </summary>
 /// <remarks>
 /// You cannot enable automatic scaling on a Pool if a resize operation is in
 /// progress on the Pool. If automatic scaling of the Pool is currently
 /// disabled, you must specify a valid autoscale formula as part of the
 /// request. If automatic scaling of the Pool is already enabled, you may
 /// specify a new autoscale formula and/or a new evaluation interval. You
 /// cannot call this API for the same Pool more than once every 30 seconds.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool on which to enable automatic scaling.
 /// </param>
 /// <param name='poolEnableAutoScaleParameter'>
 /// The parameters for the request.
 /// </param>
 /// <param name='poolEnableAutoScaleOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static PoolEnableAutoScaleHeaders EnableAutoScale(this IPoolOperations operations, string poolId, PoolEnableAutoScaleParameter poolEnableAutoScaleParameter, PoolEnableAutoScaleOptions poolEnableAutoScaleOptions = default(PoolEnableAutoScaleOptions))
 {
     return(operations.EnableAutoScaleAsync(poolId, poolEnableAutoScaleParameter, poolEnableAutoScaleOptions).GetAwaiter().GetResult());
 }
 public PoolOperationsTestHooks(ILogTracer log, IConfigOperations configOps, IPoolOperations poolOps)
 {
     _log       = log.WithTag("TestHooks", nameof(PoolOperationsTestHooks));
     _configOps = configOps;;
     _poolOps   = poolOps;
 }
Beispiel #22
0
 /// <summary>
 /// Gets information about the specified Pool.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool to get.
 /// </param>
 /// <param name='poolGetOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static CloudPool Get(this IPoolOperations operations, string poolId, PoolGetOptions poolGetOptions = default(PoolGetOptions))
 {
     return(operations.GetAsync(poolId, poolGetOptions).GetAwaiter().GetResult());
 }
Beispiel #23
0
 /// <summary>
 /// Gets lifetime summary statistics for all of the Pools in the specified
 /// Account.
 /// </summary>
 /// <remarks>
 /// Statistics are aggregated across all Pools that have ever existed in the
 /// Account, from Account creation to the last update time of the statistics.
 /// The statistics may not be immediately available. The Batch service performs
 /// periodic roll-up of statistics. The typical delay is about 30 minutes.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolGetAllLifetimeStatisticsOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static PoolStatistics GetAllLifetimeStatistics(this IPoolOperations operations, PoolGetAllLifetimeStatisticsOptions poolGetAllLifetimeStatisticsOptions = default(PoolGetAllLifetimeStatisticsOptions))
 {
     return(operations.GetAllLifetimeStatisticsAsync(poolGetAllLifetimeStatisticsOptions).GetAwaiter().GetResult());
 }
Beispiel #24
0
 /// <summary>
 /// Lists all of the Pools 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='poolListNextOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static IPage <CloudPool> ListNext(this IPoolOperations operations, string nextPageLink, PoolListNextOptions poolListNextOptions = default(PoolListNextOptions))
 {
     return(operations.ListNextAsync(nextPageLink, poolListNextOptions).GetAwaiter().GetResult());
 }
Beispiel #25
0
 /// <summary>
 /// Updates the properties of the specified Pool.
 /// </summary>
 /// <remarks>
 /// This only replaces the Pool properties specified in the request. For
 /// example, if the Pool has a StartTask associated with it, and a request does
 /// not specify a StartTask element, then the Pool keeps the existing
 /// StartTask.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool to update.
 /// </param>
 /// <param name='poolPatchParameter'>
 /// The parameters for the request.
 /// </param>
 /// <param name='poolPatchOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static PoolPatchHeaders Patch(this IPoolOperations operations, string poolId, PoolPatchParameter poolPatchParameter, PoolPatchOptions poolPatchOptions = default(PoolPatchOptions))
 {
     return(operations.PatchAsync(poolId, poolPatchParameter, poolPatchOptions).GetAwaiter().GetResult());
 }
Beispiel #26
0
 /// <summary>
 /// Removes Compute Nodes from the specified Pool.
 /// </summary>
 /// <remarks>
 /// This operation can only run when the allocation state of the Pool is
 /// steady. When this operation runs, the allocation state changes from steady
 /// to resizing. Each request may remove up to 100 nodes.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool from which you want to remove Compute Nodes.
 /// </param>
 /// <param name='nodeRemoveParameter'>
 /// The parameters for the request.
 /// </param>
 /// <param name='poolRemoveNodesOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static PoolRemoveNodesHeaders RemoveNodes(this IPoolOperations operations, string poolId, NodeRemoveParameter nodeRemoveParameter, PoolRemoveNodesOptions poolRemoveNodesOptions = default(PoolRemoveNodesOptions))
 {
     return(operations.RemoveNodesAsync(poolId, nodeRemoveParameter, poolRemoveNodesOptions).GetAwaiter().GetResult());
 }
Beispiel #27
0
 /// <summary>
 /// Updates the properties of the specified Pool.
 /// </summary>
 /// <remarks>
 /// This fully replaces all the updatable properties of the Pool. For example,
 /// if the Pool has a StartTask associated with it and if StartTask is not
 /// specified with this request, then the Batch service will remove the
 /// existing StartTask.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool to update.
 /// </param>
 /// <param name='poolUpdatePropertiesParameter'>
 /// The parameters for the request.
 /// </param>
 /// <param name='poolUpdatePropertiesOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static PoolUpdatePropertiesHeaders UpdateProperties(this IPoolOperations operations, string poolId, PoolUpdatePropertiesParameter poolUpdatePropertiesParameter, PoolUpdatePropertiesOptions poolUpdatePropertiesOptions = default(PoolUpdatePropertiesOptions))
 {
     return(operations.UpdatePropertiesAsync(poolId, poolUpdatePropertiesParameter, poolUpdatePropertiesOptions).GetAwaiter().GetResult());
 }
Beispiel #28
0
 /// <summary>
 /// Lists the usage metrics, aggregated by Pool across individual time
 /// intervals, for the specified Account.
 /// </summary>
 /// <remarks>
 /// If you do not specify a $filter clause including a poolId, the response
 /// includes all Pools that existed in the Account in the time range of the
 /// returned aggregation intervals. If you do not specify a $filter clause
 /// including a startTime or endTime these filters default to the start and end
 /// times of the last aggregation interval currently available; that is, only
 /// the last aggregation interval is returned.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolListUsageMetricsOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static IPage <PoolUsageMetrics> ListUsageMetrics(this IPoolOperations operations, PoolListUsageMetricsOptions poolListUsageMetricsOptions = default(PoolListUsageMetricsOptions))
 {
     return(operations.ListUsageMetricsAsync(poolListUsageMetricsOptions).GetAwaiter().GetResult());
 }
Beispiel #29
0
 /// <summary>
 /// Stops an ongoing resize operation on the Pool.
 /// </summary>
 /// <remarks>
 /// This does not restore the Pool to its previous state before the resize
 /// operation: it only stops any further changes being made, and the Pool
 /// maintains its current state. After stopping, the Pool stabilizes at the
 /// number of Compute Nodes it was at when the stop operation was done. During
 /// the stop operation, the Pool allocation state changes first to stopping and
 /// then to steady. A resize operation need not be an explicit resize Pool
 /// request; this API can also be used to halt the initial sizing of the Pool
 /// when it is created.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool whose resizing you want to stop.
 /// </param>
 /// <param name='poolStopResizeOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static PoolStopResizeHeaders StopResize(this IPoolOperations operations, string poolId, PoolStopResizeOptions poolStopResizeOptions = default(PoolStopResizeOptions))
 {
     return(operations.StopResizeAsync(poolId, poolStopResizeOptions).GetAwaiter().GetResult());
 }
Beispiel #30
0
 /// <summary>
 /// Gets the result of evaluating an automatic scaling formula on the Pool.
 /// </summary>
 /// <remarks>
 /// This API is primarily for validating an autoscale formula, as it simply
 /// returns the result without applying the formula to the Pool. The Pool must
 /// have auto scaling enabled in order to evaluate a formula.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool on which to evaluate the automatic scaling formula.
 /// </param>
 /// <param name='autoScaleFormula'>
 /// The formula for the desired number of Compute Nodes in the Pool. The
 /// formula is validated and its results calculated, but it is not applied to
 /// the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a
 /// Pool'. For more information about specifying this formula, see
 /// Automatically scale Compute Nodes in an Azure Batch Pool
 /// (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling).
 /// </param>
 /// <param name='poolEvaluateAutoScaleOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static AutoScaleRun EvaluateAutoScale(this IPoolOperations operations, string poolId, string autoScaleFormula, PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions = default(PoolEvaluateAutoScaleOptions))
 {
     return(operations.EvaluateAutoScaleAsync(poolId, autoScaleFormula, poolEvaluateAutoScaleOptions).GetAwaiter().GetResult());
 }