All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::RAM::Role

Last Updated:Sep 30, 2024

DATASOURCE::RAM::Role is used to query the information about a role.

Syntax

{
  "Type": "DATASOURCE::RAM::Role",
  "Properties": {
    "RoleName": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

RoleName

String

No

Yes

The role name.

None.

Return values

Fn::GetAtt

  • MaxSessionDuration: the maximum session duration of the role.

  • UpdateDate: the time when the role was updated.

  • RoleName: the role name.

  • Description: the description of the role.

  • Arn: the Alibaba Cloud Resource Name (ARN) of the role.

  • RoleId: the role ID.

  • CreateDate: the time when the role was created.

Examples

  • YAML format

    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 format

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