Package com.adobe.aio.cloudmanager
Interface EnvironmentApi
-
public interface EnvironmentApi
Environment APISee the Environment API documentation. See the Region Deployments API documentation. See the Variable API documentation. See the RDE API documentation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Environment
create(@NotNull String programId, @NotNull String name, Environment.Type type, @NotNull String region, String description)
Create a new environment in the program.void
createRegionDeployments(@NotNull Environment environment, @NotNull Region... regions)
Create a new deployment in the specified region.void
delete(@NotNull Environment environment)
Delete the environment.void
delete(@NotNull Environment environment, boolean ignoreFailure)
Delete the environment.void
delete(@NotNull String programId, @NotNull String environmentId)
Delete the environment in the specified program.void
delete(@NotNull String programId, @NotNull String environmentId, boolean ignoreFailure)
Delete the environment, with option to ignore resource deletion failure.@NotNull Collection<EnvironmentLog>
downloadLogs(@NotNull Environment environment, @NotNull LogOption logOption, int days, @NotNull File dir)
Downloads the logs for the environment, to the specified folder.@NotNull Collection<EnvironmentLog>
downloadLogs(@NotNull String programId, @NotNull String environmentId, @NotNull LogOption logOption, int days, @NotNull File dir)
Downloads the logs for the environment, to the specified folder.Environment
get(@NotNull String programId, @NotNull String environmentId)
Retrieve the environment within the program context.Optional<Environment>
get(@NotNull String programId, @NotNull Predicate<Environment> predicate)
Returns the first environment which matches the predicate, within the program context.String
getLogDownloadUrl(@NotNull Environment environment, @NotNull LogOption option, @NotNull LocalDate date)
Get the fully qualified URL to the log file for download.String
getLogDownloadUrl(@NotNull String programId, @NotNull String environmentId, @NotNull LogOption option, @NotNull LocalDate date)
Get the fully qualified URL to the log file for download.@NotNull RegionDeployment
getRegionDeployment(@NotNull String programId, @NotNull String environmentId, @NotNull String deploymentId)
Get the region deployment.@NotNull Set<Variable>
getVariables(@NotNull Environment environment)
List all variables associated with the environment.@NotNull Set<Variable>
getVariables(@NotNull String programId, @NotNull String environmentId)
List all variables associated with the environment.@NotNull Collection<Environment>
list(@NotNull String programId)
List all environments in the program.@NotNull Collection<Environment>
list(@NotNull String programId, Environment.Type type)
List all environments in the program, of the specified type.Collection<EnvironmentLog>
listLogs(@NotNull Environment environment, @NotNull LogOption option, int days)
List logs of the specified type for the environment.Collection<EnvironmentLog>
listLogs(@NotNull String programId, @NotNull String environmentId, @NotNull LogOption option, int days)
List logs of the specified type for the environment.@NotNull Collection<RegionDeployment>
listRegionDeployments(@NotNull Environment environment)
Get the region deployment.@NotNull Collection<RegionDeployment>
listRegionDeployments(@NotNull String programId, @NotNull String environmentId)
Get the region deployment.void
removeRegionDeployments(@NotNull Environment environment, @NotNull Region... regions)
Remove the deployment from the specified region.void
resetRde(@NotNull Environment environment)
Reset the Rapid Development Environment.void
resetRde(@NotNull String programId, @NotNull String environmentId)
Reset the Rapid Development Environment.@NotNull Set<Variable>
setVariables(@NotNull Environment environment, Variable... variables)
Set the variables in the environment.@NotNull Set<Variable>
setVariables(@NotNull String programId, @NotNull String environmentId, Variable... variables)
Set the variables in the environment.
-
-
-
Method Detail
-
list
@NotNull @NotNull Collection<Environment> list(@NotNull @NotNull String programId) throws CloudManagerApiException
List all environments in the program.- Parameters:
programId
- the program id- Returns:
- list of environments
- Throws:
CloudManagerApiException
- when any error occurs
-
list
@NotNull @NotNull Collection<Environment> list(@NotNull @NotNull String programId, Environment.Type type) throws CloudManagerApiException
List all environments in the program, of the specified type.- Parameters:
programId
- the program idtype
- the type of environments to list- Returns:
- list of environments
- Throws:
CloudManagerApiException
- when any error occurs
-
create
@NotNull @NotNull Environment create(@NotNull @NotNull String programId, @NotNull @NotNull String name, @NotNull Environment.Type type, @NotNull @NotNull String region, String description) throws CloudManagerApiException
Create a new environment in the program.- Parameters:
programId
- the program in which to create the environmentname
- the name of the new environmenttype
- the type of environment to createregion
- the region in which to create the environmentdescription
- optional description of the environment- Returns:
- the newly created environment
- Throws:
CloudManagerApiException
- when any error occurs
-
get
Environment get(@NotNull @NotNull String programId, @NotNull @NotNull String environmentId) throws CloudManagerApiException
Retrieve the environment within the program context.- Parameters:
programId
- the program idenvironmentId
- the environment id- Returns:
- the environment
- Throws:
CloudManagerApiException
- when any error occurs
-
delete
void delete(@NotNull @NotNull String programId, @NotNull @NotNull String environmentId) throws DeleteInProgressException, CloudManagerApiException
Delete the environment in the specified program.- Parameters:
programId
- the program id of the environment contextenvironmentId
- the environment to delete- Throws:
DeleteInProgressException
- if the delete operation is already activeCloudManagerApiException
- when any error occurs
-
delete
void delete(@NotNull @NotNull Environment environment) throws DeleteInProgressException, CloudManagerApiException
Delete the environment.- Parameters:
environment
- the environment to delete- Throws:
DeleteInProgressException
- if the delete operation is already activeCloudManagerApiException
- when any error occurs
-
delete
void delete(@NotNull @NotNull String programId, @NotNull @NotNull String environmentId, boolean ignoreFailure) throws DeleteInProgressException, CloudManagerApiException
Delete the environment, with option to ignore resource deletion failure.- Parameters:
programId
- the program id of the environment contextenvironmentId
- the environment to deleteignoreFailure
- flag to ignore failures- Throws:
DeleteInProgressException
- if the delete operation is already activeCloudManagerApiException
- when any error occurs
-
delete
void delete(@NotNull @NotNull Environment environment, boolean ignoreFailure) throws DeleteInProgressException, CloudManagerApiException
Delete the environment.- Parameters:
environment
- the environment to deleteignoreFailure
- flag to ignore failures- Throws:
DeleteInProgressException
- if the delete operation is already activeCloudManagerApiException
- when any error occurs
-
listLogs
Collection<EnvironmentLog> listLogs(@NotNull @NotNull String programId, @NotNull @NotNull String environmentId, @NotNull @NotNull LogOption option, int days) throws CloudManagerApiException
List logs of the specified type for the environment.- Parameters:
programId
- the program id for the environmentenvironmentId
- the environment idoption
- the type of logs to listdays
- then number of days of logs to list- Returns:
- the list of environment logs
- Throws:
CloudManagerApiException
- when any error occurs
-
listLogs
Collection<EnvironmentLog> listLogs(@NotNull @NotNull Environment environment, @NotNull @NotNull LogOption option, int days) throws CloudManagerApiException
List logs of the specified type for the environment.- Parameters:
environment
- the environmentoption
- the type of logs to listdays
- then number of days of logs to list- Returns:
- the list of environment logs
- Throws:
CloudManagerApiException
- when any error occurs
-
getLogDownloadUrl
String getLogDownloadUrl(@NotNull @NotNull String programId, @NotNull @NotNull String environmentId, @NotNull @NotNull LogOption option, @NotNull @NotNull LocalDate date) throws CloudManagerApiException
Get the fully qualified URL to the log file for download.- Parameters:
programId
- the program id for the environmentenvironmentId
- the environment idoption
- the type of logs to downloaddate
- the date of the logs to download- Returns:
- the log file download url
- Throws:
CloudManagerApiException
- when any error occurs
-
getLogDownloadUrl
String getLogDownloadUrl(@NotNull @NotNull Environment environment, @NotNull @NotNull LogOption option, @NotNull @NotNull LocalDate date) throws CloudManagerApiException
Get the fully qualified URL to the log file for download.- Parameters:
environment
- the environmentoption
- the type of logs to downloaddate
- the date of the logs to download- Returns:
- the log file download url
- Throws:
CloudManagerApiException
- when any error occurs
-
getRegionDeployment
@NotNull @NotNull RegionDeployment getRegionDeployment(@NotNull @NotNull String programId, @NotNull @NotNull String environmentId, @NotNull @NotNull String deploymentId) throws CloudManagerApiException
Get the region deployment.- Parameters:
programId
- the program id of the deploymentenvironmentId
- the environment id of the deploymentdeploymentId
- the id of the deployment- Returns:
- the region deployment details
- Throws:
CloudManagerApiException
- when any error occurs
-
listRegionDeployments
@NotNull @NotNull Collection<RegionDeployment> listRegionDeployments(@NotNull @NotNull String programId, @NotNull @NotNull String environmentId) throws CloudManagerApiException
Get the region deployment.- Parameters:
programId
- the program id contextenvironmentId
- the environment id context- Returns:
- the region deployment details
- Throws:
CloudManagerApiException
- when any error occurs
-
listRegionDeployments
@NotNull @NotNull Collection<RegionDeployment> listRegionDeployments(@NotNull @NotNull Environment environment) throws CloudManagerApiException
Get the region deployment.- Parameters:
environment
- the environment context- Returns:
- the region deployment details
- Throws:
CloudManagerApiException
- when any error occurs
-
createRegionDeployments
void createRegionDeployments(@NotNull @NotNull Environment environment, @NotNull @NotNull Region... regions) throws CloudManagerApiException
Create a new deployment in the specified region.- Parameters:
environment
- the environment to updateregions
- the regions in which to deploy- Throws:
CloudManagerApiException
- when any error occurs
-
removeRegionDeployments
void removeRegionDeployments(@NotNull @NotNull Environment environment, @NotNull @NotNull Region... regions) throws CloudManagerApiException
Remove the deployment from the specified region.- Parameters:
environment
- the environment to updateregions
- the regions from which to remove the deployment- Throws:
CloudManagerApiException
- when any error occurs
-
getVariables
@NotNull @NotNull Set<Variable> getVariables(@NotNull @NotNull String programId, @NotNull @NotNull String environmentId) throws CloudManagerApiException
List all variables associated with the environment.- Parameters:
programId
- the program id of the environmentenvironmentId
- the environment id- Returns:
- set of variables in the environment
- Throws:
CloudManagerApiException
- when any error occurs
-
getVariables
@NotNull @NotNull Set<Variable> getVariables(@NotNull @NotNull Environment environment) throws CloudManagerApiException
List all variables associated with the environment.- Parameters:
environment
- the environment- Returns:
- set of variables in the environment
- Throws:
CloudManagerApiException
- when any error occurs
-
setVariables
@NotNull @NotNull Set<Variable> setVariables(@NotNull @NotNull String programId, @NotNull @NotNull String environmentId, Variable... variables) throws CloudManagerApiException
Set the variables in the environment.- Parameters:
programId
- the program id of the environmentenvironmentId
- the environment idvariables
- the variables to set- Returns:
- updated list of variables in the environment
- Throws:
CloudManagerApiException
- when any error occurs
-
setVariables
@NotNull @NotNull Set<Variable> setVariables(@NotNull @NotNull Environment environment, Variable... variables) throws CloudManagerApiException
Set the variables in the environment.- Parameters:
environment
- the environment contextvariables
- the variables to set- Returns:
- updated list of variables in the environment
- Throws:
CloudManagerApiException
- when any error occurs
-
resetRde
void resetRde(@NotNull @NotNull String programId, @NotNull @NotNull String environmentId) throws CloudManagerApiException
Reset the Rapid Development Environment. If the environment is not an RDE, result is undefined.- Parameters:
programId
- the program id of the environmentenvironmentId
- the environment id- Throws:
CloudManagerApiException
- when any error occurs
-
resetRde
void resetRde(@NotNull @NotNull Environment environment) throws CloudManagerApiException
Reset the Rapid Development Environment. If the environment is not an RDE, result is undefined.- Parameters:
environment
- the environment- Throws:
CloudManagerApiException
- when any error occurs
-
get
Optional<Environment> get(@NotNull @NotNull String programId, @NotNull @NotNull Predicate<Environment> predicate) throws CloudManagerApiException
Returns the first environment which matches the predicate, within the program context.- Parameters:
programId
- the program idpredicate
- environment filter- Returns:
- the environment
- Throws:
CloudManagerApiException
- when any error occurs
-
downloadLogs
@NotNull @NotNull Collection<EnvironmentLog> downloadLogs(@NotNull @NotNull String programId, @NotNull @NotNull String environmentId, @NotNull @NotNull LogOption logOption, int days, @NotNull @NotNull File dir) throws CloudManagerApiException
Downloads the logs for the environment, to the specified folder.- Parameters:
programId
- the program id context for the environmentenvironmentId
- the environment idlogOption
- the log file referencedays
- how many days of log files to retrievedir
- the directory in which to save the files- Returns:
- a list of EnvironmentLogs with details about the downloaded files
- Throws:
CloudManagerApiException
- when any error occurs
-
downloadLogs
@NotNull @NotNull Collection<EnvironmentLog> downloadLogs(@NotNull @NotNull Environment environment, @NotNull @NotNull LogOption logOption, int days, @NotNull @NotNull File dir) throws CloudManagerApiException
Downloads the logs for the environment, to the specified folder.- Parameters:
environment
- the environment contextlogOption
- the log file referencedays
- how many days of log files to retrievedir
- the directory in which to save the files- Returns:
- a list of EnvironmentLogs with details about the downloaded files
- Throws:
CloudManagerApiException
- when any error occurs
-
-