すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:ALIYUN::Memcache::Instance

最終更新日:Jun 17, 2026

Memcache インスタンスを作成します。

構文

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

プロパティ

プロパティ名

タイプ

必須

更新可能

説明

制約

VpcId

String

いいえ

いいえ

Virtual Private Cloud (VPC) の ID。

なし

Capacity

Integer

いいえ

いいえ

インスタンスのキャパシティ。

Capacity または InstanceClass プロパティのいずれかを指定する必要があります。詳細については、「インスタンスタイプ」をご参照ください。

単位:MB。

ResourceGroupId

String

いいえ

いいえ

リソースグループの ID。

なし

BackupPolicy

Map

いいえ

はい

バックアップポリシー。

詳細については、「BackupPolicy のプロパティ」をご参照ください。

CouponNo

String

いいえ

いいえ

クーポンコード。

デフォルト値は youhuiquan_promotion_option_id_for_blank です。

AutoRenewPeriod

String

いいえ

いいえ

自動更新期間。

有効値:

  • 1

  • 2

  • 3

  • 6

  • 12

単位:月。

説明

このパラメーターは、AutoRenew が true に設定されている場合に必須です。

AutoUseCoupon

String

いいえ

いいえ

クーポンを使用するかどうかを指定します。

有効値:

  • true

  • false (デフォルト)

ZoneId

String

いいえ

いいえ

ゾーンの ID。

なし

InstanceName

String

いいえ

はい

インスタンスの名前。

名前は 2~128 文字で、先頭は英字にする必要があります。スペースや次の特殊文字は使用できません:

@/:=”<>{[]}

AutoRenew

String

いいえ

いいえ

自動更新を有効にするかどうかを指定します。

有効値:

  • true

  • false (デフォルト)

InstanceClass

String

いいえ

いいえ

インスタンスタイプ。

Capacity または InstanceClass プロパティのいずれかを指定する必要があります。詳細については、「インスタンスタイプ」をご参照ください。

VpcPasswordFree

Boolean

いいえ

いいえ

VPC 内のインスタンスへのパスワードレスアクセスを有効にするかどうかを指定します。

なし

VSwitchId

String

いいえ

いいえ

vSwitch の ID。

なし

ChargeType

String

いいえ

いいえ

課金方法。

有効値:

  • PrePaid:サブスクリプション。

  • PostPaid (デフォルト):従量課金。

Period

String

いいえ

いいえ

課金期間。

有効値:

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 12

  • 24

  • 36

単位:月。

このパラメーターは、ChargeType が PrePaid に設定されている場合に必須です。ChargeType が PostPaid に設定されている場合、このパラメーターはサポートされません。

NetworkType

String

いいえ

いいえ

ネットワークタイプ。

有効値:

  • CLASSIC (デフォルト):クラシックネットワーク。

  • Virtual Private Cloud (VPC)

Password

String

いいえ

いいえ

インスタンスのパスワード。

パスワードは 8~32 文字で、大文字、小文字、数字、特殊文字の 4 種類のうち 3 種類以上を含める必要があります。サポートされている特殊文字は次のとおりです:

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

Config

String

いいえ

いいえ

インスタンスの詳細設定。

値は JSON 形式の文字列です。

PrivateIpAddress

String

いいえ

いいえ

インスタンスのプライベート IP アドレス。

プライベート IP アドレスは、インスタンスが属する vSwitch の CIDR ブロック内にある必要があります。

BackupPolicy の構文

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

BackupPolicy のプロパティ

プロパティ名

タイプ

必須

更新可能

説明

制約

PreferredBackupTime

String

はい

はい

バックアップ時間帯。

形式: HH:mmZ-HH:mmZ

EnableBackupLog

Integer

いいえ

はい

増分バックアップを有効にするかどうかを指定します。

有効値:

  • 1:有効。

  • 0 (デフォルト):無効。

PreferredBackupPeriod

String

はい

はい

バックアップ周期。

有効値:

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

  • Sunday

戻り値

Fn::GetAtt

  • InstanceId: インスタンスの ID。

  • InstanceName: インスタンスの名前。

  • ConnectionDomain: インスタンスのエンドポイント。

  • Port: インスタンスのポート。

  • QPS: 1 秒あたりのクエリ数 (QPS)。

記述例

YAML 形式

ROSTemplateFormatVersion: '2015-09-01'
Description:
  en: 'Alibaba Cloud Resource Orchestration Service (ROS) sample template: Create a Memcache instance of the VPC type.'
  zh-cn: '阿里云资源编排服务 (ROS) 示例模板:创建一台 VPC 类型的 Memcache 实例。'
