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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.billing.getEnrollmentAccountScope

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Use this data source to access information about an existing Enrollment Account Billing Scope.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.billing.getEnrollmentAccountScope({
    billingAccountName: "existing",
    enrollmentAccountName: "existing",
});
export const id = example.then(example => example.id);
Copy
import pulumi
import pulumi_azure as azure

example = azure.billing.get_enrollment_account_scope(billing_account_name="existing",
    enrollment_account_name="existing")
pulumi.export("id", example.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/billing"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := billing.GetEnrollmentAccountScope(ctx, &billing.GetEnrollmentAccountScopeArgs{
			BillingAccountName:    "existing",
			EnrollmentAccountName: "existing",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", example.Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.Billing.GetEnrollmentAccountScope.Invoke(new()
    {
        BillingAccountName = "existing",
        EnrollmentAccountName = "existing",
    });

    return new Dictionary<string, object?>
    {
        ["id"] = example.Apply(getEnrollmentAccountScopeResult => getEnrollmentAccountScopeResult.Id),
    };
});
Copy
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.GetEnrollmentAccountScopeArgs;
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.getEnrollmentAccountScope(GetEnrollmentAccountScopeArgs.builder()
            .billingAccountName("existing")
            .enrollmentAccountName("existing")
            .build());

        ctx.export("id", example.applyValue(getEnrollmentAccountScopeResult -> getEnrollmentAccountScopeResult.id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:billing:getEnrollmentAccountScope
      arguments:
        billingAccountName: existing
        enrollmentAccountName: existing
outputs:
  id: ${example.id}
Copy

Using getEnrollmentAccountScope

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 getEnrollmentAccountScope(args: GetEnrollmentAccountScopeArgs, opts?: InvokeOptions): Promise<GetEnrollmentAccountScopeResult>
function getEnrollmentAccountScopeOutput(args: GetEnrollmentAccountScopeOutputArgs, opts?: InvokeOptions): Output<GetEnrollmentAccountScopeResult>
Copy
def get_enrollment_account_scope(billing_account_name: Optional[str] = None,
                                 enrollment_account_name: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetEnrollmentAccountScopeResult
def get_enrollment_account_scope_output(billing_account_name: Optional[pulumi.Input[str]] = None,
                                 enrollment_account_name: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetEnrollmentAccountScopeResult]
Copy
func GetEnrollmentAccountScope(ctx *Context, args *GetEnrollmentAccountScopeArgs, opts ...InvokeOption) (*GetEnrollmentAccountScopeResult, error)
func GetEnrollmentAccountScopeOutput(ctx *Context, args *GetEnrollmentAccountScopeOutputArgs, opts ...InvokeOption) GetEnrollmentAccountScopeResultOutput
Copy

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

public static class GetEnrollmentAccountScope 
{
    public static Task<GetEnrollmentAccountScopeResult> InvokeAsync(GetEnrollmentAccountScopeArgs args, InvokeOptions? opts = null)
    public static Output<GetEnrollmentAccountScopeResult> Invoke(GetEnrollmentAccountScopeInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEnrollmentAccountScopeResult> getEnrollmentAccountScope(GetEnrollmentAccountScopeArgs args, InvokeOptions options)
public static Output<GetEnrollmentAccountScopeResult> getEnrollmentAccountScope(GetEnrollmentAccountScopeArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:billing/getEnrollmentAccountScope:getEnrollmentAccountScope
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

BillingAccountName This property is required. string
The Billing Account Name of the Enterprise Account.
EnrollmentAccountName This property is required. string
The Enrollment Account Name in the above Enterprise Account.
BillingAccountName This property is required. string
The Billing Account Name of the Enterprise Account.
EnrollmentAccountName This property is required. string
The Enrollment Account Name in the above Enterprise Account.
billingAccountName This property is required. String
The Billing Account Name of the Enterprise Account.
enrollmentAccountName This property is required. String
The Enrollment Account Name in the above Enterprise Account.
billingAccountName This property is required. string
The Billing Account Name of the Enterprise Account.
enrollmentAccountName This property is required. string
The Enrollment Account Name in the above Enterprise Account.
billing_account_name This property is required. str
The Billing Account Name of the Enterprise Account.
enrollment_account_name This property is required. str
The Enrollment Account Name in the above Enterprise Account.
billingAccountName This property is required. String
The Billing Account Name of the Enterprise Account.
enrollmentAccountName This property is required. String
The Enrollment Account Name in the above Enterprise Account.

getEnrollmentAccountScope Result

The following output properties are available:

BillingAccountName string
EnrollmentAccountName string
Id string
The provider-assigned unique ID for this managed resource.
BillingAccountName string
EnrollmentAccountName string
Id string
The provider-assigned unique ID for this managed resource.
billingAccountName String
enrollmentAccountName String
id String
The provider-assigned unique ID for this managed resource.
billingAccountName string
enrollmentAccountName string
id string
The provider-assigned unique ID for this managed resource.
billing_account_name str
enrollment_account_name str
id str
The provider-assigned unique ID for this managed resource.
billingAccountName String
enrollmentAccountName 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.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi