ip_groups
Creates, updates, deletes, gets or lists an ip_groups resource.
Overview
| Name | ip_groups |
| Type | Resource |
| Id | aws.workspaces.ip_groups |
Fields
The following fields are returned by SELECT queries:
- describe_ip_groups
| Name | Datatype | Description |
|---|---|---|
group_desc | string | The description of the group. |
group_id | string | The identifier of the group. (pattern: <code>wsipg-[0-9a-z]{8,63}$</code>) |
group_name | string | The name of the group. |
user_rules | array | The rules. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_ip_groups | select | region | Describes one or more of your IP access control groups. | |
create_ip_group | insert | region, GroupName | 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. | |
associate_ip_groups | update | region, DirectoryId, GroupIds | Associates the specified IP access control group with the specified directory. | |
update_rules_of_ip_group | update | region, GroupId, UserRules | Replaces the current rules of the specified IP access control group with the specified rules. | |
delete_ip_group | delete | region | Deletes the specified IP access control group. You cannot delete an IP access control group that is associated with a directory. | |
disassociate_ip_groups | exec | region, DirectoryId, GroupIds | Disassociates 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_ip_groups
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
- create_ip_group
- Manifest
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
;
# Description fields are for documentation purposes
- name: ip_groups
props:
- name: region
value: "{{ region }}"
description: Required parameter for the ip_groups resource.
- name: GroupName
value: "{{ GroupName }}"
description: |
The name of the group.
- name: GroupDesc
value: "{{ GroupDesc }}"
description: |
The description of the group.
- name: UserRules
description: |
The rules to add to the group.
value:
- ipRule: "{{ ipRule }}"
ruleDesc: "{{ ruleDesc }}"
- name: Tags
description: |
The tags. Each WorkSpaces resource can have a maximum of 50 tags.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- associate_ip_groups
- update_rules_of_ip_group
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;
Replaces the current rules of the specified IP access control group with the specified rules.
UPDATE aws.workspaces.ip_groups
SET
GroupId = '{{ GroupId }}',
UserRules = '{{ UserRules }}'
WHERE
region = '{{ region }}' --required
AND GroupId = '{{ GroupId }}' --required
AND UserRules = '{{ UserRules }}' --required;
DELETE examples
- delete_ip_group
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
- disassociate_ip_groups
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 }}"
}'
;