资源编排ROS,这个云服务器的这个唯一标识instanceid,执行某个命令获取到这个id吗?
ROS模板中这样编写即可获得地域下ECS的InstanceId:
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RegionId:
Type: String
AssociationProperty: ALIYUN::ECS::RegionId
InstanceId:
Type: String
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
AssociationPropertyMetadata:
RegionId: ${RegionId}
具体文档可以参考link
赞0
踩0