Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::Memcache::Instance

Última atualização: Jun 27, 2026

Crie uma instância do Memcache.

Sintaxe

{
  "Type": "ALIYUN::Memcache::Instance",
  "Properties": {
    "VpcId": String,
    "Capacity": Integer,
    "ResourceGroupId": String,
    "BackupPolicy": Map,
    "CouponNo": String,
    "AutoRenewPeriod": String,
    "AutoUseCoupon": String,
    "ZoneId": String,
    "InstanceName": String,
    "AutoRenew": String,
    "InstanceClass": String,
    "VpcPasswordFree": Boolean,
    "VSwitchId": String,
    "ChargeType": String,
    "Period": String,
    "NetworkType": String,
    "Password": String,
    "Config": String,
    "PrivateIpAddress": String
  }
}

Propriedades

Nome da propriedade

Tipo

Obrigatório

Atualização permitida

Descrição

Restrições

VpcId

String

Não

Não

ID da Virtual Private Cloud (VPC).

Nenhuma

Capacity

Integer

Não

Não

Capacidade da instância.

Especifique a propriedade Capacity ou InstanceClass. Para mais informações, consulte Tipos de instância.

Unidade: MB.

ResourceGroupId

String

Não

Não

ID do grupo de recursos.

Nenhuma

BackupPolicy

Map

Não

Sim

Política de backup.

Para mais informações, consulte Propriedades de BackupPolicy.

CouponNo

String

Não

Não

Código do cupom.

O valor padrão é youhuiquan_promotion_option_id_for_blank.

AutoRenewPeriod

String

Não

Não

Ciclo de renovação automática.

Valores válidos:

  • 1

  • 2

  • 3

  • 6

  • 12

Unidade: meses.

Nota

Parâmetro obrigatório quando AutoRenew está definido como true.

AutoUseCoupon

String

Não

Não

Indica se o uso de cupom está ativado.

Valores válidos:

  • true

  • false (padrão)

ZoneId

String

Não

Não

ID da zona.

Nenhuma

InstanceName

String

Não

Sim

Nome da instância.

O nome deve ter de 2 a 128 caracteres, começar com uma letra e não pode conter espaços nem os seguintes caracteres especiais:

@/:=”<>{[]}

AutoRenew

String

Não

Não

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

Valores válidos:

  • true

  • false (padrão)

InstanceClass

String

Não

Não

Tipo da instância.

Especifique a propriedade Capacity ou InstanceClass. Para mais informações, consulte Tipos de instância.

VpcPasswordFree

Boolean

Não

Não

Indica se o acesso sem senha à instância na VPC está ativado.

Nenhuma

VSwitchId

String

Não

Não

ID do vSwitch.

Nenhuma

ChargeType

String

Não

Não

Método de faturamento.

Valores válidos:

  • PrePaid: assinatura.

  • PostPaid (padrão): pagamento conforme o uso.

Period

String

Não

Não

Ciclo de faturamento.

Valores válidos:

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 12

  • 24

  • 36

Unidade: meses.

Parâmetro obrigatório quando ChargeType está definido como PrePaid. Não suportado quando ChargeType está definido como PostPaid.

NetworkType

String

Não

Não

Tipo de rede.

Valores válidos:

  • CLASSIC (padrão): rede clássica.

  • Virtual Private Cloud (VPC).

Password

String

Não

Não

Senha da instância.

A senha deve ter de 8 a 32 caracteres e conter pelo menos três dos seguintes tipos de caractere: letras maiúsculas, letras minúsculas, dígitos e caracteres especiais. Caracteres especiais suportados:

!@#$%^&*()_+-=

Config

String

Não

Não

Configuração detalhada da instância.

Valor em formato de string JSON.

PrivateIpAddress

String

Não

Não

Endereço IP privado da instância.

O endereço IP privado deve estar dentro do bloco CIDR do vSwitch ao qual a instância pertence.

Sintaxe de BackupPolicy

