public class EnvironmentsApi 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 |
---|
EnvironmentsApi(GitLabApi gitLabApi) |
Modifier and Type | Method and Description |
---|---|
Environment |
createEnvironment(Object projectIdOrPath,
Integer environmentId)
Stop an environment.
|
Environment |
createEnvironment(Object projectIdOrPath,
String name,
String externalUrl)
Create a new environment with the given name and external_url.
|
void |
deleteEnvironment(Object projectIdOrPath,
Integer environmentId)
Delete an environment.
|
Environment |
getEnvironment(Object projectIdOrPath,
Integer environmentId)
Get a specific environment.
|
List<Environment> |
getEnvironments(Object projectIdOrPath)
Get all environments for a given project.
|
Pager<Environment> |
getEnvironments(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of all environments for a given project.
|
Stream<Environment> |
getEnvironmentsStream(Object projectIdOrPath)
Get a Stream of all environments for a given project.
|
Optional<Environment> |
getOptionalEnvironment(Object projectIdOrPath,
Integer environmentId)
Get a specific environment.
|
Environment |
updateEnvironment(Object projectIdOrPath,
Integer environmentId,
String name,
String externalUrl)
Update an existing environment.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
public EnvironmentsApi(GitLabApi gitLabApi)
public List<Environment> getEnvironments(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/environments
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic Stream<Environment> getEnvironmentsStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/environments
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic Pager<Environment> getEnvironments(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/environments
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathitemsPerPage
- the number of Environment instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Environment getEnvironment(Object projectIdOrPath, Integer environmentId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/environments/:environment_id
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathenvironmentId
- the ID of the environment to getGitLabApiException
- if any exception occurspublic Optional<Environment> getOptionalEnvironment(Object projectIdOrPath, Integer environmentId)
GitLab Endpoint: GET /projects/:id/environments/:environment_id
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathenvironmentId
- the ID of the environment to getpublic Environment createEnvironment(Object projectIdOrPath, String name, String externalUrl) throws GitLabApiException
GitLab Endpoint:POST /projects/:id/environments
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathname
- the name of the environmentexternalUrl
- the place to link to for this environmentGitLabApiException
- if any exception occurspublic Environment updateEnvironment(Object projectIdOrPath, Integer environmentId, String name, String externalUrl) throws GitLabApiException
GitLab Endpoint:POST /projects/:id/environments
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathenvironmentId
- the ID of the environment to updatename
- the name of the environmentexternalUrl
- the place to link to for this environmentGitLabApiException
- if any exception occurspublic void deleteEnvironment(Object projectIdOrPath, Integer environmentId) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/environments/:environment_id
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathenvironmentId
- the ID of the environment to deleteGitLabApiException
- if any exception occurspublic Environment createEnvironment(Object projectIdOrPath, Integer environmentId) throws GitLabApiException
GitLab Endpoint:POST /projects/:id/environments/:environment_id/stop
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathenvironmentId
- the ID of the environment to stopGitLabApiException
- if any exception occursCopyright © 2019. All rights reserved.