1. Packages
  2. Azure Native v1
  3. API Docs
  4. billing
  5. BillingRoleAssignmentByBillingAccount
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.billing.BillingRoleAssignmentByBillingAccount

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    The role assignment API Version: 2019-10-01-preview.

    Example Usage

    PutEnrollmentAdministratorRoleAssignment

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var billingRoleAssignmentByBillingAccount = new AzureNative.Billing.BillingRoleAssignmentByBillingAccount("billingRoleAssignmentByBillingAccount", new()
        {
            BillingAccountName = "{billingAccountName}",
            BillingRoleAssignmentName = "{billingRoleAssignmentName}",
            PrincipalId = "99a1a759-30dd-42c2-828c-db398826bb67",
            PrincipalTenantId = "7ca289b9-c32d-4f01-8566-7ff93261d76f",
            RoleDefinitionId = "/providers/Microsoft.Billing/billingAccounts/7898901/billingRoleDefinitions/9f1983cb-2574-400c-87e9-34cf8e2280db",
        });
    
    });
    
    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.NewBillingRoleAssignmentByBillingAccount(ctx, "billingRoleAssignmentByBillingAccount", &billing.BillingRoleAssignmentByBillingAccountArgs{
    			BillingAccountName:        pulumi.String("{billingAccountName}"),
    			BillingRoleAssignmentName: pulumi.String("{billingRoleAssignmentName}"),
    			PrincipalId:               pulumi.String("99a1a759-30dd-42c2-828c-db398826bb67"),
    			PrincipalTenantId:         pulumi.String("7ca289b9-c32d-4f01-8566-7ff93261d76f"),
    			RoleDefinitionId:          pulumi.String("/providers/Microsoft.Billing/billingAccounts/7898901/billingRoleDefinitions/9f1983cb-2574-400c-87e9-34cf8e2280db"),
    		})
    		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.BillingRoleAssignmentByBillingAccount;
    import com.pulumi.azurenative.billing.BillingRoleAssignmentByBillingAccountArgs;
    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 billingRoleAssignmentByBillingAccount = new BillingRoleAssignmentByBillingAccount("billingRoleAssignmentByBillingAccount", BillingRoleAssignmentByBillingAccountArgs.builder()        
                .billingAccountName("{billingAccountName}")
                .billingRoleAssignmentName("{billingRoleAssignmentName}")
                .principalId("99a1a759-30dd-42c2-828c-db398826bb67")
                .principalTenantId("7ca289b9-c32d-4f01-8566-7ff93261d76f")
                .roleDefinitionId("/providers/Microsoft.Billing/billingAccounts/7898901/billingRoleDefinitions/9f1983cb-2574-400c-87e9-34cf8e2280db")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    billing_role_assignment_by_billing_account = azure_native.billing.BillingRoleAssignmentByBillingAccount("billingRoleAssignmentByBillingAccount",
        billing_account_name="{billingAccountName}",
        billing_role_assignment_name="{billingRoleAssignmentName}",
        principal_id="99a1a759-30dd-42c2-828c-db398826bb67",
        principal_tenant_id="7ca289b9-c32d-4f01-8566-7ff93261d76f",
        role_definition_id="/providers/Microsoft.Billing/billingAccounts/7898901/billingRoleDefinitions/9f1983cb-2574-400c-87e9-34cf8e2280db")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const billingRoleAssignmentByBillingAccount = new azure_native.billing.BillingRoleAssignmentByBillingAccount("billingRoleAssignmentByBillingAccount", {
        billingAccountName: "{billingAccountName}",
        billingRoleAssignmentName: "{billingRoleAssignmentName}",
        principalId: "99a1a759-30dd-42c2-828c-db398826bb67",
        principalTenantId: "7ca289b9-c32d-4f01-8566-7ff93261d76f",
        roleDefinitionId: "/providers/Microsoft.Billing/billingAccounts/7898901/billingRoleDefinitions/9f1983cb-2574-400c-87e9-34cf8e2280db",
    });
    
    resources:
      billingRoleAssignmentByBillingAccount:
        type: azure-native:billing:BillingRoleAssignmentByBillingAccount
        properties:
          billingAccountName: '{billingAccountName}'
          billingRoleAssignmentName: '{billingRoleAssignmentName}'
          principalId: 99a1a759-30dd-42c2-828c-db398826bb67
          principalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
          roleDefinitionId: /providers/Microsoft.Billing/billingAccounts/7898901/billingRoleDefinitions/9f1983cb-2574-400c-87e9-34cf8e2280db
    

    Create BillingRoleAssignmentByBillingAccount Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BillingRoleAssignmentByBillingAccount(name: string, args: BillingRoleAssignmentByBillingAccountArgs, opts?: CustomResourceOptions);
    @overload
    def BillingRoleAssignmentByBillingAccount(resource_name: str,
                                              args: BillingRoleAssignmentByBillingAccountArgs,
                                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def BillingRoleAssignmentByBillingAccount(resource_name: str,
                                              opts: Optional[ResourceOptions] = None,
                                              billing_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 NewBillingRoleAssignmentByBillingAccount(ctx *Context, name string, args BillingRoleAssignmentByBillingAccountArgs, opts ...ResourceOption) (*BillingRoleAssignmentByBillingAccount, error)
    public BillingRoleAssignmentByBillingAccount(string name, BillingRoleAssignmentByBillingAccountArgs args, CustomResourceOptions? opts = null)
    public BillingRoleAssignmentByBillingAccount(String name, BillingRoleAssignmentByBillingAccountArgs args)
    public BillingRoleAssignmentByBillingAccount(String name, BillingRoleAssignmentByBillingAccountArgs args, CustomResourceOptions options)
    
    type: azure-native:billing:BillingRoleAssignmentByBillingAccount
    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 BillingRoleAssignmentByBillingAccountArgs
    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 BillingRoleAssignmentByBillingAccountArgs
    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 BillingRoleAssignmentByBillingAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BillingRoleAssignmentByBillingAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BillingRoleAssignmentByBillingAccountArgs
    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 billingRoleAssignmentByBillingAccountResource = new AzureNative.Billing.BillingRoleAssignmentByBillingAccount("billingRoleAssignmentByBillingAccountResource", new()
    {
        BillingAccountName = "string",
        BillingRoleAssignmentName = "string",
        PrincipalId = "string",
        PrincipalTenantId = "string",
        RoleDefinitionId = "string",
        UserAuthenticationType = "string",
        UserEmailAddress = "string",
    });
    
    example, err := billing.NewBillingRoleAssignmentByBillingAccount(ctx, "billingRoleAssignmentByBillingAccountResource", &billing.BillingRoleAssignmentByBillingAccountArgs{
    	BillingAccountName:        "string",
    	BillingRoleAssignmentName: "string",
    	PrincipalId:               "string",
    	PrincipalTenantId:         "string",
    	RoleDefinitionId:          "string",
    	UserAuthenticationType:    "string",
    	UserEmailAddress:          "string",
    })
    
    var billingRoleAssignmentByBillingAccountResource = new BillingRoleAssignmentByBillingAccount("billingRoleAssignmentByBillingAccountResource", BillingRoleAssignmentByBillingAccountArgs.builder()
        .billingAccountName("string")
        .billingRoleAssignmentName("string")
        .principalId("string")
        .principalTenantId("string")
        .roleDefinitionId("string")
        .userAuthenticationType("string")
        .userEmailAddress("string")
        .build());
    
    billing_role_assignment_by_billing_account_resource = azure_native.billing.BillingRoleAssignmentByBillingAccount("billingRoleAssignmentByBillingAccountResource",
        billing_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 billingRoleAssignmentByBillingAccountResource = new azure_native.billing.BillingRoleAssignmentByBillingAccount("billingRoleAssignmentByBillingAccountResource", {
        billingAccountName: "string",
        billingRoleAssignmentName: "string",
        principalId: "string",
        principalTenantId: "string",
        roleDefinitionId: "string",
        userAuthenticationType: "string",
        userEmailAddress: "string",
    });
    
    type: azure-native:billing:BillingRoleAssignmentByBillingAccount
    properties:
        billingAccountName: string
        billingRoleAssignmentName: string
        principalId: string
        principalTenantId: string
        roleDefinitionId: string
        userAuthenticationType: string
        userEmailAddress: string
    

    BillingRoleAssignmentByBillingAccount 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 BillingRoleAssignmentByBillingAccount resource accepts the following input properties:

    BillingAccountName string
    The ID that uniquely identifies a billing account.
    BillingRoleAssignmentName string
    The ID that uniquely identifies a role assignment.
    PrincipalId string
    The principal id of the user to whom the role was assigned.
    PrincipalTenantId string
    The principal tenant id of the user to whom the role was assigned.
    RoleDefinitionId string
    The ID of the role definition.
    UserAuthenticationType string
    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.
    UserEmailAddress string
    The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
    BillingAccountName string
    The ID that uniquely identifies a billing account.
    BillingRoleAssignmentName string
    The ID that uniquely identifies a role assignment.
    PrincipalId string
    The principal id of the user to whom the role was assigned.
    PrincipalTenantId string
    The principal tenant id of the user to whom the role was assigned.
    RoleDefinitionId string
    The ID of the role definition.
    UserAuthenticationType string
    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.
    UserEmailAddress string
    The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
    billingAccountName String
    The ID that uniquely identifies a billing account.
    billingRoleAssignmentName String
    The ID that uniquely identifies a role assignment.
    principalId String
    The principal id of the user to whom the role was assigned.
    principalTenantId String
    The principal tenant id of the user to whom the role was assigned.
    roleDefinitionId String
    The ID of the role definition.
    userAuthenticationType String
    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.
    userEmailAddress String
    The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
    billingAccountName string
    The ID that uniquely identifies a billing account.
    billingRoleAssignmentName string
    The ID that uniquely identifies a role assignment.
    principalId string
    The principal id of the user to whom the role was assigned.
    principalTenantId string
    The principal tenant id of the user to whom the role was assigned.
    roleDefinitionId string
    The ID of the role definition.
    userAuthenticationType string
    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.
    userEmailAddress string
    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_name str
    The ID that uniquely identifies a billing account.
    billing_role_assignment_name str
    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_id str
    The principal tenant id of the user to whom the role was assigned.
    role_definition_id str
    The ID of the role definition.
    user_authentication_type str
    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_address str
    The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
    billingAccountName String
    The ID that uniquely identifies a billing account.
    billingRoleAssignmentName String
    The ID that uniquely identifies a role assignment.
    principalId String
    The principal id of the user to whom the role was assigned.
    principalTenantId String
    The principal tenant id of the user to whom the role was assigned.
    roleDefinitionId String
    The ID of the role definition.
    userAuthenticationType String
    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.
    userEmailAddress String
    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 BillingRoleAssignmentByBillingAccount resource produces the following output properties:

    CreatedByPrincipalId string
    The principal Id of the user who created the role assignment.
    CreatedByPrincipalTenantId string
    The tenant Id of the user who created the role assignment.
    CreatedByUserEmailAddress string
    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.
    CreatedByPrincipalId string
    The principal Id of the user who created the role assignment.
    CreatedByPrincipalTenantId string
    The tenant Id of the user who created the role assignment.
    CreatedByUserEmailAddress string
    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.
    createdByPrincipalId String
    The principal Id of the user who created the role assignment.
    createdByPrincipalTenantId String
    The tenant Id of the user who created the role assignment.
    createdByUserEmailAddress String
    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.
    createdByPrincipalId string
    The principal Id of the user who created the role assignment.
    createdByPrincipalTenantId string
    The tenant Id of the user who created the role assignment.
    createdByUserEmailAddress string
    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_principal_id str
    The principal Id of the user who created the role assignment.
    created_by_principal_tenant_id str
    The tenant Id of the user who created the role assignment.
    created_by_user_email_address str
    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.
    createdByPrincipalId String
    The principal Id of the user who created the role assignment.
    createdByPrincipalTenantId String
    The tenant Id of the user who created the role assignment.
    createdByUserEmailAddress String
    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:BillingRoleAssignmentByBillingAccount 9dfd08c2-62a3-4d47-85bd-1cdba1408402 /providers/Microsoft.Billing/billingAccounts/7898901/billingRoleAssignments/9dfd08c2-62a3-4d47-85bd-1cdba1408402 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi