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

okta.FactorTotp

Explore with Pulumi AI

okta logo
Okta v4.11.3 published on Monday, Oct 21, 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

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const example = new okta.FactorTotp("example", {
        name: "example",
        otpLength: 10,
        hmacAlgorithm: "HMacSHA256",
        timeStep: 30,
        clockDriftInterval: 10,
        sharedSecretEncoding: "hexadecimal",
    });
    
    import pulumi
    import pulumi_okta as okta
    
    example = okta.FactorTotp("example",
        name="example",
        otp_length=10,
        hmac_algorithm="HMacSHA256",
        time_step=30,
        clock_drift_interval=10,
        shared_secret_encoding="hexadecimal")
    
    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{
    			Name:                 pulumi.String("example"),
    			OtpLength:            pulumi.Int(10),
    			HmacAlgorithm:        pulumi.String("HMacSHA256"),
    			TimeStep:             pulumi.Int(30),
    			ClockDriftInterval:   pulumi.Int(10),
    			SharedSecretEncoding: pulumi.String("hexadecimal"),
    		})
    		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.FactorTotp("example", new()
        {
            Name = "example",
            OtpLength = 10,
            HmacAlgorithm = "HMacSHA256",
            TimeStep = 30,
            ClockDriftInterval = 10,
            SharedSecretEncoding = "hexadecimal",
        });
    
    });
    
    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()
                .name("example")
                .otpLength(10)
                .hmacAlgorithm("HMacSHA256")
                .timeStep(30)
                .clockDriftInterval(10)
                .sharedSecretEncoding("hexadecimal")
                .build());
    
        }
    }
    
    resources:
      example:
        type: okta:FactorTotp
        properties:
          name: example
          otpLength: 10
          hmacAlgorithm: HMacSHA256
          timeStep: 30
          clockDriftInterval: 10
          sharedSecretEncoding: hexadecimal
    

    Create FactorTotp Resource

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

    Constructor syntax

    new FactorTotp(name: string, args?: FactorTotpArgs, opts?: CustomResourceOptions);
    @overload
    def FactorTotp(resource_name: str,
                   args: Optional[FactorTotpArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    
    @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)
    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.
    
    

    Parameters

    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.

    Constructor example

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

    var factorTotpResource = new Okta.FactorTotp("factorTotpResource", new()
    {
        ClockDriftInterval = 0,
        HmacAlgorithm = "string",
        Name = "string",
        OtpLength = 0,
        SharedSecretEncoding = "string",
        TimeStep = 0,
    });
    
    example, err := okta.NewFactorTotp(ctx, "factorTotpResource", &okta.FactorTotpArgs{
    	ClockDriftInterval:   pulumi.Int(0),
    	HmacAlgorithm:        pulumi.String("string"),
    	Name:                 pulumi.String("string"),
    	OtpLength:            pulumi.Int(0),
    	SharedSecretEncoding: pulumi.String("string"),
    	TimeStep:             pulumi.Int(0),
    })
    
    var factorTotpResource = new FactorTotp("factorTotpResource", FactorTotpArgs.builder()
        .clockDriftInterval(0)
        .hmacAlgorithm("string")
        .name("string")
        .otpLength(0)
        .sharedSecretEncoding("string")
        .timeStep(0)
        .build());
    
    factor_totp_resource = okta.FactorTotp("factorTotpResource",
        clock_drift_interval=0,
        hmac_algorithm="string",
        name="string",
        otp_length=0,
        shared_secret_encoding="string",
        time_step=0)
    
    const factorTotpResource = new okta.FactorTotp("factorTotpResource", {
        clockDriftInterval: 0,
        hmacAlgorithm: "string",
        name: "string",
        otpLength: 0,
        sharedSecretEncoding: "string",
        timeStep: 0,
    });
    
    type: okta:FactorTotp
    properties:
        clockDriftInterval: 0
        hmacAlgorithm: string
        name: string
        otpLength: 0
        sharedSecretEncoding: string
        timeStep: 0
    

    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

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

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