ALIYUN::CDDC::DedicatedHostAccount

更新时间:
复制为 MD 格式

ALIYUN::CDDC::DedicatedHostAccount类型用于创建专用主机帐户。

语法

{
  "Type": "ALIYUN::CDDC::DedicatedHostAccount",
  "Properties": {
    "AccountPassword": String,
    "AccountName": String,
    "DedicatedHostId": String,
    "AccountType": String,
    "BastionInstanceId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

AccountName

String

账户的名称。

长度限制:最小2,最大16

AccountPassword

String

账户的密码。

DedicatedHostId

String

专有主机的ID。

AccountType

String

账户的类型。

可选值:Normal(普通)、Admin(管理员)

BastionInstanceId

String

堡垒主机实例的ID。

返回值

Fn::GetAtt

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DedicatedHostId:
    Type: String
    Description:
      en: The ID of the dedicated host.
      zh: 专有主机的ID。
    Required: true
  AccountName:
    Type: String
    Description:
      en: The name of the account.
      zh: 账户的名称。
    Required: true
    AllowedPattern: ^[a-z][a-z0-9_]{0,14}[a-z0-9]$
    MinLength: 2
    MaxLength: 16
  AccountPassword:
    Type: String
    Description:
      en: The password of the account.
      zh: 账户的密码。
    Required: true
Resources:
  DedicatedHostAccount:
    Type: ALIYUN::CDDC::DedicatedHostAccount
    Properties:
      DedicatedHostId:
        Ref: DedicatedHostId
      AccountName:
        Ref: AccountName
      AccountPassword:
        Ref: AccountPassword
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DedicatedHostId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the dedicated host.",
        "zh": "专有主机的ID。"
      },
      "Required": true
    },
    "AccountName": {
      "Type": "String",
      "Description": {
        "en": "The name of the account.",
        "zh": "账户的名称。"
      },
      "Required": true,
      "AllowedPattern": "^[a-z][a-z0-9_]{0,14}[a-z0-9]$",
      "MinLength": 2,
      "MaxLength": 16
    },
    "AccountPassword": {
      "Type": "String",
      "Description": {
        "en": "The password of the account.",
        "zh": "账户的密码。"
      },
      "Required": true
    }
  },
  "Resources": {
    "DedicatedHostAccount": {
      "Type": "ALIYUN::CDDC::DedicatedHostAccount",
      "Properties": {
        "DedicatedHostId": {
          "Ref": "DedicatedHostId"
        },
        "AccountName": {
          "Ref": "AccountName"
        },
        "AccountPassword": {
          "Ref": "AccountPassword"
        }
      }
    }
  }
}