1. Packages
  2. Aiven Provider
  3. API Docs
  4. ClickhouseRole
Aiven v6.29.0 published on Friday, Dec 6, 2024 by Pulumi

aiven.ClickhouseRole

Explore with Pulumi AI

aiven logo
Aiven v6.29.0 published on Friday, Dec 6, 2024 by Pulumi

    Creates and manages ClickHouse roles.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const exampleRole = new aiven.ClickhouseRole("example_role", {
        serviceName: exampleClickhouse.serviceName,
        project: exampleProject.project,
        role: "writer",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    example_role = aiven.ClickhouseRole("example_role",
        service_name=example_clickhouse["serviceName"],
        project=example_project["project"],
        role="writer")
    
    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.NewClickhouseRole(ctx, "example_role", &aiven.ClickhouseRoleArgs{
    			ServiceName: pulumi.Any(exampleClickhouse.ServiceName),
    			Project:     pulumi.Any(exampleProject.Project),
    			Role:        pulumi.String("writer"),
    		})
    		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 exampleRole = new Aiven.ClickhouseRole("example_role", new()
        {
            ServiceName = exampleClickhouse.ServiceName,
            Project = exampleProject.Project,
            Role = "writer",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aiven.ClickhouseRole;
    import com.pulumi.aiven.ClickhouseRoleArgs;
    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 exampleRole = new ClickhouseRole("exampleRole", ClickhouseRoleArgs.builder()
                .serviceName(exampleClickhouse.serviceName())
                .project(exampleProject.project())
                .role("writer")
                .build());
    
        }
    }
    
    resources:
      exampleRole:
        type: aiven:ClickhouseRole
        name: example_role
        properties:
          serviceName: ${exampleClickhouse.serviceName}
          project: ${exampleProject.project}
          role: writer
    

    Create ClickhouseRole Resource

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

    Constructor syntax

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

    ClickhouseRole 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 ClickhouseRole 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.
    Role string
    The name of role. 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.
    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.
    Role string
    The name of role. 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.
    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.
    role String
    The name of role. 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.
    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.
    role string
    The name of role. 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.
    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.
    role str
    The name of role. 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.
    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.
    role String
    The name of role. 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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ClickhouseRole 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 ClickhouseRole Resource

    Get an existing ClickhouseRole 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?: ClickhouseRoleState, opts?: CustomResourceOptions): ClickhouseRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            project: Optional[str] = None,
            role: Optional[str] = None,
            service_name: Optional[str] = None) -> ClickhouseRole
    func GetClickhouseRole(ctx *Context, name string, id IDInput, state *ClickhouseRoleState, opts ...ResourceOption) (*ClickhouseRole, error)
    public static ClickhouseRole Get(string name, Input<string> id, ClickhouseRoleState? state, CustomResourceOptions? opts = null)
    public static ClickhouseRole get(String name, Output<String> id, ClickhouseRoleState 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:
    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.
    Role string
    The name of role. 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.
    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.
    Role string
    The name of role. 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.
    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.
    role String
    The name of role. 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.
    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.
    role string
    The name of role. 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.
    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.
    role str
    The name of role. 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.
    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.
    role String
    The name of role. 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.

    Import

    $ pulumi import aiven:index/clickhouseRole:ClickhouseRole example_role PROJECT/SERVICE_NAME/ROLE
    

    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.29.0 published on Friday, Dec 6, 2024 by Pulumi