Nama template
ACS-ECS-RunShellScript: Menjalankan skrip shell.
Deskripsi template
Menjalankan skrip shell.
Tipe template
Otomatis
Pemilik
Alibaba Cloud
Parameter input
Parameter | Deskripsi | Tipe | Diperlukan | Nilai default | Batasan |
instanceId | Instans ECS | String | Ya | ||
commandContent | Perintah Cloud Assistant. | String | Ya | ||
workingDir | Direktori instance ECS di mana perintah dijalankan. | String | Ya | ||
regionId | ID wilayah. | String | Tidak | {{ ACS::RegionId }} | |
timeout | Jangka waktu maksimum timeout. Satuan: detik. | Angka | Tidak | 600 | |
OOSAssumeRole | Peran Resource Access Management (RAM) yang diasumsikan oleh CloudOps Orchestration Service (OOS). | String | Tidak | "" |
Parameter keluaran
Parameter | Deskripsi | Tipe |
commandOutput | String |
Kebijakan izin yang diperlukan untuk mengeksekusi template
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInvocationResults",
"ecs:DescribeInvocations",
"ecs:RunCommand"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Detail
Untuk informasi lebih lanjut, lihat ACS-ECS-RunShellScript.yml di GitHub.
Konten Template
FormatVersion: OOS-2019-06-01
Description:
en: Run shell script.
title: ACS-ECS-RunShellScript
categories:
- run_command
Parameters:
regionId:
Type: String
Label:
en: RegionId
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
instanceId:
Label:
en: InstanceId
Type: String
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
AssociationPropertyMetadata:
RegionId: regionId
commandContent:
Label:
en: CommandContent
Type: String
AssociationProperty: Code
workingDir:
Label:
en: WorkingDir
Type: String
timeout:
Label:
en: Timeout
Type: Number
Default: 600
OOSAssumeRole:
Label:
en: OOSAssumeRole
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: runCommand
Description:
en: Execute cloud assistant command
Action: ACS::ECS::RunCommand
Properties:
regionId: '{{ regionId }}'
commandContent: "{{ commandContent }}"
instanceId: '{{ instanceId }}'
commandType: RunShellScript
workingDir: "{{ workingDir }}"
timeout: "{{ timeout }}"
Outputs:
commandOutput:
Type: String
ValueSelector: invocationOutput
Outputs:
commandOutput:
Type: String
Value: '{{ runCommand.commandOutput }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- commandContent
- workingDir
- timeout
Label:
default:
en: run command options
- Parameters:
- regionId
- instanceId
Label:
default:
en: Select ECS Instances
- Parameters:
- OOSAssumeRole
Label:
default:
en: Control Options