All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.apimanagement.kotlin.IdentityProviderAadb2cArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.apimanagement.kotlin

import com.pulumi.azure.apimanagement.IdentityProviderAadb2cArgs.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 Azure AD B2C Identity Provider.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * import * as azuread from "@pulumi/azuread";
 * 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 exampleApplication = new azuread.Application("example", {displayName: "acctestam-example"});
 * const exampleApplicationPassword = new azuread.ApplicationPassword("example", {
 *     applicationObjectId: exampleApplication.objectId,
 *     endDateRelative: "36h",
 * });
 * const exampleIdentityProviderAadb2c = new azure.apimanagement.IdentityProviderAadb2c("example", {
 *     resourceGroupName: example.name,
 *     apiManagementName: exampleService.name,
 *     clientId: exampleApplication.applicationId,
 *     clientSecret: "P@55w0rD!",
 *     allowedTenant: "myb2ctenant.onmicrosoft.com",
 *     signinTenant: "myb2ctenant.onmicrosoft.com",
 *     authority: "myb2ctenant.b2clogin.com",
 *     signinPolicy: "B2C_1_Login",
 *     signupPolicy: "B2C_1_Signup",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * import pulumi_azuread as azuread
 * 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_application = azuread.Application("example", display_name="acctestam-example")
 * example_application_password = azuread.ApplicationPassword("example",
 *     application_object_id=example_application.object_id,
 *     end_date_relative="36h")
 * example_identity_provider_aadb2c = azure.apimanagement.IdentityProviderAadb2c("example",
 *     resource_group_name=example.name,
 *     api_management_name=example_service.name,
 *     client_id=example_application.application_id,
 *     client_secret="P@55w0rD!",
 *     allowed_tenant="myb2ctenant.onmicrosoft.com",
 *     signin_tenant="myb2ctenant.onmicrosoft.com",
 *     authority="myb2ctenant.b2clogin.com",
 *     signin_policy="B2C_1_Login",
 *     signup_policy="B2C_1_Signup")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * using AzureAD = Pulumi.AzureAD;
 * 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 exampleApplication = new AzureAD.Application("example", new()
 *     {
 *         DisplayName = "acctestam-example",
 *     });
 *     var exampleApplicationPassword = new AzureAD.ApplicationPassword("example", new()
 *     {
 *         ApplicationObjectId = exampleApplication.ObjectId,
 *         EndDateRelative = "36h",
 *     });
 *     var exampleIdentityProviderAadb2c = new Azure.ApiManagement.IdentityProviderAadb2c("example", new()
 *     {
 *         ResourceGroupName = example.Name,
 *         ApiManagementName = exampleService.Name,
 *         ClientId = exampleApplication.ApplicationId,
 *         ClientSecret = "P@55w0rD!",
 *         AllowedTenant = "myb2ctenant.onmicrosoft.com",
 *         SigninTenant = "myb2ctenant.onmicrosoft.com",
 *         Authority = "myb2ctenant.b2clogin.com",
 *         SigninPolicy = "B2C_1_Login",
 *         SignupPolicy = "B2C_1_Signup",
 *     });
 * });
 * ```
 * ```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-azuread/sdk/v5/go/azuread"
 * 	"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
 * 		}
 * 		exampleApplication, err := azuread.NewApplication(ctx, "example", &azuread.ApplicationArgs{
 * 			DisplayName: pulumi.String("acctestam-example"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = azuread.NewApplicationPassword(ctx, "example", &azuread.ApplicationPasswordArgs{
 * 			ApplicationObjectId: exampleApplication.ObjectId,
 * 			EndDateRelative:     pulumi.String("36h"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = apimanagement.NewIdentityProviderAadb2c(ctx, "example", &apimanagement.IdentityProviderAadb2cArgs{
 * 			ResourceGroupName: example.Name,
 * 			ApiManagementName: exampleService.Name,
 * 			ClientId:          exampleApplication.ApplicationId,
 * 			ClientSecret:      pulumi.String("P@55w0rD!"),
 * 			AllowedTenant:     pulumi.String("myb2ctenant.onmicrosoft.com"),
 * 			SigninTenant:      pulumi.String("myb2ctenant.onmicrosoft.com"),
 * 			Authority:         pulumi.String("myb2ctenant.b2clogin.com"),
 * 			SigninPolicy:      pulumi.String("B2C_1_Login"),
 * 			SignupPolicy:      pulumi.String("B2C_1_Signup"),
 * 		})
 * 		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.azuread.Application;
 * import com.pulumi.azuread.ApplicationArgs;
 * import com.pulumi.azuread.ApplicationPassword;
 * import com.pulumi.azuread.ApplicationPasswordArgs;
 * import com.pulumi.azure.apimanagement.IdentityProviderAadb2c;
 * import com.pulumi.azure.apimanagement.IdentityProviderAadb2cArgs;
 * 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 exampleApplication = new Application("exampleApplication", ApplicationArgs.builder()
 *             .displayName("acctestam-example")
 *             .build());
 *         var exampleApplicationPassword = new ApplicationPassword("exampleApplicationPassword", ApplicationPasswordArgs.builder()
 *             .applicationObjectId(exampleApplication.objectId())
 *             .endDateRelative("36h")
 *             .build());
 *         var exampleIdentityProviderAadb2c = new IdentityProviderAadb2c("exampleIdentityProviderAadb2c", IdentityProviderAadb2cArgs.builder()
 *             .resourceGroupName(example.name())
 *             .apiManagementName(exampleService.name())
 *             .clientId(exampleApplication.applicationId())
 *             .clientSecret("P@55w0rD!")
 *             .allowedTenant("myb2ctenant.onmicrosoft.com")
 *             .signinTenant("myb2ctenant.onmicrosoft.com")
 *             .authority("myb2ctenant.b2clogin.com")
 *             .signinPolicy("B2C_1_Login")
 *             .signupPolicy("B2C_1_Signup")
 *             .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
 *   exampleApplication:
 *     type: azuread:Application
 *     name: example
 *     properties:
 *       displayName: acctestam-example
 *   exampleApplicationPassword:
 *     type: azuread:ApplicationPassword
 *     name: example
 *     properties:
 *       applicationObjectId: ${exampleApplication.objectId}
 *       endDateRelative: 36h
 *   exampleIdentityProviderAadb2c:
 *     type: azure:apimanagement:IdentityProviderAadb2c
 *     name: example
 *     properties:
 *       resourceGroupName: ${example.name}
 *       apiManagementName: ${exampleService.name}
 *       clientId: ${exampleApplication.applicationId}
 *       clientSecret: P@55w0rD!
 *       allowedTenant: myb2ctenant.onmicrosoft.com
 *       signinTenant: myb2ctenant.onmicrosoft.com
 *       authority: myb2ctenant.b2clogin.com
 *       signinPolicy: B2C_1_Login
 *       signupPolicy: B2C_1_Signup
 * ```
 * 
 * ## Import
 * API Management Azure AD B2C Identity Providers can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:apimanagement/identityProviderAadb2c:IdentityProviderAadb2c example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/service1/identityProviders/aadB2C
 * ```
 * @property allowedTenant The allowed AAD tenant, usually your B2C tenant domain.
 * @property apiManagementName The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
 * @property authority OpenID Connect discovery endpoint hostname, usually your b2clogin.com domain.
 * @property clientId Client ID of the Application in your B2C tenant.
 * @property clientSecret Client secret of the Application in your B2C tenant.
 * @property passwordResetPolicy Password reset Policy Name.
 * @property profileEditingPolicy Profile editing Policy Name.
 * @property resourceGroupName The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
 * @property signinPolicy Signin Policy Name.
 * @property signinTenant The tenant to use instead of Common when logging into Active Directory, usually your B2C tenant domain.
 * @property signupPolicy Signup Policy Name.
 */
public data class IdentityProviderAadb2cArgs(
    public val allowedTenant: Output? = null,
    public val apiManagementName: Output? = null,
    public val authority: Output? = null,
    public val clientId: Output? = null,
    public val clientSecret: Output? = null,
    public val passwordResetPolicy: Output? = null,
    public val profileEditingPolicy: Output? = null,
    public val resourceGroupName: Output? = null,
    public val signinPolicy: Output? = null,
    public val signinTenant: Output? = null,
    public val signupPolicy: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.apimanagement.IdentityProviderAadb2cArgs =
        com.pulumi.azure.apimanagement.IdentityProviderAadb2cArgs.builder()
            .allowedTenant(allowedTenant?.applyValue({ args0 -> args0 }))
            .apiManagementName(apiManagementName?.applyValue({ args0 -> args0 }))
            .authority(authority?.applyValue({ args0 -> args0 }))
            .clientId(clientId?.applyValue({ args0 -> args0 }))
            .clientSecret(clientSecret?.applyValue({ args0 -> args0 }))
            .passwordResetPolicy(passwordResetPolicy?.applyValue({ args0 -> args0 }))
            .profileEditingPolicy(profileEditingPolicy?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .signinPolicy(signinPolicy?.applyValue({ args0 -> args0 }))
            .signinTenant(signinTenant?.applyValue({ args0 -> args0 }))
            .signupPolicy(signupPolicy?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [IdentityProviderAadb2cArgs].
 */
@PulumiTagMarker
public class IdentityProviderAadb2cArgsBuilder internal constructor() {
    private var allowedTenant: Output? = null

    private var apiManagementName: Output? = null

    private var authority: Output? = null

    private var clientId: Output? = null

    private var clientSecret: Output? = null

    private var passwordResetPolicy: Output? = null

    private var profileEditingPolicy: Output? = null

    private var resourceGroupName: Output? = null

    private var signinPolicy: Output? = null

    private var signinTenant: Output? = null

    private var signupPolicy: Output? = null

    /**
     * @param value The allowed AAD tenant, usually your B2C tenant domain.
     */
    @JvmName("xbdcdrobapxtynwv")
    public suspend fun allowedTenant(`value`: Output) {
        this.allowedTenant = value
    }

    /**
     * @param value The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
     */
    @JvmName("hxypcyapkoyuydgk")
    public suspend fun apiManagementName(`value`: Output) {
        this.apiManagementName = value
    }

    /**
     * @param value OpenID Connect discovery endpoint hostname, usually your b2clogin.com domain.
     */
    @JvmName("xedpdimmdjkebucx")
    public suspend fun authority(`value`: Output) {
        this.authority = value
    }

    /**
     * @param value Client ID of the Application in your B2C tenant.
     */
    @JvmName("pnyvgoniaejwarah")
    public suspend fun clientId(`value`: Output) {
        this.clientId = value
    }

    /**
     * @param value Client secret of the Application in your B2C tenant.
     */
    @JvmName("haivuvjhgmqwqgle")
    public suspend fun clientSecret(`value`: Output) {
        this.clientSecret = value
    }

    /**
     * @param value Password reset Policy Name.
     */
    @JvmName("sjsrohwcmftillfg")
    public suspend fun passwordResetPolicy(`value`: Output) {
        this.passwordResetPolicy = value
    }

    /**
     * @param value Profile editing Policy Name.
     */
    @JvmName("eqflikcenrwfxsgv")
    public suspend fun profileEditingPolicy(`value`: Output) {
        this.profileEditingPolicy = value
    }

    /**
     * @param value The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
     */
    @JvmName("nwhfqgmremljfhoi")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Signin Policy Name.
     */
    @JvmName("jmyfjeongrmkpton")
    public suspend fun signinPolicy(`value`: Output) {
        this.signinPolicy = value
    }

    /**
     * @param value The tenant to use instead of Common when logging into Active Directory, usually your B2C tenant domain.
     */
    @JvmName("doiiqowtveisyogk")
    public suspend fun signinTenant(`value`: Output) {
        this.signinTenant = value
    }

    /**
     * @param value Signup Policy Name.
     */
    @JvmName("nexwjudsmjnjhhqp")
    public suspend fun signupPolicy(`value`: Output) {
        this.signupPolicy = value
    }

    /**
     * @param value The allowed AAD tenant, usually your B2C tenant domain.
     */
    @JvmName("nrdavruudhviauee")
    public suspend fun allowedTenant(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedTenant = mapped
    }

    /**
     * @param value The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
     */
    @JvmName("keelihenjtyextyj")
    public suspend fun apiManagementName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiManagementName = mapped
    }

    /**
     * @param value OpenID Connect discovery endpoint hostname, usually your b2clogin.com domain.
     */
    @JvmName("ylhygqoktimjivjl")
    public suspend fun authority(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authority = mapped
    }

    /**
     * @param value Client ID of the Application in your B2C tenant.
     */
    @JvmName("wqgtdbnyjyhyopay")
    public suspend fun clientId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientId = mapped
    }

    /**
     * @param value Client secret of the Application in your B2C tenant.
     */
    @JvmName("pkecnjladscufemc")
    public suspend fun clientSecret(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientSecret = mapped
    }

    /**
     * @param value Password reset Policy Name.
     */
    @JvmName("gbaemvyqodwbuyye")
    public suspend fun passwordResetPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.passwordResetPolicy = mapped
    }

    /**
     * @param value Profile editing Policy Name.
     */
    @JvmName("vdncquadraucptdt")
    public suspend fun profileEditingPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.profileEditingPolicy = mapped
    }

    /**
     * @param value The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
     */
    @JvmName("wewxvkqmaulrxqpx")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Signin Policy Name.
     */
    @JvmName("lmxvaiifpwqkjgee")
    public suspend fun signinPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.signinPolicy = mapped
    }

    /**
     * @param value The tenant to use instead of Common when logging into Active Directory, usually your B2C tenant domain.
     */
    @JvmName("btamcjcithstncco")
    public suspend fun signinTenant(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.signinTenant = mapped
    }

    /**
     * @param value Signup Policy Name.
     */
    @JvmName("jatijolcisdsgayt")
    public suspend fun signupPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.signupPolicy = mapped
    }

    internal fun build(): IdentityProviderAadb2cArgs = IdentityProviderAadb2cArgs(
        allowedTenant = allowedTenant,
        apiManagementName = apiManagementName,
        authority = authority,
        clientId = clientId,
        clientSecret = clientSecret,
        passwordResetPolicy = passwordResetPolicy,
        profileEditingPolicy = profileEditingPolicy,
        resourceGroupName = resourceGroupName,
        signinPolicy = signinPolicy,
        signinTenant = signinTenant,
        signupPolicy = signupPolicy,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy