Cloudflare

v4.12.1 published on Thursday, Sep 22, 2022 by Pulumi

getAccounts

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, &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 pulumi
import pulumi_cloudflare as cloudflare

example = cloudflare.get_accounts(name="example account")
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const example = pulumi.output(cloudflare.getAccounts({
    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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: cloudflare:index/getAccounts:getAccounts
  Arguments:
    # Arguments dictionary

The 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<GetAccountsAccount>
Id string

The provider-assigned unique ID for this managed resource.

Name string

The account name to target for the resource.

Accounts []GetAccountsAccount
Id string

The provider-assigned unique ID for this managed resource.

Name string

The account name to target for the resource.

accounts List<GetAccountsAccount>
id String

The provider-assigned unique ID for this managed resource.

name String

The account name to target for the resource.

accounts GetAccountsAccount[]
id string

The provider-assigned unique ID for this managed resource.

name string

The account name to target for the resource.

accounts Sequence[GetAccountsAccount]
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

EnforceTwofactor bool
Id string

The ID of this resource.

Name string

The account name to target for the resource.

Type string
EnforceTwofactor bool
Id string

The ID of this resource.

Name string

The account name to target for the resource.

Type string
enforceTwofactor Boolean
id String

The ID of this resource.

name String

The account name to target for the resource.

type String
enforceTwofactor 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
enforceTwofactor Boolean
id String

The ID of this resource.

name String

The account name to target for the resource.

type String

Package Details

Repository
https://github.com/pulumi/pulumi-cloudflare
License
Apache-2.0
Notes

This Pulumi package is based on the cloudflare Terraform Provider.