azure-native.billing.BillingRoleAssignmentByEnrollmentAccount
Explore with Pulumi AI
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
PutEnrollmentAccountSubscriptionCreatorRoleAssignment
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() => 
{
    var billingRoleAssignmentByEnrollmentAccount = new AzureNative.Billing.BillingRoleAssignmentByEnrollmentAccount("billingRoleAssignmentByEnrollmentAccount", new()
    {
        BillingAccountName = "{billingAccountName}",
        BillingRoleAssignmentName = "{billingRoleAssignmentName}",
        EnrollmentAccountName = "{enrollmentAccountName}",
        PrincipalId = "99a1a759-30dd-42c2-828c-db398826bb67",
        PrincipalTenantId = "7ca289b9-c32d-4f01-8566-7ff93261d76f",
        RoleDefinitionId = "/providers/Microsoft.Billing/billingAccounts/7898901/enrollmentAccounts/225314/billingRoleDefinitions/a0bcee42-bf30-4d1b-926a-48d21664ef71",
    });
});
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.NewBillingRoleAssignmentByEnrollmentAccount(ctx, "billingRoleAssignmentByEnrollmentAccount", &billing.BillingRoleAssignmentByEnrollmentAccountArgs{
			BillingAccountName:        pulumi.String("{billingAccountName}"),
			BillingRoleAssignmentName: pulumi.String("{billingRoleAssignmentName}"),
			EnrollmentAccountName:     pulumi.String("{enrollmentAccountName}"),
			PrincipalId:               pulumi.String("99a1a759-30dd-42c2-828c-db398826bb67"),
			PrincipalTenantId:         pulumi.String("7ca289b9-c32d-4f01-8566-7ff93261d76f"),
			RoleDefinitionId:          pulumi.String("/providers/Microsoft.Billing/billingAccounts/7898901/enrollmentAccounts/225314/billingRoleDefinitions/a0bcee42-bf30-4d1b-926a-48d21664ef71"),
		})
		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.BillingRoleAssignmentByEnrollmentAccount;
