Viewing docs for Okta v6.6.0
published on Wednesday, Apr 29, 2026 by Pulumi
published on Wednesday, Apr 29, 2026 by Pulumi
Viewing docs for Okta v6.6.0
published on Wednesday, Apr 29, 2026 by Pulumi
published on Wednesday, Apr 29, 2026 by Pulumi
Get a Password Policy Rule from Okta.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const password = okta.policy.getDefaultPolicy({
type: "PASSWORD",
});
const exampleRulePassword = new okta.policy.RulePassword("example", {
policyId: password.then(password => password.id),
name: "My Password Rule",
});
const example = pulumi.all([password, exampleRulePassword.id]).apply(([password, id]) => okta.policy.getRulePasswordOutput({
policyId: password.id,
id: id,
}));
import pulumi
import pulumi_okta as okta
password = okta.policy.get_default_policy(type="PASSWORD")
example_rule_password = okta.policy.RulePassword("example",
policy_id=password.id,
name="My Password Rule")
example = example_rule_password.id.apply(lambda id: okta.policy.get_rule_password(policy_id=password.id,
id=id))
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v6/go/okta/policy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
password, err := policy.GetDefaultPolicy(ctx, &policy.GetDefaultPolicyArgs{
Type: "PASSWORD",
}, nil)
if err != nil {
return err
}
exampleRulePassword, err := policy.NewRulePassword(ctx, "example", &policy.RulePasswordArgs{
PolicyId: pulumi.String(pulumi.String(password.Id)),
Name: pulumi.String("My Password Rule"),
})
if err != nil {
return err
}
_ = exampleRulePassword.ID().ApplyT(func(id string) (policy.GetRulePasswordResult, error) {
return policy.GetRulePasswordResult(policy.LookupRulePassword(ctx, &policy.LookupRulePasswordArgs{
PolicyId: password.Id,
Id: id,
}, nil)), nil
}).(policy.GetRulePasswordResultOutput)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;
return await Deployment.RunAsync(() =>
{
var password = Okta.Policy.GetDefaultPolicy.Invoke(new()
{
Type = "PASSWORD",
});
var exampleRulePassword = new Okta.Policy.RulePassword("example", new()
{
PolicyId = password.Apply(getDefaultPolicyResult => getDefaultPolicyResult.Id),
Name = "My Password Rule",
});
var example = Okta.Policy.GetRulePassword.Invoke(new()
{
PolicyId = password.Apply(getDefaultPolicyResult => getDefaultPolicyResult.Id),
Id = exampleRulePassword.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.policy.PolicyFunctions;
import com.pulumi.okta.policy.inputs.GetDefaultPolicyArgs;
import com.pulumi.okta.policy.RulePassword;
import com.pulumi.okta.policy.RulePasswordArgs;
import com.pulumi.okta.policy.inputs.GetRulePasswordArgs;
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 password = PolicyFunctions.getDefaultPolicy(GetDefaultPolicyArgs.builder()
.type("PASSWORD")
.build());
var exampleRulePassword = new RulePassword("exampleRulePassword", RulePasswordArgs.builder()
.policyId(password.id())
.name("My Password Rule")
.build());
final var example = exampleRulePassword.id().applyValue(_id -> PolicyFunctions.getRulePassword(GetRulePasswordArgs.builder()
.policyId(password.id())
.id(_id)
.build()));
}
}
resources:
exampleRulePassword:
type: okta:policy:RulePassword
name: example
properties:
policyId: ${password.id}
name: My Password Rule
variables:
password:
fn::invoke:
function: okta:policy:getDefaultPolicy
arguments:
type: PASSWORD
example:
fn::invoke:
function: okta:policy:getRulePassword
arguments:
policyId: ${password.id}
id: ${exampleRulePassword.id}
Example coming soon!
Using getRulePassword
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 getRulePassword(args: GetRulePasswordArgs, opts?: InvokeOptions): Promise<GetRulePasswordResult>
function getRulePasswordOutput(args: GetRulePasswordOutputArgs, opts?: InvokeOptions): Output<GetRulePasswordResult>def get_rule_password(id: Optional[str] = None,
name: Optional[str] = None,
policy_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRulePasswordResult
def get_rule_password_output(id: pulumi.Input[Optional[str]] = None,
name: pulumi.Input[Optional[str]] = None,
policy_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRulePasswordResult]func LookupRulePassword(ctx *Context, args *LookupRulePasswordArgs, opts ...InvokeOption) (*LookupRulePasswordResult, error)
func LookupRulePasswordOutput(ctx *Context, args *LookupRulePasswordOutputArgs, opts ...InvokeOption) LookupRulePasswordResultOutput> Note: This function is named LookupRulePassword in the Go SDK.
public static class GetRulePassword
{
public static Task<GetRulePasswordResult> InvokeAsync(GetRulePasswordArgs args, InvokeOptions? opts = null)
public static Output<GetRulePasswordResult> Invoke(GetRulePasswordInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRulePasswordResult> getRulePassword(GetRulePasswordArgs args, InvokeOptions options)
public static Output<GetRulePasswordResult> getRulePassword(GetRulePasswordArgs args, InvokeOptions options)
fn::invoke:
function: okta:policy/getRulePassword:getRulePassword
arguments:
# arguments dictionarydata "okta_policy_getrulepassword" "name" {
# arguments
}The following arguments are supported:
getRulePassword Result
The following output properties are available:
- Groups
Excludeds List<string> - Groups
Includeds List<string> - Id string
- The ID of this resource.
- Name string
- Name of the rule.
- Network
Connection string - Network selection mode:
ANYWHERE,ZONE. - Network
Excludes List<string> - Network zones to exclude (when
networkConnection=ZONE). - Network
Includes List<string> - Network zones to include (when
networkConnection=ZONE). - Password
Change string - Whether a user is allowed to change their password:
ALLOWorDENY. - Password
Reset string - Whether a user is allowed to reset their password:
ALLOWorDENY. - Password
Reset stringAccess Control - Whether SSPR access is governed by an authentication policy or legacy behavior. Options:
LEGACY,AUTH_POLICY. - Password
Reset List<GetRequirements Rule Password Password Reset Requirement> - Self-service password reset (SSPR) requirement settings.
- Password
Unlock string - Whether a user is allowed to unlock their account:
ALLOWorDENY. - Policy
Id string - ID of the Policy owning this rule.
- Priority int
- Priority of the rule.
- Status string
- Status of the rule:
ACTIVEorINACTIVE. - Users
Excludeds List<string> - User IDs excluded from this rule.
- Users
Includeds List<string>
- Groups
Excludeds []string - Groups
Includeds []string - Id string
- The ID of this resource.
- Name string
- Name of the rule.
- Network
Connection string - Network selection mode:
ANYWHERE,ZONE. - Network
Excludes []string - Network zones to exclude (when
networkConnection=ZONE). - Network
Includes []string - Network zones to include (when
networkConnection=ZONE). - Password
Change string - Whether a user is allowed to change their password:
ALLOWorDENY. - Password
Reset string - Whether a user is allowed to reset their password:
ALLOWorDENY. - Password
Reset stringAccess Control - Whether SSPR access is governed by an authentication policy or legacy behavior. Options:
LEGACY,AUTH_POLICY. - Password
Reset []GetRequirements Rule Password Password Reset Requirement - Self-service password reset (SSPR) requirement settings.
- Password
Unlock string - Whether a user is allowed to unlock their account:
ALLOWorDENY. - Policy
Id string - ID of the Policy owning this rule.
- Priority int
- Priority of the rule.
- Status string
- Status of the rule:
ACTIVEorINACTIVE. - Users
Excludeds []string - User IDs excluded from this rule.
- Users
Includeds []string
- groups_
excludeds list(string) - groups_
includeds list(string) - id string
- The ID of this resource.
- name string
- Name of the rule.
- network_
connection string - Network selection mode:
ANYWHERE,ZONE. - network_
excludes list(string) - Network zones to exclude (when
networkConnection=ZONE). - network_
includes list(string) - Network zones to include (when
networkConnection=ZONE). - password_
change string - Whether a user is allowed to change their password:
ALLOWorDENY. - password_
reset string - Whether a user is allowed to reset their password:
ALLOWorDENY. - password_
reset_ stringaccess_ control - Whether SSPR access is governed by an authentication policy or legacy behavior. Options:
LEGACY,AUTH_POLICY. - password_
reset_ list(object)requirements - Self-service password reset (SSPR) requirement settings.
- password_
unlock string - Whether a user is allowed to unlock their account:
ALLOWorDENY. - policy_
id string - ID of the Policy owning this rule.
- priority number
- Priority of the rule.
- status string
- Status of the rule:
ACTIVEorINACTIVE. - users_
excludeds list(string) - User IDs excluded from this rule.
- users_
includeds list(string)
- groups
Excludeds List<String> - groups
Includeds List<String> - id String
- The ID of this resource.
- name String
- Name of the rule.
- network
Connection String - Network selection mode:
ANYWHERE,ZONE. - network
Excludes List<String> - Network zones to exclude (when
networkConnection=ZONE). - network
Includes List<String> - Network zones to include (when
networkConnection=ZONE). - password
Change String - Whether a user is allowed to change their password:
ALLOWorDENY. - password
Reset String - Whether a user is allowed to reset their password:
ALLOWorDENY. - password
Reset StringAccess Control - Whether SSPR access is governed by an authentication policy or legacy behavior. Options:
LEGACY,AUTH_POLICY. - password
Reset List<GetRequirements Rule Password Password Reset Requirement> - Self-service password reset (SSPR) requirement settings.
- password
Unlock String - Whether a user is allowed to unlock their account:
ALLOWorDENY. - policy
Id String - ID of the Policy owning this rule.
- priority Integer
- Priority of the rule.
- status String
- Status of the rule:
ACTIVEorINACTIVE. - users
Excludeds List<String> - User IDs excluded from this rule.
- users
Includeds List<String>
- groups
Excludeds string[] - groups
Includeds string[] - id string
- The ID of this resource.
- name string
- Name of the rule.
- network
Connection string - Network selection mode:
ANYWHERE,ZONE. - network
Excludes string[] - Network zones to exclude (when
networkConnection=ZONE). - network
Includes string[] - Network zones to include (when
networkConnection=ZONE). - password
Change string - Whether a user is allowed to change their password:
ALLOWorDENY. - password
Reset string - Whether a user is allowed to reset their password:
ALLOWorDENY. - password
Reset stringAccess Control - Whether SSPR access is governed by an authentication policy or legacy behavior. Options:
LEGACY,AUTH_POLICY. - password
Reset GetRequirements Rule Password Password Reset Requirement[] - Self-service password reset (SSPR) requirement settings.
- password
Unlock string - Whether a user is allowed to unlock their account:
ALLOWorDENY. - policy
Id string - ID of the Policy owning this rule.
- priority number
- Priority of the rule.
- status string
- Status of the rule:
ACTIVEorINACTIVE. - users
Excludeds string[] - User IDs excluded from this rule.
- users
Includeds string[]
- groups_
excludeds Sequence[str] - groups_
includeds Sequence[str] - id str
- The ID of this resource.
- name str
- Name of the rule.
- network_
connection str - Network selection mode:
ANYWHERE,ZONE. - network_
excludes Sequence[str] - Network zones to exclude (when
networkConnection=ZONE). - network_
includes Sequence[str] - Network zones to include (when
networkConnection=ZONE). - password_
change str - Whether a user is allowed to change their password:
ALLOWorDENY. - password_
reset str - Whether a user is allowed to reset their password:
ALLOWorDENY. - password_
reset_ straccess_ control - Whether SSPR access is governed by an authentication policy or legacy behavior. Options:
LEGACY,AUTH_POLICY. - password_
reset_ Sequence[Getrequirements Rule Password Password Reset Requirement] - Self-service password reset (SSPR) requirement settings.
- password_
unlock str - Whether a user is allowed to unlock their account:
ALLOWorDENY. - policy_
id str - ID of the Policy owning this rule.
- priority int
- Priority of the rule.
- status str
- Status of the rule:
ACTIVEorINACTIVE. - users_
excludeds Sequence[str] - User IDs excluded from this rule.
- users_
includeds Sequence[str]
- groups
Excludeds List<String> - groups
Includeds List<String> - id String
- The ID of this resource.
- name String
- Name of the rule.
- network
Connection String - Network selection mode:
ANYWHERE,ZONE. - network
Excludes List<String> - Network zones to exclude (when
networkConnection=ZONE). - network
Includes List<String> - Network zones to include (when
networkConnection=ZONE). - password
Change String - Whether a user is allowed to change their password:
ALLOWorDENY. - password
Reset String - Whether a user is allowed to reset their password:
ALLOWorDENY. - password
Reset StringAccess Control - Whether SSPR access is governed by an authentication policy or legacy behavior. Options:
LEGACY,AUTH_POLICY. - password
Reset List<Property Map>Requirements - Self-service password reset (SSPR) requirement settings.
- password
Unlock String - Whether a user is allowed to unlock their account:
ALLOWorDENY. - policy
Id String - ID of the Policy owning this rule.
- priority Number
- Priority of the rule.
- status String
- Status of the rule:
ACTIVEorINACTIVE. - users
Excludeds List<String> - User IDs excluded from this rule.
- users
Includeds List<String>
Supporting Types
GetRulePasswordPasswordResetRequirement
- Method
Constraints List<GetRule Password Password Reset Requirement Method Constraint> - Constraints on the values specified in
primaryMethods. - Primary
Methods List<string> - Authenticator methods allowed for the initial authentication step of password recovery.
- Step
Up boolEnabled - Whether a secondary authenticator is required for password reset.
- Step
Up List<string>Methods - Authenticator methods required for the secondary authentication step of password recovery. Items value:
securityQuestion.
- Method
Constraints []GetRule Password Password Reset Requirement Method Constraint - Constraints on the values specified in
primaryMethods. - Primary
Methods []string - Authenticator methods allowed for the initial authentication step of password recovery.
- Step
Up boolEnabled - Whether a secondary authenticator is required for password reset.
- Step
Up []stringMethods - Authenticator methods required for the secondary authentication step of password recovery. Items value:
securityQuestion.
- method_
constraints list(object) - Constraints on the values specified in
primaryMethods. - primary_
methods list(string) - Authenticator methods allowed for the initial authentication step of password recovery.
- step_
up_ boolenabled - Whether a secondary authenticator is required for password reset.
- step_
up_ list(string)methods - Authenticator methods required for the secondary authentication step of password recovery. Items value:
securityQuestion.
- method
Constraints List<GetRule Password Password Reset Requirement Method Constraint> - Constraints on the values specified in
primaryMethods. - primary
Methods List<String> - Authenticator methods allowed for the initial authentication step of password recovery.
- step
Up BooleanEnabled - Whether a secondary authenticator is required for password reset.
- step
Up List<String>Methods - Authenticator methods required for the secondary authentication step of password recovery. Items value:
securityQuestion.
- method
Constraints GetRule Password Password Reset Requirement Method Constraint[] - Constraints on the values specified in
primaryMethods. - primary
Methods string[] - Authenticator methods allowed for the initial authentication step of password recovery.
- step
Up booleanEnabled - Whether a secondary authenticator is required for password reset.
- step
Up string[]Methods - Authenticator methods required for the secondary authentication step of password recovery. Items value:
securityQuestion.
- method_
constraints Sequence[GetRule Password Password Reset Requirement Method Constraint] - Constraints on the values specified in
primaryMethods. - primary_
methods Sequence[str] - Authenticator methods allowed for the initial authentication step of password recovery.
- step_
up_ boolenabled - Whether a secondary authenticator is required for password reset.
- step_
up_ Sequence[str]methods - Authenticator methods required for the secondary authentication step of password recovery. Items value:
securityQuestion.
- method
Constraints List<Property Map> - Constraints on the values specified in
primaryMethods. - primary
Methods List<String> - Authenticator methods allowed for the initial authentication step of password recovery.
- step
Up BooleanEnabled - Whether a secondary authenticator is required for password reset.
- step
Up List<String>Methods - Authenticator methods required for the secondary authentication step of password recovery. Items value:
securityQuestion.
GetRulePasswordPasswordResetRequirementMethodConstraint
- Allowed
Authenticators List<string> - Keys of the authenticators allowed for this method (e.g.
googleOtp). - Method string
- The method to constrain (e.g.
otp).
- Allowed
Authenticators []string - Keys of the authenticators allowed for this method (e.g.
googleOtp). - Method string
- The method to constrain (e.g.
otp).
- allowed_
authenticators list(string) - Keys of the authenticators allowed for this method (e.g.
googleOtp). - method string
- The method to constrain (e.g.
otp).
- allowed
Authenticators List<String> - Keys of the authenticators allowed for this method (e.g.
googleOtp). - method String
- The method to constrain (e.g.
otp).
- allowed
Authenticators string[] - Keys of the authenticators allowed for this method (e.g.
googleOtp). - method string
- The method to constrain (e.g.
otp).
- allowed_
authenticators Sequence[str] - Keys of the authenticators allowed for this method (e.g.
googleOtp). - method str
- The method to constrain (e.g.
otp).
- allowed
Authenticators List<String> - Keys of the authenticators allowed for this method (e.g.
googleOtp). - method String
- The method to constrain (e.g.
otp).
Package Details
- Repository
- Okta pulumi/pulumi-okta
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oktaTerraform Provider.
Viewing docs for Okta v6.6.0
published on Wednesday, Apr 29, 2026 by Pulumi
published on Wednesday, Apr 29, 2026 by Pulumi
