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.azure.apimanagement.kotlin
import com.pulumi.azure.apimanagement.UserArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages an API Management User.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleService = new azure.apimanagement.Service("example", {
* name: "example-apim",
* location: example.location,
* resourceGroupName: example.name,
* publisherName: "My Company",
* publisherEmail: "[email protected]",
* skuName: "Developer_1",
* });
* const exampleUser = new azure.apimanagement.User("example", {
* userId: "5931a75ae4bbd512288c680b",
* apiManagementName: exampleService.name,
* resourceGroupName: example.name,
* firstName: "Example",
* lastName: "User",
* email: "[email protected]",
* state: "active",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_service = azure.apimanagement.Service("example",
* name="example-apim",
* location=example.location,
* resource_group_name=example.name,
* publisher_name="My Company",
* publisher_email="[email protected]",
* sku_name="Developer_1")
* example_user = azure.apimanagement.User("example",
* user_id="5931a75ae4bbd512288c680b",
* api_management_name=example_service.name,
* resource_group_name=example.name,
* first_name="Example",
* last_name="User",
* email="[email protected]",
* state="active")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleService = new Azure.ApiManagement.Service("example", new()
* {
* Name = "example-apim",
* Location = example.Location,
* ResourceGroupName = example.Name,
* PublisherName = "My Company",
* PublisherEmail = "[email protected]",
* SkuName = "Developer_1",
* });
* var exampleUser = new Azure.ApiManagement.User("example", new()
* {
* UserId = "5931a75ae4bbd512288c680b",
* ApiManagementName = exampleService.Name,
* ResourceGroupName = example.Name,
* FirstName = "Example",
* LastName = "User",
* Email = "[email protected]",
* State = "active",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
* Name: pulumi.String("example-apim"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* PublisherName: pulumi.String("My Company"),
* PublisherEmail: pulumi.String("[email protected]"),
* SkuName: pulumi.String("Developer_1"),
* })
* if err != nil {
* return err
* }
* _, err = apimanagement.NewUser(ctx, "example", &apimanagement.UserArgs{
* UserId: pulumi.String("5931a75ae4bbd512288c680b"),
* ApiManagementName: exampleService.Name,
* ResourceGroupName: example.Name,
* FirstName: pulumi.String("Example"),
* LastName: pulumi.String("User"),
* Email: pulumi.String("[email protected]"),
* State: pulumi.String("active"),
* })
* 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.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.apimanagement.Service;
* import com.pulumi.azure.apimanagement.ServiceArgs;
* import com.pulumi.azure.apimanagement.User;
* import com.pulumi.azure.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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleService = new Service("exampleService", ServiceArgs.builder()
* .name("example-apim")
* .location(example.location())
* .resourceGroupName(example.name())
* .publisherName("My Company")
* .publisherEmail("[email protected]")
* .skuName("Developer_1")
* .build());
* var exampleUser = new User("exampleUser", UserArgs.builder()
* .userId("5931a75ae4bbd512288c680b")
* .apiManagementName(exampleService.name())
* .resourceGroupName(example.name())
* .firstName("Example")
* .lastName("User")
* .email("[email protected]")
* .state("active")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleService:
* type: azure:apimanagement:Service
* name: example
* properties:
* name: example-apim
* location: ${example.location}
* resourceGroupName: ${example.name}
* publisherName: My Company
* publisherEmail: [email protected]
* skuName: Developer_1
* exampleUser:
* type: azure:apimanagement:User
* name: example
* properties:
* userId: 5931a75ae4bbd512288c680b
* apiManagementName: ${exampleService.name}
* resourceGroupName: ${example.name}
* firstName: Example
* lastName: User
* email: [email protected]
* state: active
* ```
*
* ## Import
* API Management Users can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:apimanagement/user:User example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/users/abc123
* ```
* @property apiManagementName The name of the API Management Service in which the User should be created. Changing this forces a new resource to be created.
* @property confirmation The kind of confirmation email which will be sent to this user. Possible values are `invite` and `signup`. Changing this forces a new resource to be created.
* @property email The email address associated with this user.
* @property firstName The first name for this user.
* @property lastName The last name for this user.
* @property note A note about this user.
* @property password The password associated with this user.
* @property resourceGroupName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
* @property state The state of this user. Possible values are `active`, `blocked` and `pending`.
* > **NOTE:** the State can be changed from Pending > Active/Blocked but not from Active/Blocked > Pending.
* @property userId The Identifier for this User, which must be unique within the API Management Service. Changing this forces a new resource to be created.
*/
public data class UserArgs(
public val apiManagementName: Output? = null,
public val confirmation: Output? = null,
public val email: Output? = null,
public val firstName: Output? = null,
public val lastName: Output? = null,
public val note: Output? = null,
public val password: Output? = null,
public val resourceGroupName: Output? = null,
public val state: Output? = null,
public val userId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.apimanagement.UserArgs =
com.pulumi.azure.apimanagement.UserArgs.builder()
.apiManagementName(apiManagementName?.applyValue({ args0 -> args0 }))
.confirmation(confirmation?.applyValue({ args0 -> args0 }))
.email(email?.applyValue({ args0 -> args0 }))
.firstName(firstName?.applyValue({ args0 -> args0 }))
.lastName(lastName?.applyValue({ args0 -> args0 }))
.note(note?.applyValue({ args0 -> args0 }))
.password(password?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.state(state?.applyValue({ args0 -> args0 }))
.userId(userId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [UserArgs].
*/
@PulumiTagMarker
public class UserArgsBuilder internal constructor() {
private var apiManagementName: Output? = null
private var confirmation: Output? = null
private var email: Output? = null
private var firstName: Output? = null
private var lastName: Output? = null
private var note: Output? = null
private var password: Output? = null
private var resourceGroupName: Output? = null
private var state: Output? = null
private var userId: Output? = null
/**
* @param value The name of the API Management Service in which the User should be created. Changing this forces a new resource to be created.
*/
@JvmName("ijarqferflefogex")
public suspend fun apiManagementName(`value`: Output) {
this.apiManagementName = value
}
/**
* @param value The kind of confirmation email which will be sent to this user. Possible values are `invite` and `signup`. Changing this forces a new resource to be created.
*/
@JvmName("vumvgngavfumdqqp")
public suspend fun confirmation(`value`: Output) {
this.confirmation = value
}
/**
* @param value The email address associated with this user.
*/
@JvmName("hqkwpnupoaqwmgma")
public suspend fun email(`value`: Output) {
this.email = value
}
/**
* @param value The first name for this user.
*/
@JvmName("dtpinlmmprfckbqy")
public suspend fun firstName(`value`: Output) {
this.firstName = value
}
/**
* @param value The last name for this user.
*/
@JvmName("mnlvcwhdhobrdagp")
public suspend fun lastName(`value`: Output) {
this.lastName = value
}
/**
* @param value A note about this user.
*/
@JvmName("djsjxoiobnskybup")
public suspend fun note(`value`: Output) {
this.note = value
}
/**
* @param value The password associated with this user.
*/
@JvmName("wmpiqlkmxfqooxuo")
public suspend fun password(`value`: Output) {
this.password = value
}
/**
* @param value The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
*/
@JvmName("tphsdrivjofbtrcf")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The state of this user. Possible values are `active`, `blocked` and `pending`.
* > **NOTE:** the State can be changed from Pending > Active/Blocked but not from Active/Blocked > Pending.
*/
@JvmName("htesxbjdggvhwcwo")
public suspend fun state(`value`: Output) {
this.state = value
}
/**
* @param value The Identifier for this User, which must be unique within the API Management Service. Changing this forces a new resource to be created.
*/
@JvmName("dwdgkctpogwmlwji")
public suspend fun userId(`value`: Output) {
this.userId = value
}
/**
* @param value The name of the API Management Service in which the User should be created. Changing this forces a new resource to be created.
*/
@JvmName("mnsxfftcrxarttqd")
public suspend fun apiManagementName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiManagementName = mapped
}
/**
* @param value The kind of confirmation email which will be sent to this user. Possible values are `invite` and `signup`. Changing this forces a new resource to be created.
*/
@JvmName("enlehjjcaybjbwtl")
public suspend fun confirmation(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.confirmation = mapped
}
/**
* @param value The email address associated with this user.
*/
@JvmName("krygerfahrjqrnmf")
public suspend fun email(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.email = mapped
}
/**
* @param value The first name for this user.
*/
@JvmName("cdvfmcxgwbixyuca")
public suspend fun firstName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.firstName = mapped
}
/**
* @param value The last name for this user.
*/
@JvmName("nhrnvsveuctifepr")
public suspend fun lastName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.lastName = mapped
}
/**
* @param value A note about this user.
*/
@JvmName("jgnplgrjqxhingyu")
public suspend fun note(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.note = mapped
}
/**
* @param value The password associated with this user.
*/
@JvmName("uuwharfewaamkrau")
public suspend fun password(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.password = mapped
}
/**
* @param value The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
*/
@JvmName("swicckjfdiagtiuc")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The state of this user. Possible values are `active`, `blocked` and `pending`.
* > **NOTE:** the State can be changed from Pending > Active/Blocked but not from Active/Blocked > Pending.
*/
@JvmName("cogygiougmdcfvyk")
public suspend fun state(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value The Identifier for this User, which must be unique within the API Management Service. Changing this forces a new resource to be created.
*/
@JvmName("vfbcgtpjqcvodoey")
public suspend fun userId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.userId = mapped
}
internal fun build(): UserArgs = UserArgs(
apiManagementName = apiManagementName,
confirmation = confirmation,
email = email,
firstName = firstName,
lastName = lastName,
note = note,
password = password,
resourceGroupName = resourceGroupName,
state = state,
userId = userId,
)
}