cloudflare.User
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleUser = new cloudflare.User("example_user", {
country: "US",
firstName: "John",
lastName: "Appleseed",
telephone: "+1 123-123-1234",
zipcode: "12345",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_user = cloudflare.User("example_user",
country="US",
first_name="John",
last_name="Appleseed",
telephone="+1 123-123-1234",
zipcode="12345")
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.NewUser(ctx, "example_user", &cloudflare.UserArgs{
Country: pulumi.String("US"),
FirstName: pulumi.String("John"),
LastName: pulumi.String("Appleseed"),
Telephone: pulumi.String("+1 123-123-1234"),
Zipcode: pulumi.String("12345"),
})
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 exampleUser = new Cloudflare.User("example_user", new()
{
Country = "US",
FirstName = "John",
LastName = "Appleseed",
Telephone = "+1 123-123-1234",
Zipcode = "12345",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.User;
import com.pulumi.cloudflare.UserArgs;
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 exampleUser = new User("exampleUser", UserArgs.builder()
.country("US")
.firstName("John")
.lastName("Appleseed")
.telephone("+1 123-123-1234")
.zipcode("12345")
.build());
}
}
resources:
exampleUser:
type: cloudflare:User
name: example_user
properties:
country: US
firstName: John
lastName: Appleseed
telephone: +1 123-123-1234
zipcode: '12345'
Create User Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new User(name: string, args?: UserArgs, opts?: CustomResourceOptions);
@overload
def User(resource_name: str,
args: Optional[UserArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def User(resource_name: str,
opts: Optional[ResourceOptions] = None,
country: Optional[str] = None,
first_name: Optional[str] = None,
last_name: Optional[str] = None,
telephone: Optional[str] = None,
zipcode: Optional[str] = None)
func NewUser(ctx *Context, name string, args *UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs? args = null, CustomResourceOptions? opts = null)
type: cloudflare:User
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 UserArgs
- 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 UserArgs
- 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 UserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserArgs
- 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 userResource = new Cloudflare.User("userResource", new()
{
Country = "string",
FirstName = "string",
LastName = "string",
Telephone = "string",
Zipcode = "string",
});
example, err := cloudflare.NewUser(ctx, "userResource", &cloudflare.UserArgs{
Country: pulumi.String("string"),
FirstName: pulumi.String("string"),
LastName: pulumi.String("string"),
Telephone: pulumi.String("string"),
Zipcode: pulumi.String("string"),
})
var userResource = new User("userResource", UserArgs.builder()
.country("string")
.firstName("string")
.lastName("string")
.telephone("string")
.zipcode("string")
.build());
user_resource = cloudflare.User("userResource",
country="string",
first_name="string",
last_name="string",
telephone="string",
zipcode="string")
const userResource = new cloudflare.User("userResource", {
country: "string",
firstName: "string",
lastName: "string",
telephone: "string",
zipcode: "string",
});
type: cloudflare:User
properties:
country: string
firstName: string
lastName: string
telephone: string
zipcode: string
User 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 User resource accepts the following input properties:
- country str
- The country in which the user lives.
- first_
name str - User's first name
- last_
name str - User's last name
- telephone str
- User's telephone number
- zipcode str
- The zipcode or postal code where the user lives.
Outputs
All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:
- Betas List<string>
- Lists the betas that the user is participating in.
- Has
Business boolZones - Indicates whether user has any business zones
- Has
Enterprise boolZones - Indicates whether user has any enterprise zones
- Has
Pro boolZones - Indicates whether user has any pro zones
- Id string
- The provider-assigned unique ID for this managed resource.
- Organizations
List<User
Organization> - Suspended bool
- Indicates whether user has been suspended
- Two
Factor boolAuthentication Enabled - Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
- Two
Factor boolAuthentication Locked - Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
- Betas []string
- Lists the betas that the user is participating in.
- Has
Business boolZones - Indicates whether user has any business zones
- Has
Enterprise boolZones - Indicates whether user has any enterprise zones
- Has
Pro boolZones - Indicates whether user has any pro zones
- Id string
- The provider-assigned unique ID for this managed resource.
- Organizations
[]User
Organization - Suspended bool
- Indicates whether user has been suspended
- Two
Factor boolAuthentication Enabled - Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
- Two
Factor boolAuthentication Locked - Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
- betas List<String>
- Lists the betas that the user is participating in.
- has
Business BooleanZones - Indicates whether user has any business zones
- has
Enterprise BooleanZones - Indicates whether user has any enterprise zones
- has
Pro BooleanZones - Indicates whether user has any pro zones
- id String
- The provider-assigned unique ID for this managed resource.
- organizations
List<User
Organization> - suspended Boolean
- Indicates whether user has been suspended
- two
Factor BooleanAuthentication Enabled - Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
- two
Factor BooleanAuthentication Locked - Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
- betas string[]
- Lists the betas that the user is participating in.
- has
Business booleanZones - Indicates whether user has any business zones
- has
Enterprise booleanZones - Indicates whether user has any enterprise zones
- has
Pro booleanZones - Indicates whether user has any pro zones
- id string
- The provider-assigned unique ID for this managed resource.
- organizations
User
Organization[] - suspended boolean
- Indicates whether user has been suspended
- two
Factor booleanAuthentication Enabled - Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
- two
Factor booleanAuthentication Locked - Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
- betas Sequence[str]
- Lists the betas that the user is participating in.
- has_
business_ boolzones - Indicates whether user has any business zones
- has_
enterprise_ boolzones - Indicates whether user has any enterprise zones
- has_
pro_ boolzones - Indicates whether user has any pro zones
- id str
- The provider-assigned unique ID for this managed resource.
- organizations
Sequence[User
Organization] - suspended bool
- Indicates whether user has been suspended
- two_
factor_ boolauthentication_ enabled - Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
- two_
factor_ boolauthentication_ locked - Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
- betas List<String>
- Lists the betas that the user is participating in.
- has
Business BooleanZones - Indicates whether user has any business zones
- has
Enterprise BooleanZones - Indicates whether user has any enterprise zones
- has
Pro BooleanZones - Indicates whether user has any pro zones
- id String
- The provider-assigned unique ID for this managed resource.
- organizations List<Property Map>
- suspended Boolean
- Indicates whether user has been suspended
- two
Factor BooleanAuthentication Enabled - Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
- two
Factor BooleanAuthentication Locked - Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
Look up Existing User Resource
Get an existing User 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?: UserState, opts?: CustomResourceOptions): User
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
betas: Optional[Sequence[str]] = None,
country: Optional[str] = None,
first_name: Optional[str] = None,
has_business_zones: Optional[bool] = None,
has_enterprise_zones: Optional[bool] = None,
has_pro_zones: Optional[bool] = None,
last_name: Optional[str] = None,
organizations: Optional[Sequence[UserOrganizationArgs]] = None,
suspended: Optional[bool] = None,
telephone: Optional[str] = None,
two_factor_authentication_enabled: Optional[bool] = None,
two_factor_authentication_locked: Optional[bool] = None,
zipcode: Optional[str] = None) -> User
func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)
resources: _: type: cloudflare:User 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.
- Betas List<string>
- Lists the betas that the user is participating in.
- Country string
- The country in which the user lives.
- First
Name string - User's first name
- Has
Business boolZones - Indicates whether user has any business zones
- Has
Enterprise boolZones - Indicates whether user has any enterprise zones
- Has
Pro boolZones - Indicates whether user has any pro zones
- Last
Name string - User's last name
- Organizations
List<User
Organization> - Suspended bool
- Indicates whether user has been suspended
- Telephone string
- User's telephone number
- Two
Factor boolAuthentication Enabled - Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
- Two
Factor boolAuthentication Locked - Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
- Zipcode string
- The zipcode or postal code where the user lives.
- Betas []string
- Lists the betas that the user is participating in.
- Country string
- The country in which the user lives.
- First
Name string - User's first name
- Has
Business boolZones - Indicates whether user has any business zones
- Has
Enterprise boolZones - Indicates whether user has any enterprise zones
- Has
Pro boolZones - Indicates whether user has any pro zones
- Last
Name string - User's last name
- Organizations
[]User
Organization Args - Suspended bool
- Indicates whether user has been suspended
- Telephone string
- User's telephone number
- Two
Factor boolAuthentication Enabled - Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
- Two
Factor boolAuthentication Locked - Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
- Zipcode string
- The zipcode or postal code where the user lives.
- betas List<String>
- Lists the betas that the user is participating in.
- country String
- The country in which the user lives.
- first
Name String - User's first name
- has
Business BooleanZones - Indicates whether user has any business zones
- has
Enterprise BooleanZones - Indicates whether user has any enterprise zones
- has
Pro BooleanZones - Indicates whether user has any pro zones
- last
Name String - User's last name
- organizations
List<User
Organization> - suspended Boolean
- Indicates whether user has been suspended
- telephone String
- User's telephone number
- two
Factor BooleanAuthentication Enabled - Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
- two
Factor BooleanAuthentication Locked - Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
- zipcode String
- The zipcode or postal code where the user lives.
- betas string[]
- Lists the betas that the user is participating in.
- country string
- The country in which the user lives.
- first
Name string - User's first name
- has
Business booleanZones - Indicates whether user has any business zones
- has
Enterprise booleanZones - Indicates whether user has any enterprise zones
- has
Pro booleanZones - Indicates whether user has any pro zones
- last
Name string - User's last name
- organizations
User
Organization[] - suspended boolean
- Indicates whether user has been suspended
- telephone string
- User's telephone number
- two
Factor booleanAuthentication Enabled - Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
- two
Factor booleanAuthentication Locked - Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
- zipcode string
- The zipcode or postal code where the user lives.
- betas Sequence[str]
- Lists the betas that the user is participating in.
- country str
- The country in which the user lives.
- first_
name str - User's first name
- has_
business_ boolzones - Indicates whether user has any business zones
- has_
enterprise_ boolzones - Indicates whether user has any enterprise zones
- has_
pro_ boolzones - Indicates whether user has any pro zones
- last_
name str - User's last name
- organizations
Sequence[User
Organization Args] - suspended bool
- Indicates whether user has been suspended
- telephone str
- User's telephone number
- two_
factor_ boolauthentication_ enabled - Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
- two_
factor_ boolauthentication_ locked - Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
- zipcode str
- The zipcode or postal code where the user lives.
- betas List<String>
- Lists the betas that the user is participating in.
- country String
- The country in which the user lives.
- first
Name String - User's first name
- has
Business BooleanZones - Indicates whether user has any business zones
- has
Enterprise BooleanZones - Indicates whether user has any enterprise zones
- has
Pro BooleanZones - Indicates whether user has any pro zones
- last
Name String - User's last name
- organizations List<Property Map>
- suspended Boolean
- Indicates whether user has been suspended
- telephone String
- User's telephone number
- two
Factor BooleanAuthentication Enabled - Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
- two
Factor BooleanAuthentication Locked - Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
- zipcode String
- The zipcode or postal code where the user lives.
Supporting Types
UserOrganization, UserOrganizationArgs
- Id string
- Identifier
- Name string
- Organization name.
- Permissions List<string>
- Access permissions for this User.
- Roles List<string>
- List of roles that a user has within an organization.
- Status string
- Whether the user is a member of the organization or has an invitation pending. Available values: "member", "invited".
- Id string
- Identifier
- Name string
- Organization name.
- Permissions []string
- Access permissions for this User.
- Roles []string
- List of roles that a user has within an organization.
- Status string
- Whether the user is a member of the organization or has an invitation pending. Available values: "member", "invited".
- id String
- Identifier
- name String
- Organization name.
- permissions List<String>
- Access permissions for this User.
- roles List<String>
- List of roles that a user has within an organization.
- status String
- Whether the user is a member of the organization or has an invitation pending. Available values: "member", "invited".
- id string
- Identifier
- name string
- Organization name.
- permissions string[]
- Access permissions for this User.
- roles string[]
- List of roles that a user has within an organization.
- status string
- Whether the user is a member of the organization or has an invitation pending. Available values: "member", "invited".
- id str
- Identifier
- name str
- Organization name.
- permissions Sequence[str]
- Access permissions for this User.
- roles Sequence[str]
- List of roles that a user has within an organization.
- status str
- Whether the user is a member of the organization or has an invitation pending. Available values: "member", "invited".
- id String
- Identifier
- name String
- Organization name.
- permissions List<String>
- Access permissions for this User.
- roles List<String>
- List of roles that a user has within an organization.
- status String
- Whether the user is a member of the organization or has an invitation pending. Available values: "member", "invited".
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.