public class DeployKeysApi extends AbstractApi
Constants.ActionType, Constants.ArchiveFormat, Constants.EpicOrderBy, Constants.GroupOrderBy, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.SortOrder, Constants.StateEvent, Constants.TargetType, Constants.TokenType
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
Constructor and Description |
---|
DeployKeysApi(GitLabApi gitLabApi) |
Modifier and Type | Method and Description |
---|---|
DeployKey |
addDeployKey(Integer projectId,
String title,
String key,
Boolean canPush)
Creates a new deploy key for a project.
|
void |
deleteDeployKey(Integer projectId,
Integer keyId)
Removes a deploy key from the project.
|
DeployKey |
enableDeployKey(Integer projectId,
Integer keyId)
Enables a deploy key for a project so this can be used.
|
DeployKey |
getDeployKey(Integer projectId,
Integer keyId)
Get a single deploy key for the specified project.
|
List<DeployKey> |
getDeployKeys()
Get a list of all deploy keys across all projects of the GitLab instance.
|
Pager<DeployKey> |
getDeployKeys(int itemsPerPage)
Get a Pager of all deploy keys across all projects of the GitLab instance.
|
List<DeployKey> |
getDeployKeys(int page,
int perPage)
Get a list of all deploy keys across all projects of the GitLab instance using the specified page and per page settings.
|
Optional<DeployKey> |
getOptionalDeployKey(Integer projectId,
Integer keyId)
Get a single deploy key for the specified project as an Optional instance.
|
List<DeployKey> |
getProjectDeployKeys(Integer projectId)
Get a list of the deploy keys for the specified project.
|
Pager<DeployKey> |
getProjectDeployKeys(Integer projectId,
Integer itemsPerPage)
Get a Pager of the deploy keys for the specified project.
|
List<DeployKey> |
getProjectDeployKeys(Integer projectId,
int page,
int perPage)
Get a list of the deploy keys for the specified project using the specified page and per page settings.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getPageQueryParams, getPageQueryParams, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, putWithFormData, upload, upload, urlEncode, validate
public DeployKeysApi(GitLabApi gitLabApi)
public List<DeployKey> getDeployKeys() throws GitLabApiException
GitLabApiException
- if any exception occurspublic List<DeployKey> getDeployKeys(int page, int perPage) throws GitLabApiException
page
- the page to getperPage
- the number of deploy keys per pageGitLabApiException
- if any exception occurspublic Pager<DeployKey> getDeployKeys(int itemsPerPage) throws GitLabApiException
itemsPerPage
- the number of DeployKey instances that will be fetched per pageGitLabApiException
- if any exception occurspublic List<DeployKey> getProjectDeployKeys(Integer projectId) throws GitLabApiException
projectId
- the ID of the projectGitLabApiException
- if any exception occurspublic List<DeployKey> getProjectDeployKeys(Integer projectId, int page, int perPage) throws GitLabApiException
projectId
- the ID of the projectpage
- the page to getperPage
- the number of deploy keys per pageGitLabApiException
- if any exception occurspublic Pager<DeployKey> getProjectDeployKeys(Integer projectId, Integer itemsPerPage) throws GitLabApiException
projectId
- the ID of the projectitemsPerPage
- the number of DeployKey instances that will be fetched per pageGitLabApiException
- if any exception occurspublic DeployKey getDeployKey(Integer projectId, Integer keyId) throws GitLabApiException
projectId
- the ID of the projectkeyId
- the ID of the deploy key to deleteGitLabApiException
- if any exception occurspublic Optional<DeployKey> getOptionalDeployKey(Integer projectId, Integer keyId)
projectId
- the ID of the projectkeyId
- the ID of the deploy key to deletepublic DeployKey addDeployKey(Integer projectId, String title, String key, Boolean canPush) throws GitLabApiException
projectId
- the ID of the project owned by the authenticated user, requiredtitle
- the new deploy key's title, requiredkey
- the new deploy key, requiredcanPush
- can deploy key push to the project's repository, optionalGitLabApiException
- if any exception occurspublic void deleteDeployKey(Integer projectId, Integer keyId) throws GitLabApiException
projectId
- the ID of the projectkeyId
- the ID of the deploy key to deleteGitLabApiException
- if any exception occurspublic DeployKey enableDeployKey(Integer projectId, Integer keyId) throws GitLabApiException
projectId
- the ID of the projectkeyId
- the ID of the deploy key to enableGitLabApiException
- if any exception occursCopyright © 2018. All rights reserved.