Todos los productos
Search
Centro de documentos

Resource Orchestration Service:ALIYUN::Memcache::Instance

Última actualización: Sep 04, 2026

Crea una instancia de Memcache.

Sintaxis

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

Propiedades

Nombre de la propiedad

Tipo

Obligatorio

Actualización permitida

Descripción

Restricciones

VpcId

String

No

No

ID de la VPC.

Ninguna

Capacity

Integer

No

No

Capacidad de la instancia.

Especifique la propiedad Capacity o InstanceClass. Para más información, consulte Instance types.

Unidad: MB.

ResourceGroupId

String

No

No

ID del resource group.

Ninguna

BackupPolicy

Map

No

Sí

Política de copia de seguridad.

Para más información, consulte BackupPolicy properties.

CouponNo

String

No

No

Código del cupón.

El valor predeterminado es youhuiquan_promotion_option_id_for_blank.

AutoRenewPeriod

String

No

No

Ciclo de renovación automática.

Valores válidos:

  • 1

  • 2

  • 3

  • 6

  • 12

Unidad: meses.

Nota

Este parámetro es obligatorio cuando AutoRenew se establece en true.

AutoUseCoupon

String

No

No

Indica si se usa un cupón.

Valores válidos:

  • true

  • false (predeterminado)

ZoneId

String

No

No

ID de la zona.

Ninguna

InstanceName

String

No

Sí

Nombre de la instancia.

El nombre debe tener entre 2 y 128 caracteres. Debe comenzar con una letra y no puede contener espacios ni los siguientes caracteres especiales:

@/:=”<>{[]}

AutoRenew

String

No

No

Indica si se habilita la renovación automática.

Valores válidos:

  • true

  • false (predeterminado)

InstanceClass

String

No

No

Tipo de instancia.

Especifique la propiedad Capacity o InstanceClass. Para más información, consulte Instance types.

VpcPasswordFree

Boolean

No

No

Indica si se habilita el acceso sin contraseña a la instancia en una VPC.

Ninguna

VSwitchId

String

No

No

ID del vSwitch.

Ninguna

ChargeType

String

No

No

Método de facturación.

Valores válidos:

  • PrePaid: suscripción.

  • PostPaid (predeterminado): pay-as-you-go.

Period

String

No

No

Ciclo de facturación.

Valores válidos:

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 12

  • 24

  • 36

Unidad: meses.

Este parámetro es obligatorio cuando ChargeType se establece en PrePaid. No es compatible cuando ChargeType se establece en PostPaid.

NetworkType

String

No

No

Tipo de red.

Valores válidos:

  • CLASSIC (predeterminado): red clásica.

  • Virtual Private Cloud (VPC).

Password

String

No

No

Contraseña de la instancia.

La contraseña debe tener entre 8 y 32 caracteres. Debe contener como mínimo tres de los siguientes tipos de caracteres: letras mayúsculas, letras minúsculas, dígitos y caracteres especiales. Los caracteres especiales compatibles son:

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

Config

String

No

No

Configuración detallada de la instancia.

El valor es una cadena con formato JSON.

PrivateIpAddress

String

No

No

Dirección IP privada de la instancia.

La dirección IP privada debe estar dentro del bloque CIDR del vSwitch al que pertenece la instancia.

Sintaxis de BackupPolicy

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

Propiedades de BackupPolicy

Nombre de la propiedad

Tipo

Obligatorio

Actualización permitida

Descripción

Restricciones

PreferredBackupTime

String

Sí

Sí

Ventana de tiempo para la copia de seguridad.

Formato: HH:mmZ-HH:mmZ.

EnableBackupLog

Integer

No

Sí

Indica si se habilita la copia de seguridad incremental.

Valores válidos:

  • 1: habilitado.

  • 0 (predeterminado): deshabilitado.

PreferredBackupPeriod

String

Sí

Sí

Ciclo de copia de seguridad.

Valores válidos:

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

  • Sunday

Valor de retorno

Fn::GetAtt

  • InstanceId: ID de la instancia.

  • InstanceName: Nombre de la instancia.

  • ConnectionDomain: Endpoint de la instancia.

  • Port: Puerto de la instancia.

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

Ejemplos

YAML format

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 format

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