1. Packages
  2. Strata Cloud Manager Provider
  3. API Docs
  4. getPbfRule
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
scm logo
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi

    PbfRule data source

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scm from "@pulumi/scm";
    
    const exampleTag = new scm.Tag("example_tag", {
        folder: "All",
        name: "pbf-rule-tag-ds-test-1",
        color: "Red",
    });
    // --- PBF Rule Resource with discard action---
    const examplePbfRule = new scm.PbfRule("example_pbf_rule", {
        name: "pbf-test-ds-rule-discard",
        folder: "All",
        description: "Data Source testing pbf rule.",
        from: {
            zones: ["zone-untrust"],
        },
        sources: ["any"],
        destinations: ["any"],
        applications: ["any"],
        services: ["service-http"],
        sourceUsers: ["any"],
        action: {
            discard: {},
        },
        tags: [exampleTag.name],
        enforceSymmetricReturn: {
            enabled: false,
        },
        schedule: "non-work-hours",
    });
    // Define the data source (the item to be retrieved via API GET)
    const pbfExternalWebTestGet = scm.getPbfRuleOutput({
        id: examplePbfRule.id,
    });
    export const retrievedIDAndName = {
        id: pbfExternalWebTestGet.apply(pbfExternalWebTestGet => pbfExternalWebTestGet.id),
        name: pbfExternalWebTestGet.apply(pbfExternalWebTestGet => pbfExternalWebTestGet.name),
    };
    export const recievedResponse = pbfExternalWebTestGet;
    
    import pulumi
    import pulumi_scm as scm
    
    example_tag = scm.Tag("example_tag",
        folder="All",
        name="pbf-rule-tag-ds-test-1",
        color="Red")
    # --- PBF Rule Resource with discard action---
    example_pbf_rule = scm.PbfRule("example_pbf_rule",
        name="pbf-test-ds-rule-discard",
        folder="All",
        description="Data Source testing pbf rule.",
        from_={
            "zones": ["zone-untrust"],
        },
        sources=["any"],
        destinations=["any"],
        applications=["any"],
        services=["service-http"],
        source_users=["any"],
        action={
            "discard": {},
        },
        tags=[example_tag.name],
        enforce_symmetric_return={
            "enabled": False,
        },
        schedule="non-work-hours")
    # Define the data source (the item to be retrieved via API GET)
    pbf_external_web_test_get = scm.get_pbf_rule_output(id=example_pbf_rule.id)
    pulumi.export("retrievedIDAndName", {
        "id": pbf_external_web_test_get.id,
        "name": pbf_external_web_test_get.name,
    })
    pulumi.export("recievedResponse", pbf_external_web_test_get)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-scm/sdk/go/scm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleTag, err := scm.NewTag(ctx, "example_tag", &scm.TagArgs{
    			Folder: pulumi.String("All"),
    			Name:   pulumi.String("pbf-rule-tag-ds-test-1"),
    			Color:  pulumi.String("Red"),
    		})
    		if err != nil {
    			return err
    		}
    		// --- PBF Rule Resource with discard action---
    		examplePbfRule, err := scm.NewPbfRule(ctx, "example_pbf_rule", &scm.PbfRuleArgs{
    			Name:        pulumi.String("pbf-test-ds-rule-discard"),
    			Folder:      pulumi.String("All"),
    			Description: pulumi.String("Data Source testing pbf rule."),
    			From: &scm.PbfRuleFromArgs{
    				Zones: pulumi.StringArray{
    					pulumi.String("zone-untrust"),
    				},
    			},
    			Sources: pulumi.StringArray{
    				pulumi.String("any"),
    			},
    			Destinations: pulumi.StringArray{
    				pulumi.String("any"),
    			},
    			Applications: pulumi.StringArray{
    				pulumi.String("any"),
    			},
    			Services: pulumi.StringArray{
    				pulumi.String("service-http"),
    			},
    			SourceUsers: pulumi.StringArray{
    				pulumi.String("any"),
    			},
    			Action: &scm.PbfRuleActionArgs{
    				Discard: &scm.PbfRuleActionDiscardArgs{},
    			},
    			Tags: pulumi.StringArray{
    				exampleTag.Name,
    			},
    			EnforceSymmetricReturn: &scm.PbfRuleEnforceSymmetricReturnArgs{
    				Enabled: pulumi.Bool(false),
    			},
    			Schedule: pulumi.String("non-work-hours"),
    		})
    		if err != nil {
    			return err
    		}
    		// Define the data source (the item to be retrieved via API GET)
    		pbfExternalWebTestGet := scm.LookupPbfRuleOutput(ctx, scm.GetPbfRuleOutputArgs{
    			Id: examplePbfRule.ID(),
    		}, nil)
    		ctx.Export("retrievedIDAndName", pulumi.StringMap{
    			"id": pbfExternalWebTestGet.ApplyT(func(pbfExternalWebTestGet scm.GetPbfRuleResult) (*string, error) {
    				return &pbfExternalWebTestGet.Id, nil
    			}).(pulumi.StringPtrOutput),
    			"name": pbfExternalWebTestGet.ApplyT(func(pbfExternalWebTestGet scm.GetPbfRuleResult) (*string, error) {
    				return &pbfExternalWebTestGet.Name, nil
    			}).(pulumi.StringPtrOutput),
    		})
    		ctx.Export("recievedResponse", pbfExternalWebTestGet)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scm = Pulumi.Scm;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleTag = new Scm.Tag("example_tag", new()
        {
            Folder = "All",
            Name = "pbf-rule-tag-ds-test-1",
            Color = "Red",
        });
    
        // --- PBF Rule Resource with discard action---
        var examplePbfRule = new Scm.PbfRule("example_pbf_rule", new()
        {
            Name = "pbf-test-ds-rule-discard",
            Folder = "All",
            Description = "Data Source testing pbf rule.",
            From = new Scm.Inputs.PbfRuleFromArgs
            {
                Zones = new[]
                {
                    "zone-untrust",
                },
            },
            Sources = new[]
            {
                "any",
            },
            Destinations = new[]
            {
                "any",
            },
            Applications = new[]
            {
                "any",
            },
            Services = new[]
            {
                "service-http",
            },
            SourceUsers = new[]
            {
                "any",
            },
            Action = new Scm.Inputs.PbfRuleActionArgs
            {
                Discard = null,
            },
            Tags = new[]
            {
                exampleTag.Name,
            },
            EnforceSymmetricReturn = new Scm.Inputs.PbfRuleEnforceSymmetricReturnArgs
            {
                Enabled = false,
            },
            Schedule = "non-work-hours",
        });
    
        // Define the data source (the item to be retrieved via API GET)
        var pbfExternalWebTestGet = Scm.GetPbfRule.Invoke(new()
        {
            Id = examplePbfRule.Id,
        });
    
        return new Dictionary<string, object?>
        {
            ["retrievedIDAndName"] = 
            {
                { "id", pbfExternalWebTestGet.Apply(getPbfRuleResult => getPbfRuleResult.Id) },
                { "name", pbfExternalWebTestGet.Apply(getPbfRuleResult => getPbfRuleResult.Name) },
            },
            ["recievedResponse"] = pbfExternalWebTestGet,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scm.Tag;
    import com.pulumi.scm.TagArgs;
    import com.pulumi.scm.PbfRule;
    import com.pulumi.scm.PbfRuleArgs;
    import com.pulumi.scm.inputs.PbfRuleFromArgs;
    import com.pulumi.scm.inputs.PbfRuleActionArgs;
    import com.pulumi.scm.inputs.PbfRuleActionDiscardArgs;
    import com.pulumi.scm.inputs.PbfRuleEnforceSymmetricReturnArgs;
    import com.pulumi.scm.ScmFunctions;
    import com.pulumi.scm.inputs.GetPbfRuleArgs;
    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 exampleTag = new Tag("exampleTag", TagArgs.builder()
                .folder("All")
                .name("pbf-rule-tag-ds-test-1")
                .color("Red")
                .build());
    
            // --- PBF Rule Resource with discard action---
            var examplePbfRule = new PbfRule("examplePbfRule", PbfRuleArgs.builder()
                .name("pbf-test-ds-rule-discard")
                .folder("All")
                .description("Data Source testing pbf rule.")
                .from(PbfRuleFromArgs.builder()
                    .zones("zone-untrust")
                    .build())
                .sources("any")
                .destinations("any")
                .applications("any")
                .services("service-http")
                .sourceUsers("any")
                .action(PbfRuleActionArgs.builder()
                    .discard(PbfRuleActionDiscardArgs.builder()
                        .build())
                    .build())
                .tags(exampleTag.name())
                .enforceSymmetricReturn(PbfRuleEnforceSymmetricReturnArgs.builder()
                    .enabled(false)
                    .build())
                .schedule("non-work-hours")
                .build());
    
            // Define the data source (the item to be retrieved via API GET)
            final var pbfExternalWebTestGet = ScmFunctions.getPbfRule(GetPbfRuleArgs.builder()
                .id(examplePbfRule.id())
                .build());
    
            ctx.export("retrievedIDAndName", Map.ofEntries(
                Map.entry("id", pbfExternalWebTestGet.applyValue(_pbfExternalWebTestGet -> _pbfExternalWebTestGet.id())),
                Map.entry("name", pbfExternalWebTestGet.applyValue(_pbfExternalWebTestGet -> _pbfExternalWebTestGet.name()))
            ));
            ctx.export("recievedResponse", pbfExternalWebTestGet);
        }
    }
    
    resources:
      exampleTag:
        type: scm:Tag
        name: example_tag
        properties:
          folder: All
          name: pbf-rule-tag-ds-test-1
          color: Red
      # --- PBF Rule Resource with discard action---
      examplePbfRule:
        type: scm:PbfRule
        name: example_pbf_rule
        properties:
          name: pbf-test-ds-rule-discard
          folder: All
          description: Data Source testing pbf rule.
          from:
            zones:
              - zone-untrust
          sources: # Source addresses
            - any
          destinations: # Destination addresses
            - any
          applications: # Applications
            - any
          services: # Services (ports/protocols)
            - service-http
          sourceUsers:
            - any
          action:
            discard: {}
          tags:
            - ${exampleTag.name}
          enforceSymmetricReturn:
            enabled: false
          schedule: non-work-hours
    variables:
      # Define the data source (the item to be retrieved via API GET)
      pbfExternalWebTestGet:
        fn::invoke:
          function: scm:getPbfRule
          arguments:
            id: ${examplePbfRule.id}
    outputs:
      # --- Output Blocks to Print Retrieved Data ---
      retrievedIDAndName:
        id: ${pbfExternalWebTestGet.id}
        name: ${pbfExternalWebTestGet.name}
      recievedResponse: ${pbfExternalWebTestGet}
    

    Using getPbfRule

    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 getPbfRule(args: GetPbfRuleArgs, opts?: InvokeOptions): Promise<GetPbfRuleResult>
    function getPbfRuleOutput(args: GetPbfRuleOutputArgs, opts?: InvokeOptions): Output<GetPbfRuleResult>
    def get_pbf_rule(id: Optional[str] = None,
                     name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetPbfRuleResult
    def get_pbf_rule_output(id: Optional[pulumi.Input[str]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetPbfRuleResult]
    func LookupPbfRule(ctx *Context, args *LookupPbfRuleArgs, opts ...InvokeOption) (*LookupPbfRuleResult, error)
    func LookupPbfRuleOutput(ctx *Context, args *LookupPbfRuleOutputArgs, opts ...InvokeOption) LookupPbfRuleResultOutput

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

    public static class GetPbfRule 
    {
        public static Task<GetPbfRuleResult> InvokeAsync(GetPbfRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetPbfRuleResult> Invoke(GetPbfRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPbfRuleResult> getPbfRule(GetPbfRuleArgs args, InvokeOptions options)
    public static Output<GetPbfRuleResult> getPbfRule(GetPbfRuleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scm:index/getPbfRule:getPbfRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    UUID of the resource
    Name string
    PBF rule name
    Id string
    UUID of the resource
    Name string
    PBF rule name
    id String
    UUID of the resource
    name String
    PBF rule name
    id string
    UUID of the resource
    name string
    PBF rule name
    id str
    UUID of the resource
    name str
    PBF rule name
    id String
    UUID of the resource
    name String
    PBF rule name

    getPbfRule Result

    The following output properties are available:

    Action GetPbfRuleAction
    Action
    Applications List<string>
    Applications
    Description string
    Description
    Destinations List<string>
    Destination addresses
    Device string
    The device in which the resource is defined
    EnforceSymmetricReturn GetPbfRuleEnforceSymmetricReturn
    Enforce symmetric return
    Folder string
    The folder in which the resource is defined
    From GetPbfRuleFrom
    From
    Id string
    UUID of the resource
    Name string
    PBF rule name
    Schedule string
    Schedule
    Services List<string>
    Services
    Snippet string
    The snippet in which the resource is defined
    SourceUsers List<string>
    Source users
    Sources List<string>
    Source addresses
    Tags List<string>
    Tags
    Tfid string
    Action GetPbfRuleAction
    Action
    Applications []string
    Applications
    Description string
    Description
    Destinations []string
    Destination addresses
    Device string
    The device in which the resource is defined
    EnforceSymmetricReturn GetPbfRuleEnforceSymmetricReturn
    Enforce symmetric return
    Folder string
    The folder in which the resource is defined
    From GetPbfRuleFrom
    From
    Id string
    UUID of the resource
    Name string
    PBF rule name
    Schedule string
    Schedule
    Services []string
    Services
    Snippet string
    The snippet in which the resource is defined
    SourceUsers []string
    Source users
    Sources []string
    Source addresses
    Tags []string
    Tags
    Tfid string
    action GetPbfRuleAction
    Action
    applications List<String>
    Applications
    description String
    Description
    destinations List<String>
    Destination addresses
    device String
    The device in which the resource is defined
    enforceSymmetricReturn GetPbfRuleEnforceSymmetricReturn
    Enforce symmetric return
    folder String
    The folder in which the resource is defined
    from GetPbfRuleFrom
    From
    id String
    UUID of the resource
    name String
    PBF rule name
    schedule String
    Schedule
    services List<String>
    Services
    snippet String
    The snippet in which the resource is defined
    sourceUsers List<String>
    Source users
    sources List<String>
    Source addresses
    tags List<String>
    Tags
    tfid String
    action GetPbfRuleAction
    Action
    applications string[]
    Applications
    description string
    Description
    destinations string[]
    Destination addresses
    device string
    The device in which the resource is defined
    enforceSymmetricReturn GetPbfRuleEnforceSymmetricReturn
    Enforce symmetric return
    folder string
    The folder in which the resource is defined
    from GetPbfRuleFrom
    From
    id string
    UUID of the resource
    name string
    PBF rule name
    schedule string
    Schedule
    services string[]
    Services
    snippet string
    The snippet in which the resource is defined
    sourceUsers string[]
    Source users
    sources string[]
    Source addresses
    tags string[]
    Tags
    tfid string
    action GetPbfRuleAction
    Action
    applications Sequence[str]
    Applications
    description str
    Description
    destinations Sequence[str]
    Destination addresses
    device str
    The device in which the resource is defined
    enforce_symmetric_return GetPbfRuleEnforceSymmetricReturn
    Enforce symmetric return
    folder str
    The folder in which the resource is defined
    from_ GetPbfRuleFrom
    From
    id str
    UUID of the resource
    name str
    PBF rule name
    schedule str
    Schedule
    services Sequence[str]
    Services
    snippet str
    The snippet in which the resource is defined
    source_users Sequence[str]
    Source users
    sources Sequence[str]
    Source addresses
    tags Sequence[str]
    Tags
    tfid str
    action Property Map
    Action
    applications List<String>
    Applications
    description String
    Description
    destinations List<String>
    Destination addresses
    device String
    The device in which the resource is defined
    enforceSymmetricReturn Property Map
    Enforce symmetric return
    folder String
    The folder in which the resource is defined
    from Property Map
    From
    id String
    UUID of the resource
    name String
    PBF rule name
    schedule String
    Schedule
    services List<String>
    Services
    snippet String
    The snippet in which the resource is defined
    sourceUsers List<String>
    Source users
    sources List<String>
    Source addresses
    tags List<String>
    Tags
    tfid String

    Supporting Types

    GetPbfRuleAction

    GetPbfRuleActionForward

    egressInterface String
    Egress interface
    monitor Property Map
    Monitor
    nexthop Property Map
    Nexthop

    GetPbfRuleActionForwardMonitor

    DisableIfUnreachable bool
    Disable this rule if nexthop/monitor ip is unreachable?
    IpAddress string
    Monitor IP address
    Profile string
    Monitoring profile
    DisableIfUnreachable bool
    Disable this rule if nexthop/monitor ip is unreachable?
    IpAddress string
    Monitor IP address
    Profile string
    Monitoring profile
    disableIfUnreachable Boolean
    Disable this rule if nexthop/monitor ip is unreachable?
    ipAddress String
    Monitor IP address
    profile String
    Monitoring profile
    disableIfUnreachable boolean
    Disable this rule if nexthop/monitor ip is unreachable?
    ipAddress string
    Monitor IP address
    profile string
    Monitoring profile
    disable_if_unreachable bool
    Disable this rule if nexthop/monitor ip is unreachable?
    ip_address str
    Monitor IP address
    profile str
    Monitoring profile
    disableIfUnreachable Boolean
    Disable this rule if nexthop/monitor ip is unreachable?
    ipAddress String
    Monitor IP address
    profile String
    Monitoring profile

    GetPbfRuleActionForwardNexthop

    Fqdn string
    Next hop FQDN
    IpAddress string
    Next hop IP address
    Fqdn string
    Next hop FQDN
    IpAddress string
    Next hop IP address
    fqdn String
    Next hop FQDN
    ipAddress String
    Next hop IP address
    fqdn string
    Next hop FQDN
    ipAddress string
    Next hop IP address
    fqdn str
    Next hop FQDN
    ip_address str
    Next hop IP address
    fqdn String
    Next hop FQDN
    ipAddress String
    Next hop IP address

    GetPbfRuleEnforceSymmetricReturn

    Enabled bool
    Enforce symmetric return?
    NexthopAddressLists []GetPbfRuleEnforceSymmetricReturnNexthopAddressList
    Next hop IP addresses
    enabled Boolean
    Enforce symmetric return?
    nexthopAddressLists List<GetPbfRuleEnforceSymmetricReturnNexthopAddressList>
    Next hop IP addresses
    enabled boolean
    Enforce symmetric return?
    nexthopAddressLists GetPbfRuleEnforceSymmetricReturnNexthopAddressList[]
    Next hop IP addresses
    enabled Boolean
    Enforce symmetric return?
    nexthopAddressLists List<Property Map>
    Next hop IP addresses

    GetPbfRuleEnforceSymmetricReturnNexthopAddressList

    Name string
    Next hop IP address
    Name string
    Next hop IP address
    name String
    Next hop IP address
    name string
    Next hop IP address
    name str
    Next hop IP address
    name String
    Next hop IP address

    GetPbfRuleFrom

    Interfaces List<string>
    Source interfaces
    Zones List<string>
    Source zones
    Interfaces []string
    Source interfaces
    Zones []string
    Source zones
    interfaces List<String>
    Source interfaces
    zones List<String>
    Source zones
    interfaces string[]
    Source interfaces
    zones string[]
    Source zones
    interfaces Sequence[str]
    Source interfaces
    zones Sequence[str]
    Source zones
    interfaces List<String>
    Source interfaces
    zones List<String>
    Source zones

    Package Details

    Repository
    scm pulumi/pulumi-scm
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scm Terraform Provider.
    scm logo
    Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate