Class Role
Provides a Resource Manager role resource. Members are resource containers in the resource directory, which can physically isolate resources to form an independent resource grouping unit. You can create members in the resource folder to manage them in a unified manner. For information about Resource Manager role and how to use it, see What is Resource Manager role.
NOTE: Available in v1.82.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
// Add a Resource Manager role.
var example = new AliCloud.ResourceManager.Role("example", new AliCloud.ResourceManager.RoleArgs
{
AssumeRolePolicyDocument = @" {
""Statement"": [
{
""Action"": ""sts:AssumeRole"",
""Effect"": ""Allow"",
""Principal"": {
""RAM"":""acs:ram::103755469187****:root""
}
}
],
""Version"": ""1""
}
",
RoleName = "testrd",
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.ResourceManager
Assembly: Pulumi.AliCloud.dll
Syntax
public class Role : CustomResource
Constructors
View SourceRole(String, RoleArgs, CustomResourceOptions)
Create a Role resource with the given unique name, arguments, and options.
Declaration
public Role(string name, RoleArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| RoleArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArn
The resource descriptor of the role.
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AssumeRolePolicyDocument
The content of the permissions strategy that plays a role.
Declaration
public Output<string> AssumeRolePolicyDocument { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CreateDate
Role creation time.
Declaration
public Output<string> CreateDate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
The description of the Resource Manager role.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MaxSessionDuration
Role maximum session time. Valid values: [3600-43200]. Default to 3600.
Declaration
public Output<int?> MaxSessionDuration { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
RoleId
Declaration
public Output<string> RoleId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RoleName
Role Name. The length is 1 ~ 64 characters, which can include English letters, numbers, dots "." and dashes "-".
Declaration
public Output<string> RoleName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UpdateDate
Role update time.
Declaration
public Output<string> UpdateDate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, RoleState, CustomResourceOptions)
Get an existing Role resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Role Get(string name, Input<string> id, RoleState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| RoleState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Role |