UserGroupAssociationArgs

data class UserGroupAssociationArgs(val userGroupId: Output<String>? = null, val userId: Output<String>? = null) : ConvertibleToJava<UserGroupAssociationArgs>

Associate an existing ElastiCache user and an existing user group.

NOTE: The provider will detect changes in the aws.elasticache.UserGroup since aws.elasticache.UserGroupAssociation changes the user IDs associated with the user group. You can ignore these changes with the ignore_changes option as shown in the example.

Example Usage

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 com.pulumi.aws.elasticache.UserGroupAssociation;
import com.pulumi.aws.elasticache.UserGroupAssociationArgs;
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 default_ = new User("default", UserArgs.builder()
.userId("defaultUserID")
.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 exampleUserGroup = new UserGroup("exampleUserGroup", UserGroupArgs.builder()
.engine("REDIS")
.userGroupId("userGroupId")
.userIds(default_.userId())
.build());
var exampleUser = new User("exampleUser", UserArgs.builder()
.userId("exampleUserID")
.userName("exampleuser")
.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 exampleUserGroupAssociation = new UserGroupAssociation("exampleUserGroupAssociation", UserGroupAssociationArgs.builder()
.userGroupId(exampleUserGroup.userGroupId())
.userId(exampleUser.userId())
.build());
}
}

Import

ElastiCache user group associations can be imported using the user_group_id and user_id, e.g.,

$ pulumi import aws:elasticache/userGroupAssociation:UserGroupAssociation example userGoupId1,userId

Constructors

Link copied to clipboard
constructor(userGroupId: Output<String>? = null, userId: Output<String>? = null)

Properties

Link copied to clipboard
val userGroupId: Output<String>? = null

ID of the user group.

Link copied to clipboard
val userId: Output<String>? = null

ID of the user to associated with the user group.

Functions

Link copied to clipboard
open override fun toJava(): UserGroupAssociationArgs