DATASOURCE::RAM::User类型用于查询单个的RAM用户的详细信息。
语法
{
"Type": "DATASOURCE::RAM::User",
"Properties": {
"UserName": String,
"UserId": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
UserName | String | 否 | 是 | RAM 用户的登录名称。 | 无 |
UserId | String | 否 | 是 | RAM 用户 ID。 | 无 |
返回值
Fn::GetAtt
UserName:RAM 用户的登录名称。
Email:RAM 用户的电子邮箱。
UserId:RAM 用户 ID。
Comments:备注。
DisplayName:RAM 用户的显示名称。
MobilePhone:RAM 用户的手机号码。
示例
YAML
格式ROSTemplateFormatVersion: '2015-09-01' Parameters: UserName: Type: String Description: en: RAM user name. At most one UserName and UserId can be specified; if both are specified, UserName will be used. If neither is specified, the current user ID will be used. Required: false UserId: Type: String Description: en: RAM user ID. At most one UserName and UserId can be specified; if both are specified, UserName will be used. If neither is specified, the current user ID will be used. Required: false Resources: User: Type: DATASOURCE::RAM::User Properties: UserName: Ref: UserName UserId: Ref: UserId Outputs: UserName: Description: The name of the RAM user. Value: Fn::GetAtt: - User - UserName Email: Description: The email address of the RAM user. Value: Fn::GetAtt: - User - Email UserId: Description: The ID of the RAM user. Value: Fn::GetAtt: - User - UserId Comments: Description: The comments of the RAM user. Value: Fn::GetAtt: - User - Comments DisplayName: Description: The display name of the RAM user. Value: Fn::GetAtt: - User - DisplayName MobilePhone: Description: The mobile phone number of the RAM user. Value: Fn::GetAtt: - User - MobilePhone
JSON
格式{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "UserName": { "Type": "String", "Description": { "en": "RAM user name. At most one UserName and UserId can be specified; if both are specified, UserName will be used. If neither is specified, the current user ID will be used." }, "Required": false }, "UserId": { "Type": "String", "Description": { "en": "RAM user ID. At most one UserName and UserId can be specified; if both are specified, UserName will be used. If neither is specified, the current user ID will be used." }, "Required": false } }, "Resources": { "User": { "Type": "DATASOURCE::RAM::User", "Properties": { "UserName": { "Ref": "UserName" }, "UserId": { "Ref": "UserId" } } } }, "Outputs": { "UserName": { "Description": "The name of the RAM user.", "Value": { "Fn::GetAtt": [ "User", "UserName" ] } }, "Email": { "Description": "The email address of the RAM user.", "Value": { "Fn::GetAtt": [ "User", "Email" ] } }, "UserId": { "Description": "The ID of the RAM user.", "Value": { "Fn::GetAtt": [ "User", "UserId" ] } }, "Comments": { "Description": "The comments of the RAM user.", "Value": { "Fn::GetAtt": [ "User", "Comments" ] } }, "DisplayName": { "Description": "The display name of the RAM user.", "Value": { "Fn::GetAtt": [ "User", "DisplayName" ] } }, "MobilePhone": { "Description": "The mobile phone number of the RAM user.", "Value": { "Fn::GetAtt": [ "User", "MobilePhone" ] } } } }