GroupMembership

Provides a RAM Group membership resource.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a RAM Group membership.
        var @group = new AliCloud.Ram.Group("group", new AliCloud.Ram.GroupArgs
        {
            Comments = "this is a group comments.",
            Force = true,
        });
        var user = new AliCloud.Ram.User("user", new AliCloud.Ram.UserArgs
        {
            Comments = "yoyoyo",
            DisplayName = "user_display_name",
            Email = "hello.uuu@aaa.com",
            Force = true,
            Mobile = "86-18688888888",
        });
        var user1 = new AliCloud.Ram.User("user1", new AliCloud.Ram.UserArgs
        {
            Comments = "yoyoyo",
            DisplayName = "user_display_name1",
            Email = "hello.uuu@aaa.com",
            Force = true,
            Mobile = "86-18688888889",
        });
        var membership = new AliCloud.Ram.GroupMembership("membership", new AliCloud.Ram.GroupMembershipArgs
        {
            GroupName = @group.Name,
            UserNames = 
            {
                user.Name,
                user1.Name,
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

# Create a RAM Group membership.
group = alicloud.ram.Group("group",
    comments="this is a group comments.",
    force=True)
user = alicloud.ram.User("user",
    comments="yoyoyo",
    display_name="user_display_name",
    email="hello.uuu@aaa.com",
    force=True,
    mobile="86-18688888888")
user1 = alicloud.ram.User("user1",
    comments="yoyoyo",
    display_name="user_display_name1",
    email="hello.uuu@aaa.com",
    force=True,
    mobile="86-18688888889")
membership = alicloud.ram.GroupMembership("membership",
    group_name=group.name,
    user_names=[
        user.name,
        user1.name,
    ])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

// Create a RAM Group membership.
const group = new alicloud.ram.Group("group", {
    comments: "this is a group comments.",
    force: true,
});
const user = new alicloud.ram.User("user", {
    comments: "yoyoyo",
    displayName: "user_display_name",
    email: "hello.uuu@aaa.com",
    force: true,
    mobile: "86-18688888888",
});
const user1 = new alicloud.ram.User("user1", {
    comments: "yoyoyo",
    displayName: "user_display_name1",
    email: "hello.uuu@aaa.com",
    force: true,
    mobile: "86-18688888889",
});
const membership = new alicloud.ram.GroupMembership("membership", {
    groupName: group.name,
    userNames: [
        user.name,
        user1.name,
    ],
});

Create a GroupMembership Resource

def GroupMembership(resource_name, opts=None, group_name=None, user_names=None, __props__=None);
name string
The unique name of the resource.
args GroupMembershipArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args GroupMembershipArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args GroupMembershipArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

GroupMembership Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The GroupMembership resource accepts the following input properties:

GroupName string

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.

UserNames List<string>

Set of user name which will be added to group. Each name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as “-”,“.”,”_“, and must not begin with a hyphen.

GroupName string

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.

UserNames []string

Set of user name which will be added to group. Each name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as “-”,“.”,”_“, and must not begin with a hyphen.

groupName string

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.

userNames string[]

Set of user name which will be added to group. Each name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as “-”,“.”,”_“, and must not begin with a hyphen.

group_name str

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.

user_names List[str]

Set of user name which will be added to group. Each name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as “-”,“.”,”_“, and must not begin with a hyphen.

Outputs

All input properties are implicitly available as output properties. Additionally, the GroupMembership resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing GroupMembership Resource

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

public static get(name: string, id: Input<ID>, state?: GroupMembershipState, opts?: CustomResourceOptions): GroupMembership
static get(resource_name, id, opts=None, group_name=None, user_names=None, __props__=None);
func GetGroupMembership(ctx *Context, name string, id IDInput, state *GroupMembershipState, opts ...ResourceOption) (*GroupMembership, error)
public static GroupMembership Get(string name, Input<string> id, GroupMembershipState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

GroupName string

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.

UserNames List<string>

Set of user name which will be added to group. Each name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as “-”,“.”,”_“, and must not begin with a hyphen.

GroupName string

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.

UserNames []string

Set of user name which will be added to group. Each name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as “-”,“.”,”_“, and must not begin with a hyphen.

groupName string

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.

userNames string[]

Set of user name which will be added to group. Each name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as “-”,“.”,”_“, and must not begin with a hyphen.

group_name str

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.

user_names List[str]

Set of user name which will be added to group. Each name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as “-”,“.”,”_“, and must not begin with a hyphen.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.