fastly.User
Explore with Pulumi AI
Provides a Fastly User, representing the configuration for a user account for interacting with Fastly.
The User resource requires a login and name, and optionally a role.
Example Usage
Basic usage:
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const demo = new fastly.User("demo", {
login: "demo@example.com",
name: "Demo User",
});
import pulumi
import pulumi_fastly as fastly
demo = fastly.User("demo",
login="demo@example.com",
name="Demo User")
package main
import (
"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := fastly.NewUser(ctx, "demo", &fastly.UserArgs{
Login: pulumi.String("demo@example.com"),
Name: pulumi.String("Demo User"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fastly = Pulumi.Fastly;
return await Deployment.RunAsync(() =>
{
var demo = new Fastly.User("demo", new()
{
Login = "demo@example.com",
Name = "Demo User",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fastly.User;
import com.pulumi.fastly.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 demo = new User("demo", UserArgs.builder()
.login("demo@example.com")
.name("Demo User")
.build());
}
}
resources:
demo:
type: fastly:User
properties:
login: demo@example.com
name: Demo User
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: UserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def User(resource_name: str,
opts: Optional[ResourceOptions] = None,
login: Optional[str] = None,
name: Optional[str] = None,
role: Optional[str] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
type: fastly: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 Fastly.User("userResource", new()
{
Login = "string",
Name = "string",
Role = "string",
});
example, err := fastly.NewUser(ctx, "userResource", &fastly.UserArgs{
Login: pulumi.String("string"),
Name: pulumi.String("string"),
Role: pulumi.String("string"),
})
var userResource = new User("userResource", UserArgs.builder()
.login("string")
.name("string")
.role("string")
.build());
user_resource = fastly.User("userResource",
login="string",
name="string",
role="string")
const userResource = new fastly.User("userResource", {
login: "string",
name: "string",
role: "string",
});
type: fastly:User
properties:
login: string
name: string
role: 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:
- Login string
- The email address, which is the login name, of the User
- Name string
- The real life name of the user
- Role string
- The role of this user. Can be
user
(the default),billing
,engineer
, orsuperuser
. For detailed information on the abilities granted to each role, see Fastly's Documentation on User roles
- Login string
- The email address, which is the login name, of the User
- Name string
- The real life name of the user
- Role string
- The role of this user. Can be
user
(the default),billing
,engineer
, orsuperuser
. For detailed information on the abilities granted to each role, see Fastly's Documentation on User roles
- login String
- The email address, which is the login name, of the User
- name String
- The real life name of the user
- role String
- The role of this user. Can be
user
(the default),billing
,engineer
, orsuperuser
. For detailed information on the abilities granted to each role, see Fastly's Documentation on User roles
- login string
- The email address, which is the login name, of the User
- name string
- The real life name of the user
- role string
- The role of this user. Can be
user
(the default),billing
,engineer
, orsuperuser
. For detailed information on the abilities granted to each role, see Fastly's Documentation on User roles
- login str
- The email address, which is the login name, of the User
- name str
- The real life name of the user
- role str
- The role of this user. Can be
user
(the default),billing
,engineer
, orsuperuser
. For detailed information on the abilities granted to each role, see Fastly's Documentation on User roles
- login String
- The email address, which is the login name, of the User
- name String
- The real life name of the user
- role String
- The role of this user. Can be
user
(the default),billing
,engineer
, orsuperuser
. For detailed information on the abilities granted to each role, see Fastly's Documentation on User roles
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,
login: Optional[str] = None,
name: Optional[str] = None,
role: 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)
Resource lookup is not supported in YAML
- 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.
- Login string
- The email address, which is the login name, of the User
- Name string
- The real life name of the user
- Role string
- The role of this user. Can be
user
(the default),billing
,engineer
, orsuperuser
. For detailed information on the abilities granted to each role, see Fastly's Documentation on User roles
- Login string
- The email address, which is the login name, of the User
- Name string
- The real life name of the user
- Role string
- The role of this user. Can be
user
(the default),billing
,engineer
, orsuperuser
. For detailed information on the abilities granted to each role, see Fastly's Documentation on User roles
- login String
- The email address, which is the login name, of the User
- name String
- The real life name of the user
- role String
- The role of this user. Can be
user
(the default),billing
,engineer
, orsuperuser
. For detailed information on the abilities granted to each role, see Fastly's Documentation on User roles
- login string
- The email address, which is the login name, of the User
- name string
- The real life name of the user
- role string
- The role of this user. Can be
user
(the default),billing
,engineer
, orsuperuser
. For detailed information on the abilities granted to each role, see Fastly's Documentation on User roles
- login str
- The email address, which is the login name, of the User
- name str
- The real life name of the user
- role str
- The role of this user. Can be
user
(the default),billing
,engineer
, orsuperuser
. For detailed information on the abilities granted to each role, see Fastly's Documentation on User roles
- login String
- The email address, which is the login name, of the User
- name String
- The real life name of the user
- role String
- The role of this user. Can be
user
(the default),billing
,engineer
, orsuperuser
. For detailed information on the abilities granted to each role, see Fastly's Documentation on User roles
Import
A Fastly User can be imported using their user ID, e.g.
$ pulumi import fastly:index/user:User demo xxxxxxxxxxxxxxxxxxxx
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Fastly pulumi/pulumi-fastly
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
fastly
Terraform Provider.