|
| 1 | +--- |
| 2 | +subcategory: "Workspace" |
| 3 | +layout: "huaweicloud" |
| 4 | +page_title: "HuaweiCloud: huaweicloud_workspace_policy_groups" |
| 5 | +description: |- |
| 6 | + Use this data source to get the list of Workspace policy groups within HuaweiCloud. |
| 7 | +--- |
| 8 | + |
| 9 | +# huaweicloud_workspace_policy_groups |
| 10 | + |
| 11 | +Use this data source to get the list of Workspace policy groups within HuaweiCloud. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +### Basic Usage |
| 16 | + |
| 17 | +```hcl |
| 18 | +data "huaweicloud_workspace_policy_groups" "test" {} |
| 19 | +``` |
| 20 | + |
| 21 | +### Filter policy groups by priority |
| 22 | + |
| 23 | +```hcl |
| 24 | +variable "policy_priority" { |
| 25 | + type = number |
| 26 | + default = 1 |
| 27 | +} |
| 28 | +
|
| 29 | +data "huaweicloud_workspace_policy_groups" "test" { |
| 30 | + priority = var.policy_priority |
| 31 | +} |
| 32 | +``` |
| 33 | + |
| 34 | +### Filter policy groups by name |
| 35 | + |
| 36 | +```hcl |
| 37 | +variable "policy_group_name" { |
| 38 | + type = string |
| 39 | + default = "test-group" |
| 40 | +} |
| 41 | +
|
| 42 | +variable "is_name_accurate" { |
| 43 | + type = bool |
| 44 | + default = true |
| 45 | +} |
| 46 | +
|
| 47 | +data "huaweicloud_workspace_policy_groups" "test" { |
| 48 | + policy_group_name = var.policy_group_name |
| 49 | + is_group_name_accurate = var.is_name_accurate |
| 50 | +} |
| 51 | +``` |
| 52 | + |
| 53 | +## Argument Reference |
| 54 | + |
| 55 | +The following arguments are supported: |
| 56 | + |
| 57 | +* `region` - (Optional, String) Specifies the region in which to query the data source. |
| 58 | + If omitted, the provider-level region will be used. |
| 59 | + |
| 60 | +* `policy_group_id` - (Optional, String) Specifies the ID of the policy group. |
| 61 | + |
| 62 | +* `policy_group_name` - (Optional, String) Specifies the name of the policy group. |
| 63 | + |
| 64 | +* `priority` - (Optional, Int) Specifies the priority of the policy group. |
| 65 | + Defaults to **0**. |
| 66 | + |
| 67 | +* `update_time` - (Optional, String) Specifies the update time of the policy group. |
| 68 | + The time format must be: yyyy-MM-dd HH:mm:ss. |
| 69 | + |
| 70 | +* `description` - (Optional, String) Specifies the description of the policy group. |
| 71 | + |
| 72 | +* `is_group_name_accurate` - (Optional, Bool) Specifies whether to perform exact match on policy group name. |
| 73 | + Defaults to **false**. |
| 74 | + |
| 75 | +## Attribute Reference |
| 76 | + |
| 77 | +In addition to all arguments above, the following attributes are exported: |
| 78 | + |
| 79 | +* `id` - The data source ID. |
| 80 | + |
| 81 | +* `policy_groups` - The list of policy groups. |
| 82 | + The [policy_groups](#workspace_policy_groups_attr) structure is documented below. |
| 83 | + |
| 84 | +<a name="workspace_policy_groups_attr"></a> |
| 85 | +The `policy_groups` block supports: |
| 86 | + |
| 87 | +* `policy_group_id` - The ID of the policy group. |
| 88 | + |
| 89 | +* `policy_group_name` - The name of the policy group. |
| 90 | + |
| 91 | +* `priority` - The priority of the policy group. |
| 92 | + |
| 93 | +* `update_time` - The update time of the policy group. |
| 94 | + |
| 95 | +* `description` - The description of the policy group. |
| 96 | + |
| 97 | +* `policies` - The policy information. |
| 98 | + The [policies](#workspace_policy_groups_policies) structure is documented below. |
| 99 | + |
| 100 | +* `targets` - The list of target objects. |
| 101 | + The [targets](#workspace_policy_groups_targets) structure is documented below. |
| 102 | + |
| 103 | +<a name="workspace_policy_groups_policies"></a> |
| 104 | +The `policies` block supports: |
| 105 | + |
| 106 | +* `peripherals` - The peripheral device policies in JSON format. |
| 107 | + |
| 108 | +* `audio` - The audio policies in JSON format. |
| 109 | + |
| 110 | +* `client` - The client policies in JSON format. |
| 111 | + |
| 112 | +* `display` - The display policies in JSON format. |
| 113 | + |
| 114 | +* `file_and_clipboard` - The file and clipboard policies in JSON format. |
| 115 | + |
| 116 | +* `session` - The session policies in JSON format. |
| 117 | + |
| 118 | +* `virtual_channel` - The virtual channel policies in JSON format. |
| 119 | + |
| 120 | +* `watermark` - The watermark policies in JSON format. |
| 121 | + |
| 122 | +* `keyboard_mouse` - The keyboard and mouse policies in JSON format. |
| 123 | + |
| 124 | +* `seamless` - The general audio and video bypass policies in JSON format. |
| 125 | + |
| 126 | +* `personalized_data_mgmt` - The personalized data management policies in JSON format. |
| 127 | + |
| 128 | +* `custom` - The custom policies in JSON format. |
| 129 | + |
| 130 | +* `record_audit` - The screen recording audit policies in JSON format. |
| 131 | + |
| 132 | +<a name="workspace_policy_groups_targets"></a> |
| 133 | +The `targets` block supports: |
| 134 | + |
| 135 | +* `target_id` - The ID of the target. |
| 136 | + |
| 137 | +* `target_type` - The type of the target. |
| 138 | + |
| 139 | +* `target_name` - The name of the target. |
0 commit comments