DATASOURCE::RAM::Role类型用于获取单个角色信息。
语法
{
"Type": "DATASOURCE::RAM::Role",
"Properties": {
"RoleName": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
RoleName | String | 否 | 是 | 指定角色名。 | 无 |
返回值
Fn::GetAtt
MaxSessionDuration:角色最大会话时间。
UpdateDate:更新时间。
RoleName:角色名称。
Description:角色描述。
Arn:角色的资源描述符。
RoleId:角色 ID。
CreateDate:创建时间。
示例
YAML
格式ROSTemplateFormatVersion: '2015-09-01' Parameters: RoleName: Type: String Description: en: RAM role name. If not specified, the current ram role will be used. Required: false AssociationProperty: ALIYUN::RAM::Role Resources: Role: Type: DATASOURCE::RAM::Role Properties: RoleName: Ref: RoleName Outputs: MaxSessionDuration: Description: The maximum session duration of the RAM role. Value: Fn::GetAtt: - Role - MaxSessionDuration UpdateDate: Description: The time when the RAM role was last updated. Value: Fn::GetAtt: - Role - UpdateDate RoleName: Description: The name of the RAM role. Value: Fn::GetAtt: - Role - RoleName Description: Description: The description of the RAM role. Value: Fn::GetAtt: - Role - Description Arn: Description: The ARN of the RAM role. Value: Fn::GetAtt: - Role - Arn RoleId: Description: The ID of the RAM role. Value: Fn::GetAtt: - Role - RoleId CreateDate: Description: The time when the RAM role was created. Value: Fn::GetAtt: - Role - CreateDate
JSON
格式{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "RoleName": { "Type": "String", "Description": { "en": "RAM role name. If not specified, the current ram role will be used." }, "Required": false, "AssociationProperty": "ALIYUN::RAM::Role" } }, "Resources": { "Role": { "Type": "DATASOURCE::RAM::Role", "Properties": { "RoleName": { "Ref": "RoleName" } } } }, "Outputs": { "MaxSessionDuration": { "Description": "The maximum session duration of the RAM role.", "Value": { "Fn::GetAtt": [ "Role", "MaxSessionDuration" ] } }, "UpdateDate": { "Description": "The time when the RAM role was last updated.", "Value": { "Fn::GetAtt": [ "Role", "UpdateDate" ] } }, "RoleName": { "Description": "The name of the RAM role.", "Value": { "Fn::GetAtt": [ "Role", "RoleName" ] } }, "Description": { "Description": "The description of the RAM role.", "Value": { "Fn::GetAtt": [ "Role", "Description" ] } }, "Arn": { "Description": "The ARN of the RAM role.", "Value": { "Fn::GetAtt": [ "Role", "Arn" ] } }, "RoleId": { "Description": "The ID of the RAM role.", "Value": { "Fn::GetAtt": [ "Role", "RoleId" ] } }, "CreateDate": { "Description": "The time when the RAM role was created.", "Value": { "Fn::GetAtt": [ "Role", "CreateDate" ] } } } }