Tous les produits
Search
Centre de documentation

Resource Orchestration Service:ALIYUN::SWAS::Instance

Dernière mise à jour :Aug 10, 2026

La ressource ALIYUN::SWAS::Instance permet de créer un serveur Simple Application Server en mode abonnement.

Syntaxe

{
  "Type": "ALIYUN::SWAS::Instance",
  "Properties": {
    "AutoRenewPeriod": Integer,
    "PlanId": String,
    "AutoRenew": Boolean,
    "ImageId": String,
    "Period": Integer,
    "DataDiskSize": Integer,
    "Tags": List
  }
}

Propriétés

Nom de la propriété

Type

Obligatoire

Mises à jour autorisées

Description

Contrainte

ImageId

String

Oui

Non

ID de l'image.

Appelez l'opération ListImages pour obtenir les ID des images disponibles dans une région donnée.

Period

Integer

Oui

Non

Durée de l'abonnement à la ressource.

Unité : mois.

Valeurs valides : 1, 3, 6, 12, 24 et 36.

PlanId

String

Oui

Non

ID du plan.

Appelez l'opération ListPlans pour obtenir les informations sur tous les plans disponibles dans une région donnée.

AutoRenew

Boolean

Non

Non

Indique si le renouvellement automatique est activé.

Valeurs valides :

  • true : le renouvellement automatique est activé.

  • false (valeur par défaut) : le renouvellement automatique est désactivé.

AutoRenewPeriod

Integer

Non

Non

Période de renouvellement automatique.

Unité : mois.

Valeurs valides : 1, 3, 6, 12, 24 et 36.

Cette propriété doit être spécifiée uniquement lorsque AutoRenew est définie sur true.

DataDiskSize

Integer

Non

Non

Taille du disque de données à attacher au serveur Simple Application Server.

Unité : Go.

Valeurs valides : 0 à 16380. La valeur doit être un multiple entier de 20.

  • Une valeur de 0 indique qu'aucun disque de données n'est attaché.

  • Si un disque ESSD de niveau de performance 0 (PL0) est inclus dans le plan spécifié, la taille du disque de données doit être supérieure ou égale à 40 Go.

  • Si un disque SSD standard est inclus dans le plan spécifié, la taille du disque de données doit être supérieure ou égale à 20 Go.

Valeur par défaut : 0

Tags

List

Non

Oui

Liste de libellés.

Pour plus d'informations, consultez la propriété Tags.

Syntaxe des tags

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]

Propriété Tags

Nom de la propriété

Type

Obligatoire

Mises à jour autorisées

Description

Contrainte

Key

String

Oui

Non

Clé du tag.

Aucune

Value

String

Non

Non

Valeur du tag.

Aucune

Valeurs renvoyées

Fn::GetAtt

  • PublicIpAddress : adresse IP publique du serveur Simple Application Server.

  • InnerIpAddress : adresse IP privée du serveur Simple Application Server.

  • InstanceId : ID du serveur Simple Application Server.

Exemples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  AutoRenew:
    Description:
      en: 'Specifies whether to enable auto-renewal. Valid values:
        true
        false
        Default value: false.'
    Type: Boolean
  AutoRenewPeriod:
    Description:
      en: 'The auto-renewal period. This parameter is required only when you set AutoRenew
        to true. Unit: months. Valid values: 1, 3, 6, 12, 24, and 36.'
    Type: Number
  DataDiskSize:
    Description:
      en: 'The size of the data disk that is attached to the server. Unit: GB. Valid
        values: 0 to 16380. The value must be an integral multiple of 20.
        A value of 0 indicates that no data disk is attached.
        If the disk included in the specified plan is a standard SSD, the data disk
        must be 20 GB or larger in size.
        Default value: 0.'
    Type: Number
  ImageId:
    Description:
      en: The image ID. You can call the ListImages operation to query the available
        images in the specified region.
    Type: String
    Default: fe9c66133a9d4688872869726b52****
  Period:
    Description:
      en: 'The subscription period of the servers. Unit: months. Valid values: 1,
        3, 6, 12, 24, and 36.'
    Type: Number
  PlanId:
    Description:
      en: The plan ID. You can call the ListPlans operation to query all plans provided
        by Simple Application Server in the specified region.
    Type: String
    Default: swas.s2.c2m1s40b3t04 
Resources:
  Instance:
    Properties:
      AutoRenew:
        Ref: AutoRenew
      AutoRenewPeriod:
        Ref: AutoRenewPeriod
      DataDiskSize:
        Ref: DataDiskSize
      ImageId:
        Ref: ImageId
      Period:
        Ref: Period
      PlanId:
        Ref: PlanId
    Type: ALIYUN::SWAS::Instance
Outputs:
  InnerIpAddress:
    Description: The private IP address of the Simple Application Server instance.
    Value:
      Fn::GetAtt:
      - Instance
      - InnerIpAddress
  InstanceId:
    Description: The ID of the Simple Application Server instance.
    Value:
      Fn::GetAtt:
      - Instance
      - InstanceId
  PublicIpAddress:
    Description: The public IP address of the Simple Application Server instance.
    Value:
      Fn::GetAtt:
      - Instance
      - PublicIpAddress
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "AutoRenew": {
      "Description": {
        "en": "Specifies whether to enable auto-renewal. Valid values: true false Default value: false."
      },
      "Type": "Boolean"
    },
    "AutoRenewPeriod": {
      "Description": {
        "en": "The auto-renewal period. This parameter is required only when you set AutoRenew to true. Unit: months. Valid values: 1, 3, 6, 12, 24, and 36."
      },
      "Type": "Number"
    },
    "DataDiskSize": {
      "Description": {
        "en": "The size of the data disk that is attached to the server. Unit: GB. Valid values: 0 to 16380. The value must be an integral multiple of 20. A value of 0 indicates that no data disk is attached. If the disk included in the specified plan is a standard SSD, the data disk must be 20 GB or larger in size. Default value: 0."
      },
      "Type": "Number"
    },
    "ImageId": {
      "Description": {
        "en": "The image ID. You can call the ListImages operation to query the available images in the specified region."
      },
      "Type": "String",
      "Default": "fe9c66133a9d4688872869726b52****"
    },
    "Period": {
      "Description": {
        "en": "The subscription period of the servers. Unit: months. Valid values: 1, 3, 6, 12, 24, and 36."
      },
      "Type": "Number"
    },
    "PlanId": {
      "Description": {
        "en": "The plan ID. You can call the ListPlans operation to query all plans provided by Simple Application Server in the specified region."
      },
      "Type": "String",
      "Default": "swas.s2.c2m1s40b3t04"
    }
  },
  "Resources": {
    "Instance": {
      "Properties": {
        "AutoRenew": {
          "Ref": "AutoRenew"
        },
        "AutoRenewPeriod": {
          "Ref": "AutoRenewPeriod"
        },
        "DataDiskSize": {
          "Ref": "DataDiskSize"
        },
        "ImageId": {
          "Ref": "ImageId"
        },
        "Period": {
          "Ref": "Period"
        },
        "PlanId": {
          "Ref": "PlanId"
        }
      },
      "Type": "ALIYUN::SWAS::Instance"
    }
  },
  "Outputs": {
    "InnerIpAddress": {
      "Description": "The private IP address of the Simple Application Server instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InnerIpAddress"
        ]
      }
    },
    "InstanceId": {
      "Description": "The ID of the Simple Application Server instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InstanceId"
        ]
      }
    },
    "PublicIpAddress": {
      "Description": "The public IP address of the Simple Application Server instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "PublicIpAddress"
        ]
      }
    }
  }
}