All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::RAM::Roles

Last Updated:Dec 06, 2024

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 (*) and question mark (?) wildcard characters to perform a fuzzy match.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

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"
        ]
      }
    }
  }
}