Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse
grafana.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.User("testAllUsers", {
email: "all_users@example.com",
login: "test-grafana-users",
password: "my-password",
});
const allUsers = grafana.getUsers({});
import pulumi
import pulumi_grafana as grafana
import pulumiverse_grafana as grafana
test_all_users = grafana.User("testAllUsers",
email="all_users@example.com",
login="test-grafana-users",
password="my-password")
all_users = grafana.get_users()
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := grafana.NewUser(ctx, "testAllUsers", &grafana.UserArgs{
Email: pulumi.String("all_users@example.com"),
Login: pulumi.String("test-grafana-users"),
Password: pulumi.String("my-password"),
})
if err != nil {
return err
}
_, err = grafana.GetUsers(ctx, nil, 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.User("testAllUsers", new()
{
Email = "all_users@example.com",
Login = "test-grafana-users",
Password = "my-password",
});
var allUsers = Grafana.GetUsers.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.User;
import com.pulumi.grafana.UserArgs;
import com.pulumi.grafana.GrafanaFunctions;
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")
.login("test-grafana-users")
.password("my-password")
.build());
final var allUsers = GrafanaFunctions.getUsers();
}
}
resources:
testAllUsers:
type: grafana:User
properties:
email: all_users@example.com
login: test-grafana-users
password: my-password
variables:
allUsers:
fn::invoke:
Function: grafana: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:index/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. 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.