1. Packages
  2. Okta
  3. API Docs
  4. FactorTotp
Okta v4.7.0 published on Tuesday, Feb 13, 2024 by Pulumi

okta.FactorTotp

Explore with Pulumi AI

okta logo
Okta v4.7.0 published on Tuesday, Feb 13, 2024 by Pulumi

    Allows you to manage the time-based one-time password (TOTP) factors. A time-based one-time password (TOTP) is a temporary passcode that is generated for user authentication. Examples of TOTP include hardware authenticators and mobile app authenticators.

    Once saved, the settings cannot be changed (except for the name field). Any other change would force resource recreation.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Okta.FactorTotp("example", new()
        {
            ClockDriftInterval = 10,
            HmacAlgorithm = "HMacSHA256",
            OtpLength = 10,
            SharedSecretEncoding = "hexadecimal",
            TimeStep = 30,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-okta/sdk/v4/go/okta"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := okta.NewFactorTotp(ctx, "example", &okta.FactorTotpArgs{
    			ClockDriftInterval:   pulumi.Int(10),
    			HmacAlgorithm:        pulumi.String("HMacSHA256"),
    			OtpLength:            pulumi.Int(10),
    			SharedSecretEncoding: pulumi.String("hexadecimal"),
    			TimeStep:             pulumi.Int(30),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.FactorTotp;
    import com.pulumi.okta.FactorTotpArgs;
    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 FactorTotp("example", FactorTotpArgs.builder()        
                .clockDriftInterval(10)
                .hmacAlgorithm("HMacSHA256")
                .otpLength(10)
                .sharedSecretEncoding("hexadecimal")
                .timeStep(30)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_okta as okta
    
    example = okta.FactorTotp("example",
        clock_drift_interval=10,
        hmac_algorithm="HMacSHA256",
        otp_length=10,
        shared_secret_encoding="hexadecimal",
        time_step=30)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const example = new okta.FactorTotp("example", {
        clockDriftInterval: 10,
        hmacAlgorithm: "HMacSHA256",
        otpLength: 10,
        sharedSecretEncoding: "hexadecimal",
        timeStep: 30,
    });
    
    resources:
      example:
        type: okta:FactorTotp
        properties:
          clockDriftInterval: 10
          hmacAlgorithm: HMacSHA256
          otpLength: 10
          sharedSecretEncoding: hexadecimal
          timeStep: 30
    

    Create FactorTotp Resource

    new FactorTotp(name: string, args?: FactorTotpArgs, opts?: CustomResourceOptions);
    @overload
    def FactorTotp(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   clock_drift_interval: Optional[int] = None,
                   hmac_algorithm: Optional[str] = None,
                   name: Optional[str] = None,
                   otp_length: Optional[int] = None,
                   shared_secret_encoding: Optional[str] = None,
                   time_step: Optional[int] = None)
    @overload
    def FactorTotp(resource_name: str,
                   args: Optional[FactorTotpArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    func NewFactorTotp(ctx *Context, name string, args *FactorTotpArgs, opts ...ResourceOption) (*FactorTotp, error)
    public FactorTotp(string name, FactorTotpArgs? args = null, CustomResourceOptions? opts = null)
    public FactorTotp(String name, FactorTotpArgs args)
    public FactorTotp(String name, FactorTotpArgs args, CustomResourceOptions options)
    
    type: okta:FactorTotp
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args FactorTotpArgs
    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 FactorTotpArgs
    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 FactorTotpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FactorTotpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FactorTotpArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    FactorTotp Resource Properties

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

    Inputs

    The FactorTotp resource accepts the following input properties:

    ClockDriftInterval int
    Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values: 3, 5, 10. Default is 3.
    HmacAlgorithm string
    HMAC Algorithm. Valid values: "HMacSHA1", "HMacSHA256", "HMacSHA512". Default is "HMacSHA512".
    Name string
    The TOTP name.
    OtpLength int
    Length of the password. Default is 6.
    SharedSecretEncoding string
    Shared secret encoding. Valid values: "base32", "base64", "hexadecimal". Default is "base32".
    TimeStep int
    Time step in seconds. Valid values: 15, 30, 60. Default is 15.
    ClockDriftInterval int
    Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values: 3, 5, 10. Default is 3.
    HmacAlgorithm string
    HMAC Algorithm. Valid values: "HMacSHA1", "HMacSHA256", "HMacSHA512". Default is "HMacSHA512".
    Name string
    The TOTP name.
    OtpLength int
    Length of the password. Default is 6.
    SharedSecretEncoding string
    Shared secret encoding. Valid values: "base32", "base64", "hexadecimal". Default is "base32".
    TimeStep int
    Time step in seconds. Valid values: 15, 30, 60. Default is 15.
    clockDriftInterval Integer
    Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values: 3, 5, 10. Default is 3.
    hmacAlgorithm String
    HMAC Algorithm. Valid values: "HMacSHA1", "HMacSHA256", "HMacSHA512". Default is "HMacSHA512".
    name String
    The TOTP name.
    otpLength Integer
    Length of the password. Default is 6.
    sharedSecretEncoding String
    Shared secret encoding. Valid values: "base32", "base64", "hexadecimal". Default is "base32".
    timeStep Integer
    Time step in seconds. Valid values: 15, 30, 60. Default is 15.
    clockDriftInterval number
    Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values: 3, 5, 10. Default is 3.
    hmacAlgorithm string
    HMAC Algorithm. Valid values: "HMacSHA1", "HMacSHA256", "HMacSHA512". Default is "HMacSHA512".
    name string
    The TOTP name.
    otpLength number
    Length of the password. Default is 6.
    sharedSecretEncoding string
    Shared secret encoding. Valid values: "base32", "base64", "hexadecimal". Default is "base32".
    timeStep number
    Time step in seconds. Valid values: 15, 30, 60. Default is 15.
    clock_drift_interval int
    Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values: 3, 5, 10. Default is 3.
    hmac_algorithm str
    HMAC Algorithm. Valid values: "HMacSHA1", "HMacSHA256", "HMacSHA512". Default is "HMacSHA512".
    name str
    The TOTP name.
    otp_length int
    Length of the password. Default is 6.
    shared_secret_encoding str
    Shared secret encoding. Valid values: "base32", "base64", "hexadecimal". Default is "base32".
    time_step int
    Time step in seconds. Valid values: 15, 30, 60. Default is 15.
    clockDriftInterval Number
    Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values: 3, 5, 10. Default is 3.
    hmacAlgorithm String
    HMAC Algorithm. Valid values: "HMacSHA1", "HMacSHA256", "HMacSHA512". Default is "HMacSHA512".
    name String
    The TOTP name.
    otpLength Number
    Length of the password. Default is 6.
    sharedSecretEncoding String
    Shared secret encoding. Valid values: "base32", "base64", "hexadecimal". Default is "base32".
    timeStep Number
    Time step in seconds. Valid values: 15, 30, 60. Default is 15.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FactorTotp 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 FactorTotp Resource

    Get an existing FactorTotp 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?: FactorTotpState, opts?: CustomResourceOptions): FactorTotp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            clock_drift_interval: Optional[int] = None,
            hmac_algorithm: Optional[str] = None,
            name: Optional[str] = None,
            otp_length: Optional[int] = None,
            shared_secret_encoding: Optional[str] = None,
            time_step: Optional[int] = None) -> FactorTotp
    func GetFactorTotp(ctx *Context, name string, id IDInput, state *FactorTotpState, opts ...ResourceOption) (*FactorTotp, error)
    public static FactorTotp Get(string name, Input<string> id, FactorTotpState? state, CustomResourceOptions? opts = null)
    public static FactorTotp get(String name, Output<String> id, FactorTotpState 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:
    ClockDriftInterval int
    Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values: 3, 5, 10. Default is 3.
    HmacAlgorithm string
    HMAC Algorithm. Valid values: "HMacSHA1", "HMacSHA256", "HMacSHA512". Default is "HMacSHA512".
    Name string
    The TOTP name.
    OtpLength int
    Length of the password. Default is 6.
    SharedSecretEncoding string
    Shared secret encoding. Valid values: "base32", "base64", "hexadecimal". Default is "base32".
    TimeStep int
    Time step in seconds. Valid values: 15, 30, 60. Default is 15.
    ClockDriftInterval int
    Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values: 3, 5, 10. Default is 3.
    HmacAlgorithm string
    HMAC Algorithm. Valid values: "HMacSHA1", "HMacSHA256", "HMacSHA512". Default is "HMacSHA512".
    Name string
    The TOTP name.
    OtpLength int
    Length of the password. Default is 6.
    SharedSecretEncoding string
    Shared secret encoding. Valid values: "base32", "base64", "hexadecimal". Default is "base32".
    TimeStep int
    Time step in seconds. Valid values: 15, 30, 60. Default is 15.
    clockDriftInterval Integer
    Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values: 3, 5, 10. Default is 3.
    hmacAlgorithm String
    HMAC Algorithm. Valid values: "HMacSHA1", "HMacSHA256", "HMacSHA512". Default is "HMacSHA512".
    name String
    The TOTP name.
    otpLength Integer
    Length of the password. Default is 6.
    sharedSecretEncoding String
    Shared secret encoding. Valid values: "base32", "base64", "hexadecimal". Default is "base32".
    timeStep Integer
    Time step in seconds. Valid values: 15, 30, 60. Default is 15.
    clockDriftInterval number
    Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values: 3, 5, 10. Default is 3.
    hmacAlgorithm string
    HMAC Algorithm. Valid values: "HMacSHA1", "HMacSHA256", "HMacSHA512". Default is "HMacSHA512".
    name string
    The TOTP name.
    otpLength number
    Length of the password. Default is 6.
    sharedSecretEncoding string
    Shared secret encoding. Valid values: "base32", "base64", "hexadecimal". Default is "base32".
    timeStep number
    Time step in seconds. Valid values: 15, 30, 60. Default is 15.
    clock_drift_interval int
    Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values: 3, 5, 10. Default is 3.
    hmac_algorithm str
    HMAC Algorithm. Valid values: "HMacSHA1", "HMacSHA256", "HMacSHA512". Default is "HMacSHA512".
    name str
    The TOTP name.
    otp_length int
    Length of the password. Default is 6.
    shared_secret_encoding str
    Shared secret encoding. Valid values: "base32", "base64", "hexadecimal". Default is "base32".
    time_step int
    Time step in seconds. Valid values: 15, 30, 60. Default is 15.
    clockDriftInterval Number
    Clock drift interval. This setting allows you to build in tolerance for any drift between the token's current time and the server's current time. Valid values: 3, 5, 10. Default is 3.
    hmacAlgorithm String
    HMAC Algorithm. Valid values: "HMacSHA1", "HMacSHA256", "HMacSHA512". Default is "HMacSHA512".
    name String
    The TOTP name.
    otpLength Number
    Length of the password. Default is 6.
    sharedSecretEncoding String
    Shared secret encoding. Valid values: "base32", "base64", "hexadecimal". Default is "base32".
    timeStep Number
    Time step in seconds. Valid values: 15, 30, 60. Default is 15.

    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.7.0 published on Tuesday, Feb 13, 2024 by Pulumi