Okta

Pulumi Official
Package maintained by Pulumi
v3.9.0 published on Monday, May 16, 2022 by Pulumi

getDefaultPolicy

Use this data source to retrieve a default policy from Okta. This same thing can be achieved using the okta.policy.getPolicy with default names, this is simply a shortcut.

Example Usage

using Pulumi;
using Okta = Pulumi.Okta;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Okta.Policy.GetDefaultPolicy.InvokeAsync(new Okta.Policy.GetDefaultPolicyArgs
        {
            Type = "PASSWORD",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-okta/sdk/v3/go/okta/policy"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := policy.GetDefaultPolicy(ctx, &policy.GetDefaultPolicyArgs{
			Type: "PASSWORD",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(PolicyFunctions.getDefaultPolicy(GetDefaultPolicyArgs.builder()
            .type("PASSWORD")
            .build()));

        }
}
import pulumi
import pulumi_okta as okta

example = okta.policy.get_default_policy(type="PASSWORD")
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

const example = pulumi.output(okta.policy.getDefaultPolicy({
    type: "PASSWORD",
}));
variables:
  example:
    Fn::Invoke:
      Function: okta:policy:getDefaultPolicy
      Arguments:
        type: PASSWORD

Using getDefaultPolicy

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 getDefaultPolicy(args: GetDefaultPolicyArgs, opts?: InvokeOptions): Promise<GetDefaultPolicyResult>
function getDefaultPolicyOutput(args: GetDefaultPolicyOutputArgs, opts?: InvokeOptions): Output<GetDefaultPolicyResult>
def get_default_policy(type: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetDefaultPolicyResult
def get_default_policy_output(type: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetDefaultPolicyResult]
func GetDefaultPolicy(ctx *Context, args *GetDefaultPolicyArgs, opts ...InvokeOption) (*GetDefaultPolicyResult, error)
func GetDefaultPolicyOutput(ctx *Context, args *GetDefaultPolicyOutputArgs, opts ...InvokeOption) GetDefaultPolicyResultOutput

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

public static class GetDefaultPolicy 
{
    public static Task<GetDefaultPolicyResult> InvokeAsync(GetDefaultPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetDefaultPolicyResult> Invoke(GetDefaultPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDefaultPolicyResult> getDefaultPolicy(GetDefaultPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: okta:policy/getDefaultPolicy:getDefaultPolicy
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Type string

Type of policy to retrieve. Valid values: OKTA_SIGN_ON, PASSWORD, MFA_ENROLL, IDP_DISCOVERY "IDP_DISCOVERY", "ACCESS_POLICY" (only available as a part of the Identity Engine), "PROFILE_ENROLLMENT" (only available as a part of the Identity Engine)

Type string

Type of policy to retrieve. Valid values: OKTA_SIGN_ON, PASSWORD, MFA_ENROLL, IDP_DISCOVERY "IDP_DISCOVERY", "ACCESS_POLICY" (only available as a part of the Identity Engine), "PROFILE_ENROLLMENT" (only available as a part of the Identity Engine)

type String

Type of policy to retrieve. Valid values: OKTA_SIGN_ON, PASSWORD, MFA_ENROLL, IDP_DISCOVERY "IDP_DISCOVERY", "ACCESS_POLICY" (only available as a part of the Identity Engine), "PROFILE_ENROLLMENT" (only available as a part of the Identity Engine)

type string

Type of policy to retrieve. Valid values: OKTA_SIGN_ON, PASSWORD, MFA_ENROLL, IDP_DISCOVERY "IDP_DISCOVERY", "ACCESS_POLICY" (only available as a part of the Identity Engine), "PROFILE_ENROLLMENT" (only available as a part of the Identity Engine)

type str

Type of policy to retrieve. Valid values: OKTA_SIGN_ON, PASSWORD, MFA_ENROLL, IDP_DISCOVERY "IDP_DISCOVERY", "ACCESS_POLICY" (only available as a part of the Identity Engine), "PROFILE_ENROLLMENT" (only available as a part of the Identity Engine)

type String

Type of policy to retrieve. Valid values: OKTA_SIGN_ON, PASSWORD, MFA_ENROLL, IDP_DISCOVERY "IDP_DISCOVERY", "ACCESS_POLICY" (only available as a part of the Identity Engine), "PROFILE_ENROLLMENT" (only available as a part of the Identity Engine)

getDefaultPolicy Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Type string

type of policy.

Id string

The provider-assigned unique ID for this managed resource.

Type string

type of policy.

id String

The provider-assigned unique ID for this managed resource.

type String

type of policy.

id string

The provider-assigned unique ID for this managed resource.

type string

type of policy.

id str

The provider-assigned unique ID for this managed resource.

type str

type of policy.

id String

The provider-assigned unique ID for this managed resource.

type String

type of policy.

Package Details

Repository
https://github.com/pulumi/pulumi-okta
License
Apache-2.0
Notes

This Pulumi package is based on the okta Terraform Provider.