1. Packages
  2. Aiven Provider
  3. API Docs
  4. ClickhouseUser
Aiven v6.28.0 published on Friday, Nov 15, 2024 by Pulumi

aiven.ClickhouseUser

Explore with Pulumi AI

aiven logo
Aiven v6.28.0 published on Friday, Nov 15, 2024 by Pulumi

    Creates and manages a ClickHouse user.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const exampleUser = new aiven.ClickhouseUser("example_user", {
        project: exampleProject.project,
        serviceName: exampleService.serviceName,
        username: "analyst",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    example_user = aiven.ClickhouseUser("example_user",
        project=example_project["project"],
        service_name=example_service["serviceName"],
        username="analyst")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aiven.NewClickhouseUser(ctx, "example_user", &aiven.ClickhouseUserArgs{
    			Project:     pulumi.Any(exampleProject.Project),
    			ServiceName: pulumi.Any(exampleService.ServiceName),
    			Username:    pulumi.String("analyst"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleUser = new Aiven.ClickhouseUser("example_user", new()
        {
            Project = exampleProject.Project,
            ServiceName = exampleService.ServiceName,
            Username = "analyst",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aiven.ClickhouseUser;
    import com.pulumi.aiven.ClickhouseUserArgs;
    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 ClickhouseUser("exampleUser", ClickhouseUserArgs.builder()
                .project(exampleProject.project())
                .serviceName(exampleService.serviceName())
                .username("analyst")
                .build());
    
        }
    }
    
    resources:
      exampleUser:
        type: aiven:ClickhouseUser
        name: example_user
        properties:
          project: ${exampleProject.project}
          serviceName: ${exampleService.serviceName}
          username: analyst
    

    Create ClickhouseUser Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ClickhouseUser(name: string, args: ClickhouseUserArgs, opts?: CustomResourceOptions);
    @overload
    def ClickhouseUser(resource_name: str,
                       args: ClickhouseUserArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClickhouseUser(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       project: Optional[str] = None,
                       service_name: Optional[str] = None,
                       username: Optional[str] = None)
    func NewClickhouseUser(ctx *Context, name string, args ClickhouseUserArgs, opts ...ResourceOption) (*ClickhouseUser, error)
    public ClickhouseUser(string name, ClickhouseUserArgs args, CustomResourceOptions? opts = null)
    public ClickhouseUser(String name, ClickhouseUserArgs args)
    public ClickhouseUser(String name, ClickhouseUserArgs args, CustomResourceOptions options)
    
    type: aiven:ClickhouseUser
    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 ClickhouseUserArgs
    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 ClickhouseUserArgs
    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 ClickhouseUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClickhouseUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClickhouseUserArgs
    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 clickhouseUserResource = new Aiven.ClickhouseUser("clickhouseUserResource", new()
    {
        Project = "string",
        ServiceName = "string",
        Username = "string",
    });
    
    example, err := aiven.NewClickhouseUser(ctx, "clickhouseUserResource", &aiven.ClickhouseUserArgs{
    	Project:     pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    	Username:    pulumi.String("string"),
    })
    
    var clickhouseUserResource = new ClickhouseUser("clickhouseUserResource", ClickhouseUserArgs.builder()
        .project("string")
        .serviceName("string")
        .username("string")
        .build());
    
    clickhouse_user_resource = aiven.ClickhouseUser("clickhouseUserResource",
        project="string",
        service_name="string",
        username="string")
    
    const clickhouseUserResource = new aiven.ClickhouseUser("clickhouseUserResource", {
        project: "string",
        serviceName: "string",
        username: "string",
    });
    
    type: aiven:ClickhouseUser
    properties:
        project: string
        serviceName: string
        username: string
    

    ClickhouseUser 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 ClickhouseUser resource accepts the following input properties:

    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Username string
    The name of the ClickHouse user. Changing this property forces recreation of the resource.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Username string
    The name of the ClickHouse user. Changing this property forces recreation of the resource.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username String
    The name of the ClickHouse user. Changing this property forces recreation of the resource.
    project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username string
    The name of the ClickHouse user. Changing this property forces recreation of the resource.
    project str
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    service_name str
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username str
    The name of the ClickHouse user. Changing this property forces recreation of the resource.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username String
    The name of the ClickHouse user. Changing this property forces recreation of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ClickhouseUser resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    The password of the ClickHouse user.
    Required bool
    Indicates if a ClickHouse user is required.
    Uuid string
    UUID of the ClickHouse user.
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    The password of the ClickHouse user.
    Required bool
    Indicates if a ClickHouse user is required.
    Uuid string
    UUID of the ClickHouse user.
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    The password of the ClickHouse user.
    required Boolean
    Indicates if a ClickHouse user is required.
    uuid String
    UUID of the ClickHouse user.
    id string
    The provider-assigned unique ID for this managed resource.
    password string
    The password of the ClickHouse user.
    required boolean
    Indicates if a ClickHouse user is required.
    uuid string
    UUID of the ClickHouse user.
    id str
    The provider-assigned unique ID for this managed resource.
    password str
    The password of the ClickHouse user.
    required bool
    Indicates if a ClickHouse user is required.
    uuid str
    UUID of the ClickHouse user.
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    The password of the ClickHouse user.
    required Boolean
    Indicates if a ClickHouse user is required.
    uuid String
    UUID of the ClickHouse user.

    Look up Existing ClickhouseUser Resource

    Get an existing ClickhouseUser 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?: ClickhouseUserState, opts?: CustomResourceOptions): ClickhouseUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            password: Optional[str] = None,
            project: Optional[str] = None,
            required: Optional[bool] = None,
            service_name: Optional[str] = None,
            username: Optional[str] = None,
            uuid: Optional[str] = None) -> ClickhouseUser
    func GetClickhouseUser(ctx *Context, name string, id IDInput, state *ClickhouseUserState, opts ...ResourceOption) (*ClickhouseUser, error)
    public static ClickhouseUser Get(string name, Input<string> id, ClickhouseUserState? state, CustomResourceOptions? opts = null)
    public static ClickhouseUser get(String name, Output<String> id, ClickhouseUserState 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:
    Password string
    The password of the ClickHouse user.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Required bool
    Indicates if a ClickHouse user is required.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Username string
    The name of the ClickHouse user. Changing this property forces recreation of the resource.
    Uuid string
    UUID of the ClickHouse user.
    Password string
    The password of the ClickHouse user.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Required bool
    Indicates if a ClickHouse user is required.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Username string
    The name of the ClickHouse user. Changing this property forces recreation of the resource.
    Uuid string
    UUID of the ClickHouse user.
    password String
    The password of the ClickHouse user.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    required Boolean
    Indicates if a ClickHouse user is required.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username String
    The name of the ClickHouse user. Changing this property forces recreation of the resource.
    uuid String
    UUID of the ClickHouse user.
    password string
    The password of the ClickHouse user.
    project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    required boolean
    Indicates if a ClickHouse user is required.
    serviceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username string
    The name of the ClickHouse user. Changing this property forces recreation of the resource.
    uuid string
    UUID of the ClickHouse user.
    password str
    The password of the ClickHouse user.
    project str
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    required bool
    Indicates if a ClickHouse user is required.
    service_name str
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username str
    The name of the ClickHouse user. Changing this property forces recreation of the resource.
    uuid str
    UUID of the ClickHouse user.
    password String
    The password of the ClickHouse user.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    required Boolean
    Indicates if a ClickHouse user is required.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username String
    The name of the ClickHouse user. Changing this property forces recreation of the resource.
    uuid String
    UUID of the ClickHouse user.

    Import

    $ pulumi import aiven:index/clickhouseUser:ClickhouseUser example_user PROJECT/SERVICE_NAME/USERNAME
    

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

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Aiven v6.28.0 published on Friday, Nov 15, 2024 by Pulumi