public class DeployKeysApi extends AbstractApi
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.CommitBuildState, Constants.DeploymentStatus, Constants.Encoding, Constants.EpicOrderBy, Constants.GroupOrderBy, Constants.GroupSearchScope, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestSearchIn, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
gitLabApi
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(Object projectIdOrPath,
String title,
String key,
Boolean canPush)
Creates a new deploy key for a project.
|
void |
deleteDeployKey(Object projectIdOrPath,
Integer keyId)
Removes a deploy key from the project.
|
DeployKey |
enableDeployKey(Object projectIdOrPath,
Integer keyId)
Enables a deploy key for a project so this can be used.
|
DeployKey |
getDeployKey(Object projectIdOrPath,
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.
|
Stream<DeployKey> |
getDeployKeysStream()
Get a Stream of all deploy keys across all projects of the GitLab instance.
|
Optional<DeployKey> |
getOptionalDeployKey(Object projectIdOrPath,
Integer keyId)
Get a single deploy key for the specified project as an Optional instance.
|
List<DeployKey> |
getProjectDeployKeys(Object projectIdOrPath)
Get a list of the deploy keys for the specified project.
|
Pager<DeployKey> |
getProjectDeployKeys(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of the deploy keys for the specified project.
|
List<DeployKey> |
getProjectDeployKeys(Object projectIdOrPath,
int page,
int perPage)
Get a list of the deploy keys for the specified project using the specified page and per page settings.
|
Stream<DeployKey> |
getProjectDeployKeysStream(Object projectIdOrPath)
Get a list of the deploy keys for the specified project.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
public DeployKeysApi(GitLabApi gitLabApi)
public List<DeployKey> getDeployKeys() throws GitLabApiException
GitLab Endpoint: GET /deploy_keys
GitLabApiException
- if any exception occurspublic List<DeployKey> getDeployKeys(int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /deploy_keys
page
- the page to getperPage
- the number of deploy keys per pageGitLabApiException
- if any exception occurspublic Pager<DeployKey> getDeployKeys(int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /deploy_keys
itemsPerPage
- the number of DeployKey instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Stream<DeployKey> getDeployKeysStream() throws GitLabApiException
GitLab Endpoint: GET /deploy_keys
GitLabApiException
- if any exception occurspublic List<DeployKey> getProjectDeployKeys(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deploy_keys
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic List<DeployKey> getProjectDeployKeys(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deploy_keys
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancepage
- the page to getperPage
- the number of deploy keys per pageGitLabApiException
- if any exception occurspublic Pager<DeployKey> getProjectDeployKeys(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deploy_keys
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance@param projectId the ID of the projectitemsPerPage
- the number of DeployKey instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Stream<DeployKey> getProjectDeployKeysStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deploy_keys
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic DeployKey getDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancekeyId
- the ID of the deploy key to deleteGitLabApiException
- if any exception occurspublic Optional<DeployKey> getOptionalDeployKey(Object projectIdOrPath, Integer keyId)
GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancekeyId
- the ID of the deploy key to deletepublic DeployKey addDeployKey(Object projectIdOrPath, String title, String key, Boolean canPush) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/deploy_keys
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancetitle
- 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(Object projectIdOrPath, Integer keyId) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/deploy_keys/:key_id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancekeyId
- the ID of the deploy key to deleteGitLabApiException
- if any exception occurspublic DeployKey enableDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/deploy_keys/:key_id/enable
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancekeyId
- the ID of the deploy key to enableGitLabApiException
- if any exception occursCopyright © 2020. All rights reserved.