すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:ALIYUN::ENS::DiskInstanceAttachment

最終更新日:Mar 17, 2025

ALIYUN::ENS::DiskInstanceAttachment は、データディスクを Edge Node Service (ENS) インスタンスにアタッチするために使用されます。

構文

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

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

InstanceId

String

はい

いいえ

インスタンス ID。

なし。

DeleteWithInstance

String

いいえ

いいえ

インスタンスのリリース時にディスクを解放するかどうかを指定します。

有効な値:

  • true

  • false

  • このプロパティを空のままにすると、デフォルトで false が使用されます。

DiskId

String

はい

いいえ

ディスク ID。

DiskId で指定されたディスクと InstanceId で指定されたインスタンスは、同じノードに属している必要があります。

戻り値

Fn::GetAtt

  • InstanceId: インスタンス ID。

  • DiskId: ディスク ID。

  • YAML フォーマット

    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 フォーマット

    {
      "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"
            ]
          }
        }
      }
    }