Inheritance: Microsoft.Azure.Commands.Batch.Models.PoolOperationParameters
コード例 #1
0
        /// <summary>
        /// Changes the operating system version of the specified pool.
        /// </summary>
        /// <param name="parameters">The parameters specifying the pool and target OS version.</param>
        public void ChangeOSVersion(ChangeOSVersionParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            string poolId = parameters.Pool == null ? parameters.PoolId : parameters.Pool.Id;

            WriteVerbose(string.Format(Resources.ChangeOSVersion, poolId, parameters.TargetOSVersion));
            PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;

            poolOperations.ChangeOSVersion(poolId, parameters.TargetOSVersion, parameters.AdditionalBehaviors);
        }
コード例 #2
0
        /// <summary>
        /// Changes the operating system version of the specified pool.
        /// </summary>
        /// <param name="parameters">The parameters specifying the pool and target OS version.</param>
        public void ChangeOSVersion(ChangeOSVersionParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            string poolId = parameters.Pool == null ? parameters.PoolId : parameters.Pool.Id;

            WriteVerbose(string.Format(Resources.ChangeOSVersion, poolId, parameters.TargetOSVersion));
            PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;
            poolOperations.ChangeOSVersion(poolId, parameters.TargetOSVersion, parameters.AdditionalBehaviors);
        }
コード例 #3
0
 public override void ExecuteCmdlet()
 {
     ChangeOSVersionParameters parameters = new ChangeOSVersionParameters(this.BatchContext, this.Id, null,
         this.TargetOSVersion, this.AdditionalBehaviors);
     BatchClient.ChangeOSVersion(parameters);
 }
コード例 #4
0
 protected override void ProcessRecord()
 {
     ChangeOSVersionParameters parameters = new ChangeOSVersionParameters(this.BatchContext, this.Id, null,
         this.TargetOSVersion, this.AdditionalBehaviors);
     BatchClient.ChangeOSVersion(parameters);
 }