- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteUserGroupCommand
For Valkey engine version 7.2 onwards and Redis OSS 6.0 onwards: Deletes a user group. The user group must first be disassociated from the replication group before it can be deleted. For more information, see Using Role Based Access Control (RBAC) .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ElastiCacheClient, DeleteUserGroupCommand } from "@aws-sdk/client-elasticache"; // ES Modules import
// const { ElastiCacheClient, DeleteUserGroupCommand } = require("@aws-sdk/client-elasticache"); // CommonJS import
const client = new ElastiCacheClient(config);
const input = { // DeleteUserGroupMessage
UserGroupId: "STRING_VALUE", // required
};
const command = new DeleteUserGroupCommand(input);
const response = await client.send(command);
// { // UserGroup
// UserGroupId: "STRING_VALUE",
// Status: "STRING_VALUE",
// Engine: "STRING_VALUE",
// UserIds: [ // UserIdList
// "STRING_VALUE",
// ],
// MinimumEngineVersion: "STRING_VALUE",
// PendingChanges: { // UserGroupPendingChanges
// UserIdsToRemove: [
// "STRING_VALUE",
// ],
// UserIdsToAdd: [
// "STRING_VALUE",
// ],
// },
// ReplicationGroups: [ // UGReplicationGroupIdList
// "STRING_VALUE",
// ],
// ServerlessCaches: [ // UGServerlessCacheIdList
// "STRING_VALUE",
// ],
// ARN: "STRING_VALUE",
// };
DeleteUserGroupCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
UserGroupId Required | string | undefined | The ID of the user group. |
DeleteUserGroupCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
ARN | string | undefined | The Amazon Resource Name (ARN) of the user group. |
Engine | string | undefined | The options are valkey or redis. |
MinimumEngineVersion | string | undefined | The minimum engine version required, which is Redis OSS 6.0 |
PendingChanges | UserGroupPendingChanges | undefined | A list of updates being applied to the user group. |
ReplicationGroups | string[] | undefined | A list of replication groups that the user group can access. |
ServerlessCaches | string[] | undefined | Indicates which serverless caches the specified user group is associated with. Available for Valkey, Redis OSS and Serverless Memcached only. |
Status | string | undefined | Indicates user group status. Can be "creating", "active", "modifying", "deleting". |
UserGroupId | string | undefined | The ID of the user group. |
UserIds | string[] | undefined | The list of user IDs that belong to the user group. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidParameterValueException | client | The value for a parameter is invalid. |
InvalidUserGroupStateFault | client | The user group is not in an active state. |
ServiceLinkedRoleNotFoundFault | client | The specified service linked role (SLR) was not found. |
UserGroupNotFoundFault | client | The user group was not found or does not exist |
ElastiCacheServiceException | Base exception class for all service exceptions from ElastiCache service. |