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

checkpoint.getManagementThreatException

Explore with Pulumi AI

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

    This resource allows you to execute Check Point Threat Exception.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as checkpoint from "@pulumi/checkpoint";
    
    const threatRule = new checkpoint.ManagementThreatRule("threatRule", {
        layer: "Standard Threat Prevention",
        position: {
            top: "top",
        },
    });
    const threatException = new checkpoint.ManagementThreatException("threatException", {
        layer: "Standard Threat Prevention",
        position: {
            top: "top",
        },
        ruleName: threatRule.name,
    });
    const dataThreatException = pulumi.all([threatException.layer, threatException.name, threatException.ruleName]).apply(([layer, name, ruleName]) => checkpoint.getManagementThreatExceptionOutput({
        layer: layer,
        name: name,
        ruleName: ruleName,
    }));
    
    import pulumi
    import pulumi_checkpoint as checkpoint
    
    threat_rule = checkpoint.ManagementThreatRule("threatRule",
        layer="Standard Threat Prevention",
        position={
            "top": "top",
        })
    threat_exception = checkpoint.ManagementThreatException("threatException",
        layer="Standard Threat Prevention",
        position={
            "top": "top",
        },
        rule_name=threat_rule.name)
    data_threat_exception = pulumi.Output.all(
        layer=threat_exception.layer,
        name=threat_exception.name,
        rule_name=threat_exception.rule_name
    ).apply(lambda resolved_outputs: checkpoint.get_management_threat_exception_output(layer=resolved_outputs['layer'],
        name=resolved_outputs['name'],
        rule_name=resolved_outputs['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 {
    		threatRule, err := checkpoint.NewManagementThreatRule(ctx, "threatRule", &checkpoint.ManagementThreatRuleArgs{
    			Layer: pulumi.String("Standard Threat Prevention"),
    			Position: pulumi.StringMap{
    				"top": pulumi.String("top"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		threatException, err := checkpoint.NewManagementThreatException(ctx, "threatException", &checkpoint.ManagementThreatExceptionArgs{
    			Layer: pulumi.String("Standard Threat Prevention"),
    			Position: pulumi.StringMap{
    				"top": pulumi.String("top"),
    			},
    			RuleName: threatRule.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_ = pulumi.All(threatException.Layer, threatException.Name, threatException.RuleName).ApplyT(func(_args []interface{}) (checkpoint.GetManagementThreatExceptionResult, error) {
    			layer := _args[0].(*string)
    			name := _args[1].(string)
    			ruleName := _args[2].(*string)
    			return checkpoint.GetManagementThreatExceptionResult(interface{}(checkpoint.LookupManagementThreatExceptionOutput(ctx, checkpoint.GetManagementThreatExceptionOutputArgs{
    				Layer:    layer,
    				Name:     name,
    				RuleName: ruleName,
    			}, nil))), nil
    		}).(checkpoint.GetManagementThreatExceptionResultOutput)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Checkpoint = Pulumi.Checkpoint;
    
    return await Deployment.RunAsync(() => 
    {
        var threatRule = new Checkpoint.ManagementThreatRule("threatRule", new()
        {
            Layer = "Standard Threat Prevention",
            Position = 
            {
                { "top", "top" },
            },
        });
    
        var threatException = new Checkpoint.ManagementThreatException("threatException", new()
        {
            Layer = "Standard Threat Prevention",
            Position = 
            {
                { "top", "top" },
            },
            RuleName = threatRule.Name,
        });
    
        var dataThreatException = Checkpoint.GetManagementThreatException.Invoke(new()
        {
            Layer = threatException.Layer,
            Name = threatException.Name,
            RuleName = threatException.RuleName,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.checkpoint.ManagementThreatRule;
    import com.pulumi.checkpoint.ManagementThreatRuleArgs;
    import com.pulumi.checkpoint.ManagementThreatException;
    import com.pulumi.checkpoint.ManagementThreatExceptionArgs;
    import com.pulumi.checkpoint.CheckpointFunctions;
    import com.pulumi.checkpoint.inputs.GetManagementThreatExceptionArgs;
    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 threatRule = new ManagementThreatRule("threatRule", ManagementThreatRuleArgs.builder()
                .layer("Standard Threat Prevention")
                .position(Map.of("top", "top"))
                .build());
    
            var threatException = new ManagementThreatException("threatException", ManagementThreatExceptionArgs.builder()
                .layer("Standard Threat Prevention")
                .position(Map.of("top", "top"))
                .ruleName(threatRule.name())
                .build());
    
            final var dataThreatException = CheckpointFunctions.getManagementThreatException(GetManagementThreatExceptionArgs.builder()
                .layer(threatException.layer())
                .name(threatException.name())
                .ruleName(threatException.ruleName())
                .build());
    
        }
    }
    
    resources:
      threatRule:
        type: checkpoint:ManagementThreatRule
        properties:
          layer: Standard Threat Prevention
          position:
            top: top
      threatException:
        type: checkpoint:ManagementThreatException
        properties:
          layer: Standard Threat Prevention
          position:
            top: top
          ruleName: ${threatRule.name}
    variables:
      dataThreatException:
        fn::invoke:
          function: checkpoint:getManagementThreatException
          arguments:
            layer: ${threatException.layer}
            name: ${threatException.name}
            ruleName: ${threatException.ruleName}
    

    Using getManagementThreatException

    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 getManagementThreatException(args: GetManagementThreatExceptionArgs, opts?: InvokeOptions): Promise<GetManagementThreatExceptionResult>
    function getManagementThreatExceptionOutput(args: GetManagementThreatExceptionOutputArgs, opts?: InvokeOptions): Output<GetManagementThreatExceptionResult>
    def get_management_threat_exception(exception_group_name: Optional[str] = None,
                                        exception_group_uid: Optional[str] = None,
                                        id: Optional[str] = None,
                                        layer: Optional[str] = None,
                                        name: Optional[str] = None,
                                        rule_name: Optional[str] = None,
                                        rule_uid: Optional[str] = None,
                                        uid: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetManagementThreatExceptionResult
    def get_management_threat_exception_output(exception_group_name: Optional[pulumi.Input[str]] = None,
                                        exception_group_uid: Optional[pulumi.Input[str]] = None,
                                        id: Optional[pulumi.Input[str]] = None,
                                        layer: Optional[pulumi.Input[str]] = None,
                                        name: Optional[pulumi.Input[str]] = None,
                                        rule_name: Optional[pulumi.Input[str]] = None,
                                        rule_uid: Optional[pulumi.Input[str]] = None,
                                        uid: Optional[pulumi.Input[str]] = None,
                                        opts: Optional[InvokeOptions] = None) -> Output[GetManagementThreatExceptionResult]
    func LookupManagementThreatException(ctx *Context, args *LookupManagementThreatExceptionArgs, opts ...InvokeOption) (*LookupManagementThreatExceptionResult, error)
    func LookupManagementThreatExceptionOutput(ctx *Context, args *LookupManagementThreatExceptionOutputArgs, opts ...InvokeOption) LookupManagementThreatExceptionResultOutput

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

    public static class GetManagementThreatException 
    {
        public static Task<GetManagementThreatExceptionResult> InvokeAsync(GetManagementThreatExceptionArgs args, InvokeOptions? opts = null)
        public static Output<GetManagementThreatExceptionResult> Invoke(GetManagementThreatExceptionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetManagementThreatExceptionResult> getManagementThreatException(GetManagementThreatExceptionArgs args, InvokeOptions options)
    public static Output<GetManagementThreatExceptionResult> getManagementThreatException(GetManagementThreatExceptionArgs args, InvokeOptions options)
    
    fn::invoke:
      function: checkpoint:index/getManagementThreatException:getManagementThreatException
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Layer string
    Layer that the rule belongs to identified by the name or UID.
    ExceptionGroupName string
    The name of the exception-group.
    ExceptionGroupUid string
    The UID of the exception-group.
    Id string
    Name string
    The name of the exception.
    RuleName string
    The name of the parent rule.
    RuleUid string
    The UID of the parent rule.
    Uid string
    Object unique identifier.
    Layer string
    Layer that the rule belongs to identified by the name or UID.
    ExceptionGroupName string
    The name of the exception-group.
    ExceptionGroupUid string
    The UID of the exception-group.
    Id string
    Name string
    The name of the exception.
    RuleName string
    The name of the parent rule.
    RuleUid string
    The UID of the parent rule.
    Uid string
    Object unique identifier.
    layer String
    Layer that the rule belongs to identified by the name or UID.
    exceptionGroupName String
    The name of the exception-group.
    exceptionGroupUid String
    The UID of the exception-group.
    id String
    name String
    The name of the exception.
    ruleName String
    The name of the parent rule.
    ruleUid String
    The UID of the parent rule.
    uid String
    Object unique identifier.
    layer string
    Layer that the rule belongs to identified by the name or UID.
    exceptionGroupName string
    The name of the exception-group.
    exceptionGroupUid string
    The UID of the exception-group.
    id string
    name string
    The name of the exception.
    ruleName string
    The name of the parent rule.
    ruleUid string
    The UID of the parent rule.
    uid string
    Object unique identifier.
    layer str
    Layer that the rule belongs to identified by the name or UID.
    exception_group_name str
    The name of the exception-group.
    exception_group_uid str
    The UID of the exception-group.
    id str
    name str
    The name of the exception.
    rule_name str
    The name of the parent rule.
    rule_uid str
    The UID of the parent rule.
    uid str
    Object unique identifier.
    layer String
    Layer that the rule belongs to identified by the name or UID.
    exceptionGroupName String
    The name of the exception-group.
    exceptionGroupUid String
    The UID of the exception-group.
    id String
    name String
    The name of the exception.
    ruleName String
    The name of the parent rule.
    ruleUid String
    The UID of the parent rule.
    uid String
    Object unique identifier.

    getManagementThreatException Result

    The following output properties are available:

    Action string
    Comments string
    DestinationNegate bool
    Destinations List<string>
    Enabled bool
    Id string
    InstallOns List<string>
    Layer string
    Owner string
    ProtectedScopeNegate bool
    ProtectedScopes List<string>
    ProtectionOrSites List<string>
    ServiceNegate bool
    Services List<string>
    SourceNegate bool
    Sources List<string>
    Track string
    ExceptionGroupName string
    ExceptionGroupUid string
    Name string
    RuleName string
    RuleUid string
    Uid string
    Action string
    Comments string
    DestinationNegate bool
    Destinations []string
    Enabled bool
    Id string
    InstallOns []string
    Layer string
    Owner string
    ProtectedScopeNegate bool
    ProtectedScopes []string
    ProtectionOrSites []string
    ServiceNegate bool
    Services []string
    SourceNegate bool
    Sources []string
    Track string
    ExceptionGroupName string
    ExceptionGroupUid string
    Name string
    RuleName string
    RuleUid string
    Uid string
    action String
    comments String
    destinationNegate Boolean
    destinations List<String>
    enabled Boolean
    id String
    installOns List<String>
    layer String
    owner String
    protectedScopeNegate Boolean
    protectedScopes List<String>
    protectionOrSites List<String>
    serviceNegate Boolean
    services List<String>
    sourceNegate Boolean
    sources List<String>
    track String
    exceptionGroupName String
    exceptionGroupUid String
    name String
    ruleName String
    ruleUid String
    uid String
    action string
    comments string
    destinationNegate boolean
    destinations string[]
    enabled boolean
    id string
    installOns string[]
    layer string
    owner string
    protectedScopeNegate boolean
    protectedScopes string[]
    protectionOrSites string[]
    serviceNegate boolean
    services string[]
    sourceNegate boolean
    sources string[]
    track string
    exceptionGroupName string
    exceptionGroupUid string
    name string
    ruleName string
    ruleUid string
    uid string
    action String
    comments String
    destinationNegate Boolean
    destinations List<String>
    enabled Boolean
    id String
    installOns List<String>
    layer String
    owner String
    protectedScopeNegate Boolean
    protectedScopes List<String>
    protectionOrSites List<String>
    serviceNegate Boolean
    services List<String>
    sourceNegate Boolean
    sources List<String>
    track String
    exceptionGroupName String
    exceptionGroupUid String
    name String
    ruleName String
    ruleUid String
    uid String

    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