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

com.pulumi.azure.armmsi.kotlin.FederatedIdentityCredentialArgs.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.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.armmsi.kotlin

import com.pulumi.azure.armmsi.FederatedIdentityCredentialArgs.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 a Federated Identity Credential.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example",
 *     location: "West Europe",
 * });
 * const exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("example", {
 *     location: example.location,
 *     name: "example",
 *     resourceGroupName: example.name,
 * });
 * const exampleFederatedIdentityCredential = new azure.armmsi.FederatedIdentityCredential("example", {
 *     name: "example",
 *     resourceGroupName: example.name,
 *     audience: "foo",
 *     issuer: "https://foo",
 *     parentId: exampleUserAssignedIdentity.id,
 *     subject: "foo",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example",
 *     location="West Europe")
 * example_user_assigned_identity = azure.authorization.UserAssignedIdentity("example",
 *     location=example.location,
 *     name="example",
 *     resource_group_name=example.name)
 * example_federated_identity_credential = azure.armmsi.FederatedIdentityCredential("example",
 *     name="example",
 *     resource_group_name=example.name,
 *     audience="foo",
 *     issuer="https://foo",
 *     parent_id=example_user_assigned_identity.id,
 *     subject="foo")
 * ```
 * ```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",
 *         Location = "West Europe",
 *     });
 *     var exampleUserAssignedIdentity = new Azure.Authorization.UserAssignedIdentity("example", new()
 *     {
 *         Location = example.Location,
 *         Name = "example",
 *         ResourceGroupName = example.Name,
 *     });
 *     var exampleFederatedIdentityCredential = new Azure.ArmMsi.FederatedIdentityCredential("example", new()
 *     {
 *         Name = "example",
 *         ResourceGroupName = example.Name,
 *         Audience = "foo",
 *         Issuer = "https://foo",
 *         ParentId = exampleUserAssignedIdentity.Id,
 *         Subject = "foo",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/armmsi"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
 * 	"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"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
 * 			Location:          example.Location,
 * 			Name:              pulumi.String("example"),
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = armmsi.NewFederatedIdentityCredential(ctx, "example", &armmsi.FederatedIdentityCredentialArgs{
 * 			Name:              pulumi.String("example"),
 * 			ResourceGroupName: example.Name,
 * 			Audience:          pulumi.String("foo"),
 * 			Issuer:            pulumi.String("https://foo"),
 * 			ParentId:          exampleUserAssignedIdentity.ID(),
 * 			Subject:           pulumi.String("foo"),
 * 		})
 * 		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.authorization.UserAssignedIdentity;
 * import com.pulumi.azure.authorization.UserAssignedIdentityArgs;
 * import com.pulumi.azure.armmsi.FederatedIdentityCredential;
 * import com.pulumi.azure.armmsi.FederatedIdentityCredentialArgs;
 * 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")
 *             .location("West Europe")
 *             .build());
 *         var exampleUserAssignedIdentity = new UserAssignedIdentity("exampleUserAssignedIdentity", UserAssignedIdentityArgs.builder()
 *             .location(example.location())
 *             .name("example")
 *             .resourceGroupName(example.name())
 *             .build());
 *         var exampleFederatedIdentityCredential = new FederatedIdentityCredential("exampleFederatedIdentityCredential", FederatedIdentityCredentialArgs.builder()
 *             .name("example")
 *             .resourceGroupName(example.name())
 *             .audience("foo")
 *             .issuer("https://foo")
 *             .parentId(exampleUserAssignedIdentity.id())
 *             .subject("foo")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example
 *       location: West Europe
 *   exampleUserAssignedIdentity:
 *     type: azure:authorization:UserAssignedIdentity
 *     name: example
 *     properties:
 *       location: ${example.location}
 *       name: example
 *       resourceGroupName: ${example.name}
 *   exampleFederatedIdentityCredential:
 *     type: azure:armmsi:FederatedIdentityCredential
 *     name: example
 *     properties:
 *       name: example
 *       resourceGroupName: ${example.name}
 *       audience: foo
 *       issuer: https://foo
 *       parentId: ${exampleUserAssignedIdentity.id}
 *       subject: foo
 * ```
 * 
 * ## Import
 * An existing Federated Identity Credential can be imported into Terraform using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:armmsi/federatedIdentityCredential:FederatedIdentityCredential example /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{parentIdentityName}/federatedIdentityCredentials/{resourceName}
 * ```
 * @property audience Specifies the audience for this Federated Identity Credential.
 * @property issuer Specifies the issuer of this Federated Identity Credential.
 * @property name Specifies the name of this Federated Identity Credential. Changing this forces a new resource to be created.
 * @property parentId Specifies parent ID of User Assigned Identity for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created.
 * @property resourceGroupName Specifies the name of the Resource Group within which this Federated Identity Credential should exist. Changing this forces a new Federated Identity Credential to be created.
 * @property subject Specifies the subject for this Federated Identity Credential.
 */
public data class FederatedIdentityCredentialArgs(
    public val audience: Output? = null,
    public val issuer: Output? = null,
    public val name: Output? = null,
    public val parentId: Output? = null,
    public val resourceGroupName: Output? = null,
    public val subject: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.armmsi.FederatedIdentityCredentialArgs =
        com.pulumi.azure.armmsi.FederatedIdentityCredentialArgs.builder()
            .audience(audience?.applyValue({ args0 -> args0 }))
            .issuer(issuer?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .parentId(parentId?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .subject(subject?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FederatedIdentityCredentialArgs].
 */
@PulumiTagMarker
public class FederatedIdentityCredentialArgsBuilder internal constructor() {
    private var audience: Output? = null

    private var issuer: Output? = null

    private var name: Output? = null

    private var parentId: Output? = null

    private var resourceGroupName: Output? = null

    private var subject: Output? = null

    /**
     * @param value Specifies the audience for this Federated Identity Credential.
     */
    @JvmName("ewmixfeotnxupkqw")
    public suspend fun audience(`value`: Output) {
        this.audience = value
    }

    /**
     * @param value Specifies the issuer of this Federated Identity Credential.
     */
    @JvmName("buyvudwqtbrgqest")
    public suspend fun issuer(`value`: Output) {
        this.issuer = value
    }

    /**
     * @param value Specifies the name of this Federated Identity Credential. Changing this forces a new resource to be created.
     */
    @JvmName("dgyhymhenfviptor")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies parent ID of User Assigned Identity for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created.
     */
    @JvmName("dhmvsowuqfoekxpk")
    public suspend fun parentId(`value`: Output) {
        this.parentId = value
    }

    /**
     * @param value Specifies the name of the Resource Group within which this Federated Identity Credential should exist. Changing this forces a new Federated Identity Credential to be created.
     */
    @JvmName("xbbxcownuaornesl")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Specifies the subject for this Federated Identity Credential.
     */
    @JvmName("oihuixwafmyhbdtu")
    public suspend fun subject(`value`: Output) {
        this.subject = value
    }

    /**
     * @param value Specifies the audience for this Federated Identity Credential.
     */
    @JvmName("uxdgwjuqevlyjjcs")
    public suspend fun audience(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.audience = mapped
    }

    /**
     * @param value Specifies the issuer of this Federated Identity Credential.
     */
    @JvmName("etwqqwjqbiubyxkq")
    public suspend fun issuer(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.issuer = mapped
    }

    /**
     * @param value Specifies the name of this Federated Identity Credential. Changing this forces a new resource to be created.
     */
    @JvmName("qqjbdeuneunuyfut")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies parent ID of User Assigned Identity for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created.
     */
    @JvmName("dpahsjtdxwinolfn")
    public suspend fun parentId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentId = mapped
    }

    /**
     * @param value Specifies the name of the Resource Group within which this Federated Identity Credential should exist. Changing this forces a new Federated Identity Credential to be created.
     */
    @JvmName("kpobwcagbaxhjxun")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Specifies the subject for this Federated Identity Credential.
     */
    @JvmName("dgflseswcxtrakex")
    public suspend fun subject(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subject = mapped
    }

    internal fun build(): FederatedIdentityCredentialArgs = FederatedIdentityCredentialArgs(
        audience = audience,
        issuer = issuer,
        name = name,
        parentId = parentId,
        resourceGroupName = resourceGroupName,
        subject = subject,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy