如何强制在AWS Powershell中删除堆栈

时间:2019-07-08 23:14:48

标签: amazon-web-services powershell

在本教程中,我在AWS中拥有一个称为BasicWebServerStack的堆栈。当前处于ROLLBACK_COMPLETE状态的错误状态,无法更新。没什么大不了的。现在,我希望能够通过运行此命令来删除此堆栈

Powershell ...

 Remove-CFNStack -StackName 'BasicWebServerStack' -Force Yes

问题是,我似乎无法获得强制开关语句的正确语法

1 个答案:

答案 0 :(得分:0)

-Force参数是一个开关,而不是布尔值,仅抑制确认您确实要执行删除操作(未将其传递给服务)。所以您想要的语法是:

# Build new cell value
new_cell = smartsheet.models.Cell()
new_cell.column_id = <COLUMN_ID>
new_cell.value = "testing"

# Build the row to update
new_row = smartsheet.models.Row()
new_row.id = <ROW_ID>
new_row.cells.append(new_cell)

# Update rows
updated_row = smar_client.Sheets.update_rows(
  <SHEET_ID>,
  [new_row])