現時此頁面僅用英語顯示,繁體中文內容正在準備中。感謝您的耐心等待。

ALIYUN::ENS::DiskInstanceAttachment

更新時間:2024-03-25 02:02

ALIYUN::ENS::DiskInstanceAttachment is used to attach a data disk to an Edge Node Service (ENS) instance.

Syntax

{
  "Type": "ALIYUN::ENS::DiskInstanceAttachment",
  "Properties": {
    "InstanceId": String,
    "DeleteWithInstance": String,
    "DiskId": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

Property

Type

Required

Editable

Description

Constraint

InstanceId

String

Yes

No

The instance ID.

None.

DeleteWithInstance

String

No

No

Specifies whether to release the disk when the instance is released.

Valid values:

  • true

  • false

  • If you leave this property empty, false is used by default.

DiskId

String

Yes

No

The disk ID.

The disk specified by DiskId and the instance specified by InstanceId must belong to the same node.

Return values

Fn::GetAtt

  • InstanceId: the instance ID.

  • DiskId: the disk ID.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      DeleteWithInstance:
        Description:
          en: "Whether the cloud disk to be mounted is released with the instance\nValue:\n\
            true: When the instance is released, the cloud disk is released together with\
            \ the instance.\nfalse: When the instance is released, the cloud disk is retained\
            \ and is not released together with the instance.\n Empty means false by default."
        Required: false
        Type: String
      DiskId:
        Description:
          en: The ID of the cloud disk to be mounted. The Cloud Disk (DiskId) and the
            instance (InstanceId) must be on the same node.
        Required: true
        Type: String
      InstanceId:
        Description:
          en: Instance ID.
        Required: true
        Type: String
    Resources:
      ExtensionResource:
        Properties:
          DeleteWithInstance:
            Ref: DeleteWithInstance
          DiskId:
            Ref: DiskId
          InstanceId:
            Ref: InstanceId
        Type: ALIYUN::ENS::DiskInstanceAttachment
    Outputs:
      DiskId:
        Description: The ID of the cloud disk to be mounted. The Cloud Disk (DiskId) and
          the instance (InstanceId) must be on the same node.
        Value:
          Fn::GetAtt:
          - ExtensionResource
          - DiskId
      InstanceId:
        Description: Instance ID.
        Value:
          Fn::GetAtt:
          - ExtensionResource
          - InstanceId                 
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "InstanceId": {
          "Type": "String",
          "Description": {
            "en": "Instance ID."
          },
          "Required": true
        },
        "DeleteWithInstance": {
          "Type": "String",
          "Description": {
            "en": "Whether the cloud disk to be mounted is released with the instance\nValue:\ntrue: When the instance is released, the cloud disk is released together with the instance.\nfalse: When the instance is released, the cloud disk is retained and is not released together with the instance.\n Empty means false by default."
          },
          "Required": false
        },
        "DiskId": {
          "Type": "String",
          "Description": {
            "en": "The ID of the cloud disk to be mounted. The Cloud Disk (DiskId) and the instance (InstanceId) must be on the same node."
          },
          "Required": true
        }
      },
      "Resources": {
        "ExtensionResource": {
          "Type": "ALIYUN::ENS::DiskInstanceAttachment",
          "Properties": {
            "InstanceId": {
              "Ref": "InstanceId"
            },
            "DeleteWithInstance": {
              "Ref": "DeleteWithInstance"
            },
            "DiskId": {
              "Ref": "DiskId"
            }
          }
        }
      },
      "Outputs": {
        "InstanceId": {
          "Description": "Instance ID.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "InstanceId"
            ]
          }
        },
        "DiskId": {
          "Description": "The ID of the cloud disk to be mounted. The Cloud Disk (DiskId) and the instance (InstanceId) must be on the same node.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "DiskId"
            ]
          }
        }
      }
    }
                            
  • 本頁導讀 (1, T)
  • Syntax
  • Properties
  • Return values
  • Examples
文檔反饋
phone 聯絡我們

立即和Alibaba Cloud在線服務人員進行交談,獲取您想了解的產品信息以及最新折扣。

alicare alicarealicarealicare