Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::SWAS::Instance

Última atualização: Jun 27, 2026

Use o recurso ALIYUN::SWAS::Instance para criar uma instância de Simple Application Server com pagamento por assinatura.

Sintaxe

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

Propriedades

Nome da propriedade

Tipo

Obrigatório

Permite atualizações

Descrição

Restrição

ImageId

String

Sim

Não

ID da imagem.

Chame a operação ListImages para consultar os IDs das imagens disponíveis em uma região específica.

Period

Integer

Sim

Não

Duração da assinatura do recurso.

Unidade: mês.

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

PlanId

String

Sim

Não

ID do plano.

Chame a operação ListPlans para obter informações sobre todos os planos disponíveis em uma região específica.

AutoRenew

Boolean

Não

Não

Defina se a renovação automática está ativada.

Valores válidos:

  • true: renovação automática ativada.

  • false (padrão): renovação automática desativada.

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.

Especifique esta propriedade apenas quando AutoRenew for true.

DataDiskSize

Integer

Não

Não

Tamanho do disco de dados a ser anexado ao Simple Application Server.

Unidade: GB.

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

  • O valor 0 indica que nenhum disco de dados será anexado.

  • Se o plano especificado incluir um SSD aprimorado (ESSD) de nível de desempenho 0 (PL0), o disco de dados deve ter tamanho igual ou superior a 40 GB.

  • Se o plano especificado incluir um SSD padrão, o disco de dados deve ter tamanho igual ou superior a 20 GB.

Padrão: 0

Tags

List

Não

Sim

Lista de tags.

Para mais informações, consulte a propriedade Tags.

Sintaxe de Tags

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

Propriedade Tags

Nome da propriedade

Tipo

Obrigatório

Permite atualizações

Descrição

Restrição

Key

String

Sim

Não

Chave da tag.

Nenhuma

Value

String

Não

Não

Valor da tag.

Nenhuma

Valores de retorno

Fn::GetAtt

  • PublicIpAddress: endereço IP público do Simple Application Server.

  • InnerIpAddress: endereço IP privado do Simple Application Server.

  • InstanceId: ID da instância do Simple Application Server.

Exemplos

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