"BackupPolicy": {
  "PreferredBackupTime": String,
  "EnableBackupLog": Integer,
  "PreferredBackupPeriod": String
}

Propriedades de BackupPolicy

Nome da propriedade

Tipo

Obrigatório

Atualização permitida

Descrição

Restrições

PreferredBackupTime

String

Sim

Sim

Janela de tempo de backup.

Formato: HH:mmZ-HH:mmZ.

EnableBackupLog

Integer

Não

Sim

Indica se o backup incremental está ativado.

Valores válidos:

  • 1: ativado.

  • 0 (padrão): desativado.

PreferredBackupPeriod

String

Sim

Sim

Ciclo de backup.

Valores válidos:

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

  • Sunday

Valor de retorno

Fn::GetAtt

  • InstanceId: ID da instância.

  • InstanceName: Nome da instância.

  • ConnectionDomain: Endpoint da instância.

  • Port: Porta da instância.

  • QPS: Número de consultas por segundo (QPS).

Exemplos

YAML formato

ROSTemplateFormatVersion: '2015-09-01'
Description:
  en: 'Alibaba Cloud ROS Sample Template: Create a VPC type memcache instance.'
  zh-cn: 'Alibaba Cloud Resource Orchestration Service sample template: Create a VPC-type Memcache instance.'
Parameters:
  ZoneId:
    Type: String
    Description:
      zh-cn: The zone where you want to create the instance. Make sure that the zone supports the creation of Memcache instances.
      en: Create an Availability Zone for an instance to ensure that the Availability Zone supports the creation of Memcache resource specifications.
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
    Label:
      en: Zone ID
      zh-cn: Zone
  VPC:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      zh-cn: The ID of an existing VPC. You can find the ID in the VPC console.
      en: Please search the ID starts with (vpc-xxx)from console-Virtual Private Cloud
    Label:
      zh-cn: Existing VPC Instance ID
      en: Existing VPC Instance ID
  VSwitch:
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    Type: String
    Description:
      zh-cn: The ID of an existing vSwitch. You can find the ID in the VPC console under VSwitches.
      en: Please search the business VSwitch ID starts with(vsw-xxx)from console-Virtual Private Cloud-VSwitches
    Label:
      zh-cn: vSwitch ID
      en: Existing VSwitch ID
    AssociationPropertyMetadata:
      VpcId: VPC
      ZoneId: ZoneId
  InstanceClass:
    Type: String
    Description:
      en: Instance specifications
      zh-cn: Instance Type
    Default: memcache.master.small.default
    Label:
      zh-cn: Instance Type
      en: Instance Type
  Password:
    Type: String
    Description:
      en: 'Length 8~32 characters, can contain size letters, Numbers and special symbols, including the following: !@#$%^&*()_+-='
      zh-cn: 'The password must be 8 to 32 characters in length and can contain uppercase letters, lowercase letters, digits, and special characters, including the following: !@#$%^&*()_+-='
    ConstraintDescription:
      en: '8~32 characters, can contain size letters, Numbers and special symbols, including the following: !@#$%^&*()_+-='
      zh-cn: '8 to 32 characters. It can contain uppercase letters, lowercase letters, digits, and special characters, including the following: !@#$%^&*()_+-='
    MaxLength: 32
    MinLength: 8
    NoEcho: true
    Label:
      en: Instance Password
      zh-cn: Instance Password
Resources:
  MemcacheInstance:
    Type: ALIYUN::Memcache::Instance
    Properties:
      VpcId:
        Ref: VPC
      VSwitchId:
        Ref: VSwitch
      InstanceClass:
        Ref: InstanceClass
      NetworkType: VPC
      Password:
        Ref: Password
      ZoneId:
        Ref: ZoneId
Outputs:
  ConnectionDomain:
    Description: The internal endpoint.
    Value:
      Fn::GetAtt:
        - MemcacheInstance
        - ConnectionDomain
  InstanceId:
    Value:
      Fn::GetAtt:
        - MemcacheInstance
        - InstanceId
  QPS:
    Value:
      Fn::GetAtt:
        - MemcacheInstance
        - QPS
  Port:
    Value:
      Fn::GetAtt:
        - MemcacheInstance
        - Port

