ALIYUN::ClickHouse::EnterpriseDBClusterAccount

更新时间:
复制 MD 格式

The ALIYUN::ClickHouse::EnterpriseDBClusterAccount type creates a database account for an ApsaraDB for ClickHouse Enterprise Edition cluster.

Syntax

{
  "Type": "ALIYUN::ClickHouse::EnterpriseDBClusterAccount",
  "Properties": {
    "Account": String,
    "AccountType": String,
    "DBInstanceId": String,
    "Password": String,
    "Description": String,
    "DmlAuthSetting": Map
  }
}

Properties

Parameter

Type

Required

Update allowed

Description

Constraints

Account

String

Yes

No

The name of the database account.

None

AccountType

String

Yes

No

The type of the database account.

Valid values:

  • NormalAccount: A normal account.

  • SuperAccount: A privileged account.

DBInstanceId

String

Yes

No

The cluster ID.

None

Password

String

Yes

Yes

The password for the database account.

The password must meet the following requirements:
- Contain characters from at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
- Supported special characters: Oh-! @#$%^& *()_+-=.
- Be 8 to 32 characters in length.


Description

String

No

Yes

The account description.

None

DmlAuthSetting

Map

No

Yes

The account permissions.

None

DmlAuthSetting syntax

"DmlAuthSetting": {
  "DdlAuthority": Boolean,
  "DmlAuthority": Integer,
  "AllowDictionaries": List,
  "AllowDatabases": List
}

DmlAuthSetting properties

Parameter

Type

Required

Update allowed

Description

Constraints

DdlAuthority

Boolean

Yes

Yes

Whether to grant DDL permissions to the database account.

Valid values:

  • true: Grants DDL permissions.

  • false: Denies DDL permissions.

DmlAuthority

Integer

Yes

Yes

The DML permission level for the database account.

Valid values:

  • 0: Allows reading data, writing data, and changing settings.

  • 1: Allows reading data only.

  • 2: Allows reading data and changing settings.

AllowDatabases

List

No

Yes

The databases to authorize.

None

AllowDictionaries

List

No

Yes

The dictionaries to authorize.

None

Return values

Fn::GetAtt

  • Account: The database account name.

  • Description: The account description.

  • AccountType: The database account type.

  • DmlAuthSetting: The permission settings.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Account:
    Type: String
    Description: The name of the database account.
    Required: true
  DBInstanceId:
    Type: String
    Description: The cluster ID.
    Required: true
  AccountType:
    Type: String
    Description: |-
      The type of the database account. Valid values:
      - **NormalAccount**: a normal account.
      - **SuperAccount**: a privileged account.
    AllowedValues:
      - NormalAccount
      - SuperAccount
    Required: true
  Password:
    Type: String
    Description: |-
      The password for the database account. The password must meet the following requirements:
      - It must contain characters from at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
      - The supported special characters are: Oh-! @#$%^& *()_+-=.
      - It must be 8 to 32 characters in length.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::ClickHouse::EnterpriseDBClusterAccount
    Properties:
      Account:
        Ref: Account
      DBInstanceId:
        Ref: DBInstanceId
      AccountType:
        Ref: AccountType
      Password:
        Ref: Password
Outputs:
  Account:
    Description: The name of the database account.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Account
  Description:
    Description: The description of the account.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Description
  AccountType:
    Description: The type of the database account.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AccountType
  DmlAuthSetting:
    Description: The permission settings.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DmlAuthSetting
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Account": {
      "Type": "String",
      "Description": "The name of the database account.",
      "Required": true
    },
    "DBInstanceId": {
      "Type": "String",
      "Description": "The cluster ID.",
      "Required": true
    },
    "AccountType": {
      "Type": "String",
      "Description": "The type of the database account. Valid values:\n- **NormalAccount**: a normal account.\n- **SuperAccount**: a privileged account.",
      "AllowedValues": [
        "NormalAccount",
        "SuperAccount"
      ],
      "Required": true
    },
    "Password": {
      "Type": "String",
      "Description": "The password for the database account. The password must meet the following requirements:\n- It must contain characters from at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.\n- The supported special characters are: Oh-! @#$%^& *()_+-=.\n- It must be 8 to 32 characters in length.",
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ClickHouse::EnterpriseDBClusterAccount",
      "Properties": {
        "Account": {
          "Ref": "Account"
        },
        "DBInstanceId": {
          "Ref": "DBInstanceId"
        },
        "AccountType": {
          "Ref": "AccountType"
        },
        "Password": {
          "Ref": "Password"
        }
      }
    }
  },
  "Outputs": {
    "Account": {
      "Description": "The name of the database account.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Account"
        ]
      }
    },
    "Description": {
      "Description": "The description of the account.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Description"
        ]
      }
    },
    "AccountType": {
      "Description": "The type of the database account.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AccountType"
        ]
      }
    },
    "DmlAuthSetting": {
      "Description": "The permission settings.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DmlAuthSetting"
        ]
      }
    }
  }
}