1. Packages
  2. dbt Cloud Provider
  3. API Docs
  4. getUserGroups
dbt Cloud v0.1.30 published on Thursday, Mar 20, 2025 by Pulumi

dbtcloud.getUserGroups

Explore with Pulumi AI

dbt Cloud v0.1.30 published on Thursday, Mar 20, 2025 by Pulumi

Example Usage

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

const myUserGroups = dbtcloud.getUserGroups({
    userId: 12345,
});
Copy
import pulumi
import pulumi_dbtcloud as dbtcloud

my_user_groups = dbtcloud.get_user_groups(user_id=12345)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dbtcloud.LookupUserGroups(ctx, &dbtcloud.LookupUserGroupsArgs{
			UserId: 12345,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DbtCloud = Pulumi.DbtCloud;

return await Deployment.RunAsync(() => 
{
    var myUserGroups = DbtCloud.GetUserGroups.Invoke(new()
    {
        UserId = 12345,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.DbtcloudFunctions;
import com.pulumi.dbtcloud.inputs.GetUserGroupsArgs;
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 myUserGroups = DbtcloudFunctions.getUserGroups(GetUserGroupsArgs.builder()
            .userId(12345)
            .build());

    }
}
Copy
variables:
  myUserGroups:
    fn::invoke:
      function: dbtcloud:getUserGroups
      arguments:
        userId: 12345
Copy

Using getUserGroups

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 getUserGroups(args: GetUserGroupsArgs, opts?: InvokeOptions): Promise<GetUserGroupsResult>
function getUserGroupsOutput(args: GetUserGroupsOutputArgs, opts?: InvokeOptions): Output<GetUserGroupsResult>
Copy
def get_user_groups(user_id: Optional[int] = None,
                    opts: Optional[InvokeOptions] = None) -> GetUserGroupsResult
def get_user_groups_output(user_id: Optional[pulumi.Input[int]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetUserGroupsResult]
Copy
func LookupUserGroups(ctx *Context, args *LookupUserGroupsArgs, opts ...InvokeOption) (*LookupUserGroupsResult, error)
func LookupUserGroupsOutput(ctx *Context, args *LookupUserGroupsOutputArgs, opts ...InvokeOption) LookupUserGroupsResultOutput
Copy

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

public static class GetUserGroups 
{
    public static Task<GetUserGroupsResult> InvokeAsync(GetUserGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetUserGroupsResult> Invoke(GetUserGroupsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetUserGroupsResult> getUserGroups(GetUserGroupsArgs args, InvokeOptions options)
public static Output<GetUserGroupsResult> getUserGroups(GetUserGroupsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: dbtcloud:index/getUserGroups:getUserGroups
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

UserId This property is required. int
ID of the user
UserId This property is required. int
ID of the user
userId This property is required. Integer
ID of the user
userId This property is required. number
ID of the user
user_id This property is required. int
ID of the user
userId This property is required. Number
ID of the user

getUserGroups Result

The following output properties are available:

GroupIds List<int>
IDs of the groups assigned to the user
Id string
The provider-assigned unique ID for this managed resource.
UserId int
ID of the user
GroupIds []int
IDs of the groups assigned to the user
Id string
The provider-assigned unique ID for this managed resource.
UserId int
ID of the user
groupIds List<Integer>
IDs of the groups assigned to the user
id String
The provider-assigned unique ID for this managed resource.
userId Integer
ID of the user
groupIds number[]
IDs of the groups assigned to the user
id string
The provider-assigned unique ID for this managed resource.
userId number
ID of the user
group_ids Sequence[int]
IDs of the groups assigned to the user
id str
The provider-assigned unique ID for this managed resource.
user_id int
ID of the user
groupIds List<Number>
IDs of the groups assigned to the user
id String
The provider-assigned unique ID for this managed resource.
userId Number
ID of the user

Package Details

Repository
dbtcloud pulumi/pulumi-dbtcloud
License
Apache-2.0
Notes
This Pulumi package is based on the dbtcloud Terraform Provider.
dbt Cloud v0.1.30 published on Thursday, Mar 20, 2025 by Pulumi