import com.pulumi.azurenative.billing.BillingRoleAssignmentByEnrollmentAccountArgs;
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 billingRoleAssignmentByEnrollmentAccount = new BillingRoleAssignmentByEnrollmentAccount("billingRoleAssignmentByEnrollmentAccount", BillingRoleAssignmentByEnrollmentAccountArgs.builder()
            .billingAccountName("{billingAccountName}")
            .billingRoleAssignmentName("{billingRoleAssignmentName}")
            .enrollmentAccountName("{enrollmentAccountName}")
            .principalId("99a1a759-30dd-42c2-828c-db398826bb67")
            .principalTenantId("7ca289b9-c32d-4f01-8566-7ff93261d76f")
            .roleDefinitionId("/providers/Microsoft.Billing/billingAccounts/7898901/enrollmentAccounts/225314/billingRoleDefinitions/a0bcee42-bf30-4d1b-926a-48d21664ef71")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const billingRoleAssignmentByEnrollmentAccount = new azure_native.billing.BillingRoleAssignmentByEnrollmentAccount("billingRoleAssignmentByEnrollmentAccount", {
    billingAccountName: "{billingAccountName}",
    billingRoleAssignmentName: "{billingRoleAssignmentName}",
    enrollmentAccountName: "{enrollmentAccountName}",
    principalId: "99a1a759-30dd-42c2-828c-db398826bb67",
    principalTenantId: "7ca289b9-c32d-4f01-8566-7ff93261d76f",
    roleDefinitionId: "/providers/Microsoft.Billing/billingAccounts/7898901/enrollmentAccounts/225314/billingRoleDefinitions/a0bcee42-bf30-4d1b-926a-48d21664ef71",
});
import pulumi
import pulumi_azure_native as azure_native
billing_role_assignment_by_enrollment_account = azure_native.billing.BillingRoleAssignmentByEnrollmentAccount("billingRoleAssignmentByEnrollmentAccount",
    billing_account_name="{billingAccountName}",
    billing_role_assignment_name="{billingRoleAssignmentName}",
    enrollment_account_name="{enrollmentAccountName}",
    principal_id="99a1a759-30dd-42c2-828c-db398826bb67",
    principal_tenant_id="7ca289b9-c32d-4f01-8566-7ff93261d76f",
    role_definition_id="/providers/Microsoft.Billing/billingAccounts/7898901/enrollmentAccounts/225314/billingRoleDefinitions/a0bcee42-bf30-4d1b-926a-48d21664ef71")
resources:
  billingRoleAssignmentByEnrollmentAccount:
    type: azure-native:billing:BillingRoleAssignmentByEnrollmentAccount
    properties:
      billingAccountName: '{billingAccountName}'
      billingRoleAssignmentName: '{billingRoleAssignmentName}'
      enrollmentAccountName: '{enrollmentAccountName}'
      principalId: 99a1a759-30dd-42c2-828c-db398826bb67
      principalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
      roleDefinitionId: /providers/Microsoft.Billing/billingAccounts/7898901/enrollmentAccounts/225314/billingRoleDefinitions/a0bcee42-bf30-4d1b-926a-48d21664ef71
Create BillingRoleAssignmentByEnrollmentAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BillingRoleAssignmentByEnrollmentAccount(name: string, args: BillingRoleAssignmentByEnrollmentAccountArgs, opts?: CustomResourceOptions);@overload
def BillingRoleAssignmentByEnrollmentAccount(resource_name: str,
                                             args: BillingRoleAssignmentByEnrollmentAccountArgs,
                                             opts: Optional[ResourceOptions] = None)
@overload
def BillingRoleAssignmentByEnrollmentAccount(resource_name: str,
                                             opts: Optional[ResourceOptions] = None,
                                             billing_account_name: Optional[str] = None,
                                             enrollment_account_name: Optional[str] = None,
                                             billing_role_assignment_name: Optional[str] = None,
                                             principal_id: Optional[str] = None,
                                             principal_tenant_id: Optional[str] = None,
                                             role_definition_id: Optional[str] = None,
                                             user_authentication_type: Optional[str] = None,
                                             user_email_address: Optional[str] = None)func NewBillingRoleAssignmentByEnrollmentAccount(ctx *Context, name string, args BillingRoleAssignmentByEnrollmentAccountArgs, opts ...ResourceOption) (*BillingRoleAssignmentByEnrollmentAccount, error)public BillingRoleAssignmentByEnrollmentAccount(string name, BillingRoleAssignmentByEnrollmentAccountArgs args, CustomResourceOptions? opts = null)
public BillingRoleAssignmentByEnrollmentAccount(String name, BillingRoleAssignmentByEnrollmentAccountArgs args)
public BillingRoleAssignmentByEnrollmentAccount(String name, BillingRoleAssignmentByEnrollmentAccountArgs args, CustomResourceOptions options)
type: azure-native:billing:BillingRoleAssignmentByEnrollmentAccount
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BillingRoleAssignmentByEnrollmentAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BillingRoleAssignmentByEnrollmentAccountArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BillingRoleAssignmentByEnrollmentAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BillingRoleAssignmentByEnrollmentAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BillingRoleAssignmentByEnrollmentAccountArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var billingRoleAssignmentByEnrollmentAccountResource = new AzureNative.Billing.BillingRoleAssignmentByEnrollmentAccount("billingRoleAssignmentByEnrollmentAccountResource", new()
{
    BillingAccountName = "string",
    EnrollmentAccountName = "string",
    BillingRoleAssignmentName = "string",
    PrincipalId = "string",
    PrincipalTenantId = "string",
    RoleDefinitionId = "string",
    UserAuthenticationType = "string",
    UserEmailAddress = "string",
});
example, err := billing.NewBillingRoleAssignmentByEnrollmentAccount(ctx, "billingRoleAssignmentByEnrollmentAccountResource", &billing.BillingRoleAssignmentByEnrollmentAccountArgs{
	BillingAccountName:        pulumi.String("string"),
	EnrollmentAccountName:     pulumi.String("string"),
	BillingRoleAssignmentName: pulumi.String("string"),
	PrincipalId:               pulumi.String("string"),
	PrincipalTenantId:         pulumi.String("string"),
	RoleDefinitionId:          pulumi.String("string"),
	UserAuthenticationType:    pulumi.String("string"),
	UserEmailAddress:          pulumi.String("string"),
})
var billingRoleAssignmentByEnrollmentAccountResource = new BillingRoleAssignmentByEnrollmentAccount("billingRoleAssignmentByEnrollmentAccountResource", BillingRoleAssignmentByEnrollmentAccountArgs.builder()
    .billingAccountName("string")
    .enrollmentAccountName("string")
    .billingRoleAssignmentName("string")
    .principalId("string")
    .principalTenantId("string")
    .roleDefinitionId("string")
    .userAuthenticationType("string")
    .userEmailAddress("string")
    .build());
billing_role_assignment_by_enrollment_account_resource = azure_native.billing.BillingRoleAssignmentByEnrollmentAccount("billingRoleAssignmentByEnrollmentAccountResource",
    billing_account_name="string",
    enrollment_account_name="string",
    billing_role_assignment_name="string",
    principal_id="string",
    principal_tenant_id="string",
    role_definition_id="string",
    user_authentication_type="string",
    user_email_address="string")
const billingRoleAssignmentByEnrollmentAccountResource = new azure_native.billing.BillingRoleAssignmentByEnrollmentAccount("billingRoleAssignmentByEnrollmentAccountResource", {
    billingAccountName: "string",
    enrollmentAccountName: "string",
    billingRoleAssignmentName: "string",
    principalId: "string",
    principalTenantId: "string",
    roleDefinitionId: "string",
    userAuthenticationType: "string",
    userEmailAddress: "string",
});
type: azure-native:billing:BillingRoleAssignmentByEnrollmentAccount
properties:
    billingAccountName: string
    billingRoleAssignmentName: string
    enrollmentAccountName: string
    principalId: string
    principalTenantId: string
    roleDefinitionId: string
    userAuthenticationType: string
    userEmailAddress: string
BillingRoleAssignmentByEnrollmentAccount Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BillingRoleAssignmentByEnrollmentAccount resource accepts the following input properties:
- BillingAccount stringName 
- The ID that uniquely identifies a billing account.
- EnrollmentAccount stringName 
- The ID that uniquely identifies an enrollment account.
- BillingRole stringAssignment Name 
- The ID that uniquely identifies a role assignment.
- PrincipalId string
- The principal id of the user to whom the role was assigned.
- PrincipalTenant stringId 
- The principal tenant id of the user to whom the role was assigned.
- RoleDefinition stringId 
- The ID of the role definition.
- UserAuthentication stringType 
- 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.
- UserEmail stringAddress 
- The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
- BillingAccount stringName 
- The ID that uniquely identifies a billing account.
- EnrollmentAccount stringName 
- The ID that uniquely identifies an enrollment account.
- BillingRole stringAssignment Name 
- The ID that uniquely identifies a role assignment.
- PrincipalId string
- The principal id of the user to whom the role was assigned.
- PrincipalTenant stringId 
- The principal tenant id of the user to whom the role was assigned.
- RoleDefinition stringId 
- The ID of the role definition.
- UserAuthentication stringType 
- 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.
- UserEmail stringAddress 
- The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
- billingAccount StringName 
- The ID that uniquely identifies a billing account.
- enrollmentAccount StringName 
- The ID that uniquely identifies an enrollment account.
- billingRole StringAssignment Name 
- The ID that uniquely identifies a role assignment.
- principalId String
- The principal id of the user to whom the role was assigned.
- principalTenant StringId 
- The principal tenant id of the user to whom the role was assigned.
- roleDefinition StringId 
- The ID of the role definition.
- userAuthentication StringType 
- 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.
- userEmail StringAddress 
- The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
- billingAccount stringName 
- The ID that uniquely identifies a billing account.
- enrollmentAccount stringName 
- The ID that uniquely identifies an enrollment account.
- billingRole stringAssignment Name 
- The ID that uniquely identifies a role assignment.
- principalId string
- The principal id of the user to whom the role was assigned.
- principalTenant stringId 
- The principal tenant id of the user to whom the role was assigned.
- roleDefinition stringId 
- The ID of the role definition.
- userAuthentication stringType 
- 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.
- userEmail stringAddress 
- The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
- billing_account_ strname 
- The ID that uniquely identifies a billing account.
- enrollment_account_ strname 
- The ID that uniquely identifies an enrollment account.
- billing_role_ strassignment_ name 
- The ID that uniquely identifies a role assignment.
- principal_id str
- The principal id of the user to whom the role was assigned.
- principal_tenant_ strid 
- The principal tenant id of the user to whom the role was assigned.
- role_definition_ strid 
- The ID of the role definition.
- user_authentication_ strtype 
- 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.
- user_email_ straddress 
- The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
- billingAccount StringName 
- The ID that uniquely identifies a billing account.
- enrollmentAccount StringName 
- The ID that uniquely identifies an enrollment account.
- billingRole StringAssignment Name 
- The ID that uniquely identifies a role assignment.
- principalId String
- The principal id of the user to whom the role was assigned.
- principalTenant StringId 
- The principal tenant id of the user to whom the role was assigned.
- roleDefinition StringId 
- The ID of the role definition.
- userAuthentication StringType 
- 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.
- userEmail StringAddress 
- The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
Outputs
All input properties are implicitly available as output properties. Additionally, the BillingRoleAssignmentByEnrollmentAccount resource produces the following output properties:
- CreatedBy stringPrincipal Id 
- The principal Id of the user who created the role assignment.
- CreatedBy stringPrincipal Tenant Id 
- The tenant Id of the user who created the role assignment.
- CreatedBy stringUser Email Address 
- The email address of the user who created the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.
- CreatedOn string
- The date the role assignment was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- Scope string
- The scope at which the role was assigned.
- Type string
- Resource type.
- CreatedBy stringPrincipal Id 
- The principal Id of the user who created the role assignment.
- CreatedBy stringPrincipal Tenant Id 
- The tenant Id of the user who created the role assignment.
- CreatedBy stringUser Email Address 
- The email address of the user who created the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.
- CreatedOn string
- The date the role assignment was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- Scope string
- The scope at which the role was assigned.
- Type string
- Resource type.
- createdBy StringPrincipal Id 
- The principal Id of the user who created the role assignment.
- createdBy StringPrincipal Tenant Id 
- The tenant Id of the user who created the role assignment.
- createdBy StringUser Email Address 
- The email address of the user who created the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.
- createdOn String
- The date the role assignment was created.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- scope String
- The scope at which the role was assigned.
- type String
- Resource type.
- createdBy stringPrincipal Id 
- The principal Id of the user who created the role assignment.
- createdBy stringPrincipal Tenant Id 
- The tenant Id of the user who created the role assignment.
- createdBy stringUser Email Address 
- The email address of the user who created the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.
- createdOn string
- The date the role assignment was created.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Resource name.
- scope string
- The scope at which the role was assigned.
- type string
- Resource type.
- created_by_ strprincipal_ id 
- The principal Id of the user who created the role assignment.
- created_by_ strprincipal_ tenant_ id 
- The tenant Id of the user who created the role assignment.
- created_by_ struser_ email_ address 
- The email address of the user who created the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.
- created_on str
- The date the role assignment was created.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Resource name.
- scope str
- The scope at which the role was assigned.
- type str
- Resource type.
- createdBy StringPrincipal Id 
- The principal Id of the user who created the role assignment.
- createdBy StringPrincipal Tenant Id 
- The tenant Id of the user who created the role assignment.
- createdBy StringUser Email Address 
- The email address of the user who created the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.
- createdOn String
- The date the role assignment was created.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- scope String
- The scope at which the role was assigned.
- type String
- Resource type.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:billing:BillingRoleAssignmentByEnrollmentAccount 9dfd08c2-62a3-4d47-85bd-1cdba1408402 /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/billingRoleAssignments/{billingRoleAssignmentName} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0