DATASOURCE::PolarDBX::Account

DATASOURCE::PolarDBX::Account类型用于获取PolarDB-X账号信息。

语法

{
  "Type": "DATASOURCE::PolarDBX::Account",
  "Properties": {
    "DBInstanceId": String,
    "PolarDBXAccountName": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DBInstanceId

String

PolarDB-X实例ID。

PolarDBXAccountName

String

PolarDB-X账户名称。

RefreshOptions

String

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

有效值:

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

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

返回值

Fn::GetAtt

  • PolarDBXAccountName:PolarDB-X账户名称。

  • AccountDescription:PolarDB-X账户描述。

  • DBInstanceId:PolarDB-X实例ID。

  • CreateTime:账户创建时间。

  • AccountType:账号类型。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  PolarDBXAccountName:
    Type: String
    Description:
      en: The username of the account that you want to query. If you want to query information about a specific account, you must specify this parameter.
    Required: true
  DBInstanceId:
    Type: String
    Description:
      en: The ID of the PolarDB-X 2.0 instance.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::PolarDBX::Account
    Properties:
      PolarDBXAccountName:
        Ref: PolarDBXAccountName
      DBInstanceId:
        Ref: DBInstanceId
Outputs:
  PolarDBXAccountName:
    Description: The username of the account.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PolarDBXAccountName
  AccountDescription:
    Description: The description of the account.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AccountDescription
  DBInstanceId:
    Description: The ID of the PolarDB-X 2.0 instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DBInstanceId
  CreateTime:
    Description: The point in time when the account was created.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  AccountType:
    Description: The type of the account.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AccountType
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "PolarDBXAccountName": {
      "Type": "String",
      "Description": {
        "en": "The username of the account that you want to query. If you want to query information about a specific account, you must specify this parameter."
      },
      "Required": true
    },
    "DBInstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the PolarDB-X 2.0 instance."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::PolarDBX::Account",
      "Properties": {
        "PolarDBXAccountName": {
          "Ref": "PolarDBXAccountName"
        },
        "DBInstanceId": {
          "Ref": "DBInstanceId"
        }
      }
    }
  },
  "Outputs": {
    "PolarDBXAccountName": {
      "Description": "The username of the account.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PolarDBXAccountName"
        ]
      }
    },
    "AccountDescription": {
      "Description": "The description of the account.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AccountDescription"
        ]
      }
    },
    "DBInstanceId": {
      "Description": "The ID of the PolarDB-X 2.0 instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DBInstanceId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The point in time when the account was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "AccountType": {
      "Description": "The type of the account.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AccountType"
        ]
      }
    }
  }
}