1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getAccount
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.getAccount

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleAccount = cloudflare.getAccount({
        accountId: "eb78d65290b24279ba6f44721b3ea3c4",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_account = cloudflare.get_account(account_id="eb78d65290b24279ba6f44721b3ea3c4")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.LookupAccount(ctx, &cloudflare.LookupAccountArgs{
    			AccountId: pulumi.StringRef("eb78d65290b24279ba6f44721b3ea3c4"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleAccount = Cloudflare.GetAccount.Invoke(new()
        {
            AccountId = "eb78d65290b24279ba6f44721b3ea3c4",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.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 exampleAccount = CloudflareFunctions.getAccount(GetAccountArgs.builder()
                .accountId("eb78d65290b24279ba6f44721b3ea3c4")
                .build());
    
        }
    }
    
    variables:
      exampleAccount:
        fn::invoke:
          function: cloudflare:getAccount
          arguments:
            accountId: eb78d65290b24279ba6f44721b3ea3c4
    

    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(account_id: Optional[str] = None,
                    filter: Optional[GetAccountFilter] = None,
                    opts: Optional[InvokeOptions] = None) -> GetAccountResult
    def get_account_output(account_id: Optional[pulumi.Input[str]] = None,
                    filter: Optional[pulumi.Input[GetAccountFilterArgs]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetAccountResult]
    func LookupAccount(ctx *Context, args *LookupAccountArgs, opts ...InvokeOption) (*LookupAccountResult, error)
    func LookupAccountOutput(ctx *Context, args *LookupAccountOutputArgs, opts ...InvokeOption) LookupAccountResultOutput

    > Note: This function is named LookupAccount 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: cloudflare:index/getAccount:getAccount
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Account identifier tag.
    Filter GetAccountFilter
    AccountId string
    Account identifier tag.
    Filter GetAccountFilter
    accountId String
    Account identifier tag.
    filter GetAccountFilter
    accountId string
    Account identifier tag.
    filter GetAccountFilter
    account_id str
    Account identifier tag.
    filter GetAccountFilter
    accountId String
    Account identifier tag.
    filter Property Map

    getAccount Result

    The following output properties are available:

    CreatedOn string
    Timestamp for the creation of the account
    Id string
    Account identifier tag.
    Name string
    Account name
    Settings GetAccountSettings
    Account settings
    AccountId string
    Account identifier tag.
    Filter GetAccountFilter
    CreatedOn string
    Timestamp for the creation of the account
    Id string
    Account identifier tag.
    Name string
    Account name
    Settings GetAccountSettings
    Account settings
    AccountId string
    Account identifier tag.
    Filter GetAccountFilter
    createdOn String
    Timestamp for the creation of the account
    id String
    Account identifier tag.
    name String
    Account name
    settings GetAccountSettings
    Account settings
    accountId String
    Account identifier tag.
    filter GetAccountFilter
    createdOn string
    Timestamp for the creation of the account
    id string
    Account identifier tag.
    name string
    Account name
    settings GetAccountSettings
    Account settings
    accountId string
    Account identifier tag.
    filter GetAccountFilter
    created_on str
    Timestamp for the creation of the account
    id str
    Account identifier tag.
    name str
    Account name
    settings GetAccountSettings
    Account settings
    account_id str
    Account identifier tag.
    filter GetAccountFilter
    createdOn String
    Timestamp for the creation of the account
    id String
    Account identifier tag.
    name String
    Account name
    settings Property Map
    Account settings
    accountId String
    Account identifier tag.
    filter Property Map

    Supporting Types

    GetAccountFilter

    Direction string
    Direction to order results. Available values: "asc", "desc".
    Name string
    Name of the account.
    Direction string
    Direction to order results. Available values: "asc", "desc".
    Name string
    Name of the account.
    direction String
    Direction to order results. Available values: "asc", "desc".
    name String
    Name of the account.
    direction string
    Direction to order results. Available values: "asc", "desc".
    name string
    Name of the account.
    direction str
    Direction to order results. Available values: "asc", "desc".
    name str
    Name of the account.
    direction String
    Direction to order results. Available values: "asc", "desc".
    name String
    Name of the account.

    GetAccountSettings

    AbuseContactEmail string
    Sets an abuse contact email to notify for abuse reports.
    DefaultNameservers string
    Specifies the default nameservers to be used for new zones added to this account.

    Deprecated: This attribute is deprecated.

    EnforceTwofactor bool
    Indicates whether membership in this account requires that Two-Factor Authentication is enabled
    UseAccountCustomNsByDefault bool

    Indicates whether new zones should use the account-level custom nameservers by default.

    Deprecated in favor of DNS Settings.

    Deprecated: This attribute is deprecated.

    AbuseContactEmail string
    Sets an abuse contact email to notify for abuse reports.
    DefaultNameservers string
    Specifies the default nameservers to be used for new zones added to this account.

    Deprecated: This attribute is deprecated.

    EnforceTwofactor bool
    Indicates whether membership in this account requires that Two-Factor Authentication is enabled
    UseAccountCustomNsByDefault bool

    Indicates whether new zones should use the account-level custom nameservers by default.

    Deprecated in favor of DNS Settings.

    Deprecated: This attribute is deprecated.

    abuseContactEmail String
    Sets an abuse contact email to notify for abuse reports.
    defaultNameservers String
    Specifies the default nameservers to be used for new zones added to this account.

    Deprecated: This attribute is deprecated.

    enforceTwofactor Boolean
    Indicates whether membership in this account requires that Two-Factor Authentication is enabled
    useAccountCustomNsByDefault Boolean

    Indicates whether new zones should use the account-level custom nameservers by default.

    Deprecated in favor of DNS Settings.

    Deprecated: This attribute is deprecated.

    abuseContactEmail string
    Sets an abuse contact email to notify for abuse reports.
    defaultNameservers string
    Specifies the default nameservers to be used for new zones added to this account.

    Deprecated: This attribute is deprecated.

    enforceTwofactor boolean
    Indicates whether membership in this account requires that Two-Factor Authentication is enabled
    useAccountCustomNsByDefault boolean

    Indicates whether new zones should use the account-level custom nameservers by default.

    Deprecated in favor of DNS Settings.

    Deprecated: This attribute is deprecated.

    abuse_contact_email str
    Sets an abuse contact email to notify for abuse reports.
    default_nameservers str
    Specifies the default nameservers to be used for new zones added to this account.

    Deprecated: This attribute is deprecated.

    enforce_twofactor bool
    Indicates whether membership in this account requires that Two-Factor Authentication is enabled
    use_account_custom_ns_by_default bool

    Indicates whether new zones should use the account-level custom nameservers by default.

    Deprecated in favor of DNS Settings.

    Deprecated: This attribute is deprecated.

    abuseContactEmail String
    Sets an abuse contact email to notify for abuse reports.
    defaultNameservers String
    Specifies the default nameservers to be used for new zones added to this account.

    Deprecated: This attribute is deprecated.

    enforceTwofactor Boolean
    Indicates whether membership in this account requires that Two-Factor Authentication is enabled
    useAccountCustomNsByDefault Boolean

    Indicates whether new zones should use the account-level custom nameservers by default.

    Deprecated in favor of DNS Settings.

    Deprecated: This attribute is deprecated.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi