1. Packages
  2. AWS Classic
  3. API Docs
  4. elasticache
  5. UserGroup

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

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

aws.elasticache.UserGroup

Explore with Pulumi AI

aws logo

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

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

    Provides an ElastiCache user group resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.elasticache.User("test", {
        userId: "testUserId",
        userName: "default",
        accessString: "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember",
        engine: "REDIS",
        passwords: ["password123456789"],
    });
    const testUserGroup = new aws.elasticache.UserGroup("test", {
        engine: "REDIS",
        userGroupId: "userGroupId",
        userIds: [test.userId],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.elasticache.User("test",
        user_id="testUserId",
        user_name="default",
        access_string="on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember",
        engine="REDIS",
        passwords=["password123456789"])
    test_user_group = aws.elasticache.UserGroup("test",
        engine="REDIS",
        user_group_id="userGroupId",
        user_ids=[test.user_id])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := elasticache.NewUser(ctx, "test", &elasticache.UserArgs{
    			UserId:       pulumi.String("testUserId"),
    			UserName:     pulumi.String("default"),
    			AccessString: pulumi.String("on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember"),
    			Engine:       pulumi.String("REDIS"),
    			Passwords: pulumi.StringArray{
    				pulumi.String("password123456789"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = elasticache.NewUserGroup(ctx, "test", &elasticache.UserGroupArgs{
    			Engine:      pulumi.String("REDIS"),
    			UserGroupId: pulumi.String("userGroupId"),
    			UserIds: pulumi.StringArray{
    				test.UserId,
    			},
    		})
    		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 test = new Aws.ElastiCache.User("test", new()
        {
            UserId = "testUserId",
            UserName = "default",
            AccessString = "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember",
            Engine = "REDIS",
            Passwords = new[]
            {
                "password123456789",
            },
        });
    
        var testUserGroup = new Aws.ElastiCache.UserGroup("test", new()
        {
            Engine = "REDIS",
            UserGroupId = "userGroupId",
            UserIds = new[]
            {
                test.UserId,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.elasticache.User;
    import com.pulumi.aws.elasticache.UserArgs;
    import com.pulumi.aws.elasticache.UserGroup;
    import com.pulumi.aws.elasticache.UserGroupArgs;
    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 test = new User("test", UserArgs.builder()        
                .userId("testUserId")
                .userName("default")
                .accessString("on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember")
                .engine("REDIS")
                .passwords("password123456789")
                .build());
    
            var testUserGroup = new UserGroup("testUserGroup", UserGroupArgs.builder()        
                .engine("REDIS")
                .userGroupId("userGroupId")
                .userIds(test.userId())
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:elasticache:User
        properties:
          userId: testUserId
          userName: default
          accessString: on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember
          engine: REDIS
          passwords:
            - password123456789
      testUserGroup:
        type: aws:elasticache:UserGroup
        name: test
        properties:
          engine: REDIS
          userGroupId: userGroupId
          userIds:
            - ${test.userId}
    

    Create UserGroup Resource

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

    Constructor syntax

    new UserGroup(name: string, args: UserGroupArgs, opts?: CustomResourceOptions);
    @overload
    def UserGroup(resource_name: str,
                  args: UserGroupArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def UserGroup(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  engine: Optional[str] = None,
                  user_group_id: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  user_ids: Optional[Sequence[str]] = None)
    func NewUserGroup(ctx *Context, name string, args UserGroupArgs, opts ...ResourceOption) (*UserGroup, error)
    public UserGroup(string name, UserGroupArgs args, CustomResourceOptions? opts = null)
    public UserGroup(String name, UserGroupArgs args)
    public UserGroup(String name, UserGroupArgs args, CustomResourceOptions options)
    
    type: aws:elasticache:UserGroup
    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 UserGroupArgs
    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 UserGroupArgs
    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 UserGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UserGroupArgs
    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 awsUserGroupResource = new Aws.ElastiCache.UserGroup("awsUserGroupResource", new()
    {
        Engine = "string",
        UserGroupId = "string",
        Tags = 
        {
            { "string", "string" },
        },
        UserIds = new[]
        {
            "string",
        },
    });
    
    example, err := elasticache.NewUserGroup(ctx, "awsUserGroupResource", &elasticache.UserGroupArgs{
    	Engine:      pulumi.String("string"),
    	UserGroupId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	UserIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var awsUserGroupResource = new UserGroup("awsUserGroupResource", UserGroupArgs.builder()        
        .engine("string")
        .userGroupId("string")
        .tags(Map.of("string", "string"))
        .userIds("string")
        .build());
    
    aws_user_group_resource = aws.elasticache.UserGroup("awsUserGroupResource",
        engine="string",
        user_group_id="string",
        tags={
            "string": "string",
        },
        user_ids=["string"])
    
    const awsUserGroupResource = new aws.elasticache.UserGroup("awsUserGroupResource", {
        engine: "string",
        userGroupId: "string",
        tags: {
            string: "string",
        },
        userIds: ["string"],
    });
    
    type: aws:elasticache:UserGroup
    properties:
        engine: string
        tags:
            string: string
        userGroupId: string
        userIds:
            - string
    

    UserGroup 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 UserGroup resource accepts the following input properties:

    Engine string
    The current supported value is REDIS.
    UserGroupId string

    The ID of the user group.

    The following arguments are optional:

    Tags Dictionary<string, string>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    UserIds List<string>
    The list of user IDs that belong to the user group.
    Engine string
    The current supported value is REDIS.
    UserGroupId string

    The ID of the user group.

    The following arguments are optional:

    Tags map[string]string
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    UserIds []string
    The list of user IDs that belong to the user group.
    engine String
    The current supported value is REDIS.
    userGroupId String

    The ID of the user group.

    The following arguments are optional:

    tags Map<String,String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    userIds List<String>
    The list of user IDs that belong to the user group.
    engine string
    The current supported value is REDIS.
    userGroupId string

    The ID of the user group.

    The following arguments are optional:

    tags {[key: string]: string}
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    userIds string[]
    The list of user IDs that belong to the user group.
    engine str
    The current supported value is REDIS.
    user_group_id str

    The ID of the user group.

    The following arguments are optional:

    tags Mapping[str, str]
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    user_ids Sequence[str]
    The list of user IDs that belong to the user group.
    engine String
    The current supported value is REDIS.
    userGroupId String

    The ID of the user group.

    The following arguments are optional:

    tags Map<String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    userIds List<String>
    The list of user IDs that belong to the user group.

    Outputs

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

    Arn string
    The ARN that identifies the user group.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The ARN that identifies the user group.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN that identifies the user group.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The ARN that identifies the user group.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The ARN that identifies the user group.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN that identifies the user group.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing UserGroup Resource

    Get an existing UserGroup 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?: UserGroupState, opts?: CustomResourceOptions): UserGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            engine: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            user_group_id: Optional[str] = None,
            user_ids: Optional[Sequence[str]] = None) -> UserGroup
    func GetUserGroup(ctx *Context, name string, id IDInput, state *UserGroupState, opts ...ResourceOption) (*UserGroup, error)
    public static UserGroup Get(string name, Input<string> id, UserGroupState? state, CustomResourceOptions? opts = null)
    public static UserGroup get(String name, Output<String> id, UserGroupState 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 that identifies the user group.
    Engine string
    The current supported value is REDIS.
    Tags Dictionary<string, string>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    UserGroupId string

    The ID of the user group.

    The following arguments are optional:

    UserIds List<string>
    The list of user IDs that belong to the user group.
    Arn string
    The ARN that identifies the user group.
    Engine string
    The current supported value is REDIS.
    Tags map[string]string
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    UserGroupId string

    The ID of the user group.

    The following arguments are optional:

    UserIds []string
    The list of user IDs that belong to the user group.
    arn String
    The ARN that identifies the user group.
    engine String
    The current supported value is REDIS.
    tags Map<String,String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    userGroupId String

    The ID of the user group.

    The following arguments are optional:

    userIds List<String>
    The list of user IDs that belong to the user group.
    arn string
    The ARN that identifies the user group.
    engine string
    The current supported value is REDIS.
    tags {[key: string]: string}
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    userGroupId string

    The ID of the user group.

    The following arguments are optional:

    userIds string[]
    The list of user IDs that belong to the user group.
    arn str
    The ARN that identifies the user group.
    engine str
    The current supported value is REDIS.
    tags Mapping[str, str]
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    user_group_id str

    The ID of the user group.

    The following arguments are optional:

    user_ids Sequence[str]
    The list of user IDs that belong to the user group.
    arn String
    The ARN that identifies the user group.
    engine String
    The current supported value is REDIS.
    tags Map<String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    userGroupId String

    The ID of the user group.

    The following arguments are optional:

    userIds List<String>
    The list of user IDs that belong to the user group.

    Import

    Using pulumi import, import ElastiCache user groups using the user_group_id. For example:

    $ pulumi import aws:elasticache/userGroup:UserGroup my_user_group userGoupId1
    

    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.0 published on Monday, Apr 15, 2024 by Pulumi