CreateIpGroupCommand

Creates an IP access control group.

An IP access control group provides you with the ability to control the IP addresses from which users are allowed to access their WorkSpaces. To specify the CIDR address ranges, add rules to your IP access control group and then associate the group with your directory. You can add rules when you create the group or at any time using AuthorizeIpRules.

There is a default IP access control group associated with your directory. If you don't associate an IP access control group with your directory, the default group is used. The default group includes a default rule that allows users to access their WorkSpaces from anywhere. You cannot modify the default IP access control group for your directory.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { WorkSpacesClient, CreateIpGroupCommand } from "@aws-sdk/client-workspaces"; // ES Modules import
// const { WorkSpacesClient, CreateIpGroupCommand } = require("@aws-sdk/client-workspaces"); // CommonJS import
const client = new WorkSpacesClient(config);
const input = { // CreateIpGroupRequest
  GroupName: "STRING_VALUE", // required
  GroupDesc: "STRING_VALUE",
  UserRules: [ // IpRuleList
    { // IpRuleItem
      ipRule: "STRING_VALUE",
      ruleDesc: "STRING_VALUE",
    },
  ],
  Tags: [ // TagList
    { // Tag
      Key: "STRING_VALUE", // required
      Value: "STRING_VALUE",
    },
  ],
};
const command = new CreateIpGroupCommand(input);
const response = await client.send(command);
// { // CreateIpGroupResult
//   GroupId: "STRING_VALUE",
// };

CreateIpGroupCommand Input

See CreateIpGroupCommandInput for more details

Parameter
Type
Description
GroupName
Required
string | undefined

The name of the group.

GroupDesc
string | undefined

The description of the group.

Tags
Tag[] | undefined

The tags. Each WorkSpaces resource can have a maximum of 50 tags.

UserRules
IpRuleItem[] | undefined

The rules to add to the group.

CreateIpGroupCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
GroupId
string | undefined

The identifier of the group.

Throws

Name
Fault
Details
AccessDeniedException
client

The user is not authorized to access a resource.

InvalidParameterValuesException
client

One or more parameter values are not valid.

ResourceAlreadyExistsException
client

The specified resource already exists.

ResourceCreationFailedException
client

The resource could not be created.

ResourceLimitExceededException
client

Your resource limits have been exceeded.

WorkSpacesServiceException
Base exception class for all service exceptions from WorkSpaces service.