DATASOURCE::RAM::Roles is used to query the information about Resource Access Management (RAM) roles.
Syntax
{
"Type": "DATASOURCE::RAM::Roles",
"Properties": {
"RoleName": String,
"RefreshOptions": String
}
}Properties
Property | Type | Required | Editable | Description | Constraint |
RoleName | String | No | Yes | The name of the RAM role. | You can use the asterisk ( |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
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 update time. 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 creation time. 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"
]
}
}
}
}