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

com.pulumi.azure.apimanagement.kotlin.OpenIdConnectProviderArgs.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.OpenIdConnectProviderArgs.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 OpenID Connect Provider within a API Management Service.
 * ## 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 exampleOpenIdConnectProvider = new azure.apimanagement.OpenIdConnectProvider("example", {
 *     name: "example-provider",
 *     apiManagementName: exampleService.name,
 *     resourceGroupName: example.name,
 *     clientId: "00001111-2222-3333-4444-555566667777",
 *     clientSecret: "00001111-423egvwdcsjx-00001111",
 *     displayName: "Example Provider",
 *     metadataEndpoint: "https://example.com/example",
 * });
 * ```
 * ```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_open_id_connect_provider = azure.apimanagement.OpenIdConnectProvider("example",
 *     name="example-provider",
 *     api_management_name=example_service.name,
 *     resource_group_name=example.name,
 *     client_id="00001111-2222-3333-4444-555566667777",
 *     client_secret="00001111-423egvwdcsjx-00001111",
 *     display_name="Example Provider",
 *     metadata_endpoint="https://example.com/example")
 * ```
 * ```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 exampleOpenIdConnectProvider = new Azure.ApiManagement.OpenIdConnectProvider("example", new()
 *     {
 *         Name = "example-provider",
 *         ApiManagementName = exampleService.Name,
 *         ResourceGroupName = example.Name,
 *         ClientId = "00001111-2222-3333-4444-555566667777",
 *         ClientSecret = "00001111-423egvwdcsjx-00001111",
 *         DisplayName = "Example Provider",
 *         MetadataEndpoint = "https://example.com/example",
 *     });
 * });
 * ```
 * ```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.NewOpenIdConnectProvider(ctx, "example", &apimanagement.OpenIdConnectProviderArgs{
 * 			Name:              pulumi.String("example-provider"),
 * 			ApiManagementName: exampleService.Name,
 * 			ResourceGroupName: example.Name,
 * 			ClientId:          pulumi.String("00001111-2222-3333-4444-555566667777"),
 * 			ClientSecret:      pulumi.String("00001111-423egvwdcsjx-00001111"),
 * 			DisplayName:       pulumi.String("Example Provider"),
 * 			MetadataEndpoint:  pulumi.String("https://example.com/example"),
 * 		})
 * 		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.OpenIdConnectProvider;
 * import com.pulumi.azure.apimanagement.OpenIdConnectProviderArgs;
 * 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 exampleOpenIdConnectProvider = new OpenIdConnectProvider("exampleOpenIdConnectProvider", OpenIdConnectProviderArgs.builder()
 *             .name("example-provider")
 *             .apiManagementName(exampleService.name())
 *             .resourceGroupName(example.name())
 *             .clientId("00001111-2222-3333-4444-555566667777")
 *             .clientSecret("00001111-423egvwdcsjx-00001111")
 *             .displayName("Example Provider")
 *             .metadataEndpoint("https://example.com/example")
 *             .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
 *   exampleOpenIdConnectProvider:
 *     type: azure:apimanagement:OpenIdConnectProvider
 *     name: example
 *     properties:
 *       name: example-provider
 *       apiManagementName: ${exampleService.name}
 *       resourceGroupName: ${example.name}
 *       clientId: 00001111-2222-3333-4444-555566667777
 *       clientSecret: 00001111-423egvwdcsjx-00001111
 *       displayName: Example Provider
 *       metadataEndpoint: https://example.com/example
 * ```
 * 
 * ## Import
 * API Management OpenID Connect Providers can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:apimanagement/openIdConnectProvider:OpenIdConnectProvider example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/openidConnectProviders/provider1
 * ```
 * @property apiManagementName The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
 * @property clientId The Client ID used for the Client Application.
 * @property clientSecret The Client Secret used for the Client Application.
 * @property description A description of this OpenID Connect Provider.
 * @property displayName A user-friendly name for this OpenID Connect Provider.
 * @property metadataEndpoint The URI of the Metadata endpoint.
 * @property name the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
 */
public data class OpenIdConnectProviderArgs(
    public val apiManagementName: Output? = null,
    public val clientId: Output? = null,
    public val clientSecret: Output? = null,
    public val description: Output? = null,
    public val displayName: Output? = null,
    public val metadataEndpoint: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.apimanagement.OpenIdConnectProviderArgs =
        com.pulumi.azure.apimanagement.OpenIdConnectProviderArgs.builder()
            .apiManagementName(apiManagementName?.applyValue({ args0 -> args0 }))
            .clientId(clientId?.applyValue({ args0 -> args0 }))
            .clientSecret(clientSecret?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .metadataEndpoint(metadataEndpoint?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [OpenIdConnectProviderArgs].
 */
@PulumiTagMarker
public class OpenIdConnectProviderArgsBuilder internal constructor() {
    private var apiManagementName: Output? = null

    private var clientId: Output? = null

    private var clientSecret: Output? = null

    private var description: Output? = null

    private var displayName: Output? = null

    private var metadataEndpoint: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    /**
     * @param value The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
     */
    @JvmName("padwwwfvsgkenjkw")
    public suspend fun apiManagementName(`value`: Output) {
        this.apiManagementName = value
    }

    /**
     * @param value The Client ID used for the Client Application.
     */
    @JvmName("byhffooyljourrqo")
    public suspend fun clientId(`value`: Output) {
        this.clientId = value
    }

    /**
     * @param value The Client Secret used for the Client Application.
     */
    @JvmName("nfdfcuvieyggbnic")
    public suspend fun clientSecret(`value`: Output) {
        this.clientSecret = value
    }

    /**
     * @param value A description of this OpenID Connect Provider.
     */
    @JvmName("evhppqnbjwkdtjic")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value A user-friendly name for this OpenID Connect Provider.
     */
    @JvmName("nvkkisdmspgicrqo")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value The URI of the Metadata endpoint.
     */
    @JvmName("ciisehhkahjsvdgk")
    public suspend fun metadataEndpoint(`value`: Output) {
        this.metadataEndpoint = value
    }

    /**
     * @param value the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
     */
    @JvmName("enmfalfuixuhxikm")
    public suspend fun name(`value`: Output) {
        this.name = 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("bjualrjkkpydbulg")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

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

    /**
     * @param value The Client ID used for the Client Application.
     */
    @JvmName("idqscvuudccopnov")
    public suspend fun clientId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientId = mapped
    }

    /**
     * @param value The Client Secret used for the Client Application.
     */
    @JvmName("qoscqruuuqxhnhdx")
    public suspend fun clientSecret(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientSecret = mapped
    }

    /**
     * @param value A description of this OpenID Connect Provider.
     */
    @JvmName("fcugnfywfubifwdj")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value A user-friendly name for this OpenID Connect Provider.
     */
    @JvmName("bwqyejmhybislfnl")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value The URI of the Metadata endpoint.
     */
    @JvmName("fltgwrrwrsofiufw")
    public suspend fun metadataEndpoint(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadataEndpoint = mapped
    }

    /**
     * @param value the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
     */
    @JvmName("giyebkhiluufeeqm")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = 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("nyjkwmtehfebundg")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    internal fun build(): OpenIdConnectProviderArgs = OpenIdConnectProviderArgs(
        apiManagementName = apiManagementName,
        clientId = clientId,
        clientSecret = clientSecret,
        description = description,
        displayName = displayName,
        metadataEndpoint = metadataEndpoint,
        name = name,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy