文档

DATASOURCE::DRDS::Account

更新时间:

DATASOURCE::DRDS::Account类型用于查询单个实例账号列表信息。

语法

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

属性

属性名称

类型

必须

允许更新

描述

约束

DrdsAccountName

String

Drds账号名称。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • DbPrivileges:数据库权限信息。

  • Description:账号备注。

  • DrdsAccountName:Drds账号名称。

  • Host:可以访问数据库的IP地址。

  • AccountType:账号类型。

示例

  • YAML格式

    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格式

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