1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getProjectAccessTokens
GitLab v9.2.0 published on Friday, Jul 18, 2025 by Pulumi

gitlab.getProjectAccessTokens

Explore with Pulumi AI

gitlab logo
GitLab v9.2.0 published on Friday, Jul 18, 2025 by Pulumi

    The gitlab.getProjectAccessTokens data source allows to retrieve all project access tokens for a given project.

    Upstream API: GitLab REST API docs

    Using getProjectAccessTokens

    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 getProjectAccessTokens(args: GetProjectAccessTokensArgs, opts?: InvokeOptions): Promise<GetProjectAccessTokensResult>
    function getProjectAccessTokensOutput(args: GetProjectAccessTokensOutputArgs, opts?: InvokeOptions): Output<GetProjectAccessTokensResult>
    def get_project_access_tokens(project: Optional[str] = None,
                                  state: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetProjectAccessTokensResult
    def get_project_access_tokens_output(project: Optional[pulumi.Input[str]] = None,
                                  state: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetProjectAccessTokensResult]
    func GetProjectAccessTokens(ctx *Context, args *GetProjectAccessTokensArgs, opts ...InvokeOption) (*GetProjectAccessTokensResult, error)
    func GetProjectAccessTokensOutput(ctx *Context, args *GetProjectAccessTokensOutputArgs, opts ...InvokeOption) GetProjectAccessTokensResultOutput

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

    public static class GetProjectAccessTokens 
    {
        public static Task<GetProjectAccessTokensResult> InvokeAsync(GetProjectAccessTokensArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectAccessTokensResult> Invoke(GetProjectAccessTokensInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectAccessTokensResult> getProjectAccessTokens(GetProjectAccessTokensArgs args, InvokeOptions options)
    public static Output<GetProjectAccessTokensResult> getProjectAccessTokens(GetProjectAccessTokensArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gitlab:index/getProjectAccessTokens:getProjectAccessTokens
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Project string
    The name or id of the project.
    State string
    List all project access token that match the specified state. Valid values are active, inactive. Returns all project access token if not set.
    Project string
    The name or id of the project.
    State string
    List all project access token that match the specified state. Valid values are active, inactive. Returns all project access token if not set.
    project String
    The name or id of the project.
    state String
    List all project access token that match the specified state. Valid values are active, inactive. Returns all project access token if not set.
    project string
    The name or id of the project.
    state string
    List all project access token that match the specified state. Valid values are active, inactive. Returns all project access token if not set.
    project str
    The name or id of the project.
    state str
    List all project access token that match the specified state. Valid values are active, inactive. Returns all project access token if not set.
    project String
    The name or id of the project.
    state String
    List all project access token that match the specified state. Valid values are active, inactive. Returns all project access token if not set.

    getProjectAccessTokens Result

    The following output properties are available:

    AccessTokens List<Pulumi.GitLab.Outputs.GetProjectAccessTokensAccessToken>
    The list of access tokens returned by the search
    Id string
    Project string
    The name or id of the project.
    State string
    List all project access token that match the specified state. Valid values are active, inactive. Returns all project access token if not set.
    AccessTokens []GetProjectAccessTokensAccessToken
    The list of access tokens returned by the search
    Id string
    Project string
    The name or id of the project.
    State string
    List all project access token that match the specified state. Valid values are active, inactive. Returns all project access token if not set.
    accessTokens List<GetProjectAccessTokensAccessToken>
    The list of access tokens returned by the search
    id String
    project String
    The name or id of the project.
    state String
    List all project access token that match the specified state. Valid values are active, inactive. Returns all project access token if not set.
    accessTokens GetProjectAccessTokensAccessToken[]
    The list of access tokens returned by the search
    id string
    project string
    The name or id of the project.
    state string
    List all project access token that match the specified state. Valid values are active, inactive. Returns all project access token if not set.
    access_tokens Sequence[GetProjectAccessTokensAccessToken]
    The list of access tokens returned by the search
    id str
    project str
    The name or id of the project.
    state str
    List all project access token that match the specified state. Valid values are active, inactive. Returns all project access token if not set.
    accessTokens List<Property Map>
    The list of access tokens returned by the search
    id String
    project String
    The name or id of the project.
    state String
    List all project access token that match the specified state. Valid values are active, inactive. Returns all project access token if not set.

    Supporting Types

    GetProjectAccessTokensAccessToken

    AccessLevel string
    Active bool
    CreatedAt string
    Description string
    ExpiresAt string
    Id string
    LastUsedAt string
    Name string
    Project string
    Revoked bool
    Scopes List<string>
    UserId int
    AccessLevel string
    Active bool
    CreatedAt string
    Description string
    ExpiresAt string
    Id string
    LastUsedAt string
    Name string
    Project string
    Revoked bool
    Scopes []string
    UserId int
    accessLevel String
    active Boolean
    createdAt String
    description String
    expiresAt String
    id String
    lastUsedAt String
    name String
    project String
    revoked Boolean
    scopes List<String>
    userId Integer
    accessLevel string
    active boolean
    createdAt string
    description string
    expiresAt string
    id string
    lastUsedAt string
    name string
    project string
    revoked boolean
    scopes string[]
    userId number
    accessLevel String
    active Boolean
    createdAt String
    description String
    expiresAt String
    id String
    lastUsedAt String
    name String
    project String
    revoked Boolean
    scopes List<String>
    userId Number

    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.2.0 published on Friday, Jul 18, 2025 by Pulumi