Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.eds.getPolicyGroups
Explore with Pulumi AI
This data source provides the Ecd Policy Groups of the current Alibaba Cloud user.
NOTE: Available in v1.130.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = new alicloud.eds.EcdPolicyGroup("default", {
    policyGroupName: "my-policy-group",
    clipboard: "read",
    localDrive: "read",
    usbRedirect: "off",
    watermark: "off",
    authorizeAccessPolicyRules: [{
        description: "my-description1",
        cidrIp: "1.2.3.45/24",
    }],
    authorizeSecurityPolicyRules: [{
        type: "inflow",
        policy: "accept",
        description: "my-description",
        portRange: "80/80",
        ipProtocol: "TCP",
        priority: "1",
        cidrIp: "1.2.3.4/24",
    }],
});
const nameRegex = alicloud.eds.getPolicyGroups({
    nameRegex: "^my-policy",
});
export const ecdPolicyGroupId = nameRegex.then(nameRegex => nameRegex.groups?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.eds.EcdPolicyGroup("default",
    policy_group_name="my-policy-group",
    clipboard="read",
    local_drive="read",
    usb_redirect="off",
    watermark="off",
    authorize_access_policy_rules=[{
        "description": "my-description1",
        "cidr_ip": "1.2.3.45/24",
    }],
    authorize_security_policy_rules=[{
        "type": "inflow",
        "policy": "accept",
        "description": "my-description",
        "port_range": "80/80",
        "ip_protocol": "TCP",
        "priority": "1",
        "cidr_ip": "1.2.3.4/24",
    }])
name_regex = alicloud.eds.get_policy_groups(name_regex="^my-policy")
pulumi.export("ecdPolicyGroupId", name_regex.groups[0].id)
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eds"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := eds.NewEcdPolicyGroup(ctx, "default", &eds.EcdPolicyGroupArgs{
			PolicyGroupName: pulumi.String("my-policy-group"),
			Clipboard:       pulumi.String("read"),
			LocalDrive:      pulumi.String("read"),
			UsbRedirect:     pulumi.String("off"),
			Watermark:       pulumi.String("off"),
			AuthorizeAccessPolicyRules: eds.EcdPolicyGroupAuthorizeAccessPolicyRuleArray{
				&eds.EcdPolicyGroupAuthorizeAccessPolicyRuleArgs{
					Description: pulumi.String("my-description1"),
					CidrIp:      pulumi.String("1.2.3.45/24"),
				},
			},
			AuthorizeSecurityPolicyRules: eds.EcdPolicyGroupAuthorizeSecurityPolicyRuleArray{
				&eds.EcdPolicyGroupAuthorizeSecurityPolicyRuleArgs{
					Type:        pulumi.String("inflow"),
					Policy:      pulumi.String("accept"),
					Description: pulumi.String("my-description"),
					PortRange:   pulumi.String("80/80"),
					IpProtocol:  pulumi.String("TCP"),
					Priority:    pulumi.String("1"),
					CidrIp:      pulumi.String("1.2.3.4/24"),
				},
			},
		})
		if err != nil {
			return err
		}
		nameRegex, err := eds.GetPolicyGroups(ctx, &eds.GetPolicyGroupsArgs{
			NameRegex: pulumi.StringRef("^my-policy"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("ecdPolicyGroupId", nameRegex.Groups[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var @default = new AliCloud.Eds.EcdPolicyGroup("default", new()
    {
        PolicyGroupName = "my-policy-group",
        Clipboard = "read",
        LocalDrive = "read",
        UsbRedirect = "off",
        Watermark = "off",
        AuthorizeAccessPolicyRules = new[]
        {
            new AliCloud.Eds.Inputs.EcdPolicyGroupAuthorizeAccessPolicyRuleArgs
            {
                Description = "my-description1",
                CidrIp = "1.2.3.45/24",
            },
        },
        AuthorizeSecurityPolicyRules = new[]
        {
            new AliCloud.Eds.Inputs.EcdPolicyGroupAuthorizeSecurityPolicyRuleArgs
            {
                Type = "inflow",
                Policy = "accept",
                Description = "my-description",
                PortRange = "80/80",
                IpProtocol = "TCP",
                Priority = "1",
                CidrIp = "1.2.3.4/24",
            },
        },
    });
    var nameRegex = AliCloud.Eds.GetPolicyGroups.Invoke(new()
    {
        NameRegex = "^my-policy",
    });
    return new Dictionary<string, object?>
    {
        ["ecdPolicyGroupId"] = nameRegex.Apply(getPolicyGroupsResult => getPolicyGroupsResult.Groups[0]?.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.eds.EcdPolicyGroup;
import com.pulumi.alicloud.eds.EcdPolicyGroupArgs;
import com.pulumi.alicloud.eds.inputs.EcdPolicyGroupAuthorizeAccessPolicyRuleArgs;
import com.pulumi.alicloud.eds.inputs.EcdPolicyGroupAuthorizeSecurityPolicyRuleArgs;
import com.pulumi.alicloud.eds.EdsFunctions;
import com.pulumi.alicloud.eds.inputs.GetPolicyGroupsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var default_ = new EcdPolicyGroup("default", EcdPolicyGroupArgs.builder()
            .policyGroupName("my-policy-group")
            .clipboard("read")
            .localDrive("read")
            .usbRedirect("off")
            .watermark("off")
            .authorizeAccessPolicyRules(EcdPolicyGroupAuthorizeAccessPolicyRuleArgs.builder()
                .description("my-description1")
                .cidrIp("1.2.3.45/24")
                .build())
            .authorizeSecurityPolicyRules(EcdPolicyGroupAuthorizeSecurityPolicyRuleArgs.builder()
                .type("inflow")
                .policy("accept")
                .description("my-description")
                .portRange("80/80")
                .ipProtocol("TCP")
                .priority("1")
                .cidrIp("1.2.3.4/24")
                .build())
            .build());
        final var nameRegex = EdsFunctions.getPolicyGroups(GetPolicyGroupsArgs.builder()
            .nameRegex("^my-policy")
            .build());
        ctx.export("ecdPolicyGroupId", nameRegex.applyValue(getPolicyGroupsResult -> getPolicyGroupsResult.groups()[0].id()));
    }
}
resources:
  default:
    type: alicloud:eds:EcdPolicyGroup
    properties:
      policyGroupName: my-policy-group
      clipboard: read
      localDrive: read
      usbRedirect: off
      watermark: off
      authorizeAccessPolicyRules:
        - description: my-description1
          cidrIp: 1.2.3.45/24
      authorizeSecurityPolicyRules:
        - type: inflow
          policy: accept
          description: my-description
          portRange: 80/80
          ipProtocol: TCP
          priority: '1'
          cidrIp: 1.2.3.4/24
variables:
  nameRegex:
    fn::invoke:
      function: alicloud:eds:getPolicyGroups
      arguments:
        nameRegex: ^my-policy
outputs:
  ecdPolicyGroupId: ${nameRegex.groups[0].id}
Using getPolicyGroups
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getPolicyGroups(args: GetPolicyGroupsArgs, opts?: InvokeOptions): Promise<GetPolicyGroupsResult>
function getPolicyGroupsOutput(args: GetPolicyGroupsOutputArgs, opts?: InvokeOptions): Output<GetPolicyGroupsResult>def get_policy_groups(ids: Optional[Sequence[str]] = None,
                      name_regex: Optional[str] = None,
                      output_file: Optional[str] = None,
                      status: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetPolicyGroupsResult
def get_policy_groups_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      name_regex: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      status: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetPolicyGroupsResult]func GetPolicyGroups(ctx *Context, args *GetPolicyGroupsArgs, opts ...InvokeOption) (*GetPolicyGroupsResult, error)
func GetPolicyGroupsOutput(ctx *Context, args *GetPolicyGroupsOutputArgs, opts ...InvokeOption) GetPolicyGroupsResultOutput> Note: This function is named GetPolicyGroups in the Go SDK.
public static class GetPolicyGroups 
{
    public static Task<GetPolicyGroupsResult> InvokeAsync(GetPolicyGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetPolicyGroupsResult> Invoke(GetPolicyGroupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPolicyGroupsResult> getPolicyGroups(GetPolicyGroupsArgs args, InvokeOptions options)
public static Output<GetPolicyGroupsResult> getPolicyGroups(GetPolicyGroupsArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:eds/getPolicyGroups:getPolicyGroups
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of Policy Group IDs.
- NameRegex string
- A regex string to filter results by Policy Group name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Status string
- The status of policy.
- Ids []string
- A list of Policy Group IDs.
- NameRegex string
- A regex string to filter results by Policy Group name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Status string
- The status of policy.
- ids List<String>
- A list of Policy Group IDs.
- nameRegex String
- A regex string to filter results by Policy Group name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- status String
- The status of policy.
- ids string[]
- A list of Policy Group IDs.
- nameRegex string
- A regex string to filter results by Policy Group name.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- status string
- The status of policy.
- ids Sequence[str]
- A list of Policy Group IDs.
- name_regex str
- A regex string to filter results by Policy Group name.
- output_file str
- File name where to save data source results (after running pulumi preview).
- status str
- The status of policy.
- ids List<String>
- A list of Policy Group IDs.
- nameRegex String
- A regex string to filter results by Policy Group name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- status String
- The status of policy.
getPolicyGroups Result
The following output properties are available:
- Groups
List<Pulumi.Ali Cloud. Eds. Outputs. Get Policy Groups Group> 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- NameRegex string
- OutputFile string
- Status string
- Groups
[]GetPolicy Groups Group 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- NameRegex string
- OutputFile string
- Status string
- groups
List<GetPolicy Groups Group> 
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- nameRegex String
- outputFile String
- status String
- groups
GetPolicy Groups Group[] 
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- nameRegex string
- outputFile string
- status string
- groups
Sequence[GetPolicy Groups Group] 
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- name_regex str
- output_file str
- status str
- groups List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- nameRegex String
- outputFile String
- status String
Supporting Types
GetPolicyGroupsGroup   
- 
List<Pulumi.Ali Cloud. Eds. Inputs. Get Policy Groups Group Authorize Access Policy Rule> 
- The rule of authorize access rule.
- 
List<Pulumi.Ali Cloud. Eds. Inputs. Get Policy Groups Group Authorize Security Policy Rule> 
- The policy rule.
- CameraRedirect string
- Whether to enable local camera redirection. Valid values: on,off.
- Clipboard string
- The clipboard policy.
- DomainList string
- The list of domain.
- EdsCount int
- The count of eds.
- HtmlAccess string
- The access of html5.
- HtmlFile stringTransfer 
- The html5 file transfer.
- Id string
- The ID of the Policy Group.
- LocalDrive string
- Local drive redirect policy.
- PolicyGroup stringId 
- The policy group id.
- PolicyGroup stringName 
- The name of policy group.
- PolicyGroup stringType 
- The type of policy group.
- Recording string
- Whether to enable screen recording. Valid values: off,alltime,period.
- RecordingEnd stringTime 
- The end time of recording.
- RecordingFps int
- The fps of recording. Valid values: 2,5,10,15.
- RecordingStart stringTime 
- The start time of recording.
- Status string
- The status of policy.
- UsbRedirect string
- The usb redirect policy.
- VisualQuality string
- The quality of visual.sae_ecdsae_nameecd_po
- Watermark string
- The watermark policy.
- WatermarkTransparency string
- The watermark transparency.
- WatermarkType string
- The type of watemark.
- 
[]GetPolicy Groups Group Authorize Access Policy Rule 
- The rule of authorize access rule.
- 
[]GetPolicy Groups Group Authorize Security Policy Rule 
- The policy rule.
- CameraRedirect string
- Whether to enable local camera redirection. Valid values: on,off.
- Clipboard string
- The clipboard policy.
- DomainList string
- The list of domain.
- EdsCount int
- The count of eds.
- HtmlAccess string
- The access of html5.
- HtmlFile stringTransfer 
- The html5 file transfer.
- Id string
- The ID of the Policy Group.
- LocalDrive string
- Local drive redirect policy.
- PolicyGroup stringId 
- The policy group id.
- PolicyGroup stringName 
- The name of policy group.
- PolicyGroup stringType 
- The type of policy group.
- Recording string
- Whether to enable screen recording. Valid values: off,alltime,period.
- RecordingEnd stringTime 
- The end time of recording.
- RecordingFps int
- The fps of recording. Valid values: 2,5,10,15.
- RecordingStart stringTime 
- The start time of recording.
- Status string
- The status of policy.
- UsbRedirect string
- The usb redirect policy.
- VisualQuality string
- The quality of visual.sae_ecdsae_nameecd_po
- Watermark string
- The watermark policy.
- WatermarkTransparency string
- The watermark transparency.
- WatermarkType string
- The type of watemark.
- 
List<GetPolicy Groups Group Authorize Access Policy Rule> 
- The rule of authorize access rule.
- 
List<GetPolicy Groups Group Authorize Security Policy Rule> 
- The policy rule.
- cameraRedirect String
- Whether to enable local camera redirection. Valid values: on,off.
- clipboard String
- The clipboard policy.
- domainList String
- The list of domain.
- edsCount Integer
- The count of eds.
- htmlAccess String
- The access of html5.
- htmlFile StringTransfer 
- The html5 file transfer.
- id String
- The ID of the Policy Group.
- localDrive String
- Local drive redirect policy.
- policyGroup StringId 
- The policy group id.
- policyGroup StringName 
- The name of policy group.
- policyGroup StringType 
- The type of policy group.
- recording String
- Whether to enable screen recording. Valid values: off,alltime,period.
- recordingEnd StringTime 
- The end time of recording.
- recordingFps Integer
- The fps of recording. Valid values: 2,5,10,15.
- recordingStart StringTime 
- The start time of recording.
- status String
- The status of policy.
- usbRedirect String
- The usb redirect policy.
- visualQuality String
- The quality of visual.sae_ecdsae_nameecd_po
- watermark String
- The watermark policy.
- watermarkTransparency String
- The watermark transparency.
- watermarkType String
- The type of watemark.
- 
GetPolicy Groups Group Authorize Access Policy Rule[] 
- The rule of authorize access rule.
- 
GetPolicy Groups Group Authorize Security Policy Rule[] 
- The policy rule.
- cameraRedirect string
- Whether to enable local camera redirection. Valid values: on,off.
- clipboard string
- The clipboard policy.
- domainList string
- The list of domain.
- edsCount number
- The count of eds.
- htmlAccess string
- The access of html5.
- htmlFile stringTransfer 
- The html5 file transfer.
- id string
- The ID of the Policy Group.
- localDrive string
- Local drive redirect policy.
- policyGroup stringId 
- The policy group id.
- policyGroup stringName 
- The name of policy group.
- policyGroup stringType 
- The type of policy group.
- recording string
- Whether to enable screen recording. Valid values: off,alltime,period.
- recordingEnd stringTime 
- The end time of recording.
- recordingFps number
- The fps of recording. Valid values: 2,5,10,15.
- recordingStart stringTime 
- The start time of recording.
- status string
- The status of policy.
- usbRedirect string
- The usb redirect policy.
- visualQuality string
- The quality of visual.sae_ecdsae_nameecd_po
- watermark string
- The watermark policy.
- watermarkTransparency string
- The watermark transparency.
- watermarkType string
- The type of watemark.
- 
Sequence[GetPolicy Groups Group Authorize Access Policy Rule] 
- The rule of authorize access rule.
- 
Sequence[GetPolicy Groups Group Authorize Security Policy Rule] 
- The policy rule.
- camera_redirect str
- Whether to enable local camera redirection. Valid values: on,off.
- clipboard str
- The clipboard policy.
- domain_list str
- The list of domain.
- eds_count int
- The count of eds.
- html_access str
- The access of html5.
- html_file_ strtransfer 
- The html5 file transfer.
- id str
- The ID of the Policy Group.
- local_drive str
- Local drive redirect policy.
- policy_group_ strid 
- The policy group id.
- policy_group_ strname 
- The name of policy group.
- policy_group_ strtype 
- The type of policy group.
- recording str
- Whether to enable screen recording. Valid values: off,alltime,period.
- recording_end_ strtime 
- The end time of recording.
- recording_fps int
- The fps of recording. Valid values: 2,5,10,15.
- recording_start_ strtime 
- The start time of recording.
- status str
- The status of policy.
- usb_redirect str
- The usb redirect policy.
- visual_quality str
- The quality of visual.sae_ecdsae_nameecd_po
- watermark str
- The watermark policy.
- watermark_transparency str
- The watermark transparency.
- watermark_type str
- The type of watemark.
- List<Property Map>
- The rule of authorize access rule.
- List<Property Map>
- The policy rule.
- cameraRedirect String
- Whether to enable local camera redirection. Valid values: on,off.
- clipboard String
- The clipboard policy.
- domainList String
- The list of domain.
- edsCount Number
- The count of eds.
- htmlAccess String
- The access of html5.
- htmlFile StringTransfer 
- The html5 file transfer.
- id String
- The ID of the Policy Group.
- localDrive String
- Local drive redirect policy.
- policyGroup StringId 
- The policy group id.
- policyGroup StringName 
- The name of policy group.
- policyGroup StringType 
- The type of policy group.
- recording String
- Whether to enable screen recording. Valid values: off,alltime,period.
- recordingEnd StringTime 
- The end time of recording.
- recordingFps Number
- The fps of recording. Valid values: 2,5,10,15.
- recordingStart StringTime 
- The start time of recording.
- status String
- The status of policy.
- usbRedirect String
- The usb redirect policy.
- visualQuality String
- The quality of visual.sae_ecdsae_nameecd_po
- watermark String
- The watermark policy.
- watermarkTransparency String
- The watermark transparency.
- watermarkType String
- The type of watemark.
GetPolicyGroupsGroupAuthorizeAccessPolicyRule       
- CidrIp string
- The cidrip of authorize access rule..
- Description string
- The description of authorize access rule.
- CidrIp string
- The cidrip of authorize access rule..
- Description string
- The description of authorize access rule.
- cidrIp String
- The cidrip of authorize access rule..
- description String
- The description of authorize access rule.
- cidrIp string
- The cidrip of authorize access rule..
- description string
- The description of authorize access rule.
- cidr_ip str
- The cidrip of authorize access rule..
- description str
- The description of authorize access rule.
- cidrIp String
- The cidrip of authorize access rule..
- description String
- The description of authorize access rule.
GetPolicyGroupsGroupAuthorizeSecurityPolicyRule       
- CidrIp string
- The cidrip of security rules.
- Description string
- The description of security rules.
- IpProtocol string
- The ip protocol of security rules.
- Policy string
- The policy of security rules.
- PortRange string
- The port range of security rules.
- Priority string
- The priority of security rules.
- Type string
- The type of security rules.
- CidrIp string
- The cidrip of security rules.
- Description string
- The description of security rules.
- IpProtocol string
- The ip protocol of security rules.
- Policy string
- The policy of security rules.
- PortRange string
- The port range of security rules.
- Priority string
- The priority of security rules.
- Type string
- The type of security rules.
- cidrIp String
- The cidrip of security rules.
- description String
- The description of security rules.
- ipProtocol String
- The ip protocol of security rules.
- policy String
- The policy of security rules.
- portRange String
- The port range of security rules.
- priority String
- The priority of security rules.
- type String
- The type of security rules.
- cidrIp string
- The cidrip of security rules.
- description string
- The description of security rules.
- ipProtocol string
- The ip protocol of security rules.
- policy string
- The policy of security rules.
- portRange string
- The port range of security rules.
- priority string
- The priority of security rules.
- type string
- The type of security rules.
- cidr_ip str
- The cidrip of security rules.
- description str
- The description of security rules.
- ip_protocol str
- The ip protocol of security rules.
- policy str
- The policy of security rules.
- port_range str
- The port range of security rules.
- priority str
- The priority of security rules.
- type str
- The type of security rules.
- cidrIp String
- The cidrip of security rules.
- description String
- The description of security rules.
- ipProtocol String
- The ip protocol of security rules.
- policy String
- The policy of security rules.
- portRange String
- The port range of security rules.
- priority String
- The priority of security rules.
- type String
- The type of security rules.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.