1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ram
  5. GroupMembership
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ram.GroupMembership

Explore with Pulumi AI

Provides a RAM Group membership resource.

NOTE: Available since v1.0.0+.

Create GroupMembership Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new GroupMembership(name: string, args: GroupMembershipArgs, opts?: CustomResourceOptions);
@overload
def GroupMembership(resource_name: str,
                    args: GroupMembershipArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def GroupMembership(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    group_name: Optional[str] = None,
                    user_names: Optional[Sequence[str]] = None)
func NewGroupMembership(ctx *Context, name string, args GroupMembershipArgs, opts ...ResourceOption) (*GroupMembership, error)
public GroupMembership(string name, GroupMembershipArgs args, CustomResourceOptions? opts = null)
public GroupMembership(String name, GroupMembershipArgs args)
public GroupMembership(String name, GroupMembershipArgs args, CustomResourceOptions options)
type: alicloud:ram:GroupMembership
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. GroupMembershipArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. GroupMembershipArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. GroupMembershipArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. GroupMembershipArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. GroupMembershipArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var groupMembershipResource = new AliCloud.Ram.GroupMembership("groupMembershipResource", new()
{
    GroupName = "string",
    UserNames = new[]
    {
        "string",
    },
});
Copy
example, err := ram.NewGroupMembership(ctx, "groupMembershipResource", &ram.GroupMembershipArgs{
	GroupName: pulumi.String("string"),
	UserNames: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var groupMembershipResource = new GroupMembership("groupMembershipResource", GroupMembershipArgs.builder()
    .groupName("string")
    .userNames("string")
    .build());
Copy
group_membership_resource = alicloud.ram.GroupMembership("groupMembershipResource",
    group_name="string",
    user_names=["string"])
Copy
const groupMembershipResource = new alicloud.ram.GroupMembership("groupMembershipResource", {
    groupName: "string",
    userNames: ["string"],
});
Copy
type: alicloud:ram:GroupMembership
properties:
    groupName: string
    userNames:
        - string
Copy

GroupMembership Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The GroupMembership resource accepts the following input properties:

GroupName
This property is required.
Changes to this property will trigger replacement.
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 This property is required. 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
This property is required.
Changes to this property will trigger replacement.
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 This property is required. []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
This property is required.
Changes to this property will trigger replacement.
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 This property is required. 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
This property is required.
Changes to this property will trigger replacement.
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 This property is required. 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
This property is required.
Changes to this property will trigger replacement.
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 This property is required. Sequence[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.
groupName
This property is required.
Changes to this property will trigger replacement.
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 This property is required. 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.

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 string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up 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
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        group_name: Optional[str] = None,
        user_names: Optional[Sequence[str]] = None) -> GroupMembership
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)
public static GroupMembership get(String name, Output<String> id, GroupMembershipState state, CustomResourceOptions options)
resources:  _:    type: alicloud:ram:GroupMembership    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Sequence[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.
groupName Changes to this property will trigger replacement. 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.

Import

RAM Group membership can be imported using the id, e.g.

$ pulumi import alicloud:ram/groupMembership:GroupMembership example my-group
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.