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

We recommend using Azure Native.

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

azure.billing.getMcaAccountScope

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 MCA Account billing scope.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.billing.getMcaAccountScope({
        billingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
        billingProfileName: "PE2Q-NOIT-BG7-TGB",
        invoiceSectionName: "MTT4-OBS7-PJA-TGB",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.billing.get_mca_account_scope(billing_account_name="e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
        billing_profile_name="PE2Q-NOIT-BG7-TGB",
        invoice_section_name="MTT4-OBS7-PJA-TGB")
    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.GetMcaAccountScope(ctx, &billing.GetMcaAccountScopeArgs{
    			BillingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
    			BillingProfileName: "PE2Q-NOIT-BG7-TGB",
    			InvoiceSectionName: "MTT4-OBS7-PJA-TGB",
    		}, 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.GetMcaAccountScope.Invoke(new()
        {
            BillingAccountName = "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
            BillingProfileName = "PE2Q-NOIT-BG7-TGB",
            InvoiceSectionName = "MTT4-OBS7-PJA-TGB",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getMcaAccountScopeResult => getMcaAccountScopeResult.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.GetMcaAccountScopeArgs;
    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.getMcaAccountScope(GetMcaAccountScopeArgs.builder()
                .billingAccountName("e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31")
                .billingProfileName("PE2Q-NOIT-BG7-TGB")
                .invoiceSectionName("MTT4-OBS7-PJA-TGB")
                .build());
    
            ctx.export("id", example.applyValue(getMcaAccountScopeResult -> getMcaAccountScopeResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:billing:getMcaAccountScope
          Arguments:
            billingAccountName: e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31
            billingProfileName: PE2Q-NOIT-BG7-TGB
            invoiceSectionName: MTT4-OBS7-PJA-TGB
    outputs:
      id: ${example.id}
    

    Using getMcaAccountScope

    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 getMcaAccountScope(args: GetMcaAccountScopeArgs, opts?: InvokeOptions): Promise<GetMcaAccountScopeResult>
    function getMcaAccountScopeOutput(args: GetMcaAccountScopeOutputArgs, opts?: InvokeOptions): Output<GetMcaAccountScopeResult>
    def get_mca_account_scope(billing_account_name: Optional[str] = None,
                              billing_profile_name: Optional[str] = None,
                              invoice_section_name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetMcaAccountScopeResult
    def get_mca_account_scope_output(billing_account_name: Optional[pulumi.Input[str]] = None,
                              billing_profile_name: Optional[pulumi.Input[str]] = None,
                              invoice_section_name: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetMcaAccountScopeResult]
    func GetMcaAccountScope(ctx *Context, args *GetMcaAccountScopeArgs, opts ...InvokeOption) (*GetMcaAccountScopeResult, error)
    func GetMcaAccountScopeOutput(ctx *Context, args *GetMcaAccountScopeOutputArgs, opts ...InvokeOption) GetMcaAccountScopeResultOutput

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

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

    The following arguments are supported:

    BillingAccountName string
    The Billing Account Name of the MCA account.
    BillingProfileName string
    The Billing Profile Name in the above Billing Account.
    InvoiceSectionName string
    The Invoice Section Name in the above Billing Profile.
    BillingAccountName string
    The Billing Account Name of the MCA account.
    BillingProfileName string
    The Billing Profile Name in the above Billing Account.
    InvoiceSectionName string
    The Invoice Section Name in the above Billing Profile.
    billingAccountName String
    The Billing Account Name of the MCA account.
    billingProfileName String
    The Billing Profile Name in the above Billing Account.
    invoiceSectionName String
    The Invoice Section Name in the above Billing Profile.
    billingAccountName string
    The Billing Account Name of the MCA account.
    billingProfileName string
    The Billing Profile Name in the above Billing Account.
    invoiceSectionName string
    The Invoice Section Name in the above Billing Profile.
    billing_account_name str
    The Billing Account Name of the MCA account.
    billing_profile_name str
    The Billing Profile Name in the above Billing Account.
    invoice_section_name str
    The Invoice Section Name in the above Billing Profile.
    billingAccountName String
    The Billing Account Name of the MCA account.
    billingProfileName String
    The Billing Profile Name in the above Billing Account.
    invoiceSectionName String
    The Invoice Section Name in the above Billing Profile.

    getMcaAccountScope Result

    The following output properties are available:

    BillingAccountName string
    BillingProfileName string
    Id string
    The provider-assigned unique ID for this managed resource.
    InvoiceSectionName string
    BillingAccountName string
    BillingProfileName string
    Id string
    The provider-assigned unique ID for this managed resource.
    InvoiceSectionName string
    billingAccountName String
    billingProfileName String
    id String
    The provider-assigned unique ID for this managed resource.
    invoiceSectionName String
    billingAccountName string
    billingProfileName string
    id string
    The provider-assigned unique ID for this managed resource.
    invoiceSectionName string
    billing_account_name str
    billing_profile_name str
    id str
    The provider-assigned unique ID for this managed resource.
    invoice_section_name str
    billingAccountName String
    billingProfileName String
    id String
    The provider-assigned unique ID for this managed resource.
    invoiceSectionName String

    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