Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.apimanagement.kotlin
import com.pulumi.azurenative.apimanagement.UserArgs.builder
import com.pulumi.azurenative.apimanagement.kotlin.enums.AppType
import com.pulumi.azurenative.apimanagement.kotlin.enums.Confirmation
import com.pulumi.azurenative.apimanagement.kotlin.enums.UserState
import com.pulumi.azurenative.apimanagement.kotlin.inputs.UserIdentityContractArgs
import com.pulumi.azurenative.apimanagement.kotlin.inputs.UserIdentityContractArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* User details.
* Azure REST API version: 2022-08-01. Prior API version in Azure Native 1.x: 2020-12-01.
* Other available API versions: 2016-07-07, 2016-10-10, 2017-03-01, 2018-01-01, 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01.
* ## Example Usage
* ### ApiManagementCreateUser
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var user = new AzureNative.ApiManagement.User("user", new()
* {
* Confirmation = AzureNative.ApiManagement.Confirmation.Signup,
* Email = "[email protected]",
* FirstName = "foo",
* LastName = "bar",
* ResourceGroupName = "rg1",
* ServiceName = "apimService1",
* UserId = "5931a75ae4bbd512288c680b",
* });
* });
* ```
* ```go
* package main
* import (
* apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := apimanagement.NewUser(ctx, "user", &apimanagement.UserArgs{
* Confirmation: pulumi.String(apimanagement.ConfirmationSignup),
* Email: pulumi.String("[email protected]"),
* FirstName: pulumi.String("foo"),
* LastName: pulumi.String("bar"),
* ResourceGroupName: pulumi.String("rg1"),
* ServiceName: pulumi.String("apimService1"),
* UserId: pulumi.String("5931a75ae4bbd512288c680b"),
* })
* 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.azurenative.apimanagement.User;
* import com.pulumi.azurenative.apimanagement.UserArgs;
* 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 user = new User("user", UserArgs.builder()
* .confirmation("signup")
* .email("[email protected]")
* .firstName("foo")
* .lastName("bar")
* .resourceGroupName("rg1")
* .serviceName("apimService1")
* .userId("5931a75ae4bbd512288c680b")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:apimanagement:User 5931a75ae4bbd512288c680b /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}
* ```
* @property appType Determines the type of application which send the create user request. Default is legacy portal.
* @property confirmation Determines the type of confirmation e-mail that will be sent to the newly created user.
* @property email Email address. Must not be empty and must be unique within the service instance.
* @property firstName First name.
* @property identities Collection of user identities.
* @property lastName Last name.
* @property note Optional note about a user set by the administrator.
* @property notify Send an Email notification to the User.
* @property password User Password. If no value is provided, a default password is generated.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property serviceName The name of the API Management service.
* @property state Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.
* @property userId User identifier. Must be unique in the current API Management service instance.
*/
public data class UserArgs(
public val appType: Output>? = null,
public val confirmation: Output>? = null,
public val email: Output? = null,
public val firstName: Output? = null,
public val identities: Output>? = null,
public val lastName: Output? = null,
public val note: Output? = null,
public val notify: Output? = null,
public val password: Output? = null,
public val resourceGroupName: Output? = null,
public val serviceName: Output? = null,
public val state: Output>? = null,
public val userId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.apimanagement.UserArgs =
com.pulumi.azurenative.apimanagement.UserArgs.builder()
.appType(
appType?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.confirmation(
confirmation?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.email(email?.applyValue({ args0 -> args0 }))
.firstName(firstName?.applyValue({ args0 -> args0 }))
.identities(
identities?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.lastName(lastName?.applyValue({ args0 -> args0 }))
.note(note?.applyValue({ args0 -> args0 }))
.notify_(notify?.applyValue({ args0 -> args0 }))
.password(password?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.serviceName(serviceName?.applyValue({ args0 -> args0 }))
.state(
state?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.userId(userId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [UserArgs].
*/
@PulumiTagMarker
public class UserArgsBuilder internal constructor() {
private var appType: Output>? = null
private var confirmation: Output>? = null
private var email: Output? = null
private var firstName: Output? = null
private var identities: Output>? = null
private var lastName: Output? = null
private var note: Output? = null
private var notify: Output? = null
private var password: Output? = null
private var resourceGroupName: Output? = null
private var serviceName: Output? = null
private var state: Output>? = null
private var userId: Output? = null
/**
* @param value Determines the type of application which send the create user request. Default is legacy portal.
*/
@JvmName("whhlysvrnrngyyrw")
public suspend fun appType(`value`: Output>) {
this.appType = value
}
/**
* @param value Determines the type of confirmation e-mail that will be sent to the newly created user.
*/
@JvmName("bliikopkjpwchbno")
public suspend fun confirmation(`value`: Output>) {
this.confirmation = value
}
/**
* @param value Email address. Must not be empty and must be unique within the service instance.
*/
@JvmName("xnphnnqujpifwhjt")
public suspend fun email(`value`: Output) {
this.email = value
}
/**
* @param value First name.
*/
@JvmName("vfixtacoflfpdver")
public suspend fun firstName(`value`: Output) {
this.firstName = value
}
/**
* @param value Collection of user identities.
*/
@JvmName("lenrmjkqgpwpeyoo")
public suspend fun identities(`value`: Output>) {
this.identities = value
}
@JvmName("nygoyvhfmrkwoilm")
public suspend fun identities(vararg values: Output) {
this.identities = Output.all(values.asList())
}
/**
* @param values Collection of user identities.
*/
@JvmName("cyaulycfvkoamklm")
public suspend fun identities(values: List