ALIYUN::ADB::Account is used to create a database account for an AnalyticDB for MySQL cluster.

Syntax

{
  "Type": "ALIYUN::ADB::Account",
  "Properties": {
    "AccountDescription": String,
    "DBClusterId": String,
    "AccountType": String,
    "AccountPassword": String,
    "AccountName": String
  }
}

Properties

Property Type Required Editable Description Constraint
AccountDescription String No No The description of the database account. Limits:
  • The description cannot start with http:// or https://.
  • The description can be up to 256 characters in length.
DBClusterId String Yes No The ID of the AnalyticDB for MySQL cluster. None
AccountType String No No The type of the database account. Valid values:
  • Normal: a standard account
  • Super: a privileged account
AccountPassword String Yes Yes The password of the database account. Limits:
  • The password must contain uppercase letters, lowercase letters, digits, and special characters.

    The following special characters are supported: ! @ # $ % ^ & * () _ + - =

  • The password must be 8 to 32 characters in length.
AccountName String Yes No The name of the database account. None

Response parameters

Fn::GetAtt

  • DBClusterId: the ID of the AnalyticDB for MySQL cluster.
  • AccountType: the type of the database account.
  • AccountName: the name of the database account.

Example

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DBClusterId": {
      "Type": "String",
      "Description": "The ID of the cluster."
    },
    "AccountPassword": {
      "Type": "String",
      "Description": "The password of the account.\nThe password must contain uppercase letters, lowercase letters, digits, and special\ncharacters.\nSpecial characters include ! @ # $ % ^ * ()  _ + - and =\nThe password must be 8 to 32 characters in length."
    },
    "AccountName": {
      "Type": "String",
      "Description": "The name of the account."
    }
  },
  "Resources": {
    "Account": {
      "Type": "ALIYUN::ADB::Account",
      "Properties": {
        "DBClusterId": {
          "Ref": "DBClusterId"
        },
        "AccountPassword": {
          "Ref": "AccountPassword"
        },
        "AccountName": {
          "Ref": "AccountName"
        }
      }
    }
  },
  "Outputs": {
    "DBClusterId": {
      "Description": "The ID of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "Account",
          "DBClusterId"
        ]
      }
    },
    "AccountType": {
      "Description": "The type of the account.",
      "Value": {
        "Fn::GetAtt": [
          "Account",
          "AccountType"
        ]
      }
    },
    "AccountName": {
      "Description": "The name of the account.",
      "Value": {
        "Fn::GetAtt": [
          "Account",
          "AccountName"
        ]
      }
    }
  }
}