Billing Role Assignment By Department
The role assignment API Version: 2019-10-01-preview.
Example Usage
PutEnrollmentDepartmentAdministratorRoleAssignment
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",
});
});
package main
import (
billing "github.com/pulumi/pulumi-azure-native-sdk/billing"
"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
})
}
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.
$ pulumi import azure-native:billing:BillingRoleAssignmentByDepartment 9dfd08c2-62a3-4d47-85bd-1cdba1408402 /providers/Microsoft.Billing/billingAccounts/7898901/departments/97603/billingRoleAssignments/9dfd08c2-62a3-4d47-85bd-1cdba1408402
Properties
The principal Id of the user who created the role assignment.
The tenant Id of the user who created the role assignment.
The email address of the user who created the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.
The principal id of the user to whom the role was assigned.
The principal tenant id of the user to whom the role was assigned.
The ID of the role definition.
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.
The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.