azure-cli
Version:
Microsoft Azure Cross Platform Command Line tool
106 lines (101 loc) • 3.56 kB
JavaScript
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
;
/**
* The configuration parameters used while performing a rolling upgrade.
*
*/
class RollingUpgradePolicy {
/**
* Create a RollingUpgradePolicy.
* @member {number} [maxBatchInstancePercent] The maximum percent of total
* virtual machine instances that will be upgraded simultaneously by the
* rolling upgrade in one batch. As this is a maximum, unhealthy instances in
* previous or future batches can cause the percentage of instances in a
* batch to decrease to ensure higher reliability. The default value for this
* parameter is 20%.
* @member {number} [maxUnhealthyInstancePercent] The maximum percentage of
* the total virtual machine instances in the scale set that can be
* simultaneously unhealthy, either as a result of being upgraded, or by
* being found in an unhealthy state by the virtual machine health checks
* before the rolling upgrade aborts. This constraint will be checked prior
* to starting any batch. The default value for this parameter is 20%.
* @member {number} [maxUnhealthyUpgradedInstancePercent] The maximum
* percentage of upgraded virtual machine instances that can be found to be
* in an unhealthy state. This check will happen after each batch is
* upgraded. If this percentage is ever exceeded, the rolling update aborts.
* The default value for this parameter is 20%.
* @member {string} [pauseTimeBetweenBatches] The wait time between
* completing the update for all virtual machines in one batch and starting
* the next batch. The time duration should be specified in ISO 8601 format.
* The default value is 0 seconds (PT0S).
*/
constructor() {
}
/**
* Defines the metadata of RollingUpgradePolicy
*
* @returns {object} metadata of RollingUpgradePolicy
*
*/
mapper() {
return {
required: false,
serializedName: 'RollingUpgradePolicy',
type: {
name: 'Composite',
className: 'RollingUpgradePolicy',
modelProperties: {
maxBatchInstancePercent: {
required: false,
serializedName: 'maxBatchInstancePercent',
constraints: {
InclusiveMaximum: 100,
InclusiveMinimum: 5
},
type: {
name: 'Number'
}
},
maxUnhealthyInstancePercent: {
required: false,
serializedName: 'maxUnhealthyInstancePercent',
constraints: {
InclusiveMaximum: 100,
InclusiveMinimum: 5
},
type: {
name: 'Number'
}
},
maxUnhealthyUpgradedInstancePercent: {
required: false,
serializedName: 'maxUnhealthyUpgradedInstancePercent',
constraints: {
InclusiveMaximum: 100,
InclusiveMinimum: 0
},
type: {
name: 'Number'
}
},
pauseTimeBetweenBatches: {
required: false,
serializedName: 'pauseTimeBetweenBatches',
type: {
name: 'String'
}
}
}
}
};
}
}
module.exports = RollingUpgradePolicy;