GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi
gitlab.getGroupAccessTokens
Explore with Pulumi AI
The gitlab_access_tokens
data source allows to retrieve all group-level access tokens.
Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const accessTokens = gitlab.getGroupAccessTokens({
group: "my/example/group",
});
import pulumi
import pulumi_gitlab as gitlab
access_tokens = gitlab.get_group_access_tokens(group="my/example/group")
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.GetGroupAccessTokens(ctx, &gitlab.GetGroupAccessTokensArgs{
Group: "my/example/group",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var accessTokens = GitLab.GetGroupAccessTokens.Invoke(new()
{
Group = "my/example/group",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GitlabFunctions;
import com.pulumi.gitlab.inputs.GetGroupAccessTokensArgs;
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 accessTokens = GitlabFunctions.getGroupAccessTokens(GetGroupAccessTokensArgs.builder()
.group("my/example/group")
.build());
}
}
variables:
accessTokens:
fn::invoke:
function: gitlab:getGroupAccessTokens
arguments:
group: my/example/group
Using getGroupAccessTokens
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 getGroupAccessTokens(args: GetGroupAccessTokensArgs, opts?: InvokeOptions): Promise<GetGroupAccessTokensResult>
function getGroupAccessTokensOutput(args: GetGroupAccessTokensOutputArgs, opts?: InvokeOptions): Output<GetGroupAccessTokensResult>
def get_group_access_tokens(group: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetGroupAccessTokensResult
def get_group_access_tokens_output(group: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGroupAccessTokensResult]
func GetGroupAccessTokens(ctx *Context, args *GetGroupAccessTokensArgs, opts ...InvokeOption) (*GetGroupAccessTokensResult, error)
func GetGroupAccessTokensOutput(ctx *Context, args *GetGroupAccessTokensOutputArgs, opts ...InvokeOption) GetGroupAccessTokensResultOutput
> Note: This function is named GetGroupAccessTokens
in the Go SDK.
public static class GetGroupAccessTokens
{
public static Task<GetGroupAccessTokensResult> InvokeAsync(GetGroupAccessTokensArgs args, InvokeOptions? opts = null)
public static Output<GetGroupAccessTokensResult> Invoke(GetGroupAccessTokensInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGroupAccessTokensResult> getGroupAccessTokens(GetGroupAccessTokensArgs args, InvokeOptions options)
public static Output<GetGroupAccessTokensResult> getGroupAccessTokens(GetGroupAccessTokensArgs args, InvokeOptions options)
fn::invoke:
function: gitlab:index/getGroupAccessTokens:getGroupAccessTokens
arguments:
# arguments dictionary
The following arguments are supported:
- Group string
- The name or id of the group.
- Group string
- The name or id of the group.
- group String
- The name or id of the group.
- group string
- The name or id of the group.
- group str
- The name or id of the group.
- group String
- The name or id of the group.
getGroupAccessTokens Result
The following output properties are available:
- Access
Tokens List<Pulumi.Git Lab. Outputs. Get Group Access Tokens Access Token> - The list of access tokens returned by the search
- Group string
- The name or id of the group.
- Id string
- Access
Tokens []GetGroup Access Tokens Access Token - The list of access tokens returned by the search
- Group string
- The name or id of the group.
- Id string
- access
Tokens List<GetGroup Access Tokens Access Token> - The list of access tokens returned by the search
- group String
- The name or id of the group.
- id String
- access
Tokens GetGroup Access Tokens Access Token[] - The list of access tokens returned by the search
- group string
- The name or id of the group.
- id string
- access_
tokens Sequence[GetGroup Access Tokens Access Token] - The list of access tokens returned by the search
- group str
- The name or id of the group.
- id str
- access
Tokens List<Property Map> - The list of access tokens returned by the search
- group String
- The name or id of the group.
- id String
Supporting Types
GetGroupAccessTokensAccessToken
- access_
level str - active bool
- created_
at str - expires_
at str - group str
- id str
- name str
- revoked bool
- scopes Sequence[str]
- user_
id int
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.