All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::DRDS::Account

Last Updated:Oct 08, 2024

DATASOURCE::DRDS::Account is used to query the information about an account of a PolarDB-X 1.0 instance.

Syntax

{
  "Type": "DATASOURCE::DRDS::Account",
  "Properties": {
    "DrdsAccountName": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

DrdsAccountName

String

Yes

Yes

The account name.

None.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Return values

Fn::GetAtt

  • DbPrivileges: the permission information about the database.

  • Description: the description of the account.

  • DrdsAccountName: the account name.

  • Host: the IP address that is allowed to access the database.

  • AccountType: the account type.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      DrdsAccountName:
        Type: String
        Description:
          en: The name of the account.
        Required: true
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::DRDS::Account
        Properties:
          DrdsAccountName:
            Ref: DrdsAccountName
    Outputs:
      DbPrivileges:
        Description: Indicates the information about the permissions of an account on a database.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - DbPrivileges
      Description:
        Description: Account remarks. The default value of the advanced account is **Created by DRDS**, and the normal account does not have any comments. Remarks can be customized in account management.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Description
      DrdsAccountName:
        Description: Indicates the username of an instance account.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - DrdsAccountName
      Host:
        Description: Indicates an IP address that is allowed to access the database. The value % indicates that each IP address is allowed to access the database.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Host
      AccountType:
        Description: |-
          Indicates the type of an instance account. Valid values: 
          0: The instance account is a privileged account.
          1: The instance account is a standard account.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - AccountType
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "DrdsAccountName": {
          "Type": "String",
          "Description": {
            "en": "The name of the account."
          },
          "Required": true
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::DRDS::Account",
          "Properties": {
            "DrdsAccountName": {
              "Ref": "DrdsAccountName"
            }
          }
        }
      },
      "Outputs": {
        "DbPrivileges": {
          "Description": "Indicates the information about the permissions of an account on a database.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "DbPrivileges"
            ]
          }
        },
        "Description": {
          "Description": "Account remarks. The default value of the advanced account is **Created by DRDS**, and the normal account does not have any comments. Remarks can be customized in account management.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Description"
            ]
          }
        },
        "DrdsAccountName": {
          "Description": "Indicates the username of an instance account.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "DrdsAccountName"
            ]
          }
        },
        "Host": {
          "Description": "Indicates an IP address that is allowed to access the database. The value % indicates that each IP address is allowed to access the database.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Host"
            ]
          }
        },
        "AccountType": {
          "Description": "Indicates the type of an instance account. Valid values: \n0: The instance account is a privileged account.\n1: The instance account is a standard account.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "AccountType"
            ]
          }
        }
      }
    }