1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getUserSshkeys
GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi

gitlab.getUserSshkeys

Explore with Pulumi AI

gitlab logo
GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi

    The gitlab.getUserSshkeys data source allows a list of SSH keys to be retrieved by either the user ID or username.

    Upstream API: GitLab REST API docs

    Using getUserSshkeys

    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 getUserSshkeys(args: GetUserSshkeysArgs, opts?: InvokeOptions): Promise<GetUserSshkeysResult>
    function getUserSshkeysOutput(args: GetUserSshkeysOutputArgs, opts?: InvokeOptions): Output<GetUserSshkeysResult>
    def get_user_sshkeys(user_id: Optional[int] = None,
                         username: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetUserSshkeysResult
    def get_user_sshkeys_output(user_id: Optional[pulumi.Input[int]] = None,
                         username: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetUserSshkeysResult]
    func GetUserSshkeys(ctx *Context, args *GetUserSshkeysArgs, opts ...InvokeOption) (*GetUserSshkeysResult, error)
    func GetUserSshkeysOutput(ctx *Context, args *GetUserSshkeysOutputArgs, opts ...InvokeOption) GetUserSshkeysResultOutput

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

    public static class GetUserSshkeys 
    {
        public static Task<GetUserSshkeysResult> InvokeAsync(GetUserSshkeysArgs args, InvokeOptions? opts = null)
        public static Output<GetUserSshkeysResult> Invoke(GetUserSshkeysInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUserSshkeysResult> getUserSshkeys(GetUserSshkeysArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gitlab:index/getUserSshkeys:getUserSshkeys
      arguments:
        # arguments dictionary

    The following arguments are supported:

    UserId int
    ID of the user to get the SSH keys for.
    Username string
    Username of the user to get the SSH keys for.
    UserId int
    ID of the user to get the SSH keys for.
    Username string
    Username of the user to get the SSH keys for.
    userId Integer
    ID of the user to get the SSH keys for.
    username String
    Username of the user to get the SSH keys for.
    userId number
    ID of the user to get the SSH keys for.
    username string
    Username of the user to get the SSH keys for.
    user_id int
    ID of the user to get the SSH keys for.
    username str
    Username of the user to get the SSH keys for.
    userId Number
    ID of the user to get the SSH keys for.
    username String
    Username of the user to get the SSH keys for.

    getUserSshkeys Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Keys List<Pulumi.GitLab.Outputs.GetUserSshkeysKey>
    The user's keys.
    UserId int
    ID of the user to get the SSH keys for.
    Username string
    Username of the user to get the SSH keys for.
    Id string
    The provider-assigned unique ID for this managed resource.
    Keys []GetUserSshkeysKey
    The user's keys.
    UserId int
    ID of the user to get the SSH keys for.
    Username string
    Username of the user to get the SSH keys for.
    id String
    The provider-assigned unique ID for this managed resource.
    keys List<GetUserSshkeysKey>
    The user's keys.
    userId Integer
    ID of the user to get the SSH keys for.
    username String
    Username of the user to get the SSH keys for.
    id string
    The provider-assigned unique ID for this managed resource.
    keys GetUserSshkeysKey[]
    The user's keys.
    userId number
    ID of the user to get the SSH keys for.
    username string
    Username of the user to get the SSH keys for.
    id str
    The provider-assigned unique ID for this managed resource.
    keys Sequence[GetUserSshkeysKey]
    The user's keys.
    user_id int
    ID of the user to get the SSH keys for.
    username str
    Username of the user to get the SSH keys for.
    id String
    The provider-assigned unique ID for this managed resource.
    keys List<Property Map>
    The user's keys.
    userId Number
    ID of the user to get the SSH keys for.
    username String
    Username of the user to get the SSH keys for.

    Supporting Types

    GetUserSshkeysKey

    CreatedAt string
    The time when this key was created in GitLab.
    ExpiresAt string
    The expiration date of the SSH key in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ)
    Key string
    The ssh key. The SSH key comment (trailing part) is optional and ignored for diffing, because GitLab overrides it with the username and GitLab hostname.
    KeyId int
    The ID of the ssh key.
    Title string
    The title of the ssh key.
    UserId int
    The ID or username of the user. If this field is omitted, this resource manages a SSH key for the current user. Otherwise, this resource manages a SSH key for the specified user, and an admin token is required.
    CreatedAt string
    The time when this key was created in GitLab.
    ExpiresAt string
    The expiration date of the SSH key in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ)
    Key string
    The ssh key. The SSH key comment (trailing part) is optional and ignored for diffing, because GitLab overrides it with the username and GitLab hostname.
    KeyId int
    The ID of the ssh key.
    Title string
    The title of the ssh key.
    UserId int
    The ID or username of the user. If this field is omitted, this resource manages a SSH key for the current user. Otherwise, this resource manages a SSH key for the specified user, and an admin token is required.
    createdAt String
    The time when this key was created in GitLab.
    expiresAt String
    The expiration date of the SSH key in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ)
    key String
    The ssh key. The SSH key comment (trailing part) is optional and ignored for diffing, because GitLab overrides it with the username and GitLab hostname.
    keyId Integer
    The ID of the ssh key.
    title String
    The title of the ssh key.
    userId Integer
    The ID or username of the user. If this field is omitted, this resource manages a SSH key for the current user. Otherwise, this resource manages a SSH key for the specified user, and an admin token is required.
    createdAt string
    The time when this key was created in GitLab.
    expiresAt string
    The expiration date of the SSH key in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ)
    key string
    The ssh key. The SSH key comment (trailing part) is optional and ignored for diffing, because GitLab overrides it with the username and GitLab hostname.
    keyId number
    The ID of the ssh key.
    title string
    The title of the ssh key.
    userId number
    The ID or username of the user. If this field is omitted, this resource manages a SSH key for the current user. Otherwise, this resource manages a SSH key for the specified user, and an admin token is required.
    created_at str
    The time when this key was created in GitLab.
    expires_at str
    The expiration date of the SSH key in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ)
    key str
    The ssh key. The SSH key comment (trailing part) is optional and ignored for diffing, because GitLab overrides it with the username and GitLab hostname.
    key_id int
    The ID of the ssh key.
    title str
    The title of the ssh key.
    user_id int
    The ID or username of the user. If this field is omitted, this resource manages a SSH key for the current user. Otherwise, this resource manages a SSH key for the specified user, and an admin token is required.
    createdAt String
    The time when this key was created in GitLab.
    expiresAt String
    The expiration date of the SSH key in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ)
    key String
    The ssh key. The SSH key comment (trailing part) is optional and ignored for diffing, because GitLab overrides it with the username and GitLab hostname.
    keyId Number
    The ID of the ssh key.
    title String
    The title of the ssh key.
    userId Number
    The ID or username of the user. If this field is omitted, this resource manages a SSH key for the current user. Otherwise, this resource manages a SSH key for the specified user, and an admin token is required.

    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 v8.5.0 published on Friday, Oct 18, 2024 by Pulumi