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

com.pulumi.azurenative.billing.kotlin.BillingRoleAssignmentByDepartmentArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.billing.kotlin

import com.pulumi.azurenative.billing.BillingRoleAssignmentByDepartmentArgs.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

/**
 * The role assignment
 * Azure REST API version: 2019-10-01-preview. Prior API version in Azure Native 1.x: 2019-10-01-preview.
 * Other available API versions: 2024-04-01.
 * ## Example Usage
 * ### PutEnrollmentDepartmentAdministratorRoleAssignment
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var billingRoleAssignmentByDepartment = new AzureNative.Billing.BillingRoleAssignmentByDepartment("billingRoleAssignmentByDepartment", new()
 *     {
 *         BillingAccountName = "{billingAccountName}",
 *         BillingRoleAssignmentName = "{billingRoleAssignmentName}",
 *         DepartmentName = "{departmentName}",
 *         PrincipalId = "99a1a759-30dd-42c2-828c-db398826bb67",
 *         PrincipalTenantId = "7ca289b9-c32d-4f01-8566-7ff93261d76f",
 *         RoleDefinitionId = "/providers/Microsoft.Billing/billingAccounts/7898901/departments/97603/billingRoleDefinitions/fb2cf67f-be5b-42e7-8025-4683c668f840",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	billing "github.com/pulumi/pulumi-azure-native-sdk/billing/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := billing.NewBillingRoleAssignmentByDepartment(ctx, "billingRoleAssignmentByDepartment", &billing.BillingRoleAssignmentByDepartmentArgs{
 * 			BillingAccountName:        pulumi.String("{billingAccountName}"),
 * 			BillingRoleAssignmentName: pulumi.String("{billingRoleAssignmentName}"),
 * 			DepartmentName:            pulumi.String("{departmentName}"),
 * 			PrincipalId:               pulumi.String("99a1a759-30dd-42c2-828c-db398826bb67"),
 * 			PrincipalTenantId:         pulumi.String("7ca289b9-c32d-4f01-8566-7ff93261d76f"),
 * 			RoleDefinitionId:          pulumi.String("/providers/Microsoft.Billing/billingAccounts/7898901/departments/97603/billingRoleDefinitions/fb2cf67f-be5b-42e7-8025-4683c668f840"),
 * 		})
 * 		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.billing.BillingRoleAssignmentByDepartment;
 * import com.pulumi.azurenative.billing.BillingRoleAssignmentByDepartmentArgs;
 * 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 billingRoleAssignmentByDepartment = new BillingRoleAssignmentByDepartment("billingRoleAssignmentByDepartment", BillingRoleAssignmentByDepartmentArgs.builder()
 *             .billingAccountName("{billingAccountName}")
 *             .billingRoleAssignmentName("{billingRoleAssignmentName}")
 *             .departmentName("{departmentName}")
 *             .principalId("99a1a759-30dd-42c2-828c-db398826bb67")
 *             .principalTenantId("7ca289b9-c32d-4f01-8566-7ff93261d76f")
 *             .roleDefinitionId("/providers/Microsoft.Billing/billingAccounts/7898901/departments/97603/billingRoleDefinitions/fb2cf67f-be5b-42e7-8025-4683c668f840")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:billing:BillingRoleAssignmentByDepartment 9dfd08c2-62a3-4d47-85bd-1cdba1408402 /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/billingRoleAssignments/{billingRoleAssignmentName}
 * ```
 * @property billingAccountName The ID that uniquely identifies a billing account.
 * @property billingRoleAssignmentName The ID that uniquely identifies a role assignment.
 * @property departmentName The ID that uniquely identifies a department.
 * @property principalId The principal id of the user to whom the role was assigned.
 * @property principalTenantId The principal tenant id of the user to whom the role was assigned.
 * @property roleDefinitionId The ID of the role definition.
 * @property userAuthenticationType The authentication type of the user, whether Organization or MSA, of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
 * @property userEmailAddress The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
 */
