1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. eds
  5. getPolicyGroups
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.eds.getPolicyGroups

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    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=[alicloud.eds.EcdPolicyGroupAuthorizeAccessPolicyRuleArgs(
            description="my-description1",
            cidr_ip="1.2.3.45/24",
        )],
        authorize_security_policy_rules=[alicloud.eds.EcdPolicyGroupAuthorizeSecurityPolicyRuleArgs(
            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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:eds/getPolicyGroups:getPolicyGroups
      arguments:
        # arguments dictionary

    The 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.AliCloud.Eds.Outputs.GetPolicyGroupsGroup>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    NameRegex string
    OutputFile string
    Status string
    Groups []GetPolicyGroupsGroup
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    NameRegex string
    OutputFile string
    Status string
    groups List<GetPolicyGroupsGroup>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    nameRegex String
    outputFile String
    status String
    groups GetPolicyGroupsGroup[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    nameRegex string
    outputFile string
    status string
    groups Sequence[GetPolicyGroupsGroup]
    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

    AuthorizeAccessPolicyRules List<Pulumi.AliCloud.Eds.Inputs.GetPolicyGroupsGroupAuthorizeAccessPolicyRule>
    The rule of authorize access rule.
    AuthorizeSecurityPolicyRules List<Pulumi.AliCloud.Eds.Inputs.GetPolicyGroupsGroupAuthorizeSecurityPolicyRule>
    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.
    HtmlFileTransfer string
    The html5 file transfer.
    Id string
    The ID of the Policy Group.
    LocalDrive string
    Local drive redirect policy.
    PolicyGroupId string
    The policy group id.
    PolicyGroupName string
    The name of policy group.
    PolicyGroupType string
    The type of policy group.
    Recording string
    Whether to enable screen recording. Valid values: off, alltime, period.
    RecordingEndTime string
    The end time of recording.
    RecordingFps int
    The fps of recording. Valid values: 2, 5, 10, 15.
    RecordingStartTime string
    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.
    AuthorizeAccessPolicyRules []GetPolicyGroupsGroupAuthorizeAccessPolicyRule
    The rule of authorize access rule.
    AuthorizeSecurityPolicyRules []GetPolicyGroupsGroupAuthorizeSecurityPolicyRule
    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.
    HtmlFileTransfer string
    The html5 file transfer.
    Id string
    The ID of the Policy Group.
    LocalDrive string
    Local drive redirect policy.
    PolicyGroupId string
    The policy group id.
    PolicyGroupName string
    The name of policy group.
    PolicyGroupType string
    The type of policy group.
    Recording string
    Whether to enable screen recording. Valid values: off, alltime, period.
    RecordingEndTime string
    The end time of recording.
    RecordingFps int
    The fps of recording. Valid values: 2, 5, 10, 15.
    RecordingStartTime string
    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.
    authorizeAccessPolicyRules List<GetPolicyGroupsGroupAuthorizeAccessPolicyRule>
    The rule of authorize access rule.
    authorizeSecurityPolicyRules List<GetPolicyGroupsGroupAuthorizeSecurityPolicyRule>
    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.
    htmlFileTransfer String
    The html5 file transfer.
    id String
    The ID of the Policy Group.
    localDrive String
    Local drive redirect policy.
    policyGroupId String
    The policy group id.
    policyGroupName String
    The name of policy group.
    policyGroupType String
    The type of policy group.
    recording String
    Whether to enable screen recording. Valid values: off, alltime, period.
    recordingEndTime String
    The end time of recording.
    recordingFps Integer
    The fps of recording. Valid values: 2, 5, 10, 15.
    recordingStartTime String
    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.
    authorizeAccessPolicyRules GetPolicyGroupsGroupAuthorizeAccessPolicyRule[]
    The rule of authorize access rule.
    authorizeSecurityPolicyRules GetPolicyGroupsGroupAuthorizeSecurityPolicyRule[]
    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.
    htmlFileTransfer string
    The html5 file transfer.
    id string
    The ID of the Policy Group.
    localDrive string
    Local drive redirect policy.
    policyGroupId string
    The policy group id.
    policyGroupName string
    The name of policy group.
    policyGroupType string
    The type of policy group.
    recording string
    Whether to enable screen recording. Valid values: off, alltime, period.
    recordingEndTime string
    The end time of recording.
    recordingFps number
    The fps of recording. Valid values: 2, 5, 10, 15.
    recordingStartTime string
    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.
    authorize_access_policy_rules Sequence[GetPolicyGroupsGroupAuthorizeAccessPolicyRule]
    The rule of authorize access rule.
    authorize_security_policy_rules Sequence[GetPolicyGroupsGroupAuthorizeSecurityPolicyRule]
    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_transfer str
    The html5 file transfer.
    id str
    The ID of the Policy Group.
    local_drive str
    Local drive redirect policy.
    policy_group_id str
    The policy group id.
    policy_group_name str
    The name of policy group.
    policy_group_type str
    The type of policy group.
    recording str
    Whether to enable screen recording. Valid values: off, alltime, period.
    recording_end_time str
    The end time of recording.
    recording_fps int
    The fps of recording. Valid values: 2, 5, 10, 15.
    recording_start_time str
    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.
    authorizeAccessPolicyRules List<Property Map>
    The rule of authorize access rule.
    authorizeSecurityPolicyRules 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.
    htmlFileTransfer String
    The html5 file transfer.
    id String
    The ID of the Policy Group.
    localDrive String
    Local drive redirect policy.
    policyGroupId String
    The policy group id.
    policyGroupName String
    The name of policy group.
    policyGroupType String
    The type of policy group.
    recording String
    Whether to enable screen recording. Valid values: off, alltime, period.
    recordingEndTime String
    The end time of recording.
    recordingFps Number
    The fps of recording. Valid values: 2, 5, 10, 15.
    recordingStartTime String
    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 alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi