Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse
grafana.oss.getUsers
Explore with Pulumi AI
This data source uses Grafana’s admin APIs for reading users which does not currently work with API Tokens. You must use basic auth.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumi/grafana";
import * as grafana from "@pulumiverse/grafana";
const testAllUsers = new grafana.oss.User("test_all_users", {
email: "all_users@example.com",
name: "Testing grafana_users",
login: "test-grafana-users",
password: "my-password",
});
const allUsers = grafana.oss.getUsers({});
import pulumi
import pulumi_grafana as grafana
import pulumiverse_grafana as grafana
test_all_users = grafana.oss.User("test_all_users",
email="all_users@example.com",
name="Testing grafana_users",
login="test-grafana-users",
password="my-password")
all_users = grafana.oss.get_users()
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/oss"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := oss.NewUser(ctx, "test_all_users", &oss.UserArgs{
Email: pulumi.String("all_users@example.com"),
Name: pulumi.String("Testing grafana_users"),
Login: pulumi.String("test-grafana-users"),
Password: pulumi.String("my-password"),
})
if err != nil {
return err
}
_, err = oss.GetUsers(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Pulumi.Grafana;
using Grafana = Pulumiverse.Grafana;
return await Deployment.RunAsync(() =>
{
var testAllUsers = new Grafana.Oss.User("test_all_users", new()
{
Email = "all_users@example.com",
Name = "Testing grafana_users",
Login = "test-grafana-users",
Password = "my-password",
});
var allUsers = Grafana.Oss.GetUsers.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.oss.User;
import com.pulumi.grafana.oss.UserArgs;
import com.pulumi.grafana.oss.OssFunctions;
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 testAllUsers = new User("testAllUsers", UserArgs.builder()
.email("all_users@example.com")
.name("Testing grafana_users")
.login("test-grafana-users")
.password("my-password")
.build());
final var allUsers = OssFunctions.getUsers();
}
}
resources:
testAllUsers:
type: grafana:oss:User
name: test_all_users
properties:
email: all_users@example.com
name: Testing grafana_users
login: test-grafana-users
password: my-password
variables:
allUsers:
fn::invoke:
Function: grafana:oss:getUsers
Arguments: {}
Using getUsers
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getUsers(opts?: InvokeOptions): Promise<GetUsersResult>
function getUsersOutput(opts?: InvokeOptions): Output<GetUsersResult>
def get_users(opts: Optional[InvokeOptions] = None) -> GetUsersResult
def get_users_output(opts: Optional[InvokeOptions] = None) -> Output[GetUsersResult]
func GetUsers(ctx *Context, opts ...InvokeOption) (*GetUsersResult, error)
func GetUsersOutput(ctx *Context, opts ...InvokeOption) GetUsersResultOutput
> Note: This function is named GetUsers
in the Go SDK.
public static class GetUsers
{
public static Task<GetUsersResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetUsersResult> Invoke(InvokeOptions? opts = null)
}
public static CompletableFuture<GetUsersResult> getUsers(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: grafana:oss/getUsers:getUsers
arguments:
# arguments dictionary
getUsers Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Users
List<Pulumiverse.
Grafana. Oss. Outputs. Get Users User> - The Grafana instance's users.
- Id string
- The provider-assigned unique ID for this managed resource.
- Users
[]Get
Users User - The Grafana instance's users.
- id String
- The provider-assigned unique ID for this managed resource.
- users
List<Get
Users User> - The Grafana instance's users.
- id string
- The provider-assigned unique ID for this managed resource.
- users
Get
Users User[] - The Grafana instance's users.
- id str
- The provider-assigned unique ID for this managed resource.
- users
Sequence[Get
Users User] - The Grafana instance's users.
- id String
- The provider-assigned unique ID for this managed resource.
- users List<Property Map>
- The Grafana instance's users.
Supporting Types
GetUsersUser
Package Details
- Repository
- grafana pulumiverse/pulumi-grafana
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
grafana
Terraform Provider.