aws.elasticache.UserGroup
Provides an ElastiCache user group resource.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var testUser = new Aws.ElastiCache.User("testUser", 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("testUserGroup", new()
{
Engine = "REDIS",
UserGroupId = "userGroupId",
UserIds = new[]
{
testUser.UserId,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/elasticache"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testUser, err := elasticache.NewUser(ctx, "testUser", &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, "testUserGroup", &elasticache.UserGroupArgs{
Engine: pulumi.String("REDIS"),
UserGroupId: pulumi.String("userGroupId"),
UserIds: pulumi.StringArray{
testUser.UserId,
},
})
if err != nil {
return err
}
return nil
})
}
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 testUser = new User("testUser", 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(testUser.userId())
.build());
}
}
import pulumi
import pulumi_aws as aws
test_user = aws.elasticache.User("testUser",
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("testUserGroup",
engine="REDIS",
user_group_id="userGroupId",
user_ids=[test_user.user_id])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const testUser = new aws.elasticache.User("testUser", {
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("testUserGroup", {
engine: "REDIS",
userGroupId: "userGroupId",
userIds: [testUser.userId],
});
resources:
testUser:
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
properties:
engine: REDIS
userGroupId: userGroupId
userIds:
- ${testUser.userId}
Create UserGroup Resource
new UserGroup(name: string, args: UserGroupArgs, opts?: CustomResourceOptions);
@overload
def UserGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
engine: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
user_group_id: Optional[str] = None,
user_ids: Optional[Sequence[str]] = None)
@overload
def UserGroup(resource_name: str,
args: UserGroupArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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
.- User
Group stringId The ID of the user group.
- Arn string
The ARN that identifies the user group.
- 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.- User
Ids List<string> The list of user IDs that belong to the user group.
- Engine string
The current supported value is
REDIS
.- User
Group stringId The ID of the user group.
- Arn string
The ARN that identifies the user group.
- 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.- User
Ids []string The list of user IDs that belong to the user group.
- engine String
The current supported value is
REDIS
.- user
Group StringId The ID of the user group.
- arn String
The ARN that identifies the user group.
- 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.- user
Ids List<String> The list of user IDs that belong to the user group.
- engine string
The current supported value is
REDIS
.- user
Group stringId The ID of the user group.
- arn string
The ARN that identifies the user group.
- {[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.- user
Ids string[] The list of user IDs that belong to the user group.
- engine str
The current supported value is
REDIS
.- user_
group_ strid The ID of the user group.
- arn str
The ARN that identifies the user group.
- 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
.- user
Group StringId The ID of the user group.
- arn String
The ARN that identifies the user group.
- 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.- user
Ids 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:
- Id string
The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Id string
The provider-assigned unique ID for this managed resource.
- map[string]string
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id String
The provider-assigned unique ID for this managed resource.
- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id string
The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id str
The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id String
The provider-assigned unique ID for this managed resource.
- Map<String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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.
- Arn string
The ARN that identifies the user group.
- Engine string
The current supported value is
REDIS
.- 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.- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- User
Group stringId The ID of the user group.
- User
Ids 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
.- 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.- map[string]string
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- User
Group stringId The ID of the user group.
- User
Ids []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
.- 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.- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- user
Group StringId The ID of the user group.
- user
Ids 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
.- {[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.- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- user
Group stringId The ID of the user group.
- user
Ids 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
.- 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.- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- user_
group_ strid The ID of the user group.
- 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
.- 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.- Map<String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- user
Group StringId The ID of the user group.
- user
Ids List<String> The list of user IDs that belong to the user group.
Import
ElastiCache user groups can be imported using the user_group_id
, e.g.,
$ pulumi import aws:elasticache/userGroup:UserGroup my_user_group userGoupId1
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.