Viewing docs for Cloudflare v4.16.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Viewing docs for Cloudflare v4.16.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Data source for looking up Cloudflare Accounts.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var example = Cloudflare.GetAccounts.Invoke(new()
{
Name = "example account",
});
});
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v4/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.GetAccounts(ctx, &cloudflare.GetAccountsArgs{
Name: pulumi.StringRef("example account"),
}, nil)
if err != nil {
return err
}
return nil
})
}
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.GetAccountsArgs;
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 example = CloudflareFunctions.getAccounts(GetAccountsArgs.builder()
.name("example account")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const example = cloudflare.getAccounts({
name: "example account",
});
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.get_accounts(name="example account")
variables:
example:
fn::invoke:
Function: cloudflare:getAccounts
Arguments:
name: example account
Using getAccounts
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 getAccounts(args: GetAccountsArgs, opts?: InvokeOptions): Promise<GetAccountsResult>
function getAccountsOutput(args: GetAccountsOutputArgs, opts?: InvokeOptions): Output<GetAccountsResult>def get_accounts(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAccountsResult
def get_accounts_output(name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccountsResult]func GetAccounts(ctx *Context, args *GetAccountsArgs, opts ...InvokeOption) (*GetAccountsResult, error)
func GetAccountsOutput(ctx *Context, args *GetAccountsOutputArgs, opts ...InvokeOption) GetAccountsResultOutput> Note: This function is named GetAccounts in the Go SDK.
public static class GetAccounts
{
public static Task<GetAccountsResult> InvokeAsync(GetAccountsArgs args, InvokeOptions? opts = null)
public static Output<GetAccountsResult> Invoke(GetAccountsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAccountsResult> getAccounts(GetAccountsArgs args, InvokeOptions options)
public static Output<GetAccountsResult> getAccounts(GetAccountsArgs args, InvokeOptions options)
fn::invoke:
function: cloudflare:index/getAccounts:getAccounts
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The account name to target for the resource.
- Name string
- The account name to target for the resource.
- name String
- The account name to target for the resource.
- name string
- The account name to target for the resource.
- name str
- The account name to target for the resource.
- name String
- The account name to target for the resource.
getAccounts Result
The following output properties are available:
- Accounts
List<Get
Accounts Account> - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The account name to target for the resource.
- Accounts
[]Get
Accounts Account - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The account name to target for the resource.
- accounts
List<Get
Accounts Account> - id String
- The provider-assigned unique ID for this managed resource.
- name String
- The account name to target for the resource.
- accounts
Get
Accounts Account[] - id string
- The provider-assigned unique ID for this managed resource.
- name string
- The account name to target for the resource.
- accounts
Sequence[Get
Accounts Account] - id str
- The provider-assigned unique ID for this managed resource.
- name str
- The account name to target for the resource.
- accounts List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The account name to target for the resource.
Supporting Types
GetAccountsAccount
- Enforce
Twofactor bool - Id string
- The ID of this resource.
- Name string
- The account name to target for the resource.
- Type string
- Enforce
Twofactor bool - Id string
- The ID of this resource.
- Name string
- The account name to target for the resource.
- Type string
- enforce
Twofactor Boolean - id String
- The ID of this resource.
- name String
- The account name to target for the resource.
- type String
- enforce
Twofactor boolean - id string
- The ID of this resource.
- name string
- The account name to target for the resource.
- type string
- enforce_
twofactor bool - id str
- The ID of this resource.
- name str
- The account name to target for the resource.
- type str
- enforce
Twofactor Boolean - id String
- The ID of this resource.
- name String
- The account name to target for the resource.
- type String
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.
Viewing docs for Cloudflare v4.16.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
