com.pulumi.vault.identity.kotlin.MfaOkta.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-vault-kotlin Show documentation
Show all versions of pulumi-vault-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.vault.identity.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [MfaOkta].
*/
@PulumiTagMarker
public class MfaOktaResourceBuilder internal constructor() {
public var name: String? = null
public var args: MfaOktaArgs = MfaOktaArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend MfaOktaArgsBuilder.() -> Unit) {
val builder = MfaOktaArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): MfaOkta {
val builtJavaResource = com.pulumi.vault.identity.MfaOkta(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return MfaOkta(builtJavaResource)
}
}
/**
* Resource for configuring the okta MFA method.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const example = new vault.identity.MfaOkta("example", {
* orgName: "org1",
* apiToken: "token1",
* baseUrl: "qux.baz.com",
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* example = vault.identity.MfaOkta("example",
* org_name="org1",
* api_token="token1",
* base_url="qux.baz.com")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var example = new Vault.Identity.MfaOkta("example", new()
* {
* OrgName = "org1",
* ApiToken = "token1",
* BaseUrl = "qux.baz.com",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/identity"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := identity.NewMfaOkta(ctx, "example", &identity.MfaOktaArgs{
* OrgName: pulumi.String("org1"),
* ApiToken: pulumi.String("token1"),
* BaseUrl: pulumi.String("qux.baz.com"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.vault.identity.MfaOkta;
* import com.pulumi.vault.identity.MfaOktaArgs;
* 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 MfaOkta("example", MfaOktaArgs.builder()
* .orgName("org1")
* .apiToken("token1")
* .baseUrl("qux.baz.com")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: vault:identity:MfaOkta
* properties:
* orgName: org1
* apiToken: token1
* baseUrl: qux.baz.com
* ```
*
* ## Import
* Resource can be imported using its `uuid` field, e.g.
* ```sh
* $ pulumi import vault:identity/mfaOkta:MfaOkta example 0d89c36a-4ff5-4d70-8749-bb6a5598aeec
* ```
*/
public class MfaOkta internal constructor(
override val javaResource: com.pulumi.vault.identity.MfaOkta,
) : KotlinCustomResource(javaResource, MfaOktaMapper) {
/**
* Okta API token.
*/
public val apiToken: Output
get() = javaResource.apiToken().applyValue({ args0 -> args0 })
/**
* The base domain to use for API requests.
*/
public val baseUrl: Output?
get() = javaResource.baseUrl().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Method ID.
*/
public val methodId: Output
get() = javaResource.methodId().applyValue({ args0 -> args0 })
/**
* Mount accessor.
*/
public val mountAccessor: Output
get() = javaResource.mountAccessor().applyValue({ args0 -> args0 })
/**
* Method name.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Target namespace. (requires Enterprise)
*/
public val namespace: Output?
get() = javaResource.namespace().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Method's namespace ID.
*/
public val namespaceId: Output
get() = javaResource.namespaceId().applyValue({ args0 -> args0 })
/**
* Method's namespace path.
*/
public val namespacePath: Output
get() = javaResource.namespacePath().applyValue({ args0 -> args0 })
/**
* Name of the organization to be used in the Okta API.
*/
public val orgName: Output
get() = javaResource.orgName().applyValue({ args0 -> args0 })
/**
* Only match the primary email for the account.
*/
public val primaryEmail: Output?
get() = javaResource.primaryEmail().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* MFA type.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
/**
* A template string for mapping Identity names to MFA methods.
*/
public val usernameFormat: Output?
get() = javaResource.usernameFormat().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Resource UUID.
*/
public val uuid: Output
get() = javaResource.uuid().applyValue({ args0 -> args0 })
}
public object MfaOktaMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.vault.identity.MfaOkta::class == javaResource::class
override fun map(javaResource: Resource): MfaOkta = MfaOkta(
javaResource as
com.pulumi.vault.identity.MfaOkta,
)
}
/**
* @see [MfaOkta].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [MfaOkta].
*/
public suspend fun mfaOkta(name: String, block: suspend MfaOktaResourceBuilder.() -> Unit): MfaOkta {
val builder = MfaOktaResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [MfaOkta].
* @param name The _unique_ name of the resulting resource.
*/
public fun mfaOkta(name: String): MfaOkta {
val builder = MfaOktaResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy