cloudflare.Account
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleAccount = new cloudflare.Account("example_account", {
name: "name",
type: "standard",
unit: {
id: "f267e341f3dd4697bd3b9f71dd96247f",
},
});
import pulumi
import pulumi_cloudflare as cloudflare
example_account = cloudflare.Account("example_account",
name="name",
type="standard",
unit={
"id": "f267e341f3dd4697bd3b9f71dd96247f",
})
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.NewAccount(ctx, "example_account", &cloudflare.AccountArgs{
Name: pulumi.String("name"),
Type: pulumi.String("standard"),
Unit: &cloudflare.AccountUnitArgs{
Id: pulumi.String("f267e341f3dd4697bd3b9f71dd96247f"),
},
})
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 = new Cloudflare.Account("example_account", new()
{
Name = "name",
Type = "standard",
Unit = new Cloudflare.Inputs.AccountUnitArgs
{
Id = "f267e341f3dd4697bd3b9f71dd96247f",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.Account;
import com.pulumi.cloudflare.AccountArgs;
import com.pulumi.cloudflare.inputs.AccountUnitArgs;
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) {
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("name")
.type("standard")
.unit(AccountUnitArgs.builder()
.id("f267e341f3dd4697bd3b9f71dd96247f")
.build())
.build());
}
}
resources:
exampleAccount:
type: cloudflare:Account
name: example_account
properties:
name: name
type: standard
unit:
id: f267e341f3dd4697bd3b9f71dd96247f
Create Account Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);
@overload
def Account(resource_name: str,
args: AccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Account(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
type: Optional[str] = None,
settings: Optional[AccountSettingsArgs] = None,
unit: Optional[AccountUnitArgs] = None)
func NewAccount(ctx *Context, name string, args AccountArgs, opts ...ResourceOption) (*Account, error)
public Account(string name, AccountArgs args, CustomResourceOptions? opts = null)
public Account(String name, AccountArgs args)
public Account(String name, AccountArgs args, CustomResourceOptions options)
type: cloudflare:Account
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var accountResource = new Cloudflare.Account("accountResource", new()
{
Name = "string",
Type = "string",
Settings = new Cloudflare.Inputs.AccountSettingsArgs
{
AbuseContactEmail = "string",
EnforceTwofactor = false,
},
Unit = new Cloudflare.Inputs.AccountUnitArgs
{
Id = "string",
},
});
example, err := cloudflare.NewAccount(ctx, "accountResource", &cloudflare.AccountArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
Settings: &cloudflare.AccountSettingsArgs{
AbuseContactEmail: pulumi.String("string"),
EnforceTwofactor: pulumi.Bool(false),
},
Unit: &cloudflare.AccountUnitArgs{
Id: pulumi.String("string"),
},
})
var accountResource = new Account("accountResource", AccountArgs.builder()
.name("string")
.type("string")
.settings(AccountSettingsArgs.builder()
.abuseContactEmail("string")
.enforceTwofactor(false)
.build())
.unit(AccountUnitArgs.builder()
.id("string")
.build())
.build());
account_resource = cloudflare.Account("accountResource",
name="string",
type="string",
settings={
"abuse_contact_email": "string",
"enforce_twofactor": False,
},
unit={
"id": "string",
})
const accountResource = new cloudflare.Account("accountResource", {
name: "string",
type: "string",
settings: {
abuseContactEmail: "string",
enforceTwofactor: false,
},
unit: {
id: "string",
},
});
type: cloudflare:Account
properties:
name: string
settings:
abuseContactEmail: string
enforceTwofactor: false
type: string
unit:
id: string
Account Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Account resource accepts the following input properties:
- Name string
- Account name
- Type string
- the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
- Settings
Account
Settings - Account settings
- Unit
Account
Unit - information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
- Name string
- Account name
- Type string
- the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
- Settings
Account
Settings Args - Account settings
- Unit
Account
Unit Args - information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
- name String
- Account name
- type String
- the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
- settings
Account
Settings - Account settings
- unit
Account
Unit - information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
- name string
- Account name
- type string
- the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
- settings
Account
Settings - Account settings
- unit
Account
Unit - information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
- name str
- Account name
- type str
- the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
- settings
Account
Settings Args - Account settings
- unit
Account
Unit Args - information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
- name String
- Account name
- type String
- the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
- settings Property Map
- Account settings
- unit Property Map
- information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
Outputs
All input properties are implicitly available as output properties. Additionally, the Account resource produces the following output properties:
- created_
on str - Timestamp for the creation of the account
- id str
- The provider-assigned unique ID for this managed resource.
Look up Existing Account Resource
Get an existing Account resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AccountState, opts?: CustomResourceOptions): Account
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_on: Optional[str] = None,
name: Optional[str] = None,
settings: Optional[AccountSettingsArgs] = None,
type: Optional[str] = None,
unit: Optional[AccountUnitArgs] = None) -> Account
func GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)
public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)
public static Account get(String name, Output<String> id, AccountState state, CustomResourceOptions options)
resources: _: type: cloudflare:Account get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
On string - Timestamp for the creation of the account
- Name string
- Account name
- Settings
Account
Settings - Account settings
- Type string
- the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
- Unit
Account
Unit - information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
- Created
On string - Timestamp for the creation of the account
- Name string
- Account name
- Settings
Account
Settings Args - Account settings
- Type string
- the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
- Unit
Account
Unit Args - information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
- created
On String - Timestamp for the creation of the account
- name String
- Account name
- settings
Account
Settings - Account settings
- type String
- the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
- unit
Account
Unit - information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
- created
On string - Timestamp for the creation of the account
- name string
- Account name
- settings
Account
Settings - Account settings
- type string
- the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
- unit
Account
Unit - information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
- created_
on str - Timestamp for the creation of the account
- name str
- Account name
- settings
Account
Settings Args - Account settings
- type str
- the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
- unit
Account
Unit Args - information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
- created
On String - Timestamp for the creation of the account
- name String
- Account name
- settings Property Map
- Account settings
- type String
- the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
- unit Property Map
- information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
Supporting Types
AccountSettings, AccountSettingsArgs
- Abuse
Contact stringEmail - Sets an abuse contact email to notify for abuse reports.
- Default
Nameservers string - Specifies the default nameservers to be used for new zones added to this account.
- Enforce
Twofactor bool - Indicates whether membership in this account requires that Two-Factor Authentication is enabled
- Use
Account boolCustom Ns By Default Indicates whether new zones should use the account-level custom nameservers by default.
Deprecated in favor of DNS Settings.
- Abuse
Contact stringEmail - Sets an abuse contact email to notify for abuse reports.
- Default
Nameservers string - Specifies the default nameservers to be used for new zones added to this account.
- Enforce
Twofactor bool - Indicates whether membership in this account requires that Two-Factor Authentication is enabled
- Use
Account boolCustom Ns By Default Indicates whether new zones should use the account-level custom nameservers by default.
Deprecated in favor of DNS Settings.
- abuse
Contact StringEmail - Sets an abuse contact email to notify for abuse reports.
- default
Nameservers String - Specifies the default nameservers to be used for new zones added to this account.
- enforce
Twofactor Boolean - Indicates whether membership in this account requires that Two-Factor Authentication is enabled
- use
Account BooleanCustom Ns By Default Indicates whether new zones should use the account-level custom nameservers by default.
Deprecated in favor of DNS Settings.
- abuse
Contact stringEmail - Sets an abuse contact email to notify for abuse reports.
- default
Nameservers string - Specifies the default nameservers to be used for new zones added to this account.
- enforce
Twofactor boolean - Indicates whether membership in this account requires that Two-Factor Authentication is enabled
- use
Account booleanCustom Ns By Default Indicates whether new zones should use the account-level custom nameservers by default.
Deprecated in favor of DNS Settings.
- abuse_
contact_ stremail - 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.
- enforce_
twofactor bool - Indicates whether membership in this account requires that Two-Factor Authentication is enabled
- use_
account_ boolcustom_ ns_ by_ default Indicates whether new zones should use the account-level custom nameservers by default.
Deprecated in favor of DNS Settings.
- abuse
Contact StringEmail - Sets an abuse contact email to notify for abuse reports.
- default
Nameservers String - Specifies the default nameservers to be used for new zones added to this account.
- enforce
Twofactor Boolean - Indicates whether membership in this account requires that Two-Factor Authentication is enabled
- use
Account BooleanCustom Ns By Default Indicates whether new zones should use the account-level custom nameservers by default.
Deprecated in favor of DNS Settings.
AccountUnit, AccountUnitArgs
- Id string
- Tenant unit ID
- Id string
- Tenant unit ID
- id String
- Tenant unit ID
- id string
- Tenant unit ID
- id str
- Tenant unit ID
- id String
- Tenant unit ID
Import
$ pulumi import cloudflare:index/account:Account example '<account_id>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.