全部产品
Search
文档中心

Resource Orchestration Service:ALIYUN::SLB::LoadBalancer

更新时间:Feb 07, 2026

Gunakan tipe resource ALIYUN::SLB::LoadBalancer untuk membuat instance SLB.

Sintaks

{
  "Type": "ALIYUN::SLB::LoadBalancer",
  "Properties": {
    "DeletionProtection": Boolean,
    "AddressType": String,
    "Tags": List,
    "InternetChargeType": String,
    "Bandwidth": Integer,
    "SlaveZoneId": String,
    "ResourceGroupId": String,
    "VpcId": String,
    "LoadBalancerName": String,
    "VSwitchId": String,
    "LoadBalancerSpec": String,
    "MasterZoneId": String,
    "ModificationProtectionReason": String,
    "ModificationProtectionStatus": String,
    "AddressIPVersion": String,
    "InstanceChargeType": String
  }
}

Properti

Property name

Type

Required

Update allowed

Description

Constraint

ResourceGroupId

String

No

Yes

ID kelompok sumber daya.

None

DeletionProtection

Boolean

No

Yes

Menentukan apakah perlindungan penghapusan diaktifkan.

Nilai yang valid:

  • true: mengaktifkan perlindungan penghapusan.

  • false (default): menonaktifkan perlindungan penghapusan.

VpcId

String

No

No

ID VPC.

None

SlaveZoneId

String

No

No

ID zona instance SLB.

None

Bandwidth

Integer

No

Yes

Bandwidth puncak untuk instance publik yang menggunakan metode penagihan pay-by-bandwidth.

Nilai yang valid: 1 hingga 10000.

Unit: Mbit/s.

Nilai default: 1.

Untuk instance VPC, parameter ini secara default diatur ke pay-by-data-transfer.

  • Untuk instance publik yang menggunakan metode penagihan pay-by-bandwidth, Anda harus mengalokasikan nilai bandwidth yang ditentukan ke listener menggunakan parameter Bandwidth di setiap listener sebelum pengaturan berlaku.

  • Untuk instance publik yang menggunakan metode penagihan pay-by-data-transfer, tentukan bandwidth puncak langsung menggunakan parameter Bandwidth di setiap listener. Parameter ini diabaikan.

AddressType

String

No

No

Jenis alamat instance SLB.

Nilai yang valid:

  • internet (default): Instance SLB memiliki alamat IP publik. Nama domainnya meresolusi ke alamat IP publik. Anda dapat mengakses instance SLB melalui Internet.

  • intranet: Instance SLB hanya memiliki alamat IP pribadi. Nama domainnya meresolusi ke alamat IP pribadi. Anda hanya dapat mengakses instance SLB dari sumber daya dalam VPC yang sama.

VSwitchId

String

No

No

ID vSwitch.

None

LoadBalancerName

String

No

Yes

Nama instance SLB.

Panjang: 1 hingga 80 karakter. Karakter yang valid mencakup huruf, angka, tanda hubung (-), garis miring (/), titik (.), dan garis bawah (_).

Jika Anda tidak menentukan parameter ini, sistem akan memberikan nama secara otomatis.

InternetChargeType

String

No

Yes

Metode penagihan untuk instance publik.

Nilai yang valid:

  • paybybandwidth: pay-by-bandwidth.

  • paybytraffic (default): pay-by-data-transfer.

MasterZoneId

String

No

No

ID zona primer instance.

None

Tags

List

No

Yes

Tag instance SLB.

Anda dapat menambahkan hingga lima tag.

Untuk informasi selengkapnya, lihat properti Tags.

LoadBalancerSpec

String

No

Yes

Spesifikasi instance SLB.

Nilai yang valid:

  • slb.s1.small (default)

  • slb.s2.small

  • slb.s2.medium

  • slb.s3.small

  • slb.s3.medium

  • slb.s3.large

  • slb.s3.xlarge

  • slb.s3.xxlarge

Spesifikasi yang didukung bervariasi berdasarkan wilayah. Untuk detail setiap spesifikasi, lihat instance guaranteed-performance.

ModificationProtectionStatus

String

No

Yes

Anda dapat memodifikasi status perlindungan.

Nilai yang valid:

  • NonProtection (default): menonaktifkan perlindungan modifikasi.

  • ConsoleProtection: memungkinkan modifikasi melalui console.

ModificationProtectionReason

String

No

Yes

Alasan mengaktifkan perlindungan modifikasi.

Panjang: 1 hingga 80 karakter. Harus dimulai dengan huruf atau karakter Tionghoa. Karakter yang valid mencakup huruf, karakter Tionghoa, angka, titik (.), dan tanda hubung (-).

AddressIPVersion

String

No

No

Versi IP.

Nilai yang valid:

  • ipv4

  • ipv6

    Catatan

    Jika Anda menentukan ipv6, periksa wilayah dan batasan yang didukung.

InstanceChargeType

String

No

Yes

Metode penagihan untuk instance.

Nilai yang valid:

  • PayBySpec (default): pay-by-specification.

  • PayByCLCU: Anda dikenai biaya berdasarkan Load Balancer Capacity Unit (LCU) instance.

Sintaks Tags

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

Properti Tags

Property name

Type

Required

Update allowed

Description

Constraint

Key

String

Yes

No

kunci tag.

Panjang: 1 hingga 64 karakter. Tidak boleh dimulai dengan aliyun atau acs:. Tidak boleh mengandung http:// atau https://.

Value

String

No

No

nilai tag.

Panjang: 0 hingga 128 karakter. Tidak boleh dimulai dengan aliyun atau acs:. Tidak boleh mengandung http:// atau https://.

Nilai kembalian

Fn::GetAtt

  • LoadBalancerId: ID instance SLB.

  • NetworkType: jenis jaringan instance SLB.

  • AddressType: jenis alamat instance SLB.

  • IpAddress: alamat IP instance SLB.

  • OrderId: ID pesanan.

  • Bandwidth: bandwidth puncak.

  • AddressIPVersion: versi IP instance SLB.

  • SlaveZoneId: ID zona sekunder instance SLB.

  • MasterZoneId: ID zona primer instance SLB.

  • LoadBalancerName: nama instance SLB.

  • ResourceGroupId: ID kelompok sumber daya.

  • LoadBalancerSpec: spesifikasi instance SLB.

  • VpcId: ID VPC tempat instance SLB berada.

  • VSwitchId: ID vSwitch tempat instance SLB berada.

  • PayType: metode penagihan instance.

Contoh

Skenario 1: Buat instance SLB.

Buat cepat

ROSTemplateFormatVersion: '2015-09-01'
Description: Test SLB LoadBalancer
Parameters:
  MasterZoneId:
    Type: String
    AssociationProperty: ALIYUN::ECS::Instance:ZoneId
