Show / Hide Table of Contents

Class GroupPolicyAttachment

Provides a RAM Group Policy attachment resource.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    // Create a RAM Group Policy attachment.
    var @group = new AliCloud.Ram.Group("group", new AliCloud.Ram.GroupArgs
    {
        Comments = "this is a group comments.",
        Force = true,
    });
    var policy = new AliCloud.Ram.Policy("policy", new AliCloud.Ram.PolicyArgs
    {
        Description = "this is a policy test",
        Document = @"    {
  ""Statement"": [
    {
      ""Action"": [
        ""oss:ListObjects"",
        ""oss:GetObject""
      ],
      ""Effect"": ""Allow"",
      ""Resource"": [
        ""acs:oss:*:*:mybucket"",
        ""acs:oss:*:*:mybucket/*""
      ]
    }
  ],
    ""Version"": ""1""
}

",
        Force = true,
    });
    var attach = new AliCloud.Ram.GroupPolicyAttachment("attach", new AliCloud.Ram.GroupPolicyAttachmentArgs
    {
        GroupName = @group.Name,
        PolicyName = policy.Name,
        PolicyType = policy.Type,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
GroupPolicyAttachment
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.Ram
Assembly: Pulumi.AliCloud.dll
Syntax
public class GroupPolicyAttachment : CustomResource

Constructors

View Source

GroupPolicyAttachment(String, GroupPolicyAttachmentArgs, CustomResourceOptions)

Create a GroupPolicyAttachment resource with the given unique name, arguments, and options.

Declaration
public GroupPolicyAttachment(string name, GroupPolicyAttachmentArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

GroupPolicyAttachmentArgs 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

GroupName

Name of the RAM group. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.

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

PolicyName

Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.

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

PolicyType

Type of the RAM policy. It must be Custom or System.

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

Methods

View Source

Get(String, Input<String>, GroupPolicyAttachmentState, CustomResourceOptions)

Get an existing GroupPolicyAttachment resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static GroupPolicyAttachment Get(string name, Input<string> id, GroupPolicyAttachmentState 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.

GroupPolicyAttachmentState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
GroupPolicyAttachment
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.