DATASOURCE::PolarDBX::Accounts类型用于获取PolarDB-X账号列表。
语法
{
"Type": "DATASOURCE::PolarDBX::Accounts",
"Properties": {
"DBInstanceId": String,
"AccountType": Integer,
"PolarDBXAccountName": String,
"RefreshOptions": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
DBInstanceId | String | 是 | 是 | PolarDB-X实例ID。 | 无 |
AccountType | Integer | 否 | 是 | 账号类型。 | 取值:
|
PolarDBXAccountName | String | 否 | 是 | 账号名称。 | 无 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值:
|
返回值
Fn::GetAtt
PolarDBXAccountNames:PolarDB-X账号名称列表。
PolarDBXAccounts:PolarDB-X账号详情列表。
属性名称 | 类型 | 描述 | 约束 |
PolarDBXAccountNames | List | PolarDB-X账号名称列表。 | 无 |
PolarDBXAccounts | List | PolarDB-X账号详情列表。 | 无 |
PolarDBXAccountName | String | PolarDB-X账号名称。 | 无 |
AccountDescription | String | 账号描述。 | 无 |
DBInstanceId | String | PolarDB-X实例ID。 | 无 |
CreateTime | String | 账号创建时间。 | 无 |
AccountType | String | 账号类型。 | 无 |
示例
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: false
DBInstanceId:
Type: String
Description:
en: The ID of the PolarDB-X 2.0 instance.
Required: true
Resources:
ExtensionDataSource:
Type: DATASOURCE::PolarDBX::Accounts
Properties:
PolarDBXAccountName:
Ref: PolarDBXAccountName
DBInstanceId:
Ref: DBInstanceId
Outputs:
PolarDBXAccountNames:
Description: The list of PolarDB-X 2.0 account names.
Value:
Fn::GetAtt:
- ExtensionDataSource
- PolarDBXAccountNames
PolarDBXAccounts:
Description: The list of PolarDB-X 2.0 accounts.
Value:
Fn::GetAtt:
- ExtensionDataSource
- PolarDBXAccounts
{
"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": false
},
"DBInstanceId": {
"Type": "String",
"Description": {
"en": "The ID of the PolarDB-X 2.0 instance."
},
"Required": true
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::PolarDBX::Accounts",
"Properties": {
"PolarDBXAccountName": {
"Ref": "PolarDBXAccountName"
},
"DBInstanceId": {
"Ref": "DBInstanceId"
}
}
}
},
"Outputs": {
"PolarDBXAccountNames": {
"Description": "The list of PolarDB-X 2.0 account names.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"PolarDBXAccountNames"
]
}
},
"PolarDBXAccounts": {
"Description": "The list of PolarDB-X 2.0 accounts.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"PolarDBXAccounts"
]
}
}
}
}
该文章对您有帮助吗?