JSON formato

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "en": "Alibaba Cloud ROS Sample Template: Create a VPC type memcache instance.",
    "zh-cn": "Alibaba Cloud Resource Orchestration Service sample template: Create a VPC-type Memcache instance."
  },
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "Description": {
        "zh-cn": "The zone where you want to create the instance. Make sure that the zone supports the creation of Memcache instances.",
        "en": "Create an Availability Zone for an instance to ensure that the Availability Zone supports the creation of Memcache resource specifications."
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "Label": {
        "en": "Zone ID",
        "zh-cn": "Zone"
      }
    },
    "VPC": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Description": {
        "zh-cn": "The ID of an existing VPC. You can find the ID in the VPC console.",
        "en": "Please search the ID starts with (vpc-xxx)from console-Virtual Private Cloud"
      },
      "Label": {
        "zh-cn": "Existing VPC Instance ID",
        "en": "Existing VPC Instance ID"
      }
    },
    "VSwitch": {
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "Type": "String",
      "Description": {
        "zh-cn": "The ID of an existing vSwitch. You can find the ID in the VPC console under VSwitches.",
        "en": "Please search the business VSwitch ID starts with(vsw-xxx)from console-Virtual Private Cloud-VSwitches"
      },
      "Label": {
        "zh-cn": "vSwitch ID",
        "en": "Existing VSwitch ID"
      },
      "AssociationPropertyMetadata": {
        "VpcId": "VPC",
        "ZoneId": "ZoneId"
      }
    },
    "InstanceClass": {
      "Type": "String",
      "Description": {
        "en": "Instance specifications",
        "zh-cn": "Instance Type"
      },
      "Default": "memcache.master.small.default",
      "Label": {
        "zh-cn": "Instance Type",
        "en": "Instance Type"
      }
    },
    "Password": {
      "Type": "String",
      "Description": {
        "en": "Length 8~32 characters, can contain size letters, Numbers and special symbols, including the following: !@#$%^&*()_+-=",
        "zh-cn": "The password must be 8 to 32 characters in length and can contain uppercase letters, lowercase letters, digits, and special characters, including the following: !@#$%^&*()_+-="
      },
      "ConstraintDescription": {
        "en": "8~32 characters, can contain size letters, Numbers and special symbols, including the following: !@#$%^&*()_+-=",
        "zh-cn": "8 to 32 characters. It can contain uppercase letters, lowercase letters, digits, and special characters, including the following: !@#$%^&*()_+-="
      },
      "MaxLength": 32,
      "MinLength": 8,
      "NoEcho": true,
      "Label": {
        "en": "Instance Password",
        "zh-cn": "Instance Password"
      }
    }
  },
  "Resources": {
    "MemcacheInstance": {
      "Type": "ALIYUN::Memcache::Instance",
      "Properties": {
        "VpcId": {
          "Ref": "VPC"
        },
        "VSwitchId": {
          "Ref": "VSwitch"
        },
        "InstanceClass": {
          "Ref": "InstanceClass"
        },
        "NetworkType": "VPC",
        "Password": {
          "Ref": "Password"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        }
      }
    }
  },
  "Outputs": {
    "ConnectionDomain": {
      "Description": "The internal endpoint.",
      "Value": {
        "Fn::GetAtt": [
          "MemcacheInstance",
          "ConnectionDomain"
        ]
      }
    },
    "InstanceId": {
      "Value": {
        "Fn::GetAtt": [
          "MemcacheInstance",
          "InstanceId"
        ]
      }
    },
    "QPS": {
      "Value": {
        "Fn::GetAtt": [
          "MemcacheInstance",
          "QPS"
        ]
      }
    },
    "Port": {
      "Value": {
        "Fn::GetAtt": [
          "MemcacheInstance",
          "Port"
        ]
      }
    }
  }
}