Skip to main content

ip_groups

Creates, updates, deletes, gets or lists an ip_groups resource.

Overview

Nameip_groups
TypeResource
Idaws.workspaces.ip_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
group_descstringThe description of the group.
group_idstringThe identifier of the group. (pattern: <code>wsipg-[0-9a-z]{8,63}$</code>)
group_namestringThe name of the group.
user_rulesarrayThe rules.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_ip_groupsselectregionDescribes one or more of your IP access control groups.
create_ip_groupinsertregion, GroupNameCreates 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.
associate_ip_groupsupdateregion, DirectoryId, GroupIdsAssociates the specified IP access control group with the specified directory.
update_rules_of_ip_groupupdateregion, GroupId, UserRulesReplaces the current rules of the specified IP access control group with the specified rules.
delete_ip_groupdeleteregionDeletes the specified IP access control group. You cannot delete an IP access control group that is associated with a directory.
disassociate_ip_groupsexecregion, DirectoryId, GroupIdsDisassociates the specified IP access control group from the specified directory.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes one or more of your IP access control groups.

SELECT
group_desc,
group_id,
group_name,
user_rules
FROM aws.workspaces.ip_groups
WHERE region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.workspaces.ip_groups (
GroupName,
GroupDesc,
UserRules,
Tags,
region
)
SELECT
'{{ GroupName }}' /* required */,
'{{ GroupDesc }}',
'{{ UserRules }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
group_id
;

UPDATE examples

Associates the specified IP access control group with the specified directory.

UPDATE aws.workspaces.ip_groups
SET
DirectoryId = '{{ DirectoryId }}',
GroupIds = '{{ GroupIds }}'
WHERE
region = '{{ region }}' --required
AND DirectoryId = '{{ DirectoryId }}' --required
AND GroupIds = '{{ GroupIds }}' --required;

DELETE examples

Deletes the specified IP access control group. You cannot delete an IP access control group that is associated with a directory.

DELETE FROM aws.workspaces.ip_groups
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Disassociates the specified IP access control group from the specified directory.

EXEC aws.workspaces.ip_groups.disassociate_ip_groups
@region='{{ region }}' --required
@@json=
'{
"DirectoryId": "{{ DirectoryId }}",
"GroupIds": "{{ GroupIds }}"
}'
;