mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
26 lines
821 B
JavaScript
26 lines
821 B
JavaScript
export default {
|
|
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
|
|
},
|
|
}
|