All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::PolarDBX::Account

更新時間:May 08, 2023

ALIYUN::PolarDBX::Account is used to create an account.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

AccountDescription

String

No

Yes

The description of the account.

None.

DBInstanceId

String

Yes

No

The ID of the PolarDB-X instance.

None.

AccountPassword

String

Yes

Yes

The password of the account.

None.

AccountName

String

Yes

No

The name of the account.

None.

Return values

Fn::GetAtt

  • AccountDescription: the description of the account.

  • DBInstanceId: the ID of the PolarDB-X instance.

  • AccountType: the type of the account.

  • AccountName: the name of the account.

Examples

  • YAML format

    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 format

    {
      "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"
            ]
          }
        }
      }
    }