1. Packages
  2. Grafana Cloud
  3. API Docs
  4. getOncallUser
Grafana v0.16.3 published on Monday, Apr 7, 2025 by pulumiverse

grafana.getOncallUser

Explore with Pulumi AI

Grafana v0.16.3 published on Monday, Apr 7, 2025 by pulumiverse
Deprecated: grafana.index/getoncalluser.getOncallUser has been deprecated in favor of grafana.oncall/getuser.getUser

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumi/grafana";

const alex = grafana.onCall.getUser({
    username: "alex",
});
Copy
import pulumi
import pulumi_grafana as grafana

alex = grafana.onCall.get_user(username="alex")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := oncall.GetUser(ctx, &oncall.GetUserArgs{
			Username: "alex",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Pulumi.Grafana;

return await Deployment.RunAsync(() => 
{
    var alex = Grafana.OnCall.GetUser.Invoke(new()
    {
        Username = "alex",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.onCall.OnCallFunctions;
import com.pulumi.grafana.onCall.inputs.GetUserArgs;
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) {
        final var alex = OnCallFunctions.getUser(GetUserArgs.builder()
            .username("alex")
            .build());

    }
}
Copy
variables:
  alex:
    fn::invoke:
      function: grafana:onCall:getUser
      arguments:
        username: alex
Copy

Using getOncallUser

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 getOncallUser(args: GetOncallUserArgs, opts?: InvokeOptions): Promise<GetOncallUserResult>
function getOncallUserOutput(args: GetOncallUserOutputArgs, opts?: InvokeOptions): Output<GetOncallUserResult>
Copy
def get_oncall_user(username: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetOncallUserResult
def get_oncall_user_output(username: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetOncallUserResult]
Copy
func GetOncallUser(ctx *Context, args *GetOncallUserArgs, opts ...InvokeOption) (*GetOncallUserResult, error)
func GetOncallUserOutput(ctx *Context, args *GetOncallUserOutputArgs, opts ...InvokeOption) GetOncallUserResultOutput
Copy

> Note: This function is named GetOncallUser in the Go SDK.

public static class GetOncallUser 
{
    public static Task<GetOncallUserResult> InvokeAsync(GetOncallUserArgs args, InvokeOptions? opts = null)
    public static Output<GetOncallUserResult> Invoke(GetOncallUserInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOncallUserResult> getOncallUser(GetOncallUserArgs args, InvokeOptions options)
public static Output<GetOncallUserResult> getOncallUser(GetOncallUserArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: grafana:index/getOncallUser:getOncallUser
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Username This property is required. string
The username of the user.
Username This property is required. string
The username of the user.
username This property is required. String
The username of the user.
username This property is required. string
The username of the user.
username This property is required. str
The username of the user.
username This property is required. String
The username of the user.

getOncallUser Result

The following output properties are available:

Email string
The email of the user.
Id string
The ID of the user.
Role string
The role of the user.
Username string
The username of the user.
Email string
The email of the user.
Id string
The ID of the user.
Role string
The role of the user.
Username string
The username of the user.
email String
The email of the user.
id String
The ID of the user.
role String
The role of the user.
username String
The username of the user.
email string
The email of the user.
id string
The ID of the user.
role string
The role of the user.
username string
The username of the user.
email str
The email of the user.
id str
The ID of the user.
role str
The role of the user.
username str
The username of the user.
email String
The email of the user.
id String
The ID of the user.
role String
The role of the user.
username String
The username of the user.

Package Details

Repository
grafana pulumiverse/pulumi-grafana
License
Apache-2.0
Notes
This Pulumi package is based on the grafana Terraform Provider.
Grafana v0.16.3 published on Monday, Apr 7, 2025 by pulumiverse