Grafana

v0.0.3 published on Sunday, Sep 18, 2022 by lbrlabs

BuiltinRoleAssignment

Import

 $ pulumi import grafana:index/builtinRoleAssignment:BuiltinRoleAssignment builtin_role_name {{builtin_role_name}}

Example Usage

using System.Collections.Generic;
using Pulumi;
using Grafana = Lbrlabs.PulumiPackage.Grafana;

return await Deployment.RunAsync(() => 
{
    var viewer = new Grafana.BuiltinRoleAssignment("viewer", new()
    {
        BuiltinRole = "Viewer",
        Roles = new[]
        {
            new Grafana.Inputs.BuiltinRoleAssignmentRoleArgs
            {
                Global = false,
                Uid = "firstuid",
            },
            new Grafana.Inputs.BuiltinRoleAssignmentRoleArgs
            {
                Global = true,
                Uid = "seconduid",
            },
        },
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-grafana/sdk/go/grafana"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := grafana.NewBuiltinRoleAssignment(ctx, "viewer", &grafana.BuiltinRoleAssignmentArgs{
			BuiltinRole: pulumi.String("Viewer"),
			Roles: BuiltinRoleAssignmentRoleArray{
				&BuiltinRoleAssignmentRoleArgs{
					Global: pulumi.Bool(false),
					Uid:    pulumi.String("firstuid"),
				},
				&BuiltinRoleAssignmentRoleArgs{
					Global: pulumi.Bool(true),
					Uid:    pulumi.String("seconduid"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.BuiltinRoleAssignment;
import com.pulumi.grafana.BuiltinRoleAssignmentArgs;
import com.pulumi.grafana.inputs.BuiltinRoleAssignmentRoleArgs;
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 viewer = new BuiltinRoleAssignment("viewer", BuiltinRoleAssignmentArgs.builder()        
            .builtinRole("Viewer")
            .roles(            
                BuiltinRoleAssignmentRoleArgs.builder()
                    .global(false)
                    .uid("firstuid")
                    .build(),
                BuiltinRoleAssignmentRoleArgs.builder()
                    .global(true)
                    .uid("seconduid")
                    .build())
            .build());

    }
}
import pulumi
import lbrlabs_pulumi_grafana as grafana

viewer = grafana.BuiltinRoleAssignment("viewer",
    builtin_role="Viewer",
    roles=[
        grafana.BuiltinRoleAssignmentRoleArgs(
            global_=False,
            uid="firstuid",
        ),
        grafana.BuiltinRoleAssignmentRoleArgs(
            global_=True,
            uid="seconduid",
        ),
    ])
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumi/grafana";

const viewer = new grafana.BuiltinRoleAssignment("viewer", {
    builtinRole: "Viewer",
    roles: [
        {
            global: false,
            uid: "firstuid",
        },
        {
            global: true,
            uid: "seconduid",
        },
    ],
});
resources:
  viewer:
    type: grafana:BuiltinRoleAssignment
    properties:
      builtinRole: Viewer
      roles:
        - global: false
          uid: firstuid
        - global: true
          uid: seconduid

Create a BuiltinRoleAssignment Resource

new BuiltinRoleAssignment(name: string, args: BuiltinRoleAssignmentArgs, opts?: CustomResourceOptions);
@overload
def BuiltinRoleAssignment(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          builtin_role: Optional[str] = None,
                          roles: Optional[Sequence[BuiltinRoleAssignmentRoleArgs]] = None)
@overload
def BuiltinRoleAssignment(resource_name: str,
                          args: BuiltinRoleAssignmentArgs,
                          opts: Optional[ResourceOptions] = None)
func NewBuiltinRoleAssignment(ctx *Context, name string, args BuiltinRoleAssignmentArgs, opts ...ResourceOption) (*BuiltinRoleAssignment, error)
public BuiltinRoleAssignment(string name, BuiltinRoleAssignmentArgs args, CustomResourceOptions? opts = null)
public BuiltinRoleAssignment(String name, BuiltinRoleAssignmentArgs args)
public BuiltinRoleAssignment(String name, BuiltinRoleAssignmentArgs args, CustomResourceOptions options)
type: grafana:BuiltinRoleAssignment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BuiltinRoleAssignmentArgs
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 BuiltinRoleAssignmentArgs
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 BuiltinRoleAssignmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BuiltinRoleAssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BuiltinRoleAssignmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

BuiltinRoleAssignment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The BuiltinRoleAssignment resource accepts the following input properties:

BuiltinRole string

Organization roles (Viewer, Editor, Admin) or Grafana Admin to assign the roles to.

Roles List<Lbrlabs.PulumiPackage.Grafana.Inputs.BuiltinRoleAssignmentRoleArgs>

Fixed or custom roles which provide granular access for specific resources within Grafana.

BuiltinRole string

Organization roles (Viewer, Editor, Admin) or Grafana Admin to assign the roles to.

Roles []BuiltinRoleAssignmentRoleArgs

Fixed or custom roles which provide granular access for specific resources within Grafana.

builtinRole String

Organization roles (Viewer, Editor, Admin) or Grafana Admin to assign the roles to.

roles List<BuiltinRoleAssignmentRoleArgs>

Fixed or custom roles which provide granular access for specific resources within Grafana.

builtinRole string

Organization roles (Viewer, Editor, Admin) or Grafana Admin to assign the roles to.

roles BuiltinRoleAssignmentRoleArgs[]

Fixed or custom roles which provide granular access for specific resources within Grafana.

builtin_role str

Organization roles (Viewer, Editor, Admin) or Grafana Admin to assign the roles to.

roles Sequence[BuiltinRoleAssignmentRoleArgs]

Fixed or custom roles which provide granular access for specific resources within Grafana.

builtinRole String

Organization roles (Viewer, Editor, Admin) or Grafana Admin to assign the roles to.

roles List<Property Map>

Fixed or custom roles which provide granular access for specific resources within Grafana.

Outputs

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

Get an existing BuiltinRoleAssignment 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?: BuiltinRoleAssignmentState, opts?: CustomResourceOptions): BuiltinRoleAssignment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        builtin_role: Optional[str] = None,
        roles: Optional[Sequence[BuiltinRoleAssignmentRoleArgs]] = None) -> BuiltinRoleAssignment
func GetBuiltinRoleAssignment(ctx *Context, name string, id IDInput, state *BuiltinRoleAssignmentState, opts ...ResourceOption) (*BuiltinRoleAssignment, error)
public static BuiltinRoleAssignment Get(string name, Input<string> id, BuiltinRoleAssignmentState? state, CustomResourceOptions? opts = null)
public static BuiltinRoleAssignment get(String name, Output<String> id, BuiltinRoleAssignmentState 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:
BuiltinRole string

Organization roles (Viewer, Editor, Admin) or Grafana Admin to assign the roles to.

Roles List<Lbrlabs.PulumiPackage.Grafana.Inputs.BuiltinRoleAssignmentRoleArgs>

Fixed or custom roles which provide granular access for specific resources within Grafana.

BuiltinRole string

Organization roles (Viewer, Editor, Admin) or Grafana Admin to assign the roles to.

Roles []BuiltinRoleAssignmentRoleArgs

Fixed or custom roles which provide granular access for specific resources within Grafana.

builtinRole String

Organization roles (Viewer, Editor, Admin) or Grafana Admin to assign the roles to.

roles List<BuiltinRoleAssignmentRoleArgs>

Fixed or custom roles which provide granular access for specific resources within Grafana.

builtinRole string

Organization roles (Viewer, Editor, Admin) or Grafana Admin to assign the roles to.

roles BuiltinRoleAssignmentRoleArgs[]

Fixed or custom roles which provide granular access for specific resources within Grafana.

builtin_role str

Organization roles (Viewer, Editor, Admin) or Grafana Admin to assign the roles to.

roles Sequence[BuiltinRoleAssignmentRoleArgs]

Fixed or custom roles which provide granular access for specific resources within Grafana.

builtinRole String

Organization roles (Viewer, Editor, Admin) or Grafana Admin to assign the roles to.

roles List<Property Map>

Fixed or custom roles which provide granular access for specific resources within Grafana.

Supporting Types

BuiltinRoleAssignmentRole

Uid string

Unique identifier of the role to assign to builtin_role.

Global bool

States whether the assignment is available across all organizations or not. Defaults to false.

Uid string

Unique identifier of the role to assign to builtin_role.

Global bool

States whether the assignment is available across all organizations or not. Defaults to false.

uid String

Unique identifier of the role to assign to builtin_role.

global Boolean

States whether the assignment is available across all organizations or not. Defaults to false.

uid string

Unique identifier of the role to assign to builtin_role.

global boolean

States whether the assignment is available across all organizations or not. Defaults to false.

uid str

Unique identifier of the role to assign to builtin_role.

global_ bool

States whether the assignment is available across all organizations or not. Defaults to false.

uid String

Unique identifier of the role to assign to builtin_role.

global Boolean

States whether the assignment is available across all organizations or not. Defaults to false.

Package Details

Repository
https://github.com/lbrlabs/pulumi-grafana
License
Apache-2.0
Notes

This Pulumi package is based on the grafana Terraform Provider.