1. Packages
  2. Okta
  3. API Docs
  4. group
  5. getRule
Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi

okta.group.getRule

Explore with Pulumi AI

okta logo
Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi

    Use this data source to retrieve a group rule from Okta.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const test = okta.group.getRule({
        id: okta_group_rule.example.id,
    });
    
    import pulumi
    import pulumi_okta as okta
    
    test = okta.group.get_rule(id=okta_group_rule["example"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-okta/sdk/v4/go/okta/group"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := group.LookupRule(ctx, &group.LookupRuleArgs{
    			Id: pulumi.StringRef(okta_group_rule.Example.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Okta.Group.GetRule.Invoke(new()
        {
            Id = okta_group_rule.Example.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.group.GroupFunctions;
    import com.pulumi.okta.group.inputs.GetRuleArgs;
    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) {
            final var test = GroupFunctions.getRule(GetRuleArgs.builder()
                .id(okta_group_rule.example().id())
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: okta:group:getRule
          Arguments:
            id: ${okta_group_rule.example.id}
    

    Using getRule

    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 getRule(args: GetRuleArgs, opts?: InvokeOptions): Promise<GetRuleResult>
    function getRuleOutput(args: GetRuleOutputArgs, opts?: InvokeOptions): Output<GetRuleResult>
    def get_rule(id: Optional[str] = None,
                 name: Optional[str] = None,
                 status: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetRuleResult
    def get_rule_output(id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 status: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetRuleResult]
    func LookupRule(ctx *Context, args *LookupRuleArgs, opts ...InvokeOption) (*LookupRuleResult, error)
    func LookupRuleOutput(ctx *Context, args *LookupRuleOutputArgs, opts ...InvokeOption) LookupRuleResultOutput

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

    public static class GetRule 
    {
        public static Task<GetRuleResult> InvokeAsync(GetRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetRuleResult> Invoke(GetRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRuleResult> getRule(GetRuleArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: okta:group/getRule:getRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of the group rule to retrieve.
    Name string
    The name of the Group Rule to retrieve.
    Status string
    The status of the group rule.
    Id string
    The ID of the group rule to retrieve.
    Name string
    The name of the Group Rule to retrieve.
    Status string
    The status of the group rule.
    id String
    The ID of the group rule to retrieve.
    name String
    The name of the Group Rule to retrieve.
    status String
    The status of the group rule.
    id string
    The ID of the group rule to retrieve.
    name string
    The name of the Group Rule to retrieve.
    status string
    The status of the group rule.
    id str
    The ID of the group rule to retrieve.
    name str
    The name of the Group Rule to retrieve.
    status str
    The status of the group rule.
    id String
    The ID of the group rule to retrieve.
    name String
    The name of the Group Rule to retrieve.
    status String
    The status of the group rule.

    getRule Result

    The following output properties are available:

    ExpressionType string
    The expression type to use to invoke the rule.
    ExpressionValue string
    The expression value.
    GroupAssignments List<string>
    The list of group ids to assign the users to.
    UsersExcludeds List<string>
    The list of user IDs that would be excluded when rules are processed.
    Id string
    The ID of the Group Rule.
    Name string
    The name of the Group Rule.
    Status string
    The status of the group rule.
    ExpressionType string
    The expression type to use to invoke the rule.
    ExpressionValue string
    The expression value.
    GroupAssignments []string
    The list of group ids to assign the users to.
    UsersExcludeds []string
    The list of user IDs that would be excluded when rules are processed.
    Id string
    The ID of the Group Rule.
    Name string
    The name of the Group Rule.
    Status string
    The status of the group rule.
    expressionType String
    The expression type to use to invoke the rule.
    expressionValue String
    The expression value.
    groupAssignments List<String>
    The list of group ids to assign the users to.
    usersExcludeds List<String>
    The list of user IDs that would be excluded when rules are processed.
    id String
    The ID of the Group Rule.
    name String
    The name of the Group Rule.
    status String
    The status of the group rule.
    expressionType string
    The expression type to use to invoke the rule.
    expressionValue string
    The expression value.
    groupAssignments string[]
    The list of group ids to assign the users to.
    usersExcludeds string[]
    The list of user IDs that would be excluded when rules are processed.
    id string
    The ID of the Group Rule.
    name string
    The name of the Group Rule.
    status string
    The status of the group rule.
    expression_type str
    The expression type to use to invoke the rule.
    expression_value str
    The expression value.
    group_assignments Sequence[str]
    The list of group ids to assign the users to.
    users_excludeds Sequence[str]
    The list of user IDs that would be excluded when rules are processed.
    id str
    The ID of the Group Rule.
    name str
    The name of the Group Rule.
    status str
    The status of the group rule.
    expressionType String
    The expression type to use to invoke the rule.
    expressionValue String
    The expression value.
    groupAssignments List<String>
    The list of group ids to assign the users to.
    usersExcludeds List<String>
    The list of user IDs that would be excluded when rules are processed.
    id String
    The ID of the Group Rule.
    name String
    The name of the Group Rule.
    status String
    The status of the group rule.

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi