Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 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=[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.
- Name
Regex string - A regex string to filter results by Policy Group name.
- Output
File 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.
- Name
Regex string - A regex string to filter results by Policy Group name.
- Output
File 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.
- name
Regex String - A regex string to filter results by Policy Group name.
- output
File 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.
- name
Regex string - A regex string to filter results by Policy Group name.
- output
File 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.
- name
Regex String - A regex string to filter results by Policy Group name.
- output
File 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>
- Name
Regex string - Output
File string - Status string
- Groups
[]Get
Policy Groups Group - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Name
Regex string - Output
File string - Status string
- groups
List<Get
Policy Groups Group> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- name
Regex String - output
File String - status String
- groups
Get
Policy Groups Group[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- name
Regex string - output
File string - status string
- groups
Sequence[Get
Policy 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>
- name
Regex String - output
File 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.
- Camera
Redirect string - Whether to enable local camera redirection. Valid values:
on
,off
. - Clipboard string
- The clipboard policy.
- Domain
List string - The list of domain.
- Eds
Count int - The count of eds.
- Html
Access string - The access of html5.
- Html
File stringTransfer - The html5 file transfer.
- Id string
- The ID of the Policy Group.
- Local
Drive string - Local drive redirect policy.
- Policy
Group stringId - The policy group id.
- Policy
Group stringName - The name of policy group.
- Policy
Group stringType - The type of policy group.
- Recording string
- Whether to enable screen recording. Valid values:
off
,alltime
,period
. - Recording
End stringTime - The end time of recording.
- Recording
Fps int - The fps of recording. Valid values:
2
,5
,10
,15
. - Recording
Start stringTime - The start time of recording.
- Status string
- The status of policy.
- Usb
Redirect string - The usb redirect policy.
- Visual
Quality string - The quality of visual.sae_ecdsae_nameecd_po
- Watermark string
- The watermark policy.
- Watermark
Transparency string - The watermark transparency.
- Watermark
Type string - The type of watemark.
- []Get
Policy Groups Group Authorize Access Policy Rule - The rule of authorize access rule.
- []Get
Policy Groups Group Authorize Security Policy Rule - The policy rule.
- Camera
Redirect string - Whether to enable local camera redirection. Valid values:
on
,off
. - Clipboard string
- The clipboard policy.
- Domain
List string - The list of domain.
- Eds
Count int - The count of eds.
- Html
Access string - The access of html5.
- Html
File stringTransfer - The html5 file transfer.
- Id string
- The ID of the Policy Group.
- Local
Drive string - Local drive redirect policy.
- Policy
Group stringId - The policy group id.
- Policy
Group stringName - The name of policy group.
- Policy
Group stringType - The type of policy group.
- Recording string
- Whether to enable screen recording. Valid values:
off
,alltime
,period
. - Recording
End stringTime - The end time of recording.
- Recording
Fps int - The fps of recording. Valid values:
2
,5
,10
,15
. - Recording
Start stringTime - The start time of recording.
- Status string
- The status of policy.
- Usb
Redirect string - The usb redirect policy.
- Visual
Quality string - The quality of visual.sae_ecdsae_nameecd_po
- Watermark string
- The watermark policy.
- Watermark
Transparency string - The watermark transparency.
- Watermark
Type string - The type of watemark.
- List<Get
Policy Groups Group Authorize Access Policy Rule> - The rule of authorize access rule.
- List<Get
Policy Groups Group Authorize Security Policy Rule> - The policy rule.
- camera
Redirect String - Whether to enable local camera redirection. Valid values:
on
,off
. - clipboard String
- The clipboard policy.
- domain
List String - The list of domain.
- eds
Count Integer - The count of eds.
- html
Access String - The access of html5.
- html
File StringTransfer - The html5 file transfer.
- id String
- The ID of the Policy Group.
- local
Drive String - Local drive redirect policy.
- policy
Group StringId - The policy group id.
- policy
Group StringName - The name of policy group.
- policy
Group StringType - The type of policy group.
- recording String
- Whether to enable screen recording. Valid values:
off
,alltime
,period
. - recording
End StringTime - The end time of recording.
- recording
Fps Integer - The fps of recording. Valid values:
2
,5
,10
,15
. - recording
Start StringTime - The start time of recording.
- status String
- The status of policy.
- usb
Redirect String - The usb redirect policy.
- visual
Quality String - The quality of visual.sae_ecdsae_nameecd_po
- watermark String
- The watermark policy.
- watermark
Transparency String - The watermark transparency.
- watermark
Type String - The type of watemark.
- Get
Policy Groups Group Authorize Access Policy Rule[] - The rule of authorize access rule.
- Get
Policy Groups Group Authorize Security Policy Rule[] - The policy rule.
- camera
Redirect string - Whether to enable local camera redirection. Valid values:
on
,off
. - clipboard string
- The clipboard policy.
- domain
List string - The list of domain.
- eds
Count number - The count of eds.
- html
Access string - The access of html5.
- html
File stringTransfer - The html5 file transfer.
- id string
- The ID of the Policy Group.
- local
Drive string - Local drive redirect policy.
- policy
Group stringId - The policy group id.
- policy
Group stringName - The name of policy group.
- policy
Group stringType - The type of policy group.
- recording string
- Whether to enable screen recording. Valid values:
off
,alltime
,period
. - recording
End stringTime - The end time of recording.
- recording
Fps number - The fps of recording. Valid values:
2
,5
,10
,15
. - recording
Start stringTime - The start time of recording.
- status string
- The status of policy.
- usb
Redirect string - The usb redirect policy.
- visual
Quality string - The quality of visual.sae_ecdsae_nameecd_po
- watermark string
- The watermark policy.
- watermark
Transparency string - The watermark transparency.
- watermark
Type string - The type of watemark.
- Sequence[Get
Policy Groups Group Authorize Access Policy Rule] - The rule of authorize access rule.
- Sequence[Get
Policy 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.
- camera
Redirect String - Whether to enable local camera redirection. Valid values:
on
,off
. - clipboard String
- The clipboard policy.
- domain
List String - The list of domain.
- eds
Count Number - The count of eds.
- html
Access String - The access of html5.
- html
File StringTransfer - The html5 file transfer.
- id String
- The ID of the Policy Group.
- local
Drive String - Local drive redirect policy.
- policy
Group StringId - The policy group id.
- policy
Group StringName - The name of policy group.
- policy
Group StringType - The type of policy group.
- recording String
- Whether to enable screen recording. Valid values:
off
,alltime
,period
. - recording
End StringTime - The end time of recording.
- recording
Fps Number - The fps of recording. Valid values:
2
,5
,10
,15
. - recording
Start StringTime - The start time of recording.
- status String
- The status of policy.
- usb
Redirect String - The usb redirect policy.
- visual
Quality String - The quality of visual.sae_ecdsae_nameecd_po
- watermark String
- The watermark policy.
- watermark
Transparency String - The watermark transparency.
- watermark
Type String - The type of watemark.
GetPolicyGroupsGroupAuthorizeAccessPolicyRule
- Cidr
Ip string - The cidrip of authorize access rule..
- Description string
- The description of authorize access rule.
- Cidr
Ip string - The cidrip of authorize access rule..
- Description string
- The description of authorize access rule.
- cidr
Ip String - The cidrip of authorize access rule..
- description String
- The description of authorize access rule.
- cidr
Ip 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.
- cidr
Ip String - The cidrip of authorize access rule..
- description String
- The description of authorize access rule.
GetPolicyGroupsGroupAuthorizeSecurityPolicyRule
- Cidr
Ip string - The cidrip of security rules.
- Description string
- The description of security rules.
- Ip
Protocol string - The ip protocol of security rules.
- Policy string
- The policy of security rules.
- Port
Range string - The port range of security rules.
- Priority string
- The priority of security rules.
- Type string
- The type of security rules.
- Cidr
Ip string - The cidrip of security rules.
- Description string
- The description of security rules.
- Ip
Protocol string - The ip protocol of security rules.
- Policy string
- The policy of security rules.
- Port
Range string - The port range of security rules.
- Priority string
- The priority of security rules.
- Type string
- The type of security rules.
- cidr
Ip String - The cidrip of security rules.
- description String
- The description of security rules.
- ip
Protocol String - The ip protocol of security rules.
- policy String
- The policy of security rules.
- port
Range String - The port range of security rules.
- priority String
- The priority of security rules.
- type String
- The type of security rules.
- cidr
Ip string - The cidrip of security rules.
- description string
- The description of security rules.
- ip
Protocol string - The ip protocol of security rules.
- policy string
- The policy of security rules.
- port
Range 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.
- cidr
Ip String - The cidrip of security rules.
- description String
- The description of security rules.
- ip
Protocol String - The ip protocol of security rules.
- policy String
- The policy of security rules.
- port
Range 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.