Parameters:
  ZoneId:
    Type: String
    Description:
      zh-cn: 实例创建所属的可用区,请确认该可用区支持创建 Memcache 实例资源规格。
      en: The availability zone to which the instance belongs. Make sure that the availability zone supports creating Memcache resource specifications.
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
    Label:
      en: Zone ID
      zh-cn: 可用区
  VPC:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      zh-cn: 已有 VPC 实例的 ID,可通过 VPC 控制台查询。
      en: The ID of an existing VPC. You can query the ID in the VPC console.
    Label:
      zh-cn: 已有 VPC 实例 ID
      en: Existing VPC Instance ID
  VSwitch:
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    Type: String
    Description:
      zh-cn: 已有 vSwitch 实例的 ID,可通过 VPC 控制台的 VSwitch 查询。
      en: The ID of an existing vSwitch. You can query the ID on the vSwitches page of the VPC console.
    Label:
      zh-cn: 交换机 ID
      en: Existing VSwitch ID
    AssociationPropertyMetadata:
      VpcId: VPC
      ZoneId: ZoneId
  InstanceClass:
    Type: String
    Description:
      en: Instance specification.
      zh-cn: 实例规格。
    Default: memcache.master.small.default
    Label:
      zh-cn: 实例规格
      en: Instance Type
  Password:
    Type: String
    Description:
      en: 'The password must be 8 to 32 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters: !@#$%^&*()_+-='
      zh-cn: '密码长度为 8 至 32 位,且至少包含以下四类字符中的三类:大写字母、小写字母、数字和特殊字符:!@#$%^&*()_+-='
    ConstraintDescription:
      en: 'The password must be 8 to 32 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters: !@#$%^&*()_+-='
      zh-cn: '密码长度为 8 至 32 位,且至少包含以下四类字符中的三类:大写字母、小写字母、数字和特殊字符:!@#$%^&*()_+-='
    MaxLength: 32
    MinLength: 8
    NoEcho: true
    Label:
      en: Instance Password
      zh-cn: 实例密码
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: 内部エンドポイント。
    Value:
      Fn::GetAtt:
        - MemcacheInstance
        - ConnectionDomain
  InstanceId:
    Value:
      Fn::GetAtt:
        - MemcacheInstance
        - InstanceId
  QPS:
    Value:
      Fn::GetAtt:
        - MemcacheInstance
        - QPS
  Port:
    Value:
      Fn::GetAtt:
        - MemcacheInstance
        - Port

JSON 形式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "en": "Alibaba Cloud Resource Orchestration Service (ROS) sample template: Create a Memcache instance of the VPC type.",
    "zh-cn": "阿里云资源编排服务 (ROS) 示例模板:创建一台 VPC 类型的 Memcache 实例。"
  },
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "Description": {
        "zh-cn": "实例创建所属的可用区,请确认该可用区支持创建 Memcache 实例资源规格。",
        "en": "The availability zone to which the instance belongs. Make sure that the availability zone supports creating Memcache resource specifications."
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "Label": {
        "en": "Zone ID",
        "zh-cn": "可用区"
      }
    },
    "VPC": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Description": {
        "zh-cn": "已有 VPC 实例的 ID,可通过 VPC 控制台查询。",
        "en": "The ID of an existing VPC. You can query the ID in the VPC console."
      },
      "Label": {
        "zh-cn": "已有 VPC 实例 ID",
        "en": "Existing VPC Instance ID"
      }
    },
    "VSwitch": {
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "Type": "String",
      "Description": {
        "zh-cn": "已有 vSwitch 实例的 ID,可通过 VPC 控制台的 VSwitch 查询。",
        "en": "The ID of an existing vSwitch. You can query the ID on the vSwitches page of the VPC console."
      },
      "Label": {
        "zh-cn": "交換机 ID",
        "en": "Existing VSwitch ID"
      },
      "AssociationPropertyMetadata": {
        "VpcId": "VPC",
        "ZoneId": "ZoneId"
      }
    },
    "InstanceClass": {
      "Type": "String",
      "Description": {
        "en": "Instance specification.",
        "zh-cn": "实例规格。"
      },
      "Default": "memcache.master.small.default",
      "Label": {
        "zh-cn": "实例规格",
        "en": "Instance Type"
      }
    },
    "Password": {
      "Type": "String",
      "Description": {
        "en": "The password must be 8 to 32 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters: !@#$%^&*()_+-=",
        "zh-cn": "密码长度为 8 至 32 位,且至少包含以下四类字符中的三类:大写字母、小写字母、数字和特殊字符:!@#$%^&*()_+-="
      },
      "ConstraintDescription": {
        "en": "The password must be 8 to 32 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters: !@#$%^&*()_+-=",
        "zh-cn": "密码长度为 8 至 32 位,且至少包含以下四类字符中的三类:大写字母、小写字母、数字和特殊字符:!@#$%^&*()_+-="
      },
      "MaxLength": 32,
      "MinLength": 8,
      "NoEcho": true,
      "Label": {
        "en": "Instance Password",
        "zh-cn": "实例密码"
      }
    }
  },
  "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": "内部エンドポイント。",
      "Value": {
        "Fn::GetAtt": [
          "MemcacheInstance",
          "ConnectionDomain"
        ]
      }
    },
    "InstanceId": {
      "Value": {
        "Fn::GetAtt": [
          "MemcacheInstance",
          "InstanceId"
        ]
      }
    },
    "QPS": {
      "Value": {
        "Fn::GetAtt": [
          "MemcacheInstance",
          "QPS"
        ]
      }
    },
    "Port": {
      "Value": {
        "Fn::GetAtt": [
          "MemcacheInstance",
          "Port"
        ]
      }
    }
  }
}