• 地址:广州市天河区华南植物园-龙洞慧创百思G220
  • 免费热线 : 020-87581205
  • 电子邮箱 : sw@51mimu.com

ALIYUN::ECS::Invocation_ECS_资源类型_资源编排-阿里云

 知识中心     |      2020-06-23 18:52:24

ALIYUN::ECS::Invocation

更新时间:2019-06-24 11:45:02

编辑 我的收藏

新浪微博 微信 钉钉

本页目录

ALIYUN::ECS::Invocation类型用于为一台或多台ECS实例触发一条云助手命令。

语法

{
  "Type": "ALIYUN::ECS::Invocation",
  "Properties": {
    "Timed": Boolean,
    "Frequency": String,
    "CommandId": String,
    "InstanceIds": List
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
Timed Boolean 命令是否为周期执行。默认值:False
Frequency String 周期任务的执行周期。该参数值结构以 Cron 表达式 为准。
CommandId String 命令 ID。
InstanceIds List 执行命令的实例列表。最多能指定20台实例ID。

返回值

Fn::GetAtt

  • InvokeId: 命令进程执行 ID。

示例

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Timed": {
      "Type": "Boolean",
      "Description": "Whether it is timed execution. Default is False.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "Frequency": {
      "Type": "String",
      "Description": "The frequency of timing execution (the shortest frequency is performed every 1 minute). It iss mandatory when Timing is True.The value rule follows the rules of the cron expression. "
    },
    "CommandId": {
      "Type": "String",
      "Description": "The id of command."
    },
    "InstanceIds": {
      "Type": "CommaDelimitedList",
      "Description": "The instance id list. Select up to 20 instances at a time.Instances selected network type must be VPC network, status must be running"
    }
  },
  "Resources": {
    "Invocation": {
      "Type": "ALIYUN::ECS::Invocation",
      "Properties": {
        "Timed": {
          "Ref": "Timed"
        },
        "Frequency": {
          "Ref": "Frequency"
        },
        "CommandId": {
          "Ref": "CommandId"
        },
        "InstanceIds": {
          "Fn::Split": [
            ",",
            {
              "Ref": "InstanceIds"
            },
            {
              "Ref": "InstanceIds"
            }
          ]
        }
      }
    }
  },
  "Outputs": {
    "InvokeId": {
      "Description": "The id of command execution.",
      "Value": {
        "Fn::GetAtt": [
          "Invocation",
          "InvokeId"
        ]
      }
    }
  }
}


COPYRIGHT © 2018-2019,WWW.51MIMU.COM,ALL RIGHTS RESERVED版权所有 © 广州米姆信息科技有限公司(阿里云、腾讯云代理商) 粤ICP备18145377号

sitemap feed