1. Packages
  2. Vultr
  3. API Docs
  4. getAccount
Vultr v2.20.1 published on Sunday, Jun 9, 2024 by dirien

vultr.getAccount

Explore with Pulumi AI

vultr logo
Vultr v2.20.1 published on Sunday, Jun 9, 2024 by dirien

    Get information about your Vultr account. This data source provides the balance, pending charges, last payment date, and last payment amount for your Vultr account.

    Example Usage

    Get the information for an account:

    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@pulumi/vultr";
    
    const myAccount = vultr.getAccount({});
    
    import pulumi
    import pulumi_vultr as vultr
    
    my_account = vultr.get_account()
    
    package main
    
    import (
    	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vultr.GetAccount(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vultr = Pulumi.Vultr;
    
    return await Deployment.RunAsync(() => 
    {
        var myAccount = Vultr.GetAccount.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vultr.VultrFunctions;
    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 myAccount = VultrFunctions.getAccount();
    
        }
    }
    
    variables:
      myAccount:
        fn::invoke:
          Function: vultr:getAccount
          Arguments: {}
    

    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(opts?: InvokeOptions): Promise<GetAccountResult>
    function getAccountOutput(opts?: InvokeOptions): Output<GetAccountResult>
    def get_account(opts: Optional[InvokeOptions] = None) -> GetAccountResult
    def get_account_output(opts: Optional[InvokeOptions] = None) -> Output[GetAccountResult]
    func GetAccount(ctx *Context, opts ...InvokeOption) (*GetAccountResult, error)
    func GetAccountOutput(ctx *Context, opts ...InvokeOption) GetAccountResultOutput

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

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

    getAccount Result

    The following output properties are available:

    Acls List<string>
    The access control list on your Vultr account.
    Balance double
    The current balance on your Vultr account.
    Email string
    The email address on your Vultr account.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastPaymentAmount double
    The amount of the last payment made on your Vultr account.
    LastPaymentDate string
    The date of the last payment made on your Vultr account.
    Name string
    The name on your Vultr account.
    PendingCharges double
    The pending charges on your Vultr account.
    Acls []string
    The access control list on your Vultr account.
    Balance float64
    The current balance on your Vultr account.
    Email string
    The email address on your Vultr account.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastPaymentAmount float64
    The amount of the last payment made on your Vultr account.
    LastPaymentDate string
    The date of the last payment made on your Vultr account.
    Name string
    The name on your Vultr account.
    PendingCharges float64
    The pending charges on your Vultr account.
    acls List<String>
    The access control list on your Vultr account.
    balance Double
    The current balance on your Vultr account.
    email String
    The email address on your Vultr account.
    id String
    The provider-assigned unique ID for this managed resource.
    lastPaymentAmount Double
    The amount of the last payment made on your Vultr account.
    lastPaymentDate String
    The date of the last payment made on your Vultr account.
    name String
    The name on your Vultr account.
    pendingCharges Double
    The pending charges on your Vultr account.
    acls string[]
    The access control list on your Vultr account.
    balance number
    The current balance on your Vultr account.
    email string
    The email address on your Vultr account.
    id string
    The provider-assigned unique ID for this managed resource.
    lastPaymentAmount number
    The amount of the last payment made on your Vultr account.
    lastPaymentDate string
    The date of the last payment made on your Vultr account.
    name string
    The name on your Vultr account.
    pendingCharges number
    The pending charges on your Vultr account.
    acls Sequence[str]
    The access control list on your Vultr account.
    balance float
    The current balance on your Vultr account.
    email str
    The email address on your Vultr account.
    id str
    The provider-assigned unique ID for this managed resource.
    last_payment_amount float
    The amount of the last payment made on your Vultr account.
    last_payment_date str
    The date of the last payment made on your Vultr account.
    name str
    The name on your Vultr account.
    pending_charges float
    The pending charges on your Vultr account.
    acls List<String>
    The access control list on your Vultr account.
    balance Number
    The current balance on your Vultr account.
    email String
    The email address on your Vultr account.
    id String
    The provider-assigned unique ID for this managed resource.
    lastPaymentAmount Number
    The amount of the last payment made on your Vultr account.
    lastPaymentDate String
    The date of the last payment made on your Vultr account.
    name String
    The name on your Vultr account.
    pendingCharges Number
    The pending charges on your Vultr account.

    Package Details

    Repository
    vultr dirien/pulumi-vultr
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vultr Terraform Provider.
    vultr logo
    Vultr v2.20.1 published on Sunday, Jun 9, 2024 by dirien