1. Packages
  2. AWS Classic
  3. API Docs
  4. iam
  5. Group

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi

aws.iam.Group

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi

    Provides an IAM group.

    NOTE on user management: Using aws.iam.GroupMembership or aws.iam.UserGroupMembership resources in addition to manually managing user/group membership using the console may lead to configuration drift or conflicts. For this reason, it’s recommended to either manage membership entirely with the provider or entirely within the AWS console.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const developers = new aws.iam.Group("developers", {
        name: "developers",
        path: "/users/",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    developers = aws.iam.Group("developers",
        name="developers",
        path="/users/")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iam.NewGroup(ctx, "developers", &iam.GroupArgs{
    			Name: pulumi.String("developers"),
    			Path: pulumi.String("/users/"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var developers = new Aws.Iam.Group("developers", new()
        {
            Name = "developers",
            Path = "/users/",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.iam.Group;
    import com.pulumi.aws.iam.GroupArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var developers = new Group("developers", GroupArgs.builder()        
                .name("developers")
                .path("/users/")
                .build());
    
        }
    }
    
    resources:
      developers:
        type: aws:iam:Group
        properties:
          name: developers
          path: /users/
    

    Create Group Resource

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

    Constructor syntax

    new Group(name: string, args?: GroupArgs, opts?: CustomResourceOptions);
    @overload
    def Group(resource_name: str,
              args: Optional[GroupArgs] = None,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Group(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              name: Optional[str] = None,
              path: Optional[str] = None)
    func NewGroup(ctx *Context, name string, args *GroupArgs, opts ...ResourceOption) (*Group, error)
    public Group(string name, GroupArgs? args = null, CustomResourceOptions? opts = null)
    public Group(String name, GroupArgs args)
    public Group(String name, GroupArgs args, CustomResourceOptions options)
    
    type: aws:iam:Group
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

    Example

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

    var awsGroupResource = new Aws.Iam.Group("awsGroupResource", new()
    {
        Name = "string",
        Path = "string",
    });
    
    example, err := iam.NewGroup(ctx, "awsGroupResource", &iam.GroupArgs{
    	Name: pulumi.String("string"),
    	Path: pulumi.String("string"),
    })
    
    var awsGroupResource = new Group("awsGroupResource", GroupArgs.builder()        
        .name("string")
        .path("string")
        .build());
    
    aws_group_resource = aws.iam.Group("awsGroupResource",
        name="string",
        path="string")
    
    const awsGroupResource = new aws.iam.Group("awsGroupResource", {
        name: "string",
        path: "string",
    });
    
    type: aws:iam:Group
    properties:
        name: string
        path: string
    

    Group Resource Properties

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

    Inputs

    The Group resource accepts the following input properties:

    Name string
    The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".
    Path string
    Path in which to create the group.
    Name string
    The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".
    Path string
    Path in which to create the group.
    name String
    The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".
    path String
    Path in which to create the group.
    name string
    The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".
    path string
    Path in which to create the group.
    name str
    The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".
    path str
    Path in which to create the group.
    name String
    The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".
    path String
    Path in which to create the group.

    Outputs

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

    Arn string
    The ARN assigned by AWS for this group.
    Id string
    The provider-assigned unique ID for this managed resource.
    UniqueId string
    The [unique ID][1] assigned by AWS.
    Arn string
    The ARN assigned by AWS for this group.
    Id string
    The provider-assigned unique ID for this managed resource.
    UniqueId string
    The [unique ID][1] assigned by AWS.
    arn String
    The ARN assigned by AWS for this group.
    id String
    The provider-assigned unique ID for this managed resource.
    uniqueId String
    The [unique ID][1] assigned by AWS.
    arn string
    The ARN assigned by AWS for this group.
    id string
    The provider-assigned unique ID for this managed resource.
    uniqueId string
    The [unique ID][1] assigned by AWS.
    arn str
    The ARN assigned by AWS for this group.
    id str
    The provider-assigned unique ID for this managed resource.
    unique_id str
    The [unique ID][1] assigned by AWS.
    arn String
    The ARN assigned by AWS for this group.
    id String
    The provider-assigned unique ID for this managed resource.
    uniqueId String
    The [unique ID][1] assigned by AWS.

    Look up Existing Group Resource

    Get an existing Group 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?: GroupState, opts?: CustomResourceOptions): Group
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            name: Optional[str] = None,
            path: Optional[str] = None,
            unique_id: Optional[str] = None) -> Group
    func GetGroup(ctx *Context, name string, id IDInput, state *GroupState, opts ...ResourceOption) (*Group, error)
    public static Group Get(string name, Input<string> id, GroupState? state, CustomResourceOptions? opts = null)
    public static Group get(String name, Output<String> id, GroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    Arn string
    The ARN assigned by AWS for this group.
    Name string
    The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".
    Path string
    Path in which to create the group.
    UniqueId string
    The [unique ID][1] assigned by AWS.
    Arn string
    The ARN assigned by AWS for this group.
    Name string
    The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".
    Path string
    Path in which to create the group.
    UniqueId string
    The [unique ID][1] assigned by AWS.
    arn String
    The ARN assigned by AWS for this group.
    name String
    The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".
    path String
    Path in which to create the group.
    uniqueId String
    The [unique ID][1] assigned by AWS.
    arn string
    The ARN assigned by AWS for this group.
    name string
    The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".
    path string
    Path in which to create the group.
    uniqueId string
    The [unique ID][1] assigned by AWS.
    arn str
    The ARN assigned by AWS for this group.
    name str
    The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".
    path str
    Path in which to create the group.
    unique_id str
    The [unique ID][1] assigned by AWS.
    arn String
    The ARN assigned by AWS for this group.
    name String
    The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".
    path String
    Path in which to create the group.
    uniqueId String
    The [unique ID][1] assigned by AWS.

    Import

    Using pulumi import, import IAM Groups using the name. For example:

    $ pulumi import aws:iam/group:Group developers developers
    

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi