1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. getAccount
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.getAccount

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    # flexibleengine.getAccount

    Use this data source to get information about the current account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const current = flexibleengine.getAccount({});
    export const currentAccountId = current.then(current => current.id);
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    current = flexibleengine.get_account()
    pulumi.export("currentAccountId", current.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		current, err := flexibleengine.GetAccount(ctx, &flexibleengine.GetAccountArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("currentAccountId", current.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Flexibleengine.GetAccount.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["currentAccountId"] = current.Apply(getAccountResult => getAccountResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.FlexibleengineFunctions;
    import com.pulumi.flexibleengine.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 current = FlexibleengineFunctions.getAccount();
    
            ctx.export("currentAccountId", current.applyValue(getAccountResult -> getAccountResult.id()));
        }
    }
    
    variables:
      current:
        fn::invoke:
          function: flexibleengine:getAccount
          arguments: {}
    outputs:
      currentAccountId: ${current.id}
    

    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(id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetAccountResult
    def get_account_output(id: 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)
    public static Output<GetAccountResult> getAccount(GetAccountArgs args, InvokeOptions options)
    
    fn::invoke:
      function: flexibleengine:index/getAccount:getAccount
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The account ID.
    Id string
    The account ID.
    id String
    The account ID.
    id string
    The account ID.
    id str
    The account ID.
    id String
    The account ID.

    getAccount Result

    The following output properties are available:

    Id string
    The account ID.
    Name string
    The account name.
    Id string
    The account ID.
    Name string
    The account name.
    id String
    The account ID.
    name String
    The account name.
    id string
    The account ID.
    name string
    The account name.
    id str
    The account ID.
    name str
    The account name.
    id String
    The account ID.
    name String
    The account name.

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud