edit-icon download-icon

ALIYUN::ECS::DiskAttachment

Last Updated: Mar 29, 2018

The ALIYUN::ECS::DiskAttachment type is used to attach ECS disks.

Syntax

  1. {
  2. "Type" : "ALIYUN::ECS::DiskAttachment",
  3. "Properties" : {
  4. "DiskId" : String,
  5. "InstanceId" : String,
  6. "Device" : String,
  7. "DeleteWithInstance" : String
  8. }
  9. }

Attributes

Attribute name Type Required? Update allowed? Description Constraint
InstanceId string Yes No The ID of the instance to which the disk gets attached. N/A
DiskId string Yes No Disk ID The disk and instance must be located in the same zone.
Device string No No Device name of the disk in the ECS instance If this parameter is set to null, then the parameter value is allocated by the system. The value ranges from /dev/xvdb to /dev/xvdz. The default value is null.
DeleteWithInstance boolean No No Whether the disk is released along with the release of the instance Value options: true and false. “true” indicates that the disk is released along with the release of the instance. “false” indicates that the disk is not released along with the release of the instance. The default value is null, indicating that the current value is retained without modification.

Return values

Fn::GetAtt

  • DiskId: ID of the created disk.

  • Status: Status of the created disk.

  • Device: Disk attaching address.

Example

  1. {
  2. "ROSTemplateFormatVersion" : "2015-09-01",
  3. "Resources" : {
  4. "DataDisk": {
  5. "Type": "ALIYUN::ECS::Disk",
  6. "Properties": {
  7. "Size": 10,
  8. "ZoneId": "cn-beijing-a"
  9. }
  10. },
  11. "AttachDisk": {
  12. "Type": "ALIYUN::ECS::DiskAttachment",
  13. "Properties": {
  14. "DiskId": { "Fn::GetAtt" : [ "DataDisk", "DiskId" ] },
  15. "InstanceId": "i-250doz5fs"
  16. }
  17. }
  18. }
  19. }
Thank you! We've received your feedback.