1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getAccount
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

cloudflare.getAccount

Explore with Pulumi AI

Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

Example Usage

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

const exampleAccount = cloudflare.getAccount({
    accountId: "eb78d65290b24279ba6f44721b3ea3c4",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_account = cloudflare.get_account(account_id="eb78d65290b24279ba6f44721b3ea3c4")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  exampleAccount:
    fn::invoke:
      function: cloudflare:getAccount
      arguments:
        accountId: eb78d65290b24279ba6f44721b3ea3c4
Copy

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>
Copy
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]
Copy
func LookupAccount(ctx *Context, args *LookupAccountArgs, opts ...InvokeOption) (*LookupAccountResult, error)
func LookupAccountOutput(ctx *Context, args *LookupAccountOutputArgs, opts ...InvokeOption) LookupAccountResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetAccountResult> getAccount(GetAccountArgs args, InvokeOptions options)
public static Output<GetAccountResult> getAccount(GetAccountArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: cloudflare:index/getAccount:getAccount
  arguments:
    # arguments dictionary
Copy

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 This property is required. string
Sets an abuse contact email to notify for abuse reports.
DefaultNameservers This property is required. string
Specifies the default nameservers to be used for new zones added to this account.
EnforceTwofactor This property is required. bool
Indicates whether membership in this account requires that Two-Factor Authentication is enabled
UseAccountCustomNsByDefault This property is required. bool

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

Deprecated in favor of DNS Settings.

AbuseContactEmail This property is required. string
Sets an abuse contact email to notify for abuse reports.
DefaultNameservers This property is required. string
Specifies the default nameservers to be used for new zones added to this account.
EnforceTwofactor This property is required. bool
Indicates whether membership in this account requires that Two-Factor Authentication is enabled
UseAccountCustomNsByDefault This property is required. bool

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

Deprecated in favor of DNS Settings.

abuseContactEmail This property is required. String
Sets an abuse contact email to notify for abuse reports.
defaultNameservers This property is required. String
Specifies the default nameservers to be used for new zones added to this account.
enforceTwofactor This property is required. Boolean
Indicates whether membership in this account requires that Two-Factor Authentication is enabled
useAccountCustomNsByDefault This property is required. Boolean

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

Deprecated in favor of DNS Settings.

abuseContactEmail This property is required. string
Sets an abuse contact email to notify for abuse reports.
defaultNameservers This property is required. string
Specifies the default nameservers to be used for new zones added to this account.
enforceTwofactor This property is required. boolean
Indicates whether membership in this account requires that Two-Factor Authentication is enabled
useAccountCustomNsByDefault This property is required. boolean

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

Deprecated in favor of DNS Settings.

abuse_contact_email This property is required. str
Sets an abuse contact email to notify for abuse reports.
default_nameservers This property is required. str
Specifies the default nameservers to be used for new zones added to this account.
enforce_twofactor This property is required. bool
Indicates whether membership in this account requires that Two-Factor Authentication is enabled
use_account_custom_ns_by_default This property is required. bool

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

Deprecated in favor of DNS Settings.

abuseContactEmail This property is required. String
Sets an abuse contact email to notify for abuse reports.
defaultNameservers This property is required. String
Specifies the default nameservers to be used for new zones added to this account.
enforceTwofactor This property is required. Boolean
Indicates whether membership in this account requires that Two-Factor Authentication is enabled
useAccountCustomNsByDefault This property is required. Boolean

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

Deprecated in favor of DNS Settings.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi