Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::SWAS::Instances

Última atualização: Jun 27, 2026

Cria Simple Application Servers por assinatura.

Sintaxe

{
  "Type": "ALIYUN::SWAS::Instances",
  "Properties": {
    "AutoRenewPeriod": Integer,
    "PlanId": String,
    "AutoRenew": Boolean,
    "Amount": Integer,
    "ImageId": String,
    "Period": Integer,
    "DataDiskSize": Integer
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

AutoRenewPeriod

Integer

Não

Não

Período de renovação automática.

Unidade: mês.

Valores válidos: 1, 3, 6, 12, 24 e 36.

Obrigatório apenas quando AutoRenew é definido como true.

PlanId

String

Sim

Não

ID do plano.

Chame a operação ListPlans para consultar planos em uma região.

AutoRenew

Boolean

Não

Não

Ative a renovação automática.

Valores válidos:

  • true

  • false (padrão)

Amount

Integer

Não

Não

Número de servidores a serem criados.

Valores válidos: 1 a 20.

Valor padrão: 1.

ImageId

String

Sim

Não

ID da imagem.

Chame a operação ListImages para consultar imagens disponíveis em uma região.

Period

Integer

Sim

Não

Duração da assinatura.

Unidade: mês.

Valores válidos: 1, 3, 6, 12, 24 e 36.

DataDiskSize

Integer

Não

Não

Tamanho do disco de dados.

Unidade: GB.

Valores válidos: 0 a 16380. O valor deve ser múltiplo de 20.

  • 0: nenhum disco de dados anexado.

  • Se o plano incluir um ESSD PL0, o disco de dados deve ter pelo menos 40 GB.

  • Se o plano incluir um SSD padrão, o disco de dados deve ter pelo menos 20 GB.

Valor padrão: 0.

Valores de retorno

Fn::GetAtt

  • InnerIpAddresses: endereços IP internos dos Simple Application Servers.

  • PublicIpAddresses: endereços IP públicos dos Simple Application Servers.

  • InstanceIds: IDs dos Simple Application Servers.

Exemplos

  • YAML formato

    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:
      Instances:
        Properties:
          AutoRenew:
            Ref: AutoRenew
          AutoRenewPeriod:
            Ref: AutoRenewPeriod
          DataDiskSize:
            Ref: DataDiskSize
          Amount: 1
          ImageId:
            Ref: ImageId
          Period:
            Ref: Period
          PlanId:
            Ref: PlanId
        Type: ALIYUN::SWAS::Instances
    Outputs:
      InnerIpAddress:
        Description: The inner IP address of simple application server.
        Value:
          Fn::GetAtt:
          - Instances
          - InnerIpAddresses
      InstanceId:
        Description: The ID of the simple application server.
        Value:
          Fn::GetAtt:
          - Instances
          - InstanceIds
      PublicIpAddress:
        Description: The public IP address of simple application server.
        Value:
          Fn::GetAtt:
          - Instances
          - PublicIpAddresses
  • JSON formato

    {
      "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": {
        "Instances": {
          "Properties": {
            "AutoRenew": {
              "Ref": "AutoRenew"
            },
            "AutoRenewPeriod": {
              "Ref": "AutoRenewPeriod"
            },
            "DataDiskSize": {
              "Ref": "DataDiskSize"
            },
            "Amount": 1,
            "ImageId": {
              "Ref": "ImageId"
            },
            "Period": {
              "Ref": "Period"
            },
            "PlanId": {
              "Ref": "PlanId"
            }
          },
          "Type": "ALIYUN::SWAS::Instances"
        }
      },
      "Outputs": {
        "InnerIpAddress": {
          "Description": "The inner IP address of simple application server.",
          "Value": {
            "Fn::GetAtt": [
              "Instances",
              "InnerIpAddresses"
            ]
          }
        },
        "InstanceId": {
          "Description": "The ID of the simple application server.",
          "Value": {
            "Fn::GetAtt": [
              "Instances",
              "InstanceIds"
            ]
          }
        },
        "PublicIpAddress": {
          "Description": "The public IP address of simple application server.",
          "Value": {
            "Fn::GetAtt": [
              "Instances",
              "PublicIpAddresses"
            ]
          }
        }
      }
    }