ALIYUN::PolarDBX::Account类型用于创建账号。

语法

{
  "Type": "ALIYUN::PolarDBX::Account",
  "Properties": {
    "AccountDescription": String,
    "DBInstanceId": String,
    "AccountPassword": String,
    "AccountName": String
  }
}

属性

属性名称类型必须允许更新描述约束
AccountDescriptionString账号描述信息。
DBInstanceIdString数据库实例ID。
AccountPasswordString账号密码。
AccountNameString账号名称。

返回值

Fn::GetAtt

  • AccountDescription:账号描述信息。
  • DBInstanceId:数据库实例ID。
  • AccountType:账号类型。
  • AccountName:账号名称。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      DBInstanceId:
        Type: String
        Description: The ID of the instance.
      AccountPassword:
        Type: String
        Description: The password of the account.
    Resources:
      ExtensionResource:
        Type: ALIYUN::PolarDBX::Account
        Properties:
          DBInstanceId:
            Ref: DBInstanceId
          AccountPassword:
            Ref: AccountPassword
          AccountName: Demo
    Outputs:
      AccountDescription:
        Description: Account description information.
        Value:
          Fn::GetAtt:
            - ExtensionResource
            - AccountDescription
      DBInstanceId:
        Description: The ID of the instance.
        Value:
          Fn::GetAtt:
            - ExtensionResource
            - DBInstanceId
      AccountType:
        Description: Account type. 0 represents an ordinary account, and 1 represents a high-privilege account.
        Value:
          Fn::GetAtt:
            - ExtensionResource
            - AccountType
      AccountName:
        Description: Account name.
        Value:
          Fn::GetAtt:
            - ExtensionResource
            - AccountName
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "DBInstanceId": {
          "Type": "String",
          "Description": "The ID of the instance."
        },
        "AccountPassword": {
          "Type": "String",
          "Description": "The password of the account."
        }
      },
      "Resources": {
        "ExtensionResource": {
          "Type": "ALIYUN::PolarDBX::Account",
          "Properties": {
            "DBInstanceId": {
              "Ref": "DBInstanceId"
            },
            "AccountPassword": {
              "Ref": "AccountPassword"
            },
            "AccountName": "Demo"
          }
        }
      },
      "Outputs": {
        "AccountDescription": {
          "Description": "Account description information.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "AccountDescription"
            ]
          }
        },
        "DBInstanceId": {
          "Description": "The ID of the instance.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "DBInstanceId"
            ]
          }
        },
        "AccountType": {
          "Description": "Account type. 0 represents an ordinary account, and 1 represents a high-privilege account.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "AccountType"
            ]
          }
        },
        "AccountName": {
          "Description": "Account name.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "AccountName"
            ]
          }
        }
      }
    }