Billing Role Assignment By Department
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",
},
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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}
Content copied to clipboard
Properties
Link copied to clipboard
The Azure API version of the resource.
Link copied to clipboard
The properties of the billing role assignment.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Azure Resource Manager metadata containing createdBy and modifiedBy information.