Show / Hide Table of Contents

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",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Role
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.ResourceManager
Assembly: Pulumi.AliCloud.dll
Syntax
public class Role : CustomResource

Constructors

View Source

Role(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 Source

Arn

The resource descriptor of the role.

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

AssumeRolePolicyDocument

The content of the permissions strategy that plays a role.

Declaration
public Output<string> AssumeRolePolicyDocument { get; }
Property Value
Type Description
Output<System.String>
View Source

CreateDate

Role creation time.

Declaration
public Output<string> CreateDate { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

The description of the Resource Manager role.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

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>>
View Source

RoleId

Declaration
public Output<string> RoleId { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

UpdateDate

Role update time.

Declaration
public Output<string> UpdateDate { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.