mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
27 lines
836 B
JavaScript
27 lines
836 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
getUpdateStackParams(options) {
|
|
const params = this.getSharedStackActionParams(options);
|
|
|
|
// Policy must have at least one statement, otherwise no updates would be possible at all
|
|
if (
|
|
this.serverless.service.provider.stackPolicy &&
|
|
Object.keys(this.serverless.service.provider.stackPolicy).length
|
|
) {
|
|
params.StackPolicyBody = JSON.stringify({
|
|
Statement: this.serverless.service.provider.stackPolicy,
|
|
});
|
|
}
|
|
|
|
if (this.serverless.service.provider.rollbackConfiguration) {
|
|
params.RollbackConfiguration = this.serverless.service.provider.rollbackConfiguration;
|
|
}
|
|
|
|
if (this.serverless.service.provider.disableRollback) {
|
|
params.DisableRollback = this.serverless.service.provider.disableRollback;
|
|
}
|
|
return params;
|
|
},
|
|
};
|