DATASOURCE::RAM::Roles is used to query the details of RAM roles.
Syntax
{
"Type": "DATASOURCE::RAM::Roles",
"Properties": {
"RoleName": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
RoleName | String | No | Yes | The name of the RAM role. | You can use wildcard characters (* and ? ) to perform fuzzy match.
|
Return values (Fn::GetAtt)
- RoleNames: the names of the RAM roles.
- Roles: details of the RAM roles.
Property | Type | Description | Constraint |
---|---|---|---|
RoleNames | List | The names of the RAM roles. | None. |
Roles | List | Details of the RAM roles. | None. |
Description | String | The description of the RAM role. | None. |
UpdateDate | String | The time when the RAM role was updated. The time is displayed in UTC. | None. |
MaxSessionDuration | String | The maximum session duration of the RAM role. | Valid values: 3600 to 43200.
Unit: seconds. |
RoleName | String | The name of the RAM role. | None. |
CreateDate | String | The time when the RAM role was created. The time is displayed in UTC. | None. |
RoleId | String | The ID of the RAM role. | None. |
Arn | String | The Alibaba Cloud Resource Name (ARN) of the RAM role. | None. |
Examples
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RoleName": {
"Type": "String",
"Description": "Filter the results by a specific role name. Supports using * and ? to fuzzy match.",
"Default": "aliyun*"
}
},
"Resources": {
"Roles": {
"Type": "DATASOURCE::RAM::Roles",
"Properties": {
"RoleName": {
"Ref": "RoleName"
}
}
}
},
"Outputs": {
"RoleNames": {
"Description": "The list of role names.",
"Value": {
"Fn::GetAtt": [
"Roles",
"RoleNames"
]
}
},
"Roles": {
"Description": "The list of roles.",
"Value": {
"Fn::GetAtt": [
"Roles",
"Roles"
]
}
}
}
}