public data class BillingRoleAssignmentByDepartmentArgs(
    public val billingAccountName: Output? = null,
    public val billingRoleAssignmentName: Output? = null,
    public val departmentName: Output? = null,
    public val principalId: Output? = null,
    public val principalTenantId: Output? = null,
    public val roleDefinitionId: Output? = null,
    public val userAuthenticationType: Output? = null,
    public val userEmailAddress: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.billing.BillingRoleAssignmentByDepartmentArgs =
        com.pulumi.azurenative.billing.BillingRoleAssignmentByDepartmentArgs.builder()
            .billingAccountName(billingAccountName?.applyValue({ args0 -> args0 }))
            .billingRoleAssignmentName(billingRoleAssignmentName?.applyValue({ args0 -> args0 }))
            .departmentName(departmentName?.applyValue({ args0 -> args0 }))
            .principalId(principalId?.applyValue({ args0 -> args0 }))
            .principalTenantId(principalTenantId?.applyValue({ args0 -> args0 }))
            .roleDefinitionId(roleDefinitionId?.applyValue({ args0 -> args0 }))
            .userAuthenticationType(userAuthenticationType?.applyValue({ args0 -> args0 }))
            .userEmailAddress(userEmailAddress?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BillingRoleAssignmentByDepartmentArgs].
 */
@PulumiTagMarker
public class BillingRoleAssignmentByDepartmentArgsBuilder internal constructor() {
    private var billingAccountName: Output? = null

    private var billingRoleAssignmentName: Output? = null

    private var departmentName: Output? = null

    private var principalId: Output? = null

    private var principalTenantId: Output? = null

    private var roleDefinitionId: Output? = null

    private var userAuthenticationType: Output? = null

    private var userEmailAddress: Output? = null

    /**
     * @param value The ID that uniquely identifies a billing account.
     */
    @JvmName("vnhbjavfwkclyrxy")
    public suspend fun billingAccountName(`value`: Output) {
        this.billingAccountName = value
    }

    /**
     * @param value The ID that uniquely identifies a role assignment.
     */
    @JvmName("femkdktigkemnhlq")
    public suspend fun billingRoleAssignmentName(`value`: Output) {
        this.billingRoleAssignmentName = value
    }

    /**
     * @param value The ID that uniquely identifies a department.
     */
    @JvmName("fdfwkyqljqdciegc")
    public suspend fun departmentName(`value`: Output) {
        this.departmentName = value
    }

    /**
     * @param value The principal id of the user to whom the role was assigned.
     */
    @JvmName("mjakbncpcutkgepi")
    public suspend fun principalId(`value`: Output) {
        this.principalId = value
    }

    /**
     * @param value The principal tenant id of the user to whom the role was assigned.
     */
    @JvmName("sykrlpdaqkqehste")
    public suspend fun principalTenantId(`value`: Output) {
        this.principalTenantId = value
    }

    /**
     * @param value The ID of the role definition.
     */
    @JvmName("maekttfkjerefgns")
    public suspend fun roleDefinitionId(`value`: Output) {
        this.roleDefinitionId = value
    }

    /**
     * @param value The authentication type of the user, whether Organization or MSA, of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
     */
    @JvmName("vapydiwfcuircrik")
    public suspend fun userAuthenticationType(`value`: Output) {
        this.userAuthenticationType = value
    }

    /**
     * @param value The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
     */
    @JvmName("vnnxbevfrhewgkqq")
    public suspend fun userEmailAddress(`value`: Output) {
        this.userEmailAddress = value
    }

    /**
     * @param value The ID that uniquely identifies a billing account.
     */
    @JvmName("sogidqxflsixwsdy")
    public suspend fun billingAccountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.billingAccountName = mapped
    }

    /**
     * @param value The ID that uniquely identifies a role assignment.
     */
    @JvmName("nvpypkuvksdeaaio")
    public suspend fun billingRoleAssignmentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.billingRoleAssignmentName = mapped
    }

    /**
     * @param value The ID that uniquely identifies a department.
     */
    @JvmName("siwovyvwswvujnpr")
    public suspend fun departmentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.departmentName = mapped
    }

    /**
     * @param value The principal id of the user to whom the role was assigned.
     */
    @JvmName("vphtpmeicqsejrao")
    public suspend fun principalId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.principalId = mapped
    }

    /**
     * @param value The principal tenant id of the user to whom the role was assigned.
     */
    @JvmName("hpqqvfmvimylbjug")
    public suspend fun principalTenantId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.principalTenantId = mapped
    }

    /**
     * @param value The ID of the role definition.
     */
    @JvmName("ysgfodmpjsinonae")
    public suspend fun roleDefinitionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleDefinitionId = mapped
    }

    /**
     * @param value The authentication type of the user, whether Organization or MSA, of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
     */
    @JvmName("tvakybduqjuomlsl")
    public suspend fun userAuthenticationType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userAuthenticationType = mapped
    }

    /**
     * @param value The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
     */
    @JvmName("fchexjthxjepqssc")
    public suspend fun userEmailAddress(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userEmailAddress = mapped
    }

    internal fun build(): BillingRoleAssignmentByDepartmentArgs =
        BillingRoleAssignmentByDepartmentArgs(
            billingAccountName = billingAccountName,
            billingRoleAssignmentName = billingRoleAssignmentName,
            departmentName = departmentName,
            principalId = principalId,
            principalTenantId = principalTenantId,
            roleDefinitionId = roleDefinitionId,
            userAuthenticationType = userAuthenticationType,
            userEmailAddress = userEmailAddress,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy