BillingRoleAssignmentByDepartmentArgs

data class BillingRoleAssignmentByDepartmentArgs(val billingAccountName: Output<String>? = null, val billingRoleAssignmentName: Output<String>? = null, val departmentName: Output<String>? = null, val properties: Output<BillingRoleAssignmentPropertiesArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<BillingRoleAssignmentByDepartmentArgs>

The properties of the billing role assignment. Uses Azure REST API version 2024-04-01. In version 2.x of the Azure Native provider, it used API version 2019-10-01-preview. Other available API versions: 2019-10-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native billing [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

BillingRoleAssignmentCreateOrUpdateByDepartment

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 = "7898901",
BillingRoleAssignmentName = "9dfd08c2-62a3-4d47-85bd-1cdba1408402",
DepartmentName = "12345",
Properties = new AzureNative.Billing.Inputs.BillingRoleAssignmentPropertiesArgs
{
PrincipalId = "00000000-0000-0000-0000-000000000000",
PrincipalTenantId = "076915e7-de10-4323-bb34-a58c904068bb",
RoleDefinitionId = "/providers/Microsoft.Billing/billingAccounts/7898901/departments/12345/billingRoleDefinitions/9f1983cb-2574-400c-87e9-34cf8e2280db",
UserEmailAddress = "john@contoso.com",
},
});
});
package main
import (
billing "github.com/pulumi/pulumi-azure-native-sdk/billing/v3"
"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("7898901"),
BillingRoleAssignmentName: pulumi.String("9dfd08c2-62a3-4d47-85bd-1cdba1408402"),
DepartmentName: pulumi.String("12345"),
Properties: &billing.BillingRoleAssignmentPropertiesArgs{
PrincipalId: pulumi.String("00000000-0000-0000-0000-000000000000"),
PrincipalTenantId: pulumi.String("076915e7-de10-4323-bb34-a58c904068bb"),
RoleDefinitionId: pulumi.String("/providers/Microsoft.Billing/billingAccounts/7898901/departments/12345/billingRoleDefinitions/9f1983cb-2574-400c-87e9-34cf8e2280db"),
UserEmailAddress: pulumi.String("john@contoso.com"),
},
})
if err != nil {
return err
}
return nil
})
}
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 com.pulumi.azurenative.billing.inputs.BillingRoleAssignmentPropertiesArgs;
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("7898901")
.billingRoleAssignmentName("9dfd08c2-62a3-4d47-85bd-1cdba1408402")
.departmentName("12345")
.properties(BillingRoleAssignmentPropertiesArgs.builder()
.principalId("00000000-0000-0000-0000-000000000000")
.principalTenantId("076915e7-de10-4323-bb34-a58c904068bb")
.roleDefinitionId("/providers/Microsoft.Billing/billingAccounts/7898901/departments/12345/billingRoleDefinitions/9f1983cb-2574-400c-87e9-34cf8e2280db")
.userEmailAddress("john@contoso.com")
.build())
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:billing:BillingRoleAssignmentByDepartment 9dfd08c2-62a3-4d47-85bd-1cdba1408402 /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/billingRoleAssignments/{billingRoleAssignmentName}

Constructors

Link copied to clipboard
constructor(billingAccountName: Output<String>? = null, billingRoleAssignmentName: Output<String>? = null, departmentName: Output<String>? = null, properties: Output<BillingRoleAssignmentPropertiesArgs>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val billingAccountName: Output<String>? = null

The ID that uniquely identifies a billing account.

Link copied to clipboard
val billingRoleAssignmentName: Output<String>? = null

The ID that uniquely identifies a role assignment.

Link copied to clipboard
val departmentName: Output<String>? = null

The name of the department.

Link copied to clipboard

The properties of the billing role assignment.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < % & \ ? /

Functions

Link copied to clipboard
open override fun toJava(): BillingRoleAssignmentByDepartmentArgs