1. Packages
  2. Okta Provider
  3. API Docs
  4. group
  5. Rule
Okta v4.11.3 published on Monday, Oct 21, 2024 by Pulumi

okta.group.Rule

Explore with Pulumi AI

okta logo
Okta v4.11.3 published on Monday, Oct 21, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const example = new okta.group.Rule("example", {
        name: "example",
        status: "ACTIVE",
        groupAssignments: ["<group id>"],
        expressionType: "urn:okta:expression:1.0",
        expressionValue: "String.startsWith(user.firstName,\"andy\")",
    });
    
    import pulumi
    import pulumi_okta as okta
    
    example = okta.group.Rule("example",
        name="example",
        status="ACTIVE",
        group_assignments=["<group id>"],
        expression_type="urn:okta:expression:1.0",
        expression_value="String.startsWith(user.firstName,\"andy\")")
    
    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.NewRule(ctx, "example", &group.RuleArgs{
    			Name:   pulumi.String("example"),
    			Status: pulumi.String("ACTIVE"),
    			GroupAssignments: pulumi.StringArray{
    				pulumi.String("<group id>"),
    			},
    			ExpressionType:  pulumi.String("urn:okta:expression:1.0"),
    			ExpressionValue: pulumi.String("String.startsWith(user.firstName,\"andy\")"),
    		})
    		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 example = new Okta.Group.Rule("example", new()
        {
            Name = "example",
            Status = "ACTIVE",
            GroupAssignments = new[]
            {
                "<group id>",
            },
            ExpressionType = "urn:okta:expression:1.0",
            ExpressionValue = "String.startsWith(user.firstName,\"andy\")",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.group.Rule;
    import com.pulumi.okta.group.RuleArgs;
    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 example = new Rule("example", RuleArgs.builder()
                .name("example")
                .status("ACTIVE")
                .groupAssignments("<group id>")
                .expressionType("urn:okta:expression:1.0")
                .expressionValue("String.startsWith(user.firstName,\"andy\")")
                .build());
    
        }
    }
    
    resources:
      example:
        type: okta:group:Rule
        properties:
          name: example
          status: ACTIVE
          groupAssignments:
            - <group id>
          expressionType: urn:okta:expression:1.0
          expressionValue: String.startsWith(user.firstName,"andy")
    

    Create Rule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);
    @overload
    def Rule(resource_name: str,
             args: RuleArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Rule(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             expression_value: Optional[str] = None,
             group_assignments: Optional[Sequence[str]] = None,
             expression_type: Optional[str] = None,
             name: Optional[str] = None,
             remove_assigned_users: Optional[bool] = None,
             status: Optional[str] = None,
             users_excludeds: Optional[Sequence[str]] = None)
    func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
    public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
    public Rule(String name, RuleArgs args)
    public Rule(String name, RuleArgs args, CustomResourceOptions options)
    
    type: okta:group:Rule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var ruleResource = new Okta.Group.Rule("ruleResource", new()
    {
        ExpressionValue = "string",
        GroupAssignments = new[]
        {
            "string",
        },
        ExpressionType = "string",
        Name = "string",
        RemoveAssignedUsers = false,
        Status = "string",
        UsersExcludeds = new[]
        {
            "string",
        },
    });
    
    example, err := group.NewRule(ctx, "ruleResource", &group.RuleArgs{
    	ExpressionValue: pulumi.String("string"),
    	GroupAssignments: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ExpressionType:      pulumi.String("string"),
    	Name:                pulumi.String("string"),
    	RemoveAssignedUsers: pulumi.Bool(false),
    	Status:              pulumi.String("string"),
    	UsersExcludeds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var ruleResource = new Rule("ruleResource", RuleArgs.builder()
        .expressionValue("string")
        .groupAssignments("string")
        .expressionType("string")
        .name("string")
        .removeAssignedUsers(false)
        .status("string")
        .usersExcludeds("string")
        .build());
    
    rule_resource = okta.group.Rule("ruleResource",
        expression_value="string",
        group_assignments=["string"],
        expression_type="string",
        name="string",
        remove_assigned_users=False,
        status="string",
        users_excludeds=["string"])
    
    const ruleResource = new okta.group.Rule("ruleResource", {
        expressionValue: "string",
        groupAssignments: ["string"],
        expressionType: "string",
        name: "string",
        removeAssignedUsers: false,
        status: "string",
        usersExcludeds: ["string"],
    });
    
    type: okta:group:Rule
    properties:
        expressionType: string
        expressionValue: string
        groupAssignments:
            - string
        name: string
        removeAssignedUsers: false
        status: string
        usersExcludeds:
            - string
    

    Rule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Rule resource accepts the following input properties:

    ExpressionValue string
    The expression value.
    GroupAssignments List<string>
    The list of group ids to assign the users to.
    ExpressionType string
    The expression type to use to invoke the rule. The default is urn:okta:expression:1.0.
    Name string
    The name of the Group Rule (min character 1; max characters 50).
    RemoveAssignedUsers bool
    Remove users added by this rule from the assigned group after deleting this resource. Default is false
    Status string
    Default to ACTIVE
    UsersExcludeds List<string>
    The list of user IDs that would be excluded when rules are processed
    ExpressionValue string
    The expression value.
    GroupAssignments []string
    The list of group ids to assign the users to.
    ExpressionType string
    The expression type to use to invoke the rule. The default is urn:okta:expression:1.0.
    Name string
    The name of the Group Rule (min character 1; max characters 50).
    RemoveAssignedUsers bool
    Remove users added by this rule from the assigned group after deleting this resource. Default is false
    Status string
    Default to ACTIVE
    UsersExcludeds []string
    The list of user IDs that would be excluded when rules are processed
    expressionValue String
    The expression value.
    groupAssignments List<String>
    The list of group ids to assign the users to.
    expressionType String
    The expression type to use to invoke the rule. The default is urn:okta:expression:1.0.
    name String
    The name of the Group Rule (min character 1; max characters 50).
    removeAssignedUsers Boolean
    Remove users added by this rule from the assigned group after deleting this resource. Default is false
    status String
    Default to ACTIVE
    usersExcludeds List<String>
    The list of user IDs that would be excluded when rules are processed
    expressionValue string
    The expression value.
    groupAssignments string[]
    The list of group ids to assign the users to.
    expressionType string
    The expression type to use to invoke the rule. The default is urn:okta:expression:1.0.
    name string
    The name of the Group Rule (min character 1; max characters 50).
    removeAssignedUsers boolean
    Remove users added by this rule from the assigned group after deleting this resource. Default is false
    status string
    Default to ACTIVE
    usersExcludeds string[]
    The list of user IDs that would be excluded when rules are processed
    expression_value str
    The expression value.
    group_assignments Sequence[str]
    The list of group ids to assign the users to.
    expression_type str
    The expression type to use to invoke the rule. The default is urn:okta:expression:1.0.
    name str
    The name of the Group Rule (min character 1; max characters 50).
    remove_assigned_users bool
    Remove users added by this rule from the assigned group after deleting this resource. Default is false
    status str
    Default to ACTIVE
    users_excludeds Sequence[str]
    The list of user IDs that would be excluded when rules are processed
    expressionValue String
    The expression value.
    groupAssignments List<String>
    The list of group ids to assign the users to.
    expressionType String
    The expression type to use to invoke the rule. The default is urn:okta:expression:1.0.
    name String
    The name of the Group Rule (min character 1; max characters 50).
    removeAssignedUsers Boolean
    Remove users added by this rule from the assigned group after deleting this resource. Default is false
    status String
    Default to ACTIVE
    usersExcludeds List<String>
    The list of user IDs that would be excluded when rules are processed

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Rule Resource

    Get an existing Rule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RuleState, opts?: CustomResourceOptions): Rule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            expression_type: Optional[str] = None,
            expression_value: Optional[str] = None,
            group_assignments: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            remove_assigned_users: Optional[bool] = None,
            status: Optional[str] = None,
            users_excludeds: Optional[Sequence[str]] = None) -> Rule
    func GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)
    public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)
    public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ExpressionType string
    The expression type to use to invoke the rule. The default is urn:okta:expression:1.0.
    ExpressionValue string
    The expression value.
    GroupAssignments List<string>
    The list of group ids to assign the users to.
    Name string
    The name of the Group Rule (min character 1; max characters 50).
    RemoveAssignedUsers bool
    Remove users added by this rule from the assigned group after deleting this resource. Default is false
    Status string
    Default to ACTIVE
    UsersExcludeds List<string>
    The list of user IDs that would be excluded when rules are processed
    ExpressionType string
    The expression type to use to invoke the rule. The default is urn:okta:expression:1.0.
    ExpressionValue string
    The expression value.
    GroupAssignments []string
    The list of group ids to assign the users to.
    Name string
    The name of the Group Rule (min character 1; max characters 50).
    RemoveAssignedUsers bool
    Remove users added by this rule from the assigned group after deleting this resource. Default is false
    Status string
    Default to ACTIVE
    UsersExcludeds []string
    The list of user IDs that would be excluded when rules are processed
    expressionType String
    The expression type to use to invoke the rule. The default is urn:okta:expression:1.0.
    expressionValue String
    The expression value.
    groupAssignments List<String>
    The list of group ids to assign the users to.
    name String
    The name of the Group Rule (min character 1; max characters 50).
    removeAssignedUsers Boolean
    Remove users added by this rule from the assigned group after deleting this resource. Default is false
    status String
    Default to ACTIVE
    usersExcludeds List<String>
    The list of user IDs that would be excluded when rules are processed
    expressionType string
    The expression type to use to invoke the rule. The default is urn:okta:expression:1.0.
    expressionValue string
    The expression value.
    groupAssignments string[]
    The list of group ids to assign the users to.
    name string
    The name of the Group Rule (min character 1; max characters 50).
    removeAssignedUsers boolean
    Remove users added by this rule from the assigned group after deleting this resource. Default is false
    status string
    Default to ACTIVE
    usersExcludeds string[]
    The list of user IDs that would be excluded when rules are processed
    expression_type str
    The expression type to use to invoke the rule. The default is urn:okta:expression:1.0.
    expression_value str
    The expression value.
    group_assignments Sequence[str]
    The list of group ids to assign the users to.
    name str
    The name of the Group Rule (min character 1; max characters 50).
    remove_assigned_users bool
    Remove users added by this rule from the assigned group after deleting this resource. Default is false
    status str
    Default to ACTIVE
    users_excludeds Sequence[str]
    The list of user IDs that would be excluded when rules are processed
    expressionType String
    The expression type to use to invoke the rule. The default is urn:okta:expression:1.0.
    expressionValue String
    The expression value.
    groupAssignments List<String>
    The list of group ids to assign the users to.
    name String
    The name of the Group Rule (min character 1; max characters 50).
    removeAssignedUsers Boolean
    Remove users added by this rule from the assigned group after deleting this resource. Default is false
    status String
    Default to ACTIVE
    usersExcludeds List<String>
    The list of user IDs that would be excluded when rules are processed

    Import

    $ pulumi import okta:group/rule:Rule example <group_rule_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.11.3 published on Monday, Oct 21, 2024 by Pulumi