Class Instance
java.lang.Object
co.yellowdog.platform.model.Instance
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
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 booleanbooleanThe 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.inthashCode()booleanisSpot()Indicates if this instance was provisioned via spot pricing vs on-demand.voidsetCreatedTime(Instant createdTime) The date and time when this instance was first created.voidsetHostname(String hostname) The hostname of this instance.voidsetId(InstanceId id) The unique identifier for this instance formed from the YellowDog Compute Source ID and the provider supplied instance IDvoidsetImageId(String imageId) The machine image ID used for this instance.voidsetInstanceType(String instanceType) The machine type of this instance.voidsetPrivateIpAddress(String privateIpAddress) The private IP address of this instance.voidsetProvider(CloudProvider provider) The cloud provider that supplies this instance.voidsetPublicIpAddress(String publicIpAddress) The public IP address of this instance.voidThe region where this instance is provisioned.voidsetSpot(boolean spot) Indicates if this instance was provisioned via spot pricing vs on-demand.voidsetStatus(InstanceStatus status) The status of this instance.voidsetStatusChangedTime(Instant statusChangedTime) The date and time when the status last changedvoidsetSubregion(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
-