Resources:
  LoadBalance:
    Type: ALIYUN::SLB::LoadBalancer
    Properties:
      AddressType: internet
      LoadBalancerSpec: slb.s1.small
      MasterZoneId:
        Ref: MasterZoneId
      LoadBalancerName: mytest
Outputs: {}
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "Test SLB LoadBalancer",
  "Parameters": {
    "MasterZoneId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId"
    }
  },
  "Resources": {
    "LoadBalance": {
      "Type": "ALIYUN::SLB::LoadBalancer",
      "Properties": {
        "AddressType": "internet",
        "LoadBalancerSpec": "slb.s1.small",
        "MasterZoneId": {
          "Ref": "MasterZoneId"
        },
        "LoadBalancerName": "mytest"
      }
    }
  },
  "Outputs": {
  }
}

Skenario 2: Buat grup instance ECS dan sambungkan ke instance SLB.

Buat cepat

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: Buat grup instance ECS dengan konfigurasi fleksibel dan bind otomatis ke tiga instance SLB untuk mencapai load balancing.
  en: Create an ECS instance group with flexible configuration and automatically bind to three SLB instances to achieve load balancing.
Parameters:
  ZoneId:
    Type: String
    Default: null
    Required: true
    Label:
      en: Availability Zone
      zh-cn: Zona tersedia
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
    AssociationPropertyMetadata:
      AutoSelectFirst: true
  VpcId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
  VSwitchId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      ZoneId: ${ZoneId}
      VpcId: ${VpcId}
  SecurityGroupId:
    Type: String
    Label:
      en: Business Security Group ID
      zh-cn: ID security group bisnis
    AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
  InstanceType:
    Type: String
    Label: Tipe Instance ECS
    AssociationProperty: ALIYUN::ECS::Instance::InstanceType
    AssociationPropertyMetadata:
      ZoneId: ZoneId
  Password:
    Type: String
    Label: Kata Sandi Instance ECS
    AssociationProperty: ALIYUN::ECS::Instance::Password
  SlbInstanceId:
    AssociationProperty: ALIYUN::SLB::LoadBalancer::LoadBalancerId
    Type: String
Resources:
  InstanceGroup:
    Type: ALIYUN::ECS::InstanceGroup
    Properties:
      VpcId:
        Ref: VpcId
      VSwitchId:
        Ref: VSwitchId
      SecurityGroupId:
        Ref: SecurityGroupId
      ImageId: centos_7
      AllocatePublicIP: 'false'
      MaxAmount: 2
      Password:
        Ref: Password
      InstanceType:
        Ref: InstanceType
      SystemDiskCategory: cloud_essd
      UserData:
        Fn::Join:
        - ''
        - - '#!/bin/sh

            '
          - 'ip_addr=`ifconfig eth0 | awk ''/inet /{print $2}''`

            '
          - 'host_name=`hostname`

            '
          - 'echo "$ip_addr $host_name" >> /etc/hosts

            '
  AttachmentECSToSLB:
    Type: ALIYUN::SLB::BackendServerAttachment
    Properties:
      LoadBalancerId:
        Ref: SlbInstanceId
      BackendServerList:
        Fn::GetAtt:
        - InstanceGroup
        - InstanceIds
      BackendServerWeightList:
      - '100'
Outputs:
  InstanceIds:
    Description: Daftar ID instance ECS yang dibuat.
    Value:
      Fn::GetAtt:
      - InstanceGroup
      - InstanceIds
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "zh-cn": "Buat grup instance ECS dengan konfigurasi fleksibel dan bind otomatis ke tiga instance SLB untuk mencapai load balancing.",
    "en": "Create an ECS instance group with flexible configuration and automatically bind to three SLB instances to achieve load balancing."
  },
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "Default": null,
      "Required": true,
      "Label": {
        "en": "Availability Zone",
        "zh-cn": "Zona tersedia"
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "AssociationPropertyMetadata": {
        "AutoSelectFirst": true
      }
    },
    "VpcId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "VSwitchId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "ZoneId": "${ZoneId}",
        "VpcId": "${VpcId}"
      }
    },
    "SecurityGroupId": {
      "Type": "String",
      "Label": {
        "en": "Business Security Group ID",
        "zh-cn": "ID security group bisnis"
      },
      "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}"
      }
    },
    "InstanceType": {
      "Type": "String",
      "Label": "Tipe Instance ECS",
      "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
      "AssociationPropertyMetadata": {
        "ZoneId": "ZoneId"
      }
    },
    "Password": {
      "Type": "String",
      "Label": "Kata Sandi Instance ECS",
      "AssociationProperty": "ALIYUN::ECS::Instance::Password"
    },
    "SlbInstanceId": {
      "AssociationProperty": "ALIYUN::SLB::LoadBalancer::LoadBalancerId",
      "Type": "String"
    }
  },
  "Resources": {
    "InstanceGroup": {
      "Type": "ALIYUN::ECS::InstanceGroup",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "SecurityGroupId": {
          "Ref": "SecurityGroupId"
        },
        "ImageId": "centos_7",
        "AllocatePublicIP": "false",
        "MaxAmount": 2,
        "Password": {
          "Ref": "Password"
        },
        "InstanceType": {
          "Ref": "InstanceType"
        },
        "SystemDiskCategory": "cloud_essd",
        "UserData": {
          "Fn::Join": [
            "",
            [
              "#!/bin/sh\n",
              "ip_addr=`ifconfig eth0 | awk '/inet /{print $2}'`\n",
              "host_name=`hostname`\n",
              "echo \"$ip_addr $host_name\" >> /etc/hosts\n"
            ]
          ]
        }
      }
    },
    "AttachmentECSToSLB": {
      "Type": "ALIYUN::SLB::BackendServerAttachment",
      "Properties": {
        "LoadBalancerId": {
          "Ref": "SlbInstanceId"
        },
        "BackendServerList": {
          "Fn::GetAtt": [
            "InstanceGroup",
            "InstanceIds"
          ]
        },
        "BackendServerWeightList": [
          "100"
        ]
      }
    }
  },
  "Outputs": {
    "InstanceIds": {
      "Description": "Daftar ID instance ECS yang dibuat.",
      "Value": {
        "Fn::GetAtt": [
          "InstanceGroup",
          "InstanceIds"
        ]
      }
    }
  }
}

Skenario 3: Buat rencana perlindungan website e-commerce.

