動作描述
下載檔案到執行個體並執行命令
文法
Action: ACS::ECS::DownloadFileAndRunCommand
Properties:
regionId: String
instanceId: String
sourceType: String
sourcePath: String
tokenInfo: String
destinationDir: String
overwrite: Boolean
commandContent: String
workingDir: String
timeout: Number屬性
屬性名稱 | 描述 | 類型 | 是否必填 | 預設值 | 約束 |
regionId | 地區ID | String | 否 | {{ ACS::RegionId }} | |
instanceId | ECS執行個體ID | String | 是 | ||
sourceType | 檔案儲存體方式 | String | 是 | ||
sourcePath | 您必須指定一個用於隱藏檔的URL | String | 是 | ||
tokenInfo | 指定一個token來下載檔案,只有從GitHub下載檔案時會用到 | String | 否 | ||
overwrite | 覆蓋已存在的檔案 | Boolean | 否 | True | |
destinationDir | 檔案在執行個體中的下載目錄 | String | 是 | ||
commandContent | 雲助手命令 | String | 是 | ||
workingDir | 指令碼在ECS執行個體中的運行目錄。Linux系統執行個體預設在管理員(root使用者)的home目錄下,即/root。Windows系統執行個體預設在雲助手用戶端進程所在目錄,例如C:\Windows\System32 | String | 否 | "" | |
timeout | ECS執行個體中執行命令的逾時時間 | Number | 否 | 600 |
傳回值
傳回值名稱 | 描述 | 類型 |
downloadFileCommandOutput | String | |
runCommandOutput | String |