1. Packages
  2. Strata Cloud Manager Provider
  3. API Docs
  4. getAuthenticationRule
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

    AuthenticationRule data source

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scm from "@pulumi/scm";
    
    const ruleToFetch = new scm.AuthenticationRule("rule_to_fetch", {
        name: "rule-to-be-queried-scm-105",
        description: "This rule is created purely to test the data source functionality.",
        position: "pre",
        folder: "All",
        destinations: ["any"],
        froms: ["any"],
        tos: ["any"],
        sources: ["any"],
        services: [
            "service-http",
            "service-https",
        ],
        sourceUsers: ["any"],
        timeout: 1200,
        negateSource: false,
        negateDestination: false,
    });
    const ruleData = scm.getAuthenticationRuleOutput({
        id: ruleToFetch.id,
    });
    export const fetchedRuleId = ruleData.apply(ruleData => ruleData.id);
    export const fetchedRuleTimeout = ruleData.apply(ruleData => ruleData.timeout);
    
    import pulumi
    import pulumi_scm as scm
    
    rule_to_fetch = scm.AuthenticationRule("rule_to_fetch",
        name="rule-to-be-queried-scm-105",
        description="This rule is created purely to test the data source functionality.",
        position="pre",
        folder="All",
        destinations=["any"],
        froms=["any"],
        tos=["any"],
        sources=["any"],
        services=[
            "service-http",
            "service-https",
        ],
        source_users=["any"],
        timeout=1200,
        negate_source=False,
        negate_destination=False)
    rule_data = scm.get_authentication_rule_output(id=rule_to_fetch.id)
    pulumi.export("fetchedRuleId", rule_data.id)
    pulumi.export("fetchedRuleTimeout", rule_data.timeout)
    
    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 {
    		ruleToFetch, err := scm.NewAuthenticationRule(ctx, "rule_to_fetch", &scm.AuthenticationRuleArgs{
    			Name:        pulumi.String("rule-to-be-queried-scm-105"),
    			Description: pulumi.String("This rule is created purely to test the data source functionality."),
    			Position:    pulumi.String("pre"),
    			Folder:      pulumi.String("All"),
    			Destinations: pulumi.StringArray{
    				pulumi.String("any"),
    			},
    			Froms: pulumi.StringArray{
    				pulumi.String("any"),
    			},
    			Tos: pulumi.StringArray{
    				pulumi.String("any"),
    			},
    			Sources: pulumi.StringArray{
    				pulumi.String("any"),
    			},
    			Services: pulumi.StringArray{
    				pulumi.String("service-http"),
    				pulumi.String("service-https"),
    			},
    			SourceUsers: pulumi.StringArray{
    				pulumi.String("any"),
    			},
    			Timeout:           pulumi.Int(1200),
    			NegateSource:      pulumi.Bool(false),
    			NegateDestination: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		ruleData := scm.LookupAuthenticationRuleOutput(ctx, scm.GetAuthenticationRuleOutputArgs{
    			Id: ruleToFetch.ID(),
    		}, nil)
    		ctx.Export("fetchedRuleId", ruleData.ApplyT(func(ruleData scm.GetAuthenticationRuleResult) (*string, error) {
    			return &ruleData.Id, nil
    		}).(pulumi.StringPtrOutput))
    		ctx.Export("fetchedRuleTimeout", ruleData.ApplyT(func(ruleData scm.GetAuthenticationRuleResult) (*int, error) {
    			return &ruleData.Timeout, nil
    		}).(pulumi.IntPtrOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scm = Pulumi.Scm;
    
    return await Deployment.RunAsync(() => 
    {
        var ruleToFetch = new Scm.AuthenticationRule("rule_to_fetch", new()
        {
            Name = "rule-to-be-queried-scm-105",
            Description = "This rule is created purely to test the data source functionality.",
            Position = "pre",
            Folder = "All",
            Destinations = new[]
            {
                "any",
            },
            Froms = new[]
            {
                "any",
            },
            Tos = new[]
            {
                "any",
            },
            Sources = new[]
            {
                "any",
            },
            Services = new[]
            {
                "service-http",
                "service-https",
            },
            SourceUsers = new[]
            {
                "any",
            },
            Timeout = 1200,
            NegateSource = false,
            NegateDestination = false,
        });
    
        var ruleData = Scm.GetAuthenticationRule.Invoke(new()
        {
            Id = ruleToFetch.Id,
        });
    
        return new Dictionary<string, object?>
        {
            ["fetchedRuleId"] = ruleData.Apply(getAuthenticationRuleResult => getAuthenticationRuleResult.Id),
            ["fetchedRuleTimeout"] = ruleData.Apply(getAuthenticationRuleResult => getAuthenticationRuleResult.Timeout),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scm.AuthenticationRule;
    import com.pulumi.scm.AuthenticationRuleArgs;
    import com.pulumi.scm.ScmFunctions;
    import com.pulumi.scm.inputs.GetAuthenticationRuleArgs;
    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 ruleToFetch = new AuthenticationRule("ruleToFetch", AuthenticationRuleArgs.builder()
                .name("rule-to-be-queried-scm-105")
                .description("This rule is created purely to test the data source functionality.")
                .position("pre")
                .folder("All")
                .destinations("any")
                .froms("any")
                .tos("any")
                .sources("any")
                .services(            
                    "service-http",
                    "service-https")
                .sourceUsers("any")
                .timeout(1200)
                .negateSource(false)
                .negateDestination(false)
                .build());
    
            final var ruleData = ScmFunctions.getAuthenticationRule(GetAuthenticationRuleArgs.builder()
                .id(ruleToFetch.id())
                .build());
    
            ctx.export("fetchedRuleId", ruleData.applyValue(_ruleData -> _ruleData.id()));
            ctx.export("fetchedRuleTimeout", ruleData.applyValue(_ruleData -> _ruleData.timeout()));
        }
    }
    
    resources:
      ruleToFetch:
        type: scm:AuthenticationRule
        name: rule_to_fetch
        properties:
          name: rule-to-be-queried-scm-105
          description: This rule is created purely to test the data source functionality.
          position: pre
          folder: All
          destinations:
            - any
          froms:
            - any
          tos:
            - any
          sources:
            - any
          services:
            - service-http
            - service-https
          sourceUsers:
            - any
          timeout: 1200
          negateSource: false
          negateDestination: false
    variables:
      ruleData:
        fn::invoke:
          function: scm:getAuthenticationRule
          arguments:
            id: ${ruleToFetch.id}
    outputs:
      fetchedRuleId: ${ruleData.id}
      fetchedRuleTimeout: ${ruleData.timeout}
    

    Using getAuthenticationRule

    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 getAuthenticationRule(args: GetAuthenticationRuleArgs, opts?: InvokeOptions): Promise<GetAuthenticationRuleResult>
    function getAuthenticationRuleOutput(args: GetAuthenticationRuleOutputArgs, opts?: InvokeOptions): Output<GetAuthenticationRuleResult>
    def get_authentication_rule(id: Optional[str] = None,
                                name: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetAuthenticationRuleResult
    def get_authentication_rule_output(id: Optional[pulumi.Input[str]] = None,
                                name: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetAuthenticationRuleResult]
    func LookupAuthenticationRule(ctx *Context, args *LookupAuthenticationRuleArgs, opts ...InvokeOption) (*LookupAuthenticationRuleResult, error)
    func LookupAuthenticationRuleOutput(ctx *Context, args *LookupAuthenticationRuleOutputArgs, opts ...InvokeOption) LookupAuthenticationRuleResultOutput

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

    public static class GetAuthenticationRule 
    {
        public static Task<GetAuthenticationRuleResult> InvokeAsync(GetAuthenticationRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetAuthenticationRuleResult> Invoke(GetAuthenticationRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAuthenticationRuleResult> getAuthenticationRule(GetAuthenticationRuleArgs args, InvokeOptions options)
    public static Output<GetAuthenticationRuleResult> getAuthenticationRule(GetAuthenticationRuleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scm:index/getAuthenticationRule:getAuthenticationRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The UUID of the authentication rule
    Name string
    The name of the authentication rule
    Id string
    The UUID of the authentication rule
    Name string
    The name of the authentication rule
    id String
    The UUID of the authentication rule
    name String
    The name of the authentication rule
    id string
    The UUID of the authentication rule
    name string
    The name of the authentication rule
    id str
    The UUID of the authentication rule
    name str
    The name of the authentication rule
    id String
    The UUID of the authentication rule
    name String
    The name of the authentication rule

    getAuthenticationRule Result

    The following output properties are available:

    AuthenticationEnforcement string
    The authentication profile name
    Categories List<string>
    The destination URL categories
    Description string
    The description of the authentication rule
    DestinationHips List<string>
    The destination Host Integrity Profile (HIP)
    Destinations List<string>
    The destination addresses
    Device string
    Device
    Disabled bool
    Is the authentication rule disabled?
    Folder string
    Folder
    Froms List<string>
    The source security zones
    GroupTag string
    Group tag
    HipProfiles List<string>
    The source Host Integrity Profile (HIP)
    Id string
    The UUID of the authentication rule
    LogAuthenticationTimeout bool
    Log authentication timeouts?
    LogSetting string
    The log forwarding profile name
    Name string
    The name of the authentication rule
    NegateDestination bool
    Are the destination addresses negated?
    NegateSource bool
    Are the source addresses negated?
    Position string
    The relative position of the rule
    RelativePosition string
    Relative positioning rule. String must be one of these: "before", "after", "top", "bottom". If not specified, rule is created at the bottom of the ruleset.
    Services List<string>
    The destination ports
    Snippet string
    Snippet
    SourceHips List<string>
    The source Host Integrity Profile (HIP)
    SourceUsers List<string>
    The source users
    Sources List<string>
    The source addresses
    Tags List<string>
    The authentication rule tags
    TargetRule string
    The name or UUID of the rule to position this rule relative to. Required when relative_position is "before" or "after".
    Tfid string
    Timeout int
    The authentication session timeout (seconds)
    Tos List<string>
    The destination security zones
    AuthenticationEnforcement string
    The authentication profile name
    Categories []string
    The destination URL categories
    Description string
    The description of the authentication rule
    DestinationHips []string
    The destination Host Integrity Profile (HIP)
    Destinations []string
    The destination addresses
    Device string
    Device
    Disabled bool
    Is the authentication rule disabled?
    Folder string
    Folder
    Froms []string
    The source security zones
    GroupTag string
    Group tag
    HipProfiles []string
    The source Host Integrity Profile (HIP)
    Id string
    The UUID of the authentication rule
    LogAuthenticationTimeout bool
    Log authentication timeouts?
    LogSetting string
    The log forwarding profile name
    Name string
    The name of the authentication rule
    NegateDestination bool
    Are the destination addresses negated?
    NegateSource bool
    Are the source addresses negated?
    Position string
    The relative position of the rule
    RelativePosition string
    Relative positioning rule. String must be one of these: "before", "after", "top", "bottom". If not specified, rule is created at the bottom of the ruleset.
    Services []string
    The destination ports
    Snippet string
    Snippet
    SourceHips []string
    The source Host Integrity Profile (HIP)
    SourceUsers []string
    The source users
    Sources []string
    The source addresses
    Tags []string
    The authentication rule tags
    TargetRule string
    The name or UUID of the rule to position this rule relative to. Required when relative_position is "before" or "after".
    Tfid string
    Timeout int
    The authentication session timeout (seconds)
    Tos []string
    The destination security zones
    authenticationEnforcement String
    The authentication profile name
    categories List<String>
    The destination URL categories
    description String
    The description of the authentication rule
    destinationHips List<String>
    The destination Host Integrity Profile (HIP)
    destinations List<String>
    The destination addresses
    device String
    Device
    disabled Boolean
    Is the authentication rule disabled?
    folder String
    Folder
    froms List<String>
    The source security zones
    groupTag String
    Group tag
    hipProfiles List<String>
    The source Host Integrity Profile (HIP)
    id String
    The UUID of the authentication rule
    logAuthenticationTimeout Boolean
    Log authentication timeouts?
    logSetting String
    The log forwarding profile name
    name String
    The name of the authentication rule
    negateDestination Boolean
    Are the destination addresses negated?
    negateSource Boolean
    Are the source addresses negated?
    position String
    The relative position of the rule
    relativePosition String
    Relative positioning rule. String must be one of these: "before", "after", "top", "bottom". If not specified, rule is created at the bottom of the ruleset.
    services List<String>
    The destination ports
    snippet String
    Snippet
    sourceHips List<String>
    The source Host Integrity Profile (HIP)
    sourceUsers List<String>
    The source users
    sources List<String>
    The source addresses
    tags List<String>
    The authentication rule tags
    targetRule String
    The name or UUID of the rule to position this rule relative to. Required when relative_position is "before" or "after".
    tfid String
    timeout Integer
    The authentication session timeout (seconds)
    tos List<String>
    The destination security zones
    authenticationEnforcement string
    The authentication profile name
    categories string[]
    The destination URL categories
    description string
    The description of the authentication rule
    destinationHips string[]
    The destination Host Integrity Profile (HIP)
    destinations string[]
    The destination addresses
    device string
    Device
    disabled boolean
    Is the authentication rule disabled?
    folder string
    Folder
    froms string[]
    The source security zones
    groupTag string
    Group tag
    hipProfiles string[]
    The source Host Integrity Profile (HIP)
    id string
    The UUID of the authentication rule
    logAuthenticationTimeout boolean
    Log authentication timeouts?
    logSetting string
    The log forwarding profile name
    name string
    The name of the authentication rule
    negateDestination boolean
    Are the destination addresses negated?
    negateSource boolean
    Are the source addresses negated?
    position string
    The relative position of the rule
    relativePosition string
    Relative positioning rule. String must be one of these: "before", "after", "top", "bottom". If not specified, rule is created at the bottom of the ruleset.
    services string[]
    The destination ports
    snippet string
    Snippet
    sourceHips string[]
    The source Host Integrity Profile (HIP)
    sourceUsers string[]
    The source users
    sources string[]
    The source addresses
    tags string[]
    The authentication rule tags
    targetRule string
    The name or UUID of the rule to position this rule relative to. Required when relative_position is "before" or "after".
    tfid string
    timeout number
    The authentication session timeout (seconds)
    tos string[]
    The destination security zones
    authentication_enforcement str
    The authentication profile name
    categories Sequence[str]
    The destination URL categories
    description str
    The description of the authentication rule
    destination_hips Sequence[str]
    The destination Host Integrity Profile (HIP)
    destinations Sequence[str]
    The destination addresses
    device str
    Device
    disabled bool
    Is the authentication rule disabled?
    folder str
    Folder
    froms Sequence[str]
    The source security zones
    group_tag str
    Group tag
    hip_profiles Sequence[str]
    The source Host Integrity Profile (HIP)
    id str
    The UUID of the authentication rule
    log_authentication_timeout bool
    Log authentication timeouts?
    log_setting str
    The log forwarding profile name
    name str
    The name of the authentication rule
    negate_destination bool
    Are the destination addresses negated?
    negate_source bool
    Are the source addresses negated?
    position str
    The relative position of the rule
    relative_position str
    Relative positioning rule. String must be one of these: "before", "after", "top", "bottom". If not specified, rule is created at the bottom of the ruleset.
    services Sequence[str]
    The destination ports
    snippet str
    Snippet
    source_hips Sequence[str]
    The source Host Integrity Profile (HIP)
    source_users Sequence[str]
    The source users
    sources Sequence[str]
    The source addresses
    tags Sequence[str]
    The authentication rule tags
    target_rule str
    The name or UUID of the rule to position this rule relative to. Required when relative_position is "before" or "after".
    tfid str
    timeout int
    The authentication session timeout (seconds)
    tos Sequence[str]
    The destination security zones
    authenticationEnforcement String
    The authentication profile name
    categories List<String>
    The destination URL categories
    description String
    The description of the authentication rule
    destinationHips List<String>
    The destination Host Integrity Profile (HIP)
    destinations List<String>
    The destination addresses
    device String
    Device
    disabled Boolean
    Is the authentication rule disabled?
    folder String
    Folder
    froms List<String>
    The source security zones
    groupTag String
    Group tag
    hipProfiles List<String>
    The source Host Integrity Profile (HIP)
    id String
    The UUID of the authentication rule
    logAuthenticationTimeout Boolean
    Log authentication timeouts?
    logSetting String
    The log forwarding profile name
    name String
    The name of the authentication rule
    negateDestination Boolean
    Are the destination addresses negated?
    negateSource Boolean
    Are the source addresses negated?
    position String
    The relative position of the rule
    relativePosition String
    Relative positioning rule. String must be one of these: "before", "after", "top", "bottom". If not specified, rule is created at the bottom of the ruleset.
    services List<String>
    The destination ports
    snippet String
    Snippet
    sourceHips List<String>
    The source Host Integrity Profile (HIP)
    sourceUsers List<String>
    The source users
    sources List<String>
    The source addresses
    tags List<String>
    The authentication rule tags
    targetRule String
    The name or UUID of the rule to position this rule relative to. Required when relative_position is "before" or "after".
    tfid String
    timeout Number
    The authentication session timeout (seconds)
    tos List<String>
    The destination security 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