Class Instance
java.lang.Object
co.yellowdog.platform.model.Instance
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AlibabaInstance
,AwsInstance
,AzureInstance
,GceInstance
,OciInstance
,SimulatorInstance
Describes an instance provisioned for a compute requirement.
This class provides common fields shared across all compute provisioners. It is generally specialised for each provisioner to add extra fields specific to that provisioner.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The date and time when this instance was first created.The hostname of this instance.getId()
The unique identifier for this instance formed from the YellowDog Compute Source ID and the provider supplied instance IDThe machine image ID used for this instance.The machine type of this instance.The private IP address of this instance.The cloud provider that supplies this instance.The public IP address of this instance.The region where this instance is provisioned.The status of this instance.The date and time when the status last changedThe subregion where this instance is provisioned.int
hashCode()
boolean
isSpot()
Indicates if this instance was provisioned via spot pricing vs on-demand.void
setCreatedTime
(Instant createdTime) The date and time when this instance was first created.void
setHostname
(String hostname) The hostname of this instance.void
setId
(InstanceId id) The unique identifier for this instance formed from the YellowDog Compute Source ID and the provider supplied instance IDvoid
setImageId
(String imageId) The machine image ID used for this instance.void
setInstanceType
(String instanceType) The machine type of this instance.void
setPrivateIpAddress
(String privateIpAddress) The private IP address of this instance.void
setProvider
(CloudProvider provider) The cloud provider that supplies this instance.void
setPublicIpAddress
(String publicIpAddress) The public IP address of this instance.void
The region where this instance is provisioned.void
setSpot
(boolean spot) Indicates if this instance was provisioned via spot pricing vs on-demand.void
setStatus
(InstanceStatus status) The status of this instance.void
setStatusChangedTime
(Instant statusChangedTime) The date and time when the status last changedvoid
setSubregion
(String subregion) The subregion where this instance is provisioned.toString()
-
Constructor Details
-
Instance
public Instance()
-
-
Method Details
-
getCreatedTimeAccuracy
-
getId
The unique identifier for this instance formed from the YellowDog Compute Source ID and the provider supplied instance ID -
getCreatedTime
The date and time when this instance was first created.- Returns:
- the date and time when this instance was first created
-
getProvider
The cloud provider that supplies this instance.- Returns:
- the cloud provider that supplies this instance
-
getInstanceType
The machine type of this instance.- Returns:
- the machine type of this instance
-
getRegion
The region where this instance is provisioned.- Returns:
- the region where this instance is provisioned
-
getSubregion
The subregion where this instance is provisioned.- Returns:
- the subregion where this instance is provisioned
-
getImageId
The machine image ID used for this instance.- Returns:
- the machine image ID used for this instance
-
getHostname
-
getPrivateIpAddress
The private IP address of this instance.- Returns:
- the private IP adress of this instance
-
getPublicIpAddress
The public IP address of this instance.- Returns:
- the public IP address of this instance
-
isSpot
public boolean isSpot()Indicates if this instance was provisioned via spot pricing vs on-demand.- Returns:
- if this instance was provisioned via spot pricing
-
getStatus
-
getStatusChangedTime
The date and time when the status last changed- Returns:
- the date and time when the status last changed
-
setId
The unique identifier for this instance formed from the YellowDog Compute Source ID and the provider supplied instance ID -
setCreatedTime
The date and time when this instance was first created.- Parameters:
createdTime
- This should not be set outside of the YellowDog Compute service.
-
setProvider
The cloud provider that supplies this instance.- Parameters:
provider
- This should not be set outside of the YellowDog Compute service.
-
setInstanceType
The machine type of this instance.- Parameters:
instanceType
- This should not be set outside of the YellowDog Compute service.
-
setRegion
The region where this instance is provisioned.- Parameters:
region
- This should not be set outside of the YellowDog Compute service.
-
setSubregion
The subregion where this instance is provisioned.- Parameters:
subregion
- This should not be set outside of the YellowDog Compute service.
-
setImageId
The machine image ID used for this instance.- Parameters:
imageId
- This should not be set outside of the YellowDog Compute service.
-
setHostname
The hostname of this instance.- Parameters:
hostname
- This should not be set outside of the YellowDog Compute service.
-
setPrivateIpAddress
The private IP address of this instance.- Parameters:
privateIpAddress
- This should not be set outside of the YellowDog Compute service.
-
setPublicIpAddress
The public IP address of this instance.- Parameters:
publicIpAddress
- This should not be set outside of the YellowDog Compute service.
-
setSpot
public void setSpot(boolean spot) Indicates if this instance was provisioned via spot pricing vs on-demand.- Parameters:
spot
- This should not be set outside of the YellowDog Compute service.
-
setStatus
The status of this instance.- Parameters:
status
- This should not be set outside of the YellowDog Compute service.
-
setStatusChangedTime
The date and time when the status last changed- Parameters:
statusChangedTime
- This should not be set outside of the YellowDog Compute service.
-
equals
-
canEqual
-
hashCode
-
toString
-