The ALIYUN::ResourceManager::Role resource creates a role.
Syntax
{
"Type": "ALIYUN::ResourceManager::Role",
"Properties": {
"AssumeRolePolicyDocument": Map,
"RoleName": String,
"Description": String,
"MaxSessionDuration": Integer
}
}Properties
Parameter | Type | Required | Editable | Description | Constraints |
AssumeRolePolicyDocument | Map | Yes | Yes | The trust policy that grants an entity permission to assume the role. | None |
RoleName | String | Yes | No | The name of the role. | None |
Description | String | No | No | The description of the role. | None |
MaxSessionDuration | Integer | No | Yes | The maximum session duration for the role, in seconds. | Valid values: 3600 to 43200. |
Return values
Fn::GetAtt
MaxSessionDuration: The maximum session duration of the role, in seconds.
UpdateDate: The time when the role was last updated.
RoleName: The name of the role.
Description: The description of the role.
AssumeRolePolicyDocument: The trust policy that is associated with the role.
CreateTime: The time when the role was created.
Arn: The Alibaba Cloud Resource Name (ARN) of the role.
RoleId: The ID of the role.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
MaxSessionDuration:
Type: Number
Description: The maximum session duration for the role, in seconds. Valid values are 3600 to 43200. The default value is 3600.
MinValue: 3600
MaxValue: 43200
Default: Null
Required: false
RoleName:
Type: String
Description: The name of the role.
Required: true
Description:
Type: String
Description: The description of the role.
AssociationProperty: TextArea
Default: Null
Required: false
AssumeRolePolicyDocument:
Description: The trust policy that grants an entity permission to assume the role.
Required: true
Type: Json
Resources:
ExtensionResource:
Type: ALIYUN::ResourceManager::Role
Properties:
MaxSessionDuration:
Ref: MaxSessionDuration
RoleName:
Ref: RoleName
Description:
Ref: Description
AssumeRolePolicyDocument:
Ref: AssumeRolePolicyDocument
Outputs:
Description:
Value:
Fn::GetAtt:
- ExtensionResource
- Description
Description: The description of the role.
AssumeRolePolicyDocument:
Value:
Fn::GetAtt:
- ExtensionResource
- AssumeRolePolicyDocument
Description: The trust policy that is associated with the role.
MaxSessionDuration:
Value:
Fn::GetAtt:
- ExtensionResource
- MaxSessionDuration
Description: The maximum session duration of the role, in seconds.
RoleId:
Value:
Fn::GetAtt:
- ExtensionResource
- RoleId
Description: The ID of the role.
UpdateDate:
Value:
Fn::GetAtt:
- ExtensionResource
- UpdateDate
Description: The time when the role was last updated.
RoleName:
Value:
Fn::GetAtt:
- ExtensionResource
- RoleName
Description: The name of the role.
CreateTime:
Value:
Fn::GetAtt:
- ExtensionResource
- CreateTime
Description: The time when the role was created.
Arn:
Value:
Fn::GetAtt:
- ExtensionResource
- Arn
Description: The Alibaba Cloud Resource Name (ARN) of the role.
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"MaxSessionDuration": {
"Type": "Number",
"Description": "The maximum session duration for the role, in seconds. Valid values are 3600 to 43200. The default value is 3600.",
"MinValue": 3600,
"MaxValue": 43200,
"Default": null,
"Required": false
},
"RoleName": {
"Type": "String",
"Description": "The name of the role.",
"Required": true
},
"Description": {
"Type": "String",
"Description": "The description of the role.",
"AssociationProperty": "TextArea",
"Default": null,
"Required": false
},
"AssumeRolePolicyDocument": {
"Description": "The trust policy that grants an entity permission to assume the role.",
"Required": true,
"Type": "Json"
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ResourceManager::Role",
"Properties": {
"MaxSessionDuration": {
"Ref": "MaxSessionDuration"
},
"RoleName": {
"Ref": "RoleName"
},
"Description": {
"Ref": "Description"
},
"AssumeRolePolicyDocument": {
"Ref": "AssumeRolePolicyDocument"
}
}
}
},
"Outputs": {
"Description": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Description"
]
},
"Description": "The description of the role."
},
"AssumeRolePolicyDocument": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AssumeRolePolicyDocument"
]
},
"Description": "The trust policy that is associated with the role."
},
"MaxSessionDuration": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"MaxSessionDuration"
]
},
"Description": "The maximum session duration of the role, in seconds."
},
"RoleId": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RoleId"
]
},
"Description": "The ID of the role."
},
"UpdateDate": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"UpdateDate"
]
},
"Description": "The time when the role was last updated."
},
"RoleName": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RoleName"
]
},
"Description": "The name of the role."
},
"CreateTime": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CreateTime"
]
},
"Description": "The time when the role was created."
},
"Arn": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Arn"
]
},
"Description": "The Alibaba Cloud Resource Name (ARN) of the role."
}
}
}