ALIYUN::ADBLake::Account

更新时间:2025-02-28 02:43

ALIYUN::ADBLake::Account类型用于创建湖仓版数据库账号。

语法

{
  "Type": "ALIYUN::ADBLake::Account",
  "Properties": {
    "AccountType": String,
    "AccountName": String,
    "AccountPassword": String,
    "DBClusterId": String,
    "Engine": String,
    "AccountDescription": String,
    "RamUser": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

属性名称

类型

必须

允许更新

描述

约束

AccountType

String

账号类型。

取值说明:

  • Normal:普通账号。

  • Super:高权限账号。

AccountName

String

数据库账号名称。

需符合如下要求:

  • 以小写字母开头,以小写字母或数字结尾。

  • 由小写字母、数字或下划线(_)组成。

  • 长度为 2~16 个字符。

  • 不能使用预留的用户名,如 root、admin 和 opsadmin。

AccountPassword

String

数据库账号密码。

  • 由大写字母、小写字母、数字、特殊字符中的任意三种组成。

  • 特殊符号包含:!@#$%^&*()_+-=

  • 密码长度为 8~32 个字符。

DBClusterId

String

企业版、基础版或湖仓版的集群 ID。

Engine

String

数据库引擎。

取值:

  • AnalyticDB(默认):AnalyticDB MySQL 引擎。

  • Clickhouse:宽表引擎。

AccountDescription

String

账号描述。

  • 不能以http://或者https://开头。

  • 长度不超过 256 个字符。

RamUser

String

RAM 用户的账号 ID。

返回值

Fn::GetAtt

AccountName:数据库账号名称。

示例

YAML
JSON
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DBClusterId:
    Type: String
    Description:
      en: The ID of the ADB Lake cluster.
    Required: true
  AccountType:
    Type: String
    Description:
      en: 'The type of the account.Valid values: Normal: normal account. Super: super account.'
    AllowedValues:
      - Normal
      - Super
    Required: true
  Engine:
    Type: String
    Description:
      en: 'The engine of the account.Valid values: AnalyticDB / Clickhouse.'
    AllowedValues:
      - Clickhouse
      - AnalyticDB
    Required: true
    Default: AnalyticDB
  AccountName:
    Type: String
    Description:
      en: The name of the account.The database account name must meet the following requirements:Start with a lowercase letter and end with a lowercase letter or number.Consists of lowercase letters, numbers, or underscores (_).The length is 2 to 16 characters.Reserved user names such as root, admin, and opsadmin cannot be used.
    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.The password must meet the following requirements:Database account password.It consists of any three of uppercase letters, lowercase letters, numbers, and special characters.Special symbols include: !@#$%^&*()_+-=The password length is 8 to 32 characters.'
    Required: true
    MinLength: 8
    MaxLength: 32
Resources:
  Account:
    Type: ALIYUN::ADBLake::Account
    Properties:
      DBClusterId:
        Ref: DBClusterId
      AccountType:
        Ref: AccountType
      Engine:
        Ref: Engine
      AccountName:
        Ref: AccountName
      AccountPassword:
        Ref: AccountPassword
Outputs:
  AccountName:
    Description: The name of the account.
    Value:
      Fn::GetAtt:
        - Account
        - AccountName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DBClusterId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the ADB Lake cluster."
      },
      "Required": true
    },
    "AccountType": {
      "Type": "String",
      "Description": {
        "en": "The type of the account.Valid values: Normal: normal account. Super: super account."
      },
      "AllowedValues": [
        "Normal",
        "Super"
      ],
      "Required": true
    },
    "Engine": {
      "Type": "String",
      "Description": {
        "en": "The engine of the account.Valid values: AnalyticDB / Clickhouse."
      },
      "AllowedValues": [
        "Clickhouse",
        "AnalyticDB"
      ],
      "Required": true,
      "Default": "AnalyticDB"
    },
    "AccountName": {
      "Type": "String",
      "Description": {
        "en": "The name of the account.The database account name must meet the following requirements:Start with a lowercase letter and end with a lowercase letter or number.Consists of lowercase letters, numbers, or underscores (_).The length is 2 to 16 characters.Reserved user names such as root, admin, and opsadmin cannot be used."
      },
      "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.The password must meet the following requirements:Database account password.It consists of any three of uppercase letters, lowercase letters, numbers, and special characters.Special symbols include: !@#$%^&*()_+-=The password length is 8 to 32 characters."
      },
      "Required": true,
      "MinLength": 8,
      "MaxLength": 32
    }
  },
  "Resources": {
    "Account": {
      "Type": "ALIYUN::ADBLake::Account",
      "Properties": {
        "DBClusterId": {
          "Ref": "DBClusterId"
        },
        "AccountType": {
          "Ref": "AccountType"
        },
        "Engine": {
          "Ref": "Engine"
        },
        "AccountName": {
          "Ref": "AccountName"
        },
        "AccountPassword": {
          "Ref": "AccountPassword"
        }
      }
    }
  },
  "Outputs": {
    "AccountName": {
      "Description": "The name of the account.",
      "Value": {
        "Fn::GetAtt": [
          "Account",
          "AccountName"
        ]
      }
    }
  }
}
                        
  • 本页导读 (1)
  • 语法
  • 属性
  • 返回值
  • 示例
文档反馈
phone 联系我们

立即和Alibaba Cloud在线服务人员进行交谈,获取您想了解的产品信息以及最新折扣。

alicare alicarealicarealicare