1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. User
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.User

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    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)
    public User(String name, UserArgs args)
    public User(String name, UserArgs args, CustomResourceOptions options)
    
    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 string
    The country in which the user lives.
    FirstName string
    User's first name
    LastName string
    User's last name
    Telephone string
    User's telephone number
    Zipcode string
    The zipcode or postal code where the user lives.
    Country string
    The country in which the user lives.
    FirstName string
    User's first name
    LastName string
    User's last name
    Telephone string
    User's telephone number
    Zipcode string
    The zipcode or postal code where the user lives.
    country String
    The country in which the user lives.
    firstName String
    User's first name
    lastName String
    User's last name
    telephone String
    User's telephone number
    zipcode String
    The zipcode or postal code where the user lives.
    country string
    The country in which the user lives.
    firstName string
    User's first name
    lastName string
    User's last name
    telephone string
    User's telephone number
    zipcode string
    The zipcode or postal code where the user lives.
    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.
    country String
    The country in which the user lives.
    firstName String
    User's first name
    lastName String
    User's last name
    telephone String
    User's telephone number
    zipcode String
    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:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    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,
            country: Optional[str] = None,
            first_name: Optional[str] = None,
            last_name: Optional[str] = None,
            telephone: Optional[str] = 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.
    The following state arguments are supported:
    Country string
    The country in which the user lives.
    FirstName string
    User's first name
    LastName string
    User's last name
    Telephone string
    User's telephone number
    Zipcode string
    The zipcode or postal code where the user lives.
    Country string
    The country in which the user lives.
    FirstName string
    User's first name
    LastName string
    User's last name
    Telephone string
    User's telephone number
    Zipcode string
    The zipcode or postal code where the user lives.
    country String
    The country in which the user lives.
    firstName String
    User's first name
    lastName String
    User's last name
    telephone String
    User's telephone number
    zipcode String
    The zipcode or postal code where the user lives.
    country string
    The country in which the user lives.
    firstName string
    User's first name
    lastName string
    User's last name
    telephone string
    User's telephone number
    zipcode string
    The zipcode or postal code where the user lives.
    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.
    country String
    The country in which the user lives.
    firstName String
    User's first name
    lastName String
    User's last name
    telephone String
    User's telephone number
    zipcode String
    The zipcode or postal code where the user lives.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi