1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getGroupServiceAccountAccessTokens
GitLab v9.7.0 published on Monday, Dec 22, 2025 by Pulumi
gitlab logo
GitLab v9.7.0 published on Monday, Dec 22, 2025 by Pulumi

    The gitlab.getGroupServiceAccountAccessTokens data source allows to retrieve all access tokens for a group service account.

    Note: The data source returns the token metadata only. The token value is not available.

    Permissions: You must have administrator access or be an Owner of the group to list the tokens of a service account.

    Upstream API: GitLab REST API docs

    Using getGroupServiceAccountAccessTokens

    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 getGroupServiceAccountAccessTokens(args: GetGroupServiceAccountAccessTokensArgs, opts?: InvokeOptions): Promise<GetGroupServiceAccountAccessTokensResult>
    function getGroupServiceAccountAccessTokensOutput(args: GetGroupServiceAccountAccessTokensOutputArgs, opts?: InvokeOptions): Output<GetGroupServiceAccountAccessTokensResult>
    def get_group_service_account_access_tokens(group: Optional[str] = None,
                                                service_account_id: Optional[int] = None,
                                                opts: Optional[InvokeOptions] = None) -> GetGroupServiceAccountAccessTokensResult
    def get_group_service_account_access_tokens_output(group: Optional[pulumi.Input[str]] = None,
                                                service_account_id: Optional[pulumi.Input[int]] = None,
                                                opts: Optional[InvokeOptions] = None) -> Output[GetGroupServiceAccountAccessTokensResult]
    func GetGroupServiceAccountAccessTokens(ctx *Context, args *GetGroupServiceAccountAccessTokensArgs, opts ...InvokeOption) (*GetGroupServiceAccountAccessTokensResult, error)
    func GetGroupServiceAccountAccessTokensOutput(ctx *Context, args *GetGroupServiceAccountAccessTokensOutputArgs, opts ...InvokeOption) GetGroupServiceAccountAccessTokensResultOutput

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

    public static class GetGroupServiceAccountAccessTokens 
    {
        public static Task<GetGroupServiceAccountAccessTokensResult> InvokeAsync(GetGroupServiceAccountAccessTokensArgs args, InvokeOptions? opts = null)
        public static Output<GetGroupServiceAccountAccessTokensResult> Invoke(GetGroupServiceAccountAccessTokensInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGroupServiceAccountAccessTokensResult> getGroupServiceAccountAccessTokens(GetGroupServiceAccountAccessTokensArgs args, InvokeOptions options)
    public static Output<GetGroupServiceAccountAccessTokensResult> getGroupServiceAccountAccessTokens(GetGroupServiceAccountAccessTokensArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gitlab:index/getGroupServiceAccountAccessTokens:getGroupServiceAccountAccessTokens
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Group string
    The ID or URL-encoded path of the group containing the service account. Must be a top level group.
    ServiceAccountId int
    The ID of the service account user.
    Group string
    The ID or URL-encoded path of the group containing the service account. Must be a top level group.
    ServiceAccountId int
    The ID of the service account user.
    group String
    The ID or URL-encoded path of the group containing the service account. Must be a top level group.
    serviceAccountId Integer
    The ID of the service account user.
    group string
    The ID or URL-encoded path of the group containing the service account. Must be a top level group.
    serviceAccountId number
    The ID of the service account user.
    group str
    The ID or URL-encoded path of the group containing the service account. Must be a top level group.
    service_account_id int
    The ID of the service account user.
    group String
    The ID or URL-encoded path of the group containing the service account. Must be a top level group.
    serviceAccountId Number
    The ID of the service account user.

    getGroupServiceAccountAccessTokens Result

    The following output properties are available:

    AccessTokens List<Pulumi.GitLab.Outputs.GetGroupServiceAccountAccessTokensAccessToken>
    The list of access tokens for the service account.
    Group string
    The ID or URL-encoded path of the group containing the service account. Must be a top level group.
    Id string
    ServiceAccountId int
    The ID of the service account user.
    AccessTokens []GetGroupServiceAccountAccessTokensAccessToken
    The list of access tokens for the service account.
    Group string
    The ID or URL-encoded path of the group containing the service account. Must be a top level group.
    Id string
    ServiceAccountId int
    The ID of the service account user.
    accessTokens List<GetGroupServiceAccountAccessTokensAccessToken>
    The list of access tokens for the service account.
    group String
    The ID or URL-encoded path of the group containing the service account. Must be a top level group.
    id String
    serviceAccountId Integer
    The ID of the service account user.
    accessTokens GetGroupServiceAccountAccessTokensAccessToken[]
    The list of access tokens for the service account.
    group string
    The ID or URL-encoded path of the group containing the service account. Must be a top level group.
    id string
    serviceAccountId number
    The ID of the service account user.
    access_tokens Sequence[GetGroupServiceAccountAccessTokensAccessToken]
    The list of access tokens for the service account.
    group str
    The ID or URL-encoded path of the group containing the service account. Must be a top level group.
    id str
    service_account_id int
    The ID of the service account user.
    accessTokens List<Property Map>
    The list of access tokens for the service account.
    group String
    The ID or URL-encoded path of the group containing the service account. Must be a top level group.
    id String
    serviceAccountId Number
    The ID of the service account user.

    Supporting Types

    GetGroupServiceAccountAccessTokensAccessToken

    Active bool
    CreatedAt string
    ExpiresAt string
    Id string
    Name string
    Revoked bool
    Scopes List<string>
    Active bool
    CreatedAt string
    ExpiresAt string
    Id string
    Name string
    Revoked bool
    Scopes []string
    active Boolean
    createdAt String
    expiresAt String
    id String
    name String
    revoked Boolean
    scopes List<String>
    active boolean
    createdAt string
    expiresAt string
    id string
    name string
    revoked boolean
    scopes string[]
    active bool
    created_at str
    expires_at str
    id str
    name str
    revoked bool
    scopes Sequence[str]
    active Boolean
    createdAt String
    expiresAt String
    id String
    name String
    revoked Boolean
    scopes List<String>

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v9.7.0 published on Monday, Dec 22, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate