1. Packages
  2. Equinix
  3. API Docs
  4. networkedge
  5. getAccount
Equinix v0.11.2 published on Wednesday, Jun 26, 2024 by Equinix

equinix.networkedge.getAccount

Explore with Pulumi AI

equinix logo
Equinix v0.11.2 published on Wednesday, Jun 26, 2024 by Equinix

    Use this data source to get number and identifier of Equinix Network Edge billing account in a given metro location.

    Billing account reference is required to create Network Edge virtual device in corresponding metro location.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as equinix from "@pulumi/equinix";
    
    const dc = equinix.networkedge.getAccount({
        metroCode: "DC",
        status: "Active",
        projectId: "a86d7112-d740-4758-9c9c-31e66373746b",
    });
    export const number = dc.then(dc => dc.number);
    
    import pulumi
    import pulumi_equinix as equinix
    
    dc = equinix.networkedge.get_account(metro_code="DC",
        status="Active",
        project_id="a86d7112-d740-4758-9c9c-31e66373746b")
    pulumi.export("number", dc.number)
    
    package main
    
    import (
    	"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		dc, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{
    			MetroCode: "DC",
    			Status:    pulumi.StringRef("Active"),
    			ProjectId: pulumi.StringRef("a86d7112-d740-4758-9c9c-31e66373746b"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("number", dc.Number)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Equinix = Pulumi.Equinix;
    
    return await Deployment.RunAsync(() => 
    {
        var dc = Equinix.NetworkEdge.GetAccount.Invoke(new()
        {
            MetroCode = "DC",
            Status = "Active",
            ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b",
        });
    
        return new Dictionary<string, object?>
        {
            ["number"] = dc.Apply(getAccountResult => getAccountResult.Number),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.equinix.networkedge.NetworkedgeFunctions;
    import com.pulumi.equinix.networkedge.inputs.GetAccountArgs;
    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 dc = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()
                .metroCode("DC")
                .status("Active")
                .projectId("a86d7112-d740-4758-9c9c-31e66373746b")
                .build());
    
            ctx.export("number", dc.applyValue(getAccountResult -> getAccountResult.number()));
        }
    }
    
    variables:
      dc:
        fn::invoke:
          Function: equinix:networkedge:getAccount
          Arguments:
            metroCode: DC
            status: Active
            projectId: a86d7112-d740-4758-9c9c-31e66373746b
    outputs:
      number: ${dc.number}
    

    Using getAccount

    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 getAccount(args: GetAccountArgs, opts?: InvokeOptions): Promise<GetAccountResult>
    function getAccountOutput(args: GetAccountOutputArgs, opts?: InvokeOptions): Output<GetAccountResult>
    def get_account(metro_code: Optional[str] = None,
                    name: Optional[str] = None,
                    project_id: Optional[str] = None,
                    status: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetAccountResult
    def get_account_output(metro_code: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    project_id: Optional[pulumi.Input[str]] = None,
                    status: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetAccountResult]
    func GetAccount(ctx *Context, args *GetAccountArgs, opts ...InvokeOption) (*GetAccountResult, error)
    func GetAccountOutput(ctx *Context, args *GetAccountOutputArgs, opts ...InvokeOption) GetAccountResultOutput

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

    public static class GetAccount 
    {
        public static Task<GetAccountResult> InvokeAsync(GetAccountArgs args, InvokeOptions? opts = null)
        public static Output<GetAccountResult> Invoke(GetAccountInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccountResult> getAccount(GetAccountArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: equinix:networkedge/getAccount:getAccount
      arguments:
        # arguments dictionary

    The following arguments are supported:

    MetroCode string
    Account location metro code.
    Name string
    Account name for filtering.
    ProjectId string
    Unique Identifier for the project resource where the account is scoped to.If you leave it out, all the billing accounts under all projects in your organization will be returned and it may return more than one account.
    Status string
    Account status for filtering. Possible values are: Active, Processing, Submitted, Staged.
    MetroCode string
    Account location metro code.
    Name string
    Account name for filtering.
    ProjectId string
    Unique Identifier for the project resource where the account is scoped to.If you leave it out, all the billing accounts under all projects in your organization will be returned and it may return more than one account.
    Status string
    Account status for filtering. Possible values are: Active, Processing, Submitted, Staged.
    metroCode String
    Account location metro code.
    name String
    Account name for filtering.
    projectId String
    Unique Identifier for the project resource where the account is scoped to.If you leave it out, all the billing accounts under all projects in your organization will be returned and it may return more than one account.
    status String
    Account status for filtering. Possible values are: Active, Processing, Submitted, Staged.
    metroCode string
    Account location metro code.
    name string
    Account name for filtering.
    projectId string
    Unique Identifier for the project resource where the account is scoped to.If you leave it out, all the billing accounts under all projects in your organization will be returned and it may return more than one account.
    status string
    Account status for filtering. Possible values are: Active, Processing, Submitted, Staged.
    metro_code str
    Account location metro code.
    name str
    Account name for filtering.
    project_id str
    Unique Identifier for the project resource where the account is scoped to.If you leave it out, all the billing accounts under all projects in your organization will be returned and it may return more than one account.
    status str
    Account status for filtering. Possible values are: Active, Processing, Submitted, Staged.
    metroCode String
    Account location metro code.
    name String
    Account name for filtering.
    projectId String
    Unique Identifier for the project resource where the account is scoped to.If you leave it out, all the billing accounts under all projects in your organization will be returned and it may return more than one account.
    status String
    Account status for filtering. Possible values are: Active, Processing, Submitted, Staged.

    getAccount Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    MetroCode string
    Name string
    Number string
    Account unique number.
    ProjectId string
    Status string
    UcmId string
    Account unique identifier.
    Id string
    The provider-assigned unique ID for this managed resource.
    MetroCode string
    Name string
    Number string
    Account unique number.
    ProjectId string
    Status string
    UcmId string
    Account unique identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    metroCode String
    name String
    number String
    Account unique number.
    projectId String
    status String
    ucmId String
    Account unique identifier.
    id string
    The provider-assigned unique ID for this managed resource.
    metroCode string
    name string
    number string
    Account unique number.
    projectId string
    status string
    ucmId string
    Account unique identifier.
    id str
    The provider-assigned unique ID for this managed resource.
    metro_code str
    name str
    number str
    Account unique number.
    project_id str
    status str
    ucm_id str
    Account unique identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    metroCode String
    name String
    number String
    Account unique number.
    projectId String
    status String
    ucmId String
    Account unique identifier.

    Package Details

    Repository
    equinix equinix/pulumi-equinix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the equinix Terraform Provider.
    equinix logo
    Equinix v0.11.2 published on Wednesday, Jun 26, 2024 by Equinix