1. Packages
  2. Dbtcloud Provider
  3. API Docs
  4. getUserGroups
dbt Cloud v0.1.25 published on Friday, Nov 8, 2024 by Pulumi

dbtcloud.getUserGroups

Explore with Pulumi AI

dbtcloud logo
dbt Cloud v0.1.25 published on Friday, Nov 8, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dbtcloud from "@pulumi/dbtcloud";
    
    const myUserGroups = dbtcloud.getUserGroups({
        userId: 12345,
    });
    
    import pulumi
    import pulumi_dbtcloud as dbtcloud
    
    my_user_groups = dbtcloud.get_user_groups(user_id=12345)
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      myUserGroups:
        fn::invoke:
          Function: dbtcloud:getUserGroups
          Arguments:
            userId: 12345
    

    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>
    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]
    func LookupUserGroups(ctx *Context, args *LookupUserGroupsArgs, opts ...InvokeOption) (*LookupUserGroupsResult, error)
    func LookupUserGroupsOutput(ctx *Context, args *LookupUserGroupsOutputArgs, opts ...InvokeOption) LookupUserGroupsResultOutput

    > 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)
    }
    public static CompletableFuture<GetUserGroupsResult> getUserGroups(GetUserGroupsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: dbtcloud:index/getUserGroups:getUserGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    UserId int
    ID of the user
    UserId int
    ID of the user
    userId Integer
    ID of the user
    userId number
    ID of the user
    user_id int
    ID of the user
    userId 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.
    dbtcloud logo
    dbt Cloud v0.1.25 published on Friday, Nov 8, 2024 by Pulumi