public class EnvironmentsApi extends AbstractApi
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.ContributorOrderBy, Constants.DefaultBranchProtectionLevel, Constants.DeploymentOrderBy, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, Constants.EventScope, 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.PackageOrderBy, Constants.PackageStatus, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectAccessTokenScope, Constants.ProjectCreationLevel, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.SubgroupCreationLevel, 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(java.lang.Object projectIdOrPath,
java.lang.Long environmentId)
Stop an environment.
|
Environment |
createEnvironment(java.lang.Object projectIdOrPath,
java.lang.String name,
java.lang.String externalUrl)
Create a new environment with the given name and external_url.
|
void |
deleteEnvironment(java.lang.Object projectIdOrPath,
java.lang.Long environmentId)
Delete an environment.
|
Environment |
getEnvironment(java.lang.Object projectIdOrPath,
java.lang.Long environmentId)
Get a specific environment.
|
java.util.List<Environment> |
getEnvironments(java.lang.Object projectIdOrPath)
Get all environments for a given project.
|
Pager<Environment> |
getEnvironments(java.lang.Object projectIdOrPath,
int itemsPerPage)
Get a Pager of all environments for a given project.
|
java.util.stream.Stream<Environment> |
getEnvironmentsStream(java.lang.Object projectIdOrPath)
Get a Stream of all environments for a given project.
|
java.util.Optional<Environment> |
getOptionalEnvironment(java.lang.Object projectIdOrPath,
java.lang.Long environmentId)
Get a specific environment.
|
Environment |
stopEnvironment(java.lang.Object projectIdOrPath,
java.lang.Long environmentId)
Stop an environment.
|
Environment |
updateEnvironment(java.lang.Object projectIdOrPath,
java.lang.Long environmentId,
java.lang.String name,
java.lang.String externalUrl)
Update an existing environment.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, upload, urlEncode, validate
public EnvironmentsApi(GitLabApi gitLabApi)
public java.util.List<Environment> getEnvironments(java.lang.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 java.util.stream.Stream<Environment> getEnvironmentsStream(java.lang.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(java.lang.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(java.lang.Object projectIdOrPath, java.lang.Long 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 java.util.Optional<Environment> getOptionalEnvironment(java.lang.Object projectIdOrPath, java.lang.Long 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(java.lang.Object projectIdOrPath, java.lang.String name, java.lang.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(java.lang.Object projectIdOrPath, java.lang.Long environmentId, java.lang.String name, java.lang.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 Environment stopEnvironment(java.lang.Object projectIdOrPath, java.lang.Long 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 occurspublic void deleteEnvironment(java.lang.Object projectIdOrPath, java.lang.Long 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(java.lang.Object projectIdOrPath, java.lang.Long 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 occurs