Package com.adobe.aio.cloudmanager
Interface Environment
-
public interface EnvironmentAn Environment definition.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classEnvironment.NamePredicatePredicate to use for retrieving an environment based on its name.static classEnvironment.TierTiers within an Environmentstatic classEnvironment.TypeRepresentation of the different environment types.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddRegionDeployment(Region region)Add a deployment to the specified region.voiddelete()Delete this environment.voiddelete(boolean ignoreFailure)Delete this environment, with option to ignore resource deletion failure.Collection<EnvironmentLog>downloadLogs(LogOption logOption, int days, File dir)Download the logs for this environment, to the specified directory.StringgetDeveloperConsoleUrl()Retrieve the Developer Console URL for this Environment.Environment.TypegetEnvType()The type of this environmentStringgetId()The id of this environmentStringgetLogDownloadUrl(@NotNull LogOption option, @NotNull LocalDate date)Retrieve the fully qualified URL to the log file for download.Collection<LogOption>getLogOptions()A list of available log options for downloading.StringgetName()The name of this environmentStringgetProgramId()The id of the program context of this environment.Set<Variable>getVariables()List the variables configured in this environment.Collection<EnvironmentLog>listLogs(@NotNull LogOption option, int days)List available logs of the specified type, for the number of days.Collection<RegionDeployment>listRegionDeployments()List the deployment regions for this environmentvoidremoveRegionDeployment(Region region)Remove the the the deployment from the specified region.voidreset()Reset this environment, if it is of type RDE.Set<Variable>setVariables(Variable... variables)Set the variables on this environment.
-
-
-
Method Detail
-
getId
String getId()
The id of this environment- Returns:
- the id
-
getProgramId
String getProgramId()
The id of the program context of this environment.- Returns:
- the program id
-
getName
String getName()
The name of this environment- Returns:
- the name
-
getEnvType
Environment.Type getEnvType()
The type of this environment- Returns:
- type
-
getLogOptions
Collection<LogOption> getLogOptions()
A list of available log options for downloading.- Returns:
- list of log options
-
delete
void delete() throws DeleteInProgressException, CloudManagerApiExceptionDelete this environment.- Throws:
DeleteInProgressException- if the delete operation is already activeCloudManagerApiException- when any error occurs
-
delete
void delete(boolean ignoreFailure) throws DeleteInProgressException, CloudManagerApiExceptionDelete this environment, with option to ignore resource deletion failure.- Parameters:
ignoreFailure- flag to ignore failures- Throws:
DeleteInProgressException- if the delete operation is already activeCloudManagerApiException- when any error occurs
-
listLogs
Collection<EnvironmentLog> listLogs(@NotNull @NotNull LogOption option, int days) throws CloudManagerApiException
List available logs of the specified type, for the number of days.- Parameters:
option- the log option detailsdays- number of days of logs to list- Returns:
- the list of logs
- Throws:
CloudManagerApiException- when any error occurs
-
getLogDownloadUrl
String getLogDownloadUrl(@NotNull @NotNull LogOption option, @NotNull @NotNull LocalDate date) throws CloudManagerApiException
Retrieve the fully qualified URL to the log file for download.- Parameters:
option- 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
-
listRegionDeployments
Collection<RegionDeployment> listRegionDeployments() throws CloudManagerApiException
List the deployment regions for this environment- Returns:
- list of deployments
- Throws:
CloudManagerApiException- when any error occurs
-
addRegionDeployment
void addRegionDeployment(Region region) throws CloudManagerApiException
Add a deployment to the specified region.- Parameters:
region- the region- Throws:
CloudManagerApiException- when any error occurs
-
removeRegionDeployment
void removeRegionDeployment(Region region) throws CloudManagerApiException
Remove the the the deployment from the specified region.- Parameters:
region- the region- Throws:
CloudManagerApiException- when any error occurs
-
getVariables
Set<Variable> getVariables() throws CloudManagerApiException
List the variables configured in this environment.- Returns:
- the set of variables
- Throws:
CloudManagerApiException- when any error occurs
-
setVariables
Set<Variable> setVariables(Variable... variables) throws CloudManagerApiException
Set the variables on this environment.- Parameters:
variables- the variables to set- Returns:
- the complete list of variables in this environment
- Throws:
CloudManagerApiException- when any error occurs
-
reset
void reset() throws CloudManagerApiExceptionReset this environment, if it is of type RDE. Any other type of environment results in a NOOP- Throws:
CloudManagerApiException- when any error occurs
-
getDeveloperConsoleUrl
String getDeveloperConsoleUrl() throws CloudManagerApiException
Retrieve the Developer Console URL for this Environment.- Returns:
- the url to the developer console.
- Throws:
CloudManagerApiException- when any error occurs
-
downloadLogs
Collection<EnvironmentLog> downloadLogs(LogOption logOption, int days, File dir) throws CloudManagerApiException
Download the logs for this environment, to the specified directory.- Parameters:
logOption- the log file referencedays- the number of days to downloaddir- the directory in which to place the log files- Returns:
- a list of EnvironmentLogs with details about the downloaded files
- Throws:
CloudManagerApiException- when any error occurs
-
-