Buat cepat

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: Kembangkan rencana perlindungan website e-commerce, mencakup sumber daya Virtual Private Cloud (VPC), Elastic Compute Service (ECS), Server Load Balancer (SLB), dan Relational Database Service (RDS). Terapkan langkah-langkah untuk mencegah scalper mengeksploitasi promosi, memastikan stabilitas layanan dan keaslian diskon. Deploy di beberapa zona ketersediaan untuk redundansi dan ketersediaan tinggi.
  en: Develop an e-commerce website protection plan, encompassing Virtual Private Cloud (VPC), Elastic Compute Service (ECS), Server Load Balancer (SLB), and Relational Database Service (RDS) resources. Implement measures to prevent scalpers from exploiting promotions, ensuring service stability and the authenticity of discounts. Deploy across multiple availability zones for redundancy and high availability.
Parameters:
  VpcCidrBlock:
    Type: String
    Label:
      en: VPC CIDR Block
      zh-cn: Blok CIDR VPC
    Description:
      en: 'The IP address range of the VPC in the CIDR Block form; 
You can use the following IP address ranges: <br><font color=''green''>[10.0.0.0/8]</font><br><font color=''green''>[172.16.0.0/12]</font><br><font color=''green''>[192.168.0.0/16]</font>' zh-cn: Rentang alamat IP VPC dalam notasi CIDR.<br>Anda dapat menggunakan rentang alamat IP berikut:<br><font color='green'>[10.0.0.0/8]</font><br><font color='green'>[172.16.0.0/12]</font><br><font color='green'>[192.168.0.0/16]</font> Default: 192.168.0.0/16 AllowedValues: - 10.0.0.0/8 - 172.16.0.0/12 - 192.168.0.0/16 VSwitchZoneId: Type: String Label: en: Master Zone zh-cn: Zona primer Description: en: 'Availability Zone ID;<br><b>Note: <font color=''blue''>Before selecting an availability zone, verify that it supports the required specifications for creating SLB, RDS, and ECS resources.</font>' zh-cn: ID zona ketersediaan.<br/><b>Catatan: <font color='blue'>Sebelum memilih zona ketersediaan, pastikan zona tersebut mendukung spesifikasi yang diperlukan untuk membuat sumber daya SLB, RDS, dan ECS.</font> AssociationProperty: ALIYUN::ECS::Instance:ZoneId VswCidrBlock: Type: String Label: en: Master Zone CIDR Block zh-cn: Blok CIDR zona primer Description: en: Must be a subnet segment that belongs to the VPC and is not occupied by another vSwitch. zh-cn: Harus berupa segmen subnet yang termasuk dalam VPC dan tidak digunakan oleh vSwitch lain. Default: 192.168.1.0/24 VSwitchZoneId2: Type: String Label: en: Slave Zone zh-cn: Zona sekunder Description: en: 'Availability Zone ID,<br/><b>Note: <font color=''blue''>Before selecting an availability zone, verify that it supports the required specifications for creating SLB resources and differs from the primary zone.</font>' zh-cn: ID zona ketersediaan.<br/><b>Catatan: <font color='blue'>Sebelum memilih zona ketersediaan, pastikan zona tersebut mendukung spesifikasi yang diperlukan untuk membuat sumber daya SLB dan berbeda dari zona primer.</font> AssociationProperty: ALIYUN::ECS::Instance:ZoneId VswCidrBlock2: Type: String Label: en: Slave Zone CIDR Block zh-cn: Blok CIDR zona sekunder Description: en: Must be a subnet segment that belongs to the VPC and is not occupied by another vSwitch. zh-cn: Harus berupa segmen subnet yang termasuk dalam VPC dan tidak digunakan oleh vSwitch lain. Default: 192.168.2.0/24 EcsInstanceType: Type: String Label: en: Instance Type zh-cn: Tipe instans Description: en: 'Enter the instance types available in the vSwitch availability zone.</font>
General-purpose instance types: <font color=''red''><b>ecs.g5.xlarge</font><br/>Note: Some zones do not support general-purpose instance types.<br>For details, see <a href=''https://www.alibabacloud.com/help/en/doc-detail/25378.html'' target=''_blank''><b><font color=''blue''>Instance family</font></a>' zh-cn: Masukkan tipe instans yang tersedia di zona ketersediaan vSwitch.<br/>Tipe instans tujuan umum: <font color='red'><b>ecs.g5.xlarge</font><br/>Catatan: Beberapa zona tidak mendukung tipe instans tujuan umum.<br>Untuk detailnya, lihat <a href='https://www.alibabacloud.com/help/document_detail/25378.html' target='_blank'><b><font color='blue'>keluarga instans</font></a> AssociationProperty: ALIYUN::ECS::Instance::InstanceType AssociationPropertyMetadata: ZoneId: VSwitchZoneId ECSImageId: Type: String Label: en: Application Server Image zh-cn: Gambar server aplikasi Description: en: 'Server instance image ID.
[Shanghai: <font color=''green''>m-uf6j125b6mhvg27jo58a</font>]<br>[Hangzhou: <font color=''green''>m-bp1h0ys627i2ke0dx0t1</font>]<br>[Beijing: <font color=''green''>m-2zeir96eip2yw414w1jd</font>]<br>[Qingdao: <font color=''green''>m-m5e81ywnfuk84x1r7v0n</font>]<br>[Shenzhen: <font color=''green''>m-wz98u1criwvafhq3ctfm</font>]<br>[Zhangjiakou: <font color=''green''>m-8vbg3h5yp5ncag0q31lt</font>]<br>[Hohhot: <font color=''green''>m-hp34cnncgeiowbkzpmic</font>]<br>[Hong Kong: <font color=''green''>m-j6c0e5hkfmzk6d8bfss1</font>]<br>[US (Silicon Valley): <font color=''green''>m-rj981ywnfuk84x1r7v0p</font>]<br>Note: For more images, see <b><a href=''https://marketplace.alibabacloud.com/products?keywords=magento'' target=''_blank''><font color=''blue''>Magento image</font></a>' zh-cn: ID gambar instance server.<br/>Nama gambar Alibaba Cloud Marketplace: Sistem E-dagang Open Source Magento (LAMP | paket bahasa Tionghoa)<br><b>Nilai contoh:<br/>[Shanghai: <font color='green'>m-uf6j125b6mhvg27jo58a</font>]<br>[Hangzhou: <font color='green'>m-bp1h0ys627i2ke0dx0t1</font>]<br>[Beijing: <font color='green'>m-2zeir96eip2yw414w1jd</font>]<br>[Qingdao: <font color='green'>m-m5e81ywnfuk84x1r7v0n</font>]<br>[Shenzhen: <font color='green'>m-wz98u1criwvafhq3ctfm</font>]<br>[Zhangjiakou: <font color='green'>m-8vbg3h5yp5ncag0q31lt</font>]<br>[Hohhot: <font color='green'>m-hp34cnncgeiowbkzpmic</font>]<br>[Hong Kong: <font color='green'>m-j6c0e5hkfmzk6d8bfss1</font>]<br>[AS (Silicon Valley): <font color='green'>m-rj981ywnfuk84x1r7v0p</font>]<br>Catatan: Untuk gambar lainnya, lihat <b><a href='https://market.aliyun.com/products/53616009/cmjj00038197.html' target='_blank'><font color='blue'>gambar Magento</font></a> SystemDiskCategory: Type: String Label: en: Disk Type zh-cn: Jenis disk Description: en: '<font color=''blue''><b>Valid values:</font>
[cloud_efficiency: <font color=''green''>Ultra disk</font>]<br>[cloud_ssd: <font color=''green''>Standard SSD</font>]<br>[cloud_essd: <font color=''green''>Enterprise SSD</font>]<br>[cloud: <font color=''green''>Basic disk</font>]<br>[ephemeral_ssd: <font color=''green''>Local SSD</font>]' zh-cn: '<font color=''blue''><b>Nilai yang valid:</font><br/>[cloud_efficiency: <font color=''green''>Ultra disk</font>]<br>[cloud_ssd: <font color=''green''>Standard SSD</font>]<br>[cloud_essd: <font color=''green''>Enterprise SSD</font>]<br>[cloud: <font color=''green''>Disk dasar</font>]<br>[ephemeral_ssd: <font color=''green''>SSD lokal</font>]' Default: cloud_efficiency AllowedValues: - cloud_efficiency - cloud_ssd - cloud - cloud_essd - ephemeral_ssd SystemDiskSize: Type: Number Label: en: System Disk Size zh-cn: Ukuran disk sistem Description: en: 'System disk size. Valid values: 40 to 500. Unit: GB.' zh-cn: Ukuran disk sistem. Nilai yang valid: 40 hingga 500. Satuan: GB. ConstraintDescription: en: 'Valid values: 40 to 500. Unit: GB.' zh-cn: Nilai yang valid: 40 hingga 500. Satuan: GB. Default: 40 MinValue: 40 MaxValue: 500 EcsPassword: Type: String Label: en: Login Password zh-cn: Kata sandi logon Description: en: 'Server logon password. Length: 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters ()`~!@#$%^&*_-+=| {}[]:;' <>,.? / .' zh-cn: Kata sandi logon server. Panjang: 8 hingga 30 karakter. Harus mengandung minimal tiga dari berikut ini: huruf kapital, huruf kecil, angka, dan karakter khusus ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/. ConstraintDescription: en: 'Length: 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters ()`~!@#$%^&*_-+=| {}[]:;' <>,.? / .' zh-cn: Panjang: 8 hingga 30 karakter. Harus mengandung minimal tiga dari berikut ini: huruf kapital, huruf kecil, angka, dan karakter khusus ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/. AssociationProperty: 'ALIYUN::ECS::Instance::Password' LoadBalancerName: Type: String Label: en: Instance Name zh-cn: Nama instans Description: en: 'Length: 1 to 80 characters. Valid characters include letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).' zh-cn: Panjang: 1 hingga 80 karakter. Karakter yang valid mencakup huruf, angka, tanda hubung (-), garis miring (/), titik (.), dan garis bawah (_). Default: slb001 LoadBalancerSpec: Type: String Label: en: Specifications zh-cn: Spesifikasi Description: en: 'Instance specifications.</br>For details, see <a href=''https://www.alibabacloud.com/help/doc-detail/85939.html'' target=''_blank''><b><font color=''blue''>Guaranteed-performance instance</font></a>' zh-cn: Spesifikasi instans.</br>Untuk detailnya, lihat <a href='https://www.alibabacloud.com/help/document_detail/85939.html' target='_blank'><b><font color='blue'>instans guaranteed-performance</font></a> Default: slb.s1.small DBInstanceEngineAndVersion: Type: String Label: en: Type And Version zh-cn: Jenis dan versi Description: en: Database engine type and version number. zh-cn: Jenis mesin database dan nomor versi. Default: MySQL-5.6 AllowedValues: - MySQL-5.5 - MySQL-5.6 - MySQL-5.7 - MySQL-8.0 DBInstanceClass: Type: String Label: en: Specifications zh-cn: Spesifikasi Description: en: 'Select the instance specification based on the database engine type and region support.
For details, see <a href=''https://www.alibabacloud.com/help/doc-detail/26312.html'' target=''_blank''><b><font color=''blue''>Instance specification sheet</font></a>' zh-cn: Pilih spesifikasi instans berdasarkan jenis mesin database dan dukungan wilayah.<br/>Untuk detailnya, lihat <a href='https://www.alibabacloud.com/help/document_detail/26312.html' target='_blank'><b><font color='blue'>lembar spesifikasi instans</font></a> Default: rds.mysql.s2.large DBInstanceStorage: Type: Number Label: en: Storage Space zh-cn: storage space Description: en: 'Database storage space. Unit: GB. Increments: 5 GB. Valid values: 5 to 1000.' zh-cn: storage space database. Satuan: GB. Kelipatan: 5 GB. Nilai yang valid: 5 hingga 1000. ConstraintDescription: en: 'Database storage space. Unit: GB. Increments: 5 GB. Valid values: 5 to 1000.' zh-cn: storage space database. Satuan: GB. Kelipatan: 5 GB. Nilai yang valid: 5 hingga 1000. Default: 5 MinValue: 5 MaxValue: 1000 RdsUserPassword: Type: String Label: en: Password zh-cn: password Description: en: 'The privileged account password for the database instance. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters !@#$%^&*()_+-=. Length: 8 to 32 characters.' zh-cn: password akun istimewa untuk instansiasi basis data. Harus mengandung minimal tiga dari berikut ini: huruf kapital, huruf kecil, angka, dan karakter khusus !@#$%^&*()_+-=. Panjang: 8 hingga 32 karakter. AssociationProperty: ALIYUN::RDS::Instance::AccountPassword ConstraintDescription: en: 'Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters !@#$%^&*()_+-=. Length: 8 to 32 characters.' zh-cn: Harus mengandung minimal tiga dari berikut ini: huruf kapital, huruf kecil, angka, dan karakter khusus !@#$%^&*()_+-=. Panjang: 8 hingga 32 karakter. MinLength: 8 MaxLength: 32 NoEcho: true DBName: Type: String Label: en: Database Name zh-cn: Nama database Description: en: 'Database name. Consists of lowercase letters, digits, and hyphens (-) or underscores (_). Must start with a letter and end with a letter or digit. Maximum length: 64 characters.' zh-cn: Nama database. Terdiri dari huruf kecil, angka, dan tanda hubung (-) atau garis bawah (_). Harus dimulai dengan huruf dan diakhiri dengan huruf atau angka. Panjang maksimum: 64 karakter. Default: db_magento RdsUserType: Type: String Label: en: Account Type zh-cn: Jenis akun Description: en: '<b>Database account type. <font color=''blue''>Valid values:</font><br/>[Normal: <font color=''green''>Standard account</font>]<br>[Super: <font color=''green''>Privileged account</font>]' zh-cn: '<b>Jenis akun database. <font color=''blue''>Nilai yang valid:</font><br>[Normal: <font color=''green''>Akun standar</font>]<br>[Super: <font color=''green''>Akun istimewa</font>]' Default: Normal AllowedValues: - Super - Normal RdsUserName: Type: String Label: en: Database Account zh-cn: Akun database Description: en: 'Database account name. Consists of lowercase letters, digits, and underscores (_). Must start with a letter and end with a letter or digit. Length: 2 to 16 characters.' zh-cn: Nama akun database. Terdiri dari huruf kecil, angka, dan garis bawah (_). Harus dimulai dengan huruf dan diakhiri dengan huruf atau angka. Panjang: 2 hingga 16 karakter. Default: account_magento MinLength: 2 MaxLength: 16 Resources: Vpc: Type: ALIYUN::ECS::VPC Properties: CidrBlock: Ref: VpcCidrBlock VpcName: Fn::Join: - '-' - - Stack - Ref: ALIYUN::StackId SecurityGroup: Type: ALIYUN::ECS::SecurityGroup Properties: VpcId: Ref: Vpc SecurityGroupIngress: - IpProtocol: tcp Policy: accept PortRange: 3389/3389 Priority: 1 SourceCidrIp: 0.0.0.0/0 Tags: - Key: best_practice Value: '065' VSwitch: Type: ALIYUN::ECS::VSwitch Properties: ZoneId: Ref: VSwitchZoneId VpcId: Ref: Vpc CidrBlock: Ref: VswCidrBlock VSwitchName: Fn::Join: - '-' - - Stack - Ref: ALIYUN::StackId - Fn::Select: - '2' - Fn::Split: - '-' - Ref: VSwitchZoneId ECS: Type: ALIYUN::ECS::Instance Properties: ZoneId: Ref: VSwitchZoneId VpcId: Ref: Vpc VSwitchId: Ref: VSwitch SecurityGroupId: Ref: SecurityGroup ImageId: Ref: ECSImageId AllocatePublicIP: true HostName: APP001 InstanceName: APP001 InstanceType: Ref: EcsInstanceType InternetChargeType: PayByTraffic Password: Ref: EcsPassword SystemDiskCategory: Ref: SystemDiskCategory SystemDiskSize: Ref: SystemDiskSize Tags: - Key: '065' Value: best_practice SLBLoadBalance: Type: ALIYUN::SLB::LoadBalancer Properties: VpcId: Ref: Vpc AddressType: internet InternetChargeType: paybytraffic LoadBalancerName: Ref: LoadBalancerName LoadBalancerSpec: Ref: LoadBalancerSpec MasterZoneId: Ref: VSwitchZoneId PayType: PayOnDemand SlaveZoneId: Ref: VSwitchZoneId2 Tags: - Key: '065' Value: best_practice BackendServerAttachment: Type: ALIYUN::SLB::BackendServerAttachment Properties: BackendServerList: - Ref: ECS BackendServerWeightList: - 100 LoadBalancerId: Ref: SLBLoadBalance DependsOn: - ECS - SLBLoadBalance Listener: Type: ALIYUN::SLB::Listener Properties: BackendServerPort: 80 Bandwidth: -1 ListenerPort: 80 LoadBalancerId: Ref: SLBLoadBalance Protocol: http DependsOn: SLBLoadBalance RdsDBInstance: Type: ALIYUN::RDS::DBInstance Properties: VpcId: Ref: Vpc VSwitchId: Ref: VSwitch DBInstanceClass: Ref: DBInstanceClass DBInstanceStorage: Ref: DBInstanceStorage DBMappings: - CharacterSetName: utf8 DBName: Ref: DBName Engine: Fn::Select: - '0' - Fn::Split: - '-' - Ref: DBInstanceEngineAndVersion EngineVersion: Fn::Select: - '1' - Fn::Split: - '-' - Ref: DBInstanceEngineAndVersion MasterUserPassword: Ref: RdsUserPassword MasterUserType: Ref: RdsUserType MasterUsername: Ref: RdsUserName MultiAZ: true SecurityIPList: Ref: VpcCidrBlock Tags: Key: best_practice Value: '065' Outputs: ECSPublicIP: Description: Alamat IP publik server Magento Value: Fn::GetAtt: - ECS - PublicIp Metadata: ALIYUN::ROS::Interface: ParameterGroups: - Parameters: - VpcCidrBlock - VSwitchZoneId - VswCidrBlock - VSwitchZoneId2 - VswCidrBlock2 Label: default: VPC - Parameters: - EcsInstanceType - ECSImageId - SystemDiskCategory - SystemDiskSize - EcsPassword Label: default: ECS - Parameters: - LoadBalancerName - LoadBalancerSpec Label: default: SLB - Parameters: - DBInstanceEngineAndVersion - DBInstanceClass - DBInstanceStorage - RdsUserPassword - DBName - RdsUserType - RdsUserName Label: default: RDS TemplateTags: - acs:solution:security&compliance:e-commerce website business security<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "zh-cn": "Kembangkan rencana perlindungan website e-commerce, mencakup sumber daya Virtual Private Cloud (VPC), Elastic Compute Service (ECS), Server Load Balancer (SLB), dan Relational Database Service (RDS). Terapkan langkah-langkah untuk mencegah scalper mengeksploitasi promosi, memastikan stabilitas layanan dan keaslian diskon. Deploy di beberapa zona ketersediaan untuk redundansi dan ketersediaan tinggi.",
    "en": "Develop an e-commerce website protection plan, encompassing Virtual Private Cloud (VPC), Elastic Compute Service (ECS), Server Load Balancer (SLB), and Relational Database Service (RDS) resources. Implement measures to prevent scalpers from exploiting promotions, ensuring service stability and the authenticity of discounts. Deploy across multiple availability zones for redundancy and high availability."
  },
  "Parameters": {
    "VpcCidrBlock": {
      "Type": "String",
      "Label": {
        "en": "VPC CIDR Block",
        "zh-cn": "Blok CIDR VPC"
      },
      "Description": {
        "en": "The IP address range of the VPC in the CIDR Block form; 
You can use the following IP address ranges: <br><font color='green'>[10.0.0.0/8]</font><br><font color='green'>[172.16.0.0/12]</font><br><font color='green'>[192.168.0.0/16]</font>", "zh-cn": "Rentang alamat IP VPC dalam notasi CIDR.<br>Anda dapat menggunakan rentang alamat IP berikut:<br><font color='green'>[10.0.0.0/8]</font><br><font color='green'>[172.16.0.0/12]</font><br><font color='green'>[192.168.0.0/16]</font>" }, "Default": "192.168.0.0/16", "AllowedValues": [ "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16" ] }, "VSwitchZoneId": { "Type": "String", "Label": { "en": "Master Zone", "zh-cn": "Zona primer" }, "Description": { "en": "Availability Zone ID;<br><b>Note: <font color='blue'>Before selecting an availability zone, verify that it supports the required specifications for creating SLB、RDS、ECS resources.</font>", "zh-cn": "ID zona ketersediaan.<br/><b>Catatan: <font color='blue'>Sebelum memilih zona ketersediaan, pastikan zona tersebut mendukung spesifikasi yang diperlukan untuk membuat sumber daya SLB、RDS、ECS.</font>" }, "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId" }, "VswCidrBlock": { "Type": "String", "Label": { "en": "Master Zone CIDR Block", "zh-cn": "Blok CIDR zona primer" }, "Description": { "en": "Must be a subnet segment that belongs to a proprietary network and is not occupied by another vSwitch.", "zh-cn": "Harus berupa segmen subnet yang termasuk dalam VPC dan tidak digunakan oleh vSwitch lain." }, "Default": "192.168.1.0/24" }, "VSwitchZoneId2": { "Type": "String", "Label": { "en": "Slave Zone", "zh-cn": "Zona sekunder" }, "Description": { "en": "Availability Zone ID,<br/><b>Note: <font color='blue'>Before selecting an availability zone, verify that it supports the required specifications for creating SLB resources, not the same as the primary zone.</font>", "zh-cn": "ID zona ketersediaan.<br/><b>Catatan: <font color='blue'>Sebelum memilih zona ketersediaan, pastikan zona tersebut mendukung spesifikasi yang diperlukan untuk membuat sumber daya SLB dan berbeda dari zona primer.</font>" }, "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId" }, "VswCidrBlock2": { "Type": "String", "Label": { "en": "Slave Zone CIDR Block", "zh-cn": "Blok CIDR zona sekunder" }, "Description": { "en": "Must be a subnet segment that belongs to a proprietary network and is not occupied by another vSwitch.", "zh-cn": "Harus berupa segmen subnet yang termasuk dalam VPC dan tidak digunakan oleh vSwitch lain." }, "Default": "192.168.2.0/24" }, "EcsInstanceType": { "Type": "String", "Label": { "en": "Instance Type", "zh-cn": "Tipe instans" }, "Description": { "en": "Fill in the specifications that can be used under the vSwitch availability zone;</font>
general-purpose instance types: <font color='red'><b>ecs.g5.xlarge</font><br/>note: a few zones do not support general-purpose instance types<br>see detail: <a href='https://www.alibabacloud.com/help/en/doc-detail/25378.html' target='_blank'><b><font color='blue'>Instance family</font></a>", "zh-cn": "Masukkan tipe instans yang tersedia di zona ketersediaan vSwitch.<br/>Tipe instans tujuan umum: <font color='red'><b>ecs.g5.xlarge</font><br/>Catatan: Beberapa zona tidak mendukung tipe instans tujuan umum.<br>Untuk detailnya, lihat <a href='https://www.alibabacloud.com/help/document_detail/25378.html' target='_blank'><b><font color='blue'>keluarga instans</font></a>" }, "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType", "AssociationPropertyMetadata": { "ZoneId": "VSwitchZoneId" } }, "ECSImageId": { "Type": "String", "Label": { "en": "Application Server Image", "zh-cn": "Gambar server aplikasi" }, "Description": { "en": "Server instance image ID.
[Shanghai: <font color='green'>m-uf6j125b6mhvg27jo58a</font>]<br>[Hangzhou: <font color='green'>m-bp1h0ys627i2ke0dx0t1</font>]<br>[Beijing: <font color='green'>m-2zeir96eip2yw414w1jd</font>]<br>[Qingdao: <font color='green'>m-m5e81ywnfuk84x1r7v0n</font>]<br>[Shenzhen: <font color='green'>m-wz98u1criwvafhq3ctfm</font>]<br>[Zhangjiakou: <font color='green'>m-8vbg3h5yp5ncag0q31lt</font>]<br>[Hohhot: <font color='green'>m-hp34cnncgeiowbkzpmic</font>]<br>[Hong Kong: <font color='green'>m-j6c0e5hkfmzk6d8bfss1</font>]<br>[US(Silincon Valley): <font color='green'>m-rj981ywnfuk84x1r7v0p</font>]<br>note: for more images available, see detail: <b><a href='https://marketplace.alibabacloud.com/products?keywords=magento' target='_blank'><font color='blue'>Magento image</font></a>", "zh-cn": "ID gambar instance server.<br/>Nama gambar Alibaba Cloud Marketplace: Sistem E-dagang Open Source Magento (LAMP | paket bahasa Tionghoa)<br><b>Nilai contoh:<br/>[Shanghai: <font color='green'>m-uf6j125b6mhvg27jo58a</font>]<br>[Hangzhou: <font color='green'>m-bp1h0ys627i2ke0dx0t1</font>]<br>[Beijing: <font color='green'>m-2zeir96eip2yw414w1jd</font>]<br>[Qingdao: <font color='green'>m-m5e81ywnfuk84x1r7v0n</font>]<br>[Shenzhen: <font color='green'>m-wz98u1criwvafhq3ctfm</font>]<br>[Zhangjiakou: <font color='green'>m-8vbg3h5yp5ncag0q31lt</font>]<br>[Hohhot: <font color='green'>m-hp34cnncgeiowbkzpmic</font>]<br>[Hong Kong: <font color='green'>m-j6c0e5hkfmzk6d8bfss1</font>]<br>[AS (Silicon Valley): <font color='green'>m-rj981ywnfuk84x1r7v0p</font>]<br>Catatan: Untuk gambar lainnya, lihat <b><a href='https://market.aliyun.com/products/53616009/cmjj00038197.html' target='_blank'><font color='blue'>gambar Magento</font></a>" } }, "SystemDiskCategory": { "Type": "String", "Label": { "en": "Disk Type", "zh-cn": "Jenis disk" }, "Description": { "en": "<font color='blue'><b>Valid values:</font>
[cloud_efficiency: <font color='green'>Ultra disk</font>]<br>[cloud_ssd: <font color='green'>Standard SSD</font>]<br>[cloud_essd: <font color='green'>Enterprise SSD</font>]<br>[cloud: <font color='green'>Basic disk</font>]<br>[ephemeral_ssd: <font color='green'>Local SSD</font>]", "zh-cn": "<font color='blue'><b>Nilai yang valid:</font><br/>[cloud_efficiency: <font color='green'>Ultra disk</font>]<br>[cloud_ssd: <font color='green'>Standard SSD</font>]<br>[cloud_essd: <font color='green'>Enterprise SSD</font>]<br>[cloud: <font color='green'>Disk dasar</font>]<br>[ephemeral_ssd: <font color='green'>SSD lokal</font>]" }, "Default": "cloud_efficiency", "AllowedValues": [ "cloud_efficiency", "cloud_ssd", "cloud", "cloud_essd", "ephemeral_ssd" ] }, "SystemDiskSize": { "Type": "Number", "Label": { "en": "System Disk Size", "zh-cn": "Ukuran disk sistem" }, "Description": { "en": "System disk size, range of values: 40-500, units: GB.", "zh-cn": "Ukuran disk sistem, nilai yang valid: 40 hingga 500. Satuan: GB." }, "ConstraintDescription": { "en": "Valid values: 40 to 500. Unit: GB.", "zh-cn": "Nilai yang valid: 40 hingga 500. Satuan: GB." }, "Default": 40, "MinValue": 40, "MaxValue": 500 }, "EcsPassword": { "Type": "String", "Label": { "en": "Login Password", "zh-cn": "Kata sandi logon" }, "Description": { "en": "Server logon password, Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=| {}[]:;' <>,.? / Special symbol in).", "zh-cn": "Kata sandi logon server, panjang: 8 hingga 30 karakter. Harus mengandung minimal tiga dari berikut ini: huruf kapital, huruf kecil, angka, dan karakter khusus ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/." }, "ConstraintDescription": { "en": "Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=| {}[]:;' <>,.? / Special symbol in).", "zh-cn": "Panjang: 8 hingga 30 karakter. Harus mengandung minimal tiga dari berikut ini: huruf kapital, huruf kecil, angka, dan karakter khusus ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/." }, "AssociationProperty": "ALIYUN::ECS::Instance::Password" }, "LoadBalancerName": { "Type": "String", "Label": { "en": "Instance Name", "zh-cn": "Nama instans" }, "Description": { "en": "Length: 1-80 characters. Can contain Chinese、letters、digits and special characters('-'、'/'、'.'、'_').", "zh-cn": "Panjang: 1 hingga 80 karakter. Karakter yang valid mencakup huruf, angka, tanda hubung (-), garis miring (/), titik (.), dan garis bawah (_)." }, "Default": "slb001" }, "LoadBalancerSpec": { "Type": "String", "Label": { "en": "Specifications", "zh-cn": "Spesifikasi" }, "Description": { "en": "Instance specifications,</br>see detail: <a href='https://www.alibabacloud.com/help/doc-detail/85939.html' target='_blank'><b><font color='blue'>Guaranteed-performance instance</font></a>", "zh-cn": "Spesifikasi instans.</br>Untuk detailnya, lihat <a href='https://www.alibabacloud.com/help/document_detail/85939.html' target='_blank'><font color='blue'>instans guaranteed-performance</font></a>" }, "Default": "slb.s1.small" }, "DBInstanceEngineAndVersion": { "Type": "String", "Label": { "en": "Type And Version", "zh-cn": "Jenis dan versi" }, "Description": { "en": "Database type and version number.", "zh-cn": "Jenis mesin database dan nomor versi." }, "Default": "MySQL-5.6", "AllowedValues": [ "MySQL-5.5", "MySQL-5.6", "MySQL-5.7", "MySQL-8.0" ] }, "DBInstanceClass": { "Type": "String", "Label": { "en": "Specifications", "zh-cn": "Spesifikasi" }, "Description": { "en": "Select the instance specification based on the type of database engine and the available area support;
see detail: <a href='https://www.alibabacloud.com/help/doc-detail/26312.html' target='_blank'><b><font color='blue'>Instance specification sheet</font></a>", "zh-cn": "Pilih spesifikasi instans berdasarkan jenis mesin database dan dukungan wilayah.<br/>Untuk detailnya, lihat <a href='https://www.alibabacloud.com/help/document_detail/26312.html' target='_blank'><b><font color='blue'>lembar spesifikasi instans</font></a>" }, "Default": "rds.mysql.s2.large" }, "DBInstanceStorage": { "Type": "Number", "Label": { "en": "Storage Space", "zh-cn": "storage space" }, "Description": { "en": "Database storage space, unit: GB, increasing every 5GB, valid value: 5-1000.", "zh-cn": "storage space database. Satuan: GB. Kelipatan: 5 GB. Nilai yang valid: 5 hingga 1000." }, "ConstraintDescription": { "en": "Database storage space, unit: GB, increasing every 5GB, valid value: 5-1000.", "zh-cn": "storage space database. Satuan: GB. Kelipatan: 5 GB. Nilai yang valid: 5 hingga 1000." }, "Default": 5, "MinValue": 5, "MaxValue": 1000 }, "RdsUserPassword": { "Type": "String", "Label": { "en": "Password", "zh-cn": "password" }, "Description": { "en": "The primary account password for the database instance.Large/lowercase letters, Numbers and special characters take up three kinds, and the length is 8-32 bits. Special characters included! @ # $% ^ & * () _ + - =", "zh-cn": "password akun istimewa untuk instansiasi basis data. Harus mengandung minimal tiga dari berikut ini: huruf kapital, huruf kecil, angka, dan karakter khusus !@#$%^&*()_+-=. Panjang: 8 hingga 32 karakter." }, "AssociationProperty": "ALIYUN::RDS::Instance::AccountPassword", "ConstraintDescription": { "en": "Large/lowercase letters, Numbers and special characters take up three kinds, and the length is 8-32 bits. Special characters included! @ # $% ^ & * () _ + - =", "zh-cn": "Harus mengandung minimal tiga dari berikut ini: huruf kapital, huruf kecil, angka, dan karakter khusus !@#$%^&*()_+-=. Panjang: 8 hingga 32 karakter." }, "MinLength": 8, "MaxLength": 32, "NoEcho": true }, "DBName": { "Type": "String", "Label": { "en": "Database Name", "zh-cn": "Nama database" }, "Description": { "en": "Database name, consisting of lowercase letters, Numbers, and special characters (-_), starting with letters, ending with letters or Numbers, up to 64 characters.", "zh-cn": "Nama database. Terdiri dari huruf kecil, angka, dan tanda hubung (-) atau garis bawah (_). Harus dimulai dengan huruf dan diakhiri dengan huruf atau angka. Panjang maksimum: 64 karakter." }, "Default": "db_magento" }, "RdsUserType": { "Type": "String", "Label": { "en": "Account Type", "zh-cn": "Jenis akun" }, "Description": { "en": "<b>Database account type, <font color='blue'>Valid values: </font><br/>[Normal: <font color='green'>Standard account</font>]<br>[Super: <font color='green'>Privileged account</font>]", "zh-cn": "<b>Jenis akun database. <font color='blue'>Nilai yang valid:</font><br>[Normal: <font color='green'>Akun standar</font>]<br>[Super: <font color='green'>Akun istimewa</font>]" }, "Default": "Normal", "AllowedValues": [ "Super", "Normal" ] }, "RdsUserName": { "Type": "String", "Label": { "en": "Database Account", "zh-cn": "Akun database" }, "Description": { "en": "Consists of lowercase letters, Numbers, and underscores, beginning with letters, ending with letters or Numbers, up to 16 characters, and at least 2 characters.", "zh-cn": "Nama akun database. Terdiri dari huruf kecil, angka, dan garis bawah (_). Harus dimulai dengan huruf dan diakhiri dengan huruf atau angka. Panjang: 2 hingga 16 karakter." }, "Default": "account_magento", "MinLength": 2, "MaxLength": 16 } }, "Resources": { "Vpc": { "Type": "ALIYUN::ECS::VPC", "Properties": { "CidrBlock": { "Ref": "VpcCidrBlock" }, "VpcName": { "Fn::Join": [ "-", [ "Stack", { "Ref": "ALIYUN::StackId" } ] ] } } }, "SecurityGroup": { "Type": "ALIYUN::ECS::SecurityGroup", "Properties": { "VpcId": { "Ref": "Vpc" }, "SecurityGroupIngress": [ { "IpProtocol": "tcp", "Policy": "accept", "PortRange": "3389/3389", "Priority": 1, "SourceCidrIp": "0.0.0.0/0" } ], "Tags": [ { "Key": "best_practice", "Value": "065" } ] } }, "VSwitch": { "Type": "ALIYUN::ECS::VSwitch", "Properties": { "ZoneId": { "Ref": "VSwitchZoneId" }, "VpcId": { "Ref": "Vpc" }, "CidrBlock": { "Ref": "VswCidrBlock" }, "VSwitchName": { "Fn::Join": [ "-", [ "Stack", { "Ref": "ALIYUN::StackId" }, { "Fn::Select": [ "2", { "Fn::Split": [ "-", { "Ref": "VSwitchZoneId" } ] } ] } ] ] } } }, "ECS": { "Type": "ALIYUN::ECS::Instance", "Properties": { "ZoneId": { "Ref": "VSwitchZoneId" }, "VpcId": { "Ref": "Vpc" }, "VSwitchId": { "Ref": "VSwitch" }, "SecurityGroupId": { "Ref": "SecurityGroup" }, "ImageId": { "Ref": "ECSImageId" }, "AllocatePublicIP": true, "HostName": "APP001", "InstanceName": "APP001", "InstanceType": { "Ref": "EcsInstanceType" }, "InternetChargeType": "PayByTraffic", "Password": { "Ref": "EcsPassword" }, "SystemDiskCategory": { "Ref": "SystemDiskCategory" }, "SystemDiskSize": { "Ref": "SystemDiskSize" }, "Tags": [ { "Key": "065", "Value": "best_practice" } ] } }, "SLBLoadBalance": { "Type": "ALIYUN::SLB::LoadBalancer", "Properties": { "VpcId": { "Ref": "Vpc" }, "AddressType": "internet", "InternetChargeType": "paybytraffic", "LoadBalancerName": { "Ref": "LoadBalancerName" }, "LoadBalancerSpec": { "Ref": "LoadBalancerSpec" }, "MasterZoneId": { "Ref": "VSwitchZoneId" }, "PayType": "PayOnDemand", "SlaveZoneId": { "Ref": "VSwitchZoneId2" }, "Tags": [ { "Key": "065", "Value": "best_practice" } ] } }, "BackendServerAttachment": { "Type": "ALIYUN::SLB::BackendServerAttachment", "Properties": { "BackendServerList": [ { "Ref": "ECS" } ], "BackendServerWeightList": [ 100 ], "LoadBalancerId": { "Ref": "SLBLoadBalance" } }, "DependsOn": [ "ECS", "SLBLoadBalance" ] }, "Listener": { "Type": "ALIYUN::SLB::Listener", "Properties": { "BackendServerPort": 80, "Bandwidth": -1, "ListenerPort": 80, "LoadBalancerId": { "Ref": "SLBLoadBalance" }, "Protocol": "http" }, "DependsOn": "SLBLoadBalance" }, "RdsDBInstance": { "Type": "ALIYUN::RDS::DBInstance", "Properties": { "VpcId": { "Ref": "Vpc" }, "VSwitchId": { "Ref": "VSwitch" }, "DBInstanceClass": { "Ref": "DBInstanceClass" }, "DBInstanceStorage": { "Ref": "DBInstanceStorage" }, "DBMappings": [ { "CharacterSetName": "utf8", "DBName": { "Ref": "DBName" } } ], "Engine": { "Fn::Select": [ "0", { "Fn::Split": [ "-", { "Ref": "DBInstanceEngineAndVersion" } ] } ] }, "EngineVersion": { "Fn::Select": [ "1", { "Fn::Split": [ "-", { "Ref": "DBInstanceEngineAndVersion" } ] } ] }, "MasterUserPassword": { "Ref": "RdsUserPassword" }, "MasterUserType": { "Ref": "RdsUserType" }, "MasterUsername": { "Ref": "RdsUserName" }, "MultiAZ": true, "SecurityIPList": { "Ref": "VpcCidrBlock" }, "Tags": { "Key": "best_practice", "Value": "065" } } } }, "Outputs": { "ECSPublicIP": { "Description": "Alamat IP publik server Magento", "Value": { "Fn::GetAtt": [ "ECS", "PublicIp" ] } } }, "Metadata": { "ALIYUN::ROS::Interface": { "ParameterGroups": [ { "Parameters": [ "VpcCidrBlock", "VSwitchZoneId", "VswCidrBlock", "VSwitchZoneId2", "VswCidrBlock2" ], "Label": { "default": "VPC" } }, { "Parameters": [ "EcsInstanceType", "ECSImageId", "SystemDiskCategory", "SystemDiskSize", "EcsPassword" ], "Label": { "default": "ECS" } }, { "Parameters": [ "LoadBalancerName", "LoadBalancerSpec" ], "Label": { "default": "SLB" } }, { "Parameters": [ "DBInstanceEngineAndVersion", "DBInstanceClass", "DBInstanceStorage", "RdsUserPassword", "DBName", "RdsUserType", "RdsUserName" ], "Label": { "default": "RDS" } } ], "TemplateTags": [ "acs:solution:security&compliance:e-commerce website business security" ] } } }<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>

Untuk contoh lainnya, lihat templat publik yang menyertakan resource ini.