Tous les produits
Search
Centre de documentation

Resource Orchestration Service:ALIYUN::ENS::Disk

Dernière mise à jour :Aug 10, 2026

Créez un disque de données ENS en paiement à l'utilisation ou par abonnement.

Syntaxe

{
  "Type": "ALIYUN::ENS::Disk",
  "Properties": {
    "SnapshotId": String,
    "Category": String,
    "KMSKeyId": String,
    "Encrypted": Boolean,
    "InstanceChargeType": String,
    "Size": String,
    "InstanceBillingCycle": String,
    "DiskName": String,
    "EnsRegionId": String
  }
}

Propriétés

Propriété

Type

Obligatoire

Modifiable

Description

Contrainte

SnapshotId

String

Non

Non

Le snapshot utilisé pour créer le disque.

Contraintes relatives à SnapshotId et Size :

  • Si la taille du snapshot spécifiée par SnapshotId dépasse Size, la taille du disque est égale à celle du snapshot.

  • Si la taille du snapshot spécifiée par SnapshotId est inférieure à Size, la taille du disque est égale à Size.

Category

String

Oui

Non

La catégorie du disque.

Valeurs valides :

  • cloud_efficiency : disque ultra

  • cloud_ssd : disque tout flash

KMSKeyId

String

Non

Non

L'ID de clé KMS pour le disque.

Si vous définissez Encrypted sur true et laissez KMSKeyId vide, la clé de service par défaut est utilisée.

Encrypted

Boolean

Non

Non

Indique s'il faut chiffrer le disque.

Valeurs valides :

  • true

  • false (par défaut)

InstanceChargeType

String

Oui

Non

La méthode de facturation de l'instance.

Définissez sur PostPaid (paiement à l'utilisation).

Size

String

Oui

Oui

La taille du disque.

Unité : GiB.

InstanceBillingCycle

String

Non

Non

Le cycle de facturation.

Aucune.

DiskName

String

Non

Non

Le nom du disque.

Aucune.

EnsRegionId

String

Oui

Non

L'ID du nœud de périphérie.

Aucune.

Valeurs de retour

Fn::GetAtt

DiskId : l'ID du disque.

Exemples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Category:
    Description:
      en: 'The category of the disk. Valid values:

        cloud_efficiency: ultra disk.

        cloud_ssd: all-flash disk.'
    Required: true
    Type: String
  DiskName:
    Description:
      en: The name of the disk.
    Required: false
    Type: String
  Encrypted:
    Description:
      en: 'Specifies whether to encrypt the data disk. Valid values:

        true

        false (default)'
    Required: false
    Type: Boolean
  EnsRegionId:
    Description:
      en: The ID of the edge node.
    Required: true
    Type: String
  InstanceChargeType:
    AssociationPropertyMetadata:
      LocaleKey: InstanceChargeType
    Default: PostPaid
    Description:
      en: The billing method of the instance. Set the value to PostPaid.
    Required: true
    Type: String
  KMSKeyId:
    Description:
      en: 'The ID of the Key Management Service (KMS) key for the disk.

        Note If you set the Encrypted parameter to true, the default service key is
        used when the KMSKeyId parameter is empty.'
    Required: false
    Type: String
  Size:
    Description:
      en: 'The size of the disk. Unit: GiB.'
    Required: true
    Type: String
  SnapshotId:
    Description:
      en: 'The ID of the snapshot that you want to use to create the disk.

        The following limits apply to the SnapshotId and Size parameters:

        If the size of the snapshot specified by SnapshotId is greater than the specified
        Size value, the size of the created disk is equal to the specified snapshot
        size.

        If the size of the snapshot specified by SnapshotId is smaller than the specified
        Size value, the size of the created disk is equal to the specified Size value.'
    Required: false
    Type: String
Resources:
  Disk:
    Properties:
      Category:
        Ref: Category
      DiskName:
        Ref: DiskName
      Encrypted:
        Ref: Encrypted
      EnsRegionId:
        Ref: EnsRegionId
      InstanceChargeType:
        Ref: InstanceChargeType
      KMSKeyId:
        Ref: KMSKeyId
      Size:
        Ref: Size
      SnapshotId:
        Ref: SnapshotId
    Type: ALIYUN::ENS::Disk
Outputs:
  DiskId:
    Description: The ID of the disk.
    Value:
      Fn::GetAtt:
      - Disk
      - DiskId
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SnapshotId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the snapshot that you want to use to create the disk.\nThe following limits apply to the SnapshotId and Size parameters:\nIf the size of the snapshot specified by SnapshotId is greater than the specified Size value, the size of the created disk is equal to the specified snapshot size.\nIf the size of the snapshot specified by SnapshotId is smaller than the specified Size value, the size of the created disk is equal to the specified Size value."
      },
      "Required": false
    },
    "Category": {
      "Type": "String",
      "Description": {
        "en": "The category of the disk. Valid values:\ncloud_efficiency: ultra disk.\ncloud_ssd: all-flash disk."
      },
      "Required": true
    },
    "KMSKeyId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the Key Management Service (KMS) key for the disk.\nNote If you set the Encrypted parameter to true, the default service key is used when the KMSKeyId parameter is empty."
      },
      "Required": false
    },
    "Encrypted": {
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether to encrypt the data disk. Valid values:\ntrue\nfalse (default)"
      },
      "Required": false
    },
    "InstanceChargeType": {
      "AssociationPropertyMetadata": {
        "LocaleKey": "InstanceChargeType"
      },
      "Type": "String",
      "Description": {
        "en": "The billing method of the instance. Set the value to PostPaid."
      },
      "Required": true,
      "Default": "PostPaid"
    },
    "Size": {
      "Type": "String",
      "Description": {
        "en": "The size of the disk. Unit: GiB."
      },
      "Required": true
    },
    "DiskName": {
      "Type": "String",
      "Description": {
        "en": "The name of the disk."
      },
      "Required": false
    },
    "EnsRegionId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the edge node."
      },
      "Required": true
    }
  },
  "Resources": {
    "Disk": {
      "Type": "ALIYUN::ENS::Disk",
      "Properties": {
        "SnapshotId": {
          "Ref": "SnapshotId"
        },
        "Category": {
          "Ref": "Category"
        },
        "KMSKeyId": {
          "Ref": "KMSKeyId"
        },
        "Encrypted": {
          "Ref": "Encrypted"
        },
        "InstanceChargeType": {
          "Ref": "InstanceChargeType"
        },
        "Size": {
          "Ref": "Size"
        },
        "DiskName": {
          "Ref": "DiskName"
        },
        "EnsRegionId": {
          "Ref": "EnsRegionId"
        }
      }
    }
  },
  "Outputs": {
    "DiskId": {
      "Description": "The ID of the disk.",
      "Value": {
        "Fn::GetAtt": [
          "Disk",
          "DiskId"
        ]
      }
    }
  }
}