1. Packages
  2. Azure Classic
  3. API Docs
  4. billing
  5. getMpaAccountScope

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.billing.getMpaAccountScope

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Use this data source to access an ID for your MPA Account billing scope.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.billing.getMpaAccountScope({
        billingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
        customerName: "2281f543-7321-4cf9-1e23-edb4Oc31a31c",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.billing.get_mpa_account_scope(billing_account_name="e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
        customer_name="2281f543-7321-4cf9-1e23-edb4Oc31a31c")
    pulumi.export("id", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/billing"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := billing.GetMpaAccountScope(ctx, &billing.GetMpaAccountScopeArgs{
    			BillingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
    			CustomerName:       "2281f543-7321-4cf9-1e23-edb4Oc31a31c",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Billing.GetMpaAccountScope.Invoke(new()
        {
            BillingAccountName = "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
            CustomerName = "2281f543-7321-4cf9-1e23-edb4Oc31a31c",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getMpaAccountScopeResult => getMpaAccountScopeResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.billing.BillingFunctions;
    import com.pulumi.azure.billing.inputs.GetMpaAccountScopeArgs;
    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) {
            final var example = BillingFunctions.getMpaAccountScope(GetMpaAccountScopeArgs.builder()
                .billingAccountName("e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31")
                .customerName("2281f543-7321-4cf9-1e23-edb4Oc31a31c")
                .build());
    
            ctx.export("id", example.applyValue(getMpaAccountScopeResult -> getMpaAccountScopeResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:billing:getMpaAccountScope
          Arguments:
            billingAccountName: e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31
            customerName: 2281f543-7321-4cf9-1e23-edb4Oc31a31c
    outputs:
      id: ${example.id}
    

    Using getMpaAccountScope

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getMpaAccountScope(args: GetMpaAccountScopeArgs, opts?: InvokeOptions): Promise<GetMpaAccountScopeResult>
    function getMpaAccountScopeOutput(args: GetMpaAccountScopeOutputArgs, opts?: InvokeOptions): Output<GetMpaAccountScopeResult>
    def get_mpa_account_scope(billing_account_name: Optional[str] = None,
                              customer_name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetMpaAccountScopeResult
    def get_mpa_account_scope_output(billing_account_name: Optional[pulumi.Input[str]] = None,
                              customer_name: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetMpaAccountScopeResult]
    func GetMpaAccountScope(ctx *Context, args *GetMpaAccountScopeArgs, opts ...InvokeOption) (*GetMpaAccountScopeResult, error)
    func GetMpaAccountScopeOutput(ctx *Context, args *GetMpaAccountScopeOutputArgs, opts ...InvokeOption) GetMpaAccountScopeResultOutput

    > Note: This function is named GetMpaAccountScope in the Go SDK.

    public static class GetMpaAccountScope 
    {
        public static Task<GetMpaAccountScopeResult> InvokeAsync(GetMpaAccountScopeArgs args, InvokeOptions? opts = null)
        public static Output<GetMpaAccountScopeResult> Invoke(GetMpaAccountScopeInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMpaAccountScopeResult> getMpaAccountScope(GetMpaAccountScopeArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:billing/getMpaAccountScope:getMpaAccountScope
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BillingAccountName string
    The Billing Account Name of the MPA account.
    CustomerName string
    The Customer Name in the above Billing Account.
    BillingAccountName string
    The Billing Account Name of the MPA account.
    CustomerName string
    The Customer Name in the above Billing Account.
    billingAccountName String
    The Billing Account Name of the MPA account.
    customerName String
    The Customer Name in the above Billing Account.
    billingAccountName string
    The Billing Account Name of the MPA account.
    customerName string
    The Customer Name in the above Billing Account.
    billing_account_name str
    The Billing Account Name of the MPA account.
    customer_name str
    The Customer Name in the above Billing Account.
    billingAccountName String
    The Billing Account Name of the MPA account.
    customerName String
    The Customer Name in the above Billing Account.

    getMpaAccountScope Result

    The following output properties are available:

    BillingAccountName string
    CustomerName string
    Id string
    The provider-assigned unique ID for this managed resource.
    BillingAccountName string
    CustomerName string
    Id string
    The provider-assigned unique ID for this managed resource.
    billingAccountName String
    customerName String
    id String
    The provider-assigned unique ID for this managed resource.
    billingAccountName string
    customerName string
    id string
    The provider-assigned unique ID for this managed resource.
    billing_account_name str
    customer_name str
    id str
    The provider-assigned unique ID for this managed resource.
    billingAccountName String
    customerName String
    id String
    The provider-assigned unique ID for this managed resource.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi