1. Packages
  2. Checkpoint Provider
  3. API Docs
  4. getManagementDataAccessRule
checkpoint 2.9.0 published on Monday, Apr 14, 2025 by checkpointsw

checkpoint.getManagementDataAccessRule

Explore with Pulumi AI

checkpoint logo
checkpoint 2.9.0 published on Monday, Apr 14, 2025 by checkpointsw

    Use this data source to get information on an existing Check Point Access Rule.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as checkpoint from "@pulumi/checkpoint";
    
    const accessRule = new checkpoint.ManagementAccessRule("accessRule", {
        contents: ["Any"],
        customFields: {},
        destinations: ["Any"],
        installOns: ["Policy Targets"],
        layer: "Network",
        position: {
            top: "top",
        },
        services: ["Any"],
        sources: ["Any"],
        times: ["Any"],
        track: {
            accounting: "false",
            alert: "none",
            enable_firewall_session: "false",
            per_connection: "true",
            per_session: "false",
            type: "Log",
        },
        vpn: "Any",
    });
    const dataAccessRule = checkpoint.getManagementDataAccessRuleOutput({
        layer: accessRule.layer,
        name: accessRule.name,
    });
    
    import pulumi
    import pulumi_checkpoint as checkpoint
    
    access_rule = checkpoint.ManagementAccessRule("accessRule",
        contents=["Any"],
        custom_fields={},
        destinations=["Any"],
        install_ons=["Policy Targets"],
        layer="Network",
        position={
            "top": "top",
        },
        services=["Any"],
        sources=["Any"],
        times=["Any"],
        track={
            "accounting": "false",
            "alert": "none",
            "enable_firewall_session": "false",
            "per_connection": "true",
            "per_session": "false",
            "type": "Log",
        },
        vpn="Any")
    data_access_rule = checkpoint.get_management_data_access_rule_output(layer=access_rule.layer,
        name=access_rule.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/checkpoint/v2/checkpoint"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		accessRule, err := checkpoint.NewManagementAccessRule(ctx, "accessRule", &checkpoint.ManagementAccessRuleArgs{
    			Contents: pulumi.StringArray{
    				pulumi.String("Any"),
    			},
    			CustomFields: pulumi.StringMap{},
    			Destinations: pulumi.StringArray{
    				pulumi.String("Any"),
    			},
    			InstallOns: pulumi.StringArray{
    				pulumi.String("Policy Targets"),
    			},
    			Layer: pulumi.String("Network"),
    			Position: pulumi.StringMap{
    				"top": pulumi.String("top"),
    			},
    			Services: pulumi.StringArray{
    				pulumi.String("Any"),
    			},
    			Sources: pulumi.StringArray{
    				pulumi.String("Any"),
    			},
    			Times: pulumi.StringArray{
    				pulumi.String("Any"),
    			},
    			Track: pulumi.StringMap{
    				"accounting":              pulumi.String("false"),
    				"alert":                   pulumi.String("none"),
    				"enable_firewall_session": pulumi.String("false"),
    				"per_connection":          pulumi.String("true"),
    				"per_session":             pulumi.String("false"),
    				"type":                    pulumi.String("Log"),
    			},
    			Vpn: pulumi.String("Any"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = checkpoint.GetManagementDataAccessRuleOutput(ctx, checkpoint.GetManagementDataAccessRuleOutputArgs{
    			Layer: accessRule.Layer,
    			Name:  accessRule.Name,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Checkpoint = Pulumi.Checkpoint;
    
    return await Deployment.RunAsync(() => 
    {
        var accessRule = new Checkpoint.ManagementAccessRule("accessRule", new()
        {
            Contents = new[]
            {
                "Any",
            },
            CustomFields = null,
            Destinations = new[]
            {
                "Any",
            },
            InstallOns = new[]
            {
                "Policy Targets",
            },
            Layer = "Network",
            Position = 
            {
                { "top", "top" },
            },
            Services = new[]
            {
                "Any",
            },
            Sources = new[]
            {
                "Any",
            },
            Times = new[]
            {
                "Any",
            },
            Track = 
            {
                { "accounting", "false" },
                { "alert", "none" },
                { "enable_firewall_session", "false" },
                { "per_connection", "true" },
                { "per_session", "false" },
                { "type", "Log" },
            },
            Vpn = "Any",
        });
    
        var dataAccessRule = Checkpoint.GetManagementDataAccessRule.Invoke(new()
        {
            Layer = accessRule.Layer,
            Name = accessRule.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.checkpoint.ManagementAccessRule;
    import com.pulumi.checkpoint.ManagementAccessRuleArgs;
    import com.pulumi.checkpoint.CheckpointFunctions;
    import com.pulumi.checkpoint.inputs.GetManagementDataAccessRuleArgs;
    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 accessRule = new ManagementAccessRule("accessRule", ManagementAccessRuleArgs.builder()
                .contents("Any")
                .customFields()
                .destinations("Any")
                .installOns("Policy Targets")
                .layer("Network")
                .position(Map.of("top", "top"))
                .services("Any")
                .sources("Any")
                .times("Any")
                .track(Map.ofEntries(
                    Map.entry("accounting", false),
                    Map.entry("alert", "none"),
                    Map.entry("enable_firewall_session", false),
                    Map.entry("per_connection", true),
                    Map.entry("per_session", false),
                    Map.entry("type", "Log")
                ))
                .vpn("Any")
                .build());
    
            final var dataAccessRule = CheckpointFunctions.getManagementDataAccessRule(GetManagementDataAccessRuleArgs.builder()
                .layer(accessRule.layer())
                .name(accessRule.name())
                .build());
    
        }
    }
    
    resources:
      accessRule:
        type: checkpoint:ManagementAccessRule
        properties:
          contents:
            - Any
          customFields: {}
          destinations:
            - Any
          installOns:
            - Policy Targets
          layer: Network
          position:
            top: top
          services:
            - Any
          sources:
            - Any
          times:
            - Any
          track:
            accounting: false
            alert: none
            enable_firewall_session: false
            per_connection: true
            per_session: false
            type: Log
          vpn: Any
    variables:
      dataAccessRule:
        fn::invoke:
          function: checkpoint:getManagementDataAccessRule
          arguments:
            layer: ${accessRule.layer}
            name: ${accessRule.name}
    

    Using getManagementDataAccessRule

    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 getManagementDataAccessRule(args: GetManagementDataAccessRuleArgs, opts?: InvokeOptions): Promise<GetManagementDataAccessRuleResult>
    function getManagementDataAccessRuleOutput(args: GetManagementDataAccessRuleOutputArgs, opts?: InvokeOptions): Output<GetManagementDataAccessRuleResult>
    def get_management_data_access_rule(fields_with_uid_identifiers: Optional[Sequence[str]] = None,
                                        id: Optional[str] = None,
                                        layer: Optional[str] = None,
                                        name: Optional[str] = None,
                                        uid: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetManagementDataAccessRuleResult
    def get_management_data_access_rule_output(fields_with_uid_identifiers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                        id: Optional[pulumi.Input[str]] = None,
                                        layer: Optional[pulumi.Input[str]] = None,
                                        name: Optional[pulumi.Input[str]] = None,
                                        uid: Optional[pulumi.Input[str]] = None,
                                        opts: Optional[InvokeOptions] = None) -> Output[GetManagementDataAccessRuleResult]
    func GetManagementDataAccessRule(ctx *Context, args *GetManagementDataAccessRuleArgs, opts ...InvokeOption) (*GetManagementDataAccessRuleResult, error)
    func GetManagementDataAccessRuleOutput(ctx *Context, args *GetManagementDataAccessRuleOutputArgs, opts ...InvokeOption) GetManagementDataAccessRuleResultOutput

    > Note: This function is named GetManagementDataAccessRule in the Go SDK.

    public static class GetManagementDataAccessRule 
    {
        public static Task<GetManagementDataAccessRuleResult> InvokeAsync(GetManagementDataAccessRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetManagementDataAccessRuleResult> Invoke(GetManagementDataAccessRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetManagementDataAccessRuleResult> getManagementDataAccessRule(GetManagementDataAccessRuleArgs args, InvokeOptions options)
    public static Output<GetManagementDataAccessRuleResult> getManagementDataAccessRule(GetManagementDataAccessRuleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: checkpoint:index/getManagementDataAccessRule:getManagementDataAccessRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Layer string
    Layer that the rule belongs to identified by the name or UID.
    FieldsWithUidIdentifiers List<string>
    List of resource fields that will use object UIDs as object identifiers. Default is object name.
    Id string
    Name string
    Rule name.
    Uid string
    Object unique identifier.
    Layer string
    Layer that the rule belongs to identified by the name or UID.
    FieldsWithUidIdentifiers []string
    List of resource fields that will use object UIDs as object identifiers. Default is object name.
    Id string
    Name string
    Rule name.
    Uid string
    Object unique identifier.
    layer String
    Layer that the rule belongs to identified by the name or UID.
    fieldsWithUidIdentifiers List<String>
    List of resource fields that will use object UIDs as object identifiers. Default is object name.
    id String
    name String
    Rule name.
    uid String
    Object unique identifier.
    layer string
    Layer that the rule belongs to identified by the name or UID.
    fieldsWithUidIdentifiers string[]
    List of resource fields that will use object UIDs as object identifiers. Default is object name.
    id string
    name string
    Rule name.
    uid string
    Object unique identifier.
    layer str
    Layer that the rule belongs to identified by the name or UID.
    fields_with_uid_identifiers Sequence[str]
    List of resource fields that will use object UIDs as object identifiers. Default is object name.
    id str
    name str
    Rule name.
    uid str
    Object unique identifier.
    layer String
    Layer that the rule belongs to identified by the name or UID.
    fieldsWithUidIdentifiers List<String>
    List of resource fields that will use object UIDs as object identifiers. Default is object name.
    id String
    name String
    Rule name.
    uid String
    Object unique identifier.

    getManagementDataAccessRule Result

    The following output properties are available:

    Action string
    ActionSettings Dictionary<string, string>
    Comments string
    ContentDirection string
    ContentNegate bool
    Contents List<string>
    CustomFields Dictionary<string, string>
    DestinationNegate bool
    Destinations List<string>
    Enabled bool
    Id string
    InlineLayer string
    InstallOns List<string>
    Layer string
    ServiceNegate bool
    Services List<string>
    SourceNegate bool
    Sources List<string>
    Times List<string>
    Track Dictionary<string, string>
    UserChecks List<GetManagementDataAccessRuleUserCheck>
    Vpn string
    VpnCommunities List<string>
    VpnDirectionals List<GetManagementDataAccessRuleVpnDirectional>
    FieldsWithUidIdentifiers List<string>
    Name string
    Uid string
    action String
    actionSettings Map<String,String>
    comments String
    contentDirection String
    contentNegate Boolean
    contents List<String>
    customFields Map<String,String>
    destinationNegate Boolean
    destinations List<String>
    enabled Boolean
    id String
    inlineLayer String
    installOns List<String>
    layer String
    serviceNegate Boolean
    services List<String>
    sourceNegate Boolean
    sources List<String>
    times List<String>
    track Map<String,String>
    userChecks List<GetManagementDataAccessRuleUserCheck>
    vpn String
    vpnCommunities List<String>
    vpnDirectionals List<GetManagementDataAccessRuleVpnDirectional>
    fieldsWithUidIdentifiers List<String>
    name String
    uid String
    action string
    actionSettings {[key: string]: string}
    comments string
    contentDirection string
    contentNegate boolean
    contents string[]
    customFields {[key: string]: string}
    destinationNegate boolean
    destinations string[]
    enabled boolean
    id string
    inlineLayer string
    installOns string[]
    layer string
    serviceNegate boolean
    services string[]
    sourceNegate boolean
    sources string[]
    times string[]
    track {[key: string]: string}
    userChecks GetManagementDataAccessRuleUserCheck[]
    vpn string
    vpnCommunities string[]
    vpnDirectionals GetManagementDataAccessRuleVpnDirectional[]
    fieldsWithUidIdentifiers string[]
    name string
    uid string
    action String
    actionSettings Map<String>
    comments String
    contentDirection String
    contentNegate Boolean
    contents List<String>
    customFields Map<String>
    destinationNegate Boolean
    destinations List<String>
    enabled Boolean
    id String
    inlineLayer String
    installOns List<String>
    layer String
    serviceNegate Boolean
    services List<String>
    sourceNegate Boolean
    sources List<String>
    times List<String>
    track Map<String>
    userChecks List<Property Map>
    vpn String
    vpnCommunities List<String>
    vpnDirectionals List<Property Map>
    fieldsWithUidIdentifiers List<String>
    name String
    uid String

    Supporting Types

    GetManagementDataAccessRuleUserCheck

    Confirm string
    CustomFrequencies []GetManagementDataAccessRuleUserCheckCustomFrequency
    Custom Frequency blocks are documented below.
    Frequency string
    Interaction string
    confirm string
    customFrequencies GetManagementDataAccessRuleUserCheckCustomFrequency[]
    Custom Frequency blocks are documented below.
    frequency string
    interaction string
    confirm String
    customFrequencies List<Property Map>
    Custom Frequency blocks are documented below.
    frequency String
    interaction String

    GetManagementDataAccessRuleUserCheckCustomFrequency

    Every double
    Unit string
    Every float64
    Unit string
    every Double
    unit String
    every number
    unit string
    every float
    unit str
    every Number
    unit String

    GetManagementDataAccessRuleVpnDirectional

    From string
    From VPN community.
    To string
    To VPN community.
    From string
    From VPN community.
    To string
    To VPN community.
    from String
    From VPN community.
    to String
    To VPN community.
    from string
    From VPN community.
    to string
    To VPN community.
    from_ str
    From VPN community.
    to str
    To VPN community.
    from String
    From VPN community.
    to String
    To VPN community.

    Package Details

    Repository
    checkpoint checkpointsw/terraform-provider-checkpoint
    License
    Notes
    This Pulumi package is based on the checkpoint Terraform Provider.
    checkpoint logo
    checkpoint 2.9.0 published on Monday, Apr 14, 2025 by checkpointsw