GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi
gitlab.getUserSshkeys
Explore with Pulumi AI
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:
getUserSshkeys Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Keys
List<Pulumi.
Git Lab. Outputs. Get User Sshkeys Key> - The user's keys.
- User
Id 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
[]Get
User Sshkeys Key - The user's keys.
- User
Id 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<Get
User Sshkeys Key> - The user's keys.
- user
Id 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
Get
User Sshkeys Key[] - The user's keys.
- user
Id 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[Get
User Sshkeys Key] - 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.
- user
Id 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
- Created
At string - The time when this key was created in GitLab.
- Expires
At 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. - Key
Id int - The ID of the ssh key.
- Title string
- 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.
- Created
At string - The time when this key was created in GitLab.
- Expires
At 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. - Key
Id int - The ID of the ssh key.
- Title string
- 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.
- created
At String - The time when this key was created in GitLab.
- expires
At 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. - key
Id Integer - The ID of the ssh key.
- title String
- The title of the ssh key.
- user
Id 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.
- created
At string - The time when this key was created in GitLab.
- expires
At 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. - key
Id number - The ID of the ssh key.
- title string
- The title of the ssh key.
- user
Id 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.
- created
At String - The time when this key was created in GitLab.
- expires
At 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. - key
Id Number - The ID of the ssh key.
- title String
- The title of the ssh key.
- user
Id 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.