文档

DATASOURCE::GraphDatabase::Account

更新时间:

DATASOURCE::GraphDatabase::Account类型用于查询单个账号详情。

语法

{
  "Type": "DATASOURCE::GraphDatabase::Account",
  "Properties": {
    "AccountName": String,
    "DbInstanceId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

AccountName

String

账号名称。

DbInstanceId

String

数据库实例ID。

RefreshOptions

String

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

有效值:

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

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

返回值

Fn::GetAtt

  • AccountDescription:GraphDatabase的账号描述。

  • AccountType:GraphDatabase的账号类型。

  • AccountName:GraphDatabase的账号名称。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      DbInstanceId:
        Type: String
        Description:
          en: The ID of the GDB Instance.
        Required: true
      AccountName:
        Type: String
        Description:
          en: The name of the GDB Account.
        Required: true
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::GraphDatabase::Account
        Properties:
          DbInstanceId:
            Ref: DbInstanceId
          AccountName:
            Ref: AccountName
    Outputs:
      AccountDescription:
        Description: GDB Account description.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - AccountDescription
      AccountType:
        Description: GDB Account Type.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - AccountType
      AccountName:
        Description: The name of the GDB Account.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - AccountName
    
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "DbInstanceId": {
          "Type": "String",
          "Description": {
            "en": "The ID of the GDB Instance."
          },
          "Required": true
        },
        "AccountName": {
          "Type": "String",
          "Description": {
            "en": "The name of the GDB Account."
          },
          "Required": true
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::GraphDatabase::Account",
          "Properties": {
            "DbInstanceId": {
              "Ref": "DbInstanceId"
            },
            "AccountName": {
              "Ref": "AccountName"
            }
          }
        }
      },
      "Outputs": {
        "AccountDescription": {
          "Description": "GDB Account description.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "AccountDescription"
            ]
          }
        },
        "AccountType": {
          "Description": "GDB Account Type.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "AccountType"
            ]
          }
        },
        "AccountName": {
          "Description": "The name of the GDB Account.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "AccountName"
            ]
          }
        }
      }
    }