1. Packages
  2. Rabbitmq Provider
  3. API Docs
  4. User
RabbitMQ v3.3.6 published on Monday, Oct 7, 2024 by Pulumi

rabbitmq.User

Explore with Pulumi AI

rabbitmq logo
RabbitMQ v3.3.6 published on Monday, Oct 7, 2024 by Pulumi

    The rabbitmq.User resource creates and manages a user.

    Note: All arguments including username and password will be stored in the raw state as plain-text. Read more about sensitive data in state.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as rabbitmq from "@pulumi/rabbitmq";
    
    const test = new rabbitmq.User("test", {
        name: "mctest",
        password: "foobar",
        tags: [
            "administrator",
            "management",
        ],
    });
    
    import pulumi
    import pulumi_rabbitmq as rabbitmq
    
    test = rabbitmq.User("test",
        name="mctest",
        password="foobar",
        tags=[
            "administrator",
            "management",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-rabbitmq/sdk/v3/go/rabbitmq"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := rabbitmq.NewUser(ctx, "test", &rabbitmq.UserArgs{
    			Name:     pulumi.String("mctest"),
    			Password: pulumi.String("foobar"),
    			Tags: pulumi.StringArray{
    				pulumi.String("administrator"),
    				pulumi.String("management"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using RabbitMQ = Pulumi.RabbitMQ;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new RabbitMQ.User("test", new()
        {
            Name = "mctest",
            Password = "foobar",
            Tags = new[]
            {
                "administrator",
                "management",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.rabbitmq.User;
    import com.pulumi.rabbitmq.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 test = new User("test", UserArgs.builder()
                .name("mctest")
                .password("foobar")
                .tags(            
                    "administrator",
                    "management")
                .build());
    
        }
    }
    
    resources:
      test:
        type: rabbitmq:User
        properties:
          name: mctest
          password: foobar
          tags:
            - administrator
            - management
    

    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,
             password: Optional[str] = None,
             name: Optional[str] = None,
             tags: Optional[Sequence[str]] = None)
    func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
    public User(string name, UserArgs args, CustomResourceOptions? opts = null)
    public User(String name, UserArgs args)
    public User(String name, UserArgs args, CustomResourceOptions options)
    
    type: rabbitmq: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 RabbitMQ.User("userResource", new()
    {
        Password = "string",
        Name = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := rabbitmq.NewUser(ctx, "userResource", &rabbitmq.UserArgs{
    	Password: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var userResource = new User("userResource", UserArgs.builder()
        .password("string")
        .name("string")
        .tags("string")
        .build());
    
    user_resource = rabbitmq.User("userResource",
        password="string",
        name="string",
        tags=["string"])
    
    const userResource = new rabbitmq.User("userResource", {
        password: "string",
        name: "string",
        tags: ["string"],
    });
    
    type: rabbitmq:User
    properties:
        name: string
        password: string
        tags:
            - 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:

    Password string
    The password of the user. The value of this argument is plain-text so make sure to secure where this is defined.
    Name string
    The name of the user.
    Tags List<string>
    Which permission model to apply to the user. Valid options are: management, policymaker, monitoring, and administrator.
    Password string
    The password of the user. The value of this argument is plain-text so make sure to secure where this is defined.
    Name string
    The name of the user.
    Tags []string
    Which permission model to apply to the user. Valid options are: management, policymaker, monitoring, and administrator.
    password String
    The password of the user. The value of this argument is plain-text so make sure to secure where this is defined.
    name String
    The name of the user.
    tags List<String>
    Which permission model to apply to the user. Valid options are: management, policymaker, monitoring, and administrator.
    password string
    The password of the user. The value of this argument is plain-text so make sure to secure where this is defined.
    name string
    The name of the user.
    tags string[]
    Which permission model to apply to the user. Valid options are: management, policymaker, monitoring, and administrator.
    password str
    The password of the user. The value of this argument is plain-text so make sure to secure where this is defined.
    name str
    The name of the user.
    tags Sequence[str]
    Which permission model to apply to the user. Valid options are: management, policymaker, monitoring, and administrator.
    password String
    The password of the user. The value of this argument is plain-text so make sure to secure where this is defined.
    name String
    The name of the user.
    tags List<String>
    Which permission model to apply to the user. Valid options are: management, policymaker, monitoring, and administrator.

    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,
            name: Optional[str] = None,
            password: Optional[str] = None,
            tags: Optional[Sequence[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.
    The following state arguments are supported:
    Name string
    The name of the user.
    Password string
    The password of the user. The value of this argument is plain-text so make sure to secure where this is defined.
    Tags List<string>
    Which permission model to apply to the user. Valid options are: management, policymaker, monitoring, and administrator.
    Name string
    The name of the user.
    Password string
    The password of the user. The value of this argument is plain-text so make sure to secure where this is defined.
    Tags []string
    Which permission model to apply to the user. Valid options are: management, policymaker, monitoring, and administrator.
    name String
    The name of the user.
    password String
    The password of the user. The value of this argument is plain-text so make sure to secure where this is defined.
    tags List<String>
    Which permission model to apply to the user. Valid options are: management, policymaker, monitoring, and administrator.
    name string
    The name of the user.
    password string
    The password of the user. The value of this argument is plain-text so make sure to secure where this is defined.
    tags string[]
    Which permission model to apply to the user. Valid options are: management, policymaker, monitoring, and administrator.
    name str
    The name of the user.
    password str
    The password of the user. The value of this argument is plain-text so make sure to secure where this is defined.
    tags Sequence[str]
    Which permission model to apply to the user. Valid options are: management, policymaker, monitoring, and administrator.
    name String
    The name of the user.
    password String
    The password of the user. The value of this argument is plain-text so make sure to secure where this is defined.
    tags List<String>
    Which permission model to apply to the user. Valid options are: management, policymaker, monitoring, and administrator.

    Import

    Users can be imported using the name, e.g.

    $ pulumi import rabbitmq:index/user:User test mctest
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    RabbitMQ pulumi/pulumi-rabbitmq
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the rabbitmq Terraform Provider.
    rabbitmq logo
    RabbitMQ v3.3.6 published on Monday, Oct 7, 2024 by Pulumi