Package jetbrains.buildServer.clouds
Interface CloudInstance
-
- All Superinterfaces:
CloudErrorProvider
- All Known Implementing Classes:
CloudStateHolder.InstanceState
,DummyCloudInstance
,StartInstanceUserAction.StartingInstance
public interface CloudInstance extends CloudErrorProvider
One cloud instance, running or stopped.- Since:
- 5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
containsAgent(AgentDescription agent)
Checks is the agent is running under this instanceCloudErrorInfo
getErrorInfo()
Returns currect error info ifgetStatus()
returnsInstanceStatus.ERROR
orInstanceStatus.ERROR_CANNOT_STOP
value.CloudImage
getImage()
Returns the reference to the handle of the image this instance started from.String
getImageId()
Returns the image identifierString
getInstanceId()
Returns the instance identifier.default String
getInstanceType()
Return the type of the instance (e.g.String
getName()
Name of the instance.String
getNetworkIdentity()
Returns the instance's DNS name (if one exists) or IPv4 address (if no DNS names).Date
getStartedTime()
Returns the instance started time.InstanceStatus
getStatus()
current status of the instance
-
-
-
Method Detail
-
getInstanceId
@NotNull String getInstanceId()
Returns the instance identifier.
Must be unique within the profile.- Returns:
- instance identifier.
-
getName
@NotNull String getName()
Name of the instance. Name may change in the time.- Returns:
- name
-
getImageId
@NotNull String getImageId()
Returns the image identifier- Returns:
- image identifier.
- See Also:
CloudImage.getId()
-
getImage
@NotNull CloudImage getImage()
Returns the reference to the handle of the image this instance started from.- Returns:
- reference to the image descriptor (all instances started from one image returns a reference to the same java object).
-
getStartedTime
@NotNull Date getStartedTime()
Returns the instance started time.- Returns:
- started time.
-
getNetworkIdentity
@Nullable String getNetworkIdentity()
Returns the instance's DNS name (if one exists) or IPv4 address (if no DNS names).- Returns:
- DNS name (in form "host.domain.com") or IPv4 address (in form "12.34.56.78"), or null if the identity is unknown at this moment. Never returns empty strings.
-
getStatus
@NotNull InstanceStatus getStatus()
current status of the instance- Returns:
- status
-
getErrorInfo
@Nullable CloudErrorInfo getErrorInfo()
Returns currect error info ifgetStatus()
returnsInstanceStatus.ERROR
orInstanceStatus.ERROR_CANNOT_STOP
value.- Specified by:
getErrorInfo
in interfaceCloudErrorProvider
- Returns:
- error info or null
-
containsAgent
boolean containsAgent(@NotNull AgentDescription agent)
Checks is the agent is running under this instance- Parameters:
agent
- agent to check- Returns:
- true is agent is running under the instance
-
getInstanceType
@Nullable default String getInstanceType()
Return the type of the instance (e.g. "a1.medium", "n1-standard-1", etc)- Returns:
- see above
- Since:
- 2023.03
-
-