Class OciInstancesComputeSource
java.lang.Object
co.yellowdog.platform.model.OciInstancesComputeSource
- All Implemented Interfaces:
ComputeSource
,Credentialed
,Identified
,Named
,OciComputeSource
,Serializable
@JsonClassDescription("Details needed for provisioning distinct instances from OCI")
public class OciInstancesComputeSource
extends Object
implements OciComputeSource
Defines a source of compute composed of OCI instances provisioned individually.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A builder that can be used to build a new OciInstancesComputeSource that is automatically validated on build. -
Field Summary
Fields inherited from interface co.yellowdog.platform.model.ComputeSource
DEFAULT_ASSIGN_PUBLIC_IP
-
Constructor Summary
ConstructorsConstructorDescriptionOciInstancesComputeSource
(String name, String credential, String sshKey, String region, String availabilityDomain, String compartmentId, String imageId, String shape, Float flexOcpus, Float flexRam, Boolean preemptible, String subnetId, int limit, Boolean assignPublicIp, String userData, Map<String, String> instanceTags) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
protected boolean
boolean
The OCI availability domain where instances will be provisioned.The OCI compartment ID (ocid) where instances will be provisioned.Gets the ID of the source template if this source was created from a template.Return the names of the credentials to be used for this Credentialed entity.If this source is associated with an exhausted allowance, gets the exhaustion state.The number of OCPUs to provision on a flex type machine shapeThe amount of ram in GB to provision on a flex type machine shapegetId()
Returns the IDThe region-specific OCI Image ID (ocid) for the image to use for the provisioned instances.Gets the instance pricing for this source, e.g.A summary of instance counts according to instance statusGets the custom instance tags to be set on the provisioned instance at startup.int
getLimit()
Returns the limit in number of instances that can be provisioned from this source.getName()
Returns the name of this compute source (which must be unique within the containing ComputeRequirement).The OCI region where instances will be provisioned.getShape()
The machine shape to use for the provisioned instances.The public SSH key.Gets the current provisioning status of this source.Gets the message associated with the current provisioning status of this source.The region-specific OCI Subnet ID (ocid) for the subnet to use for the provisioned instances.Indicates if supporting resources have been created for this source.Returns an object describing behavioural traits specific to this compute source.Gets the user-data script to be passed to the provisioned instance at startup.int
hashCode()
boolean
Indicates if provisioned instances should be assigned public IP addresses.boolean
void
setAssignPublicIp
(boolean assignPublicIp) Indicates if provisioned instances should be assigned public IP addresses.void
setAvailabilityDomain
(String availabilityDomain) The OCI availability domain where instances will be provisioned.void
setCompartmentId
(String compartmentId) The OCI compartment ID (ocid) where instances will be provisioned.void
setCreatedFromId
(String createdFromId) Sets the source template IDvoid
setCredential
(String credential) void
setExhaustion
(ComputeSourceExhaustion exhaustion) void
setFlexOcpus
(Float flexOcpus) void
setFlexRam
(Float flexRam) void
Sets the IDvoid
setImageId
(String imageId) The region-specific OCI Image ID (ocid) for the image to use for the provisioned instances.void
setInstanceSummary
(InstanceSummary instanceSummary) void
setInstanceTags
(Map<@OciInstanceTagKey String, @OciInstanceTagValue String> instanceTags) Sets the custom instance tags to be set on the provisioned instance at startup.void
setLimit
(int limit) Sets the limit in number of instances that can be provisioned from this source.void
Sets the name of this compute source (which must be unique within the containing ComputeRequirement).void
setPreemptible
(boolean preemptible) void
The OCI region where instances will be provisioned.void
The machine shape to use for the provisioned instances.void
The public SSH key.void
setStatus
(ComputeSourceStatus status) Sets the current provisioning status of this source.void
setStatusMessage
(String statusMessage) Sets the message associated with the current provisioning status of this source.void
setSubnetId
(String subnetId) The region-specific OCI Subnet ID (ocid) for the subnet to use for the provisioned instances.void
setUserData
(String userData) Sets the user-data script to be passed to the provisioned instance at startup.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface co.yellowdog.platform.model.OciComputeSource
getInstanceType, getProvider, getSubregion, setInstanceType
-
Constructor Details
-
OciInstancesComputeSource
public OciInstancesComputeSource(String name, String credential, String sshKey, String region, String availabilityDomain, String compartmentId, String imageId, String shape, Float flexOcpus, Float flexRam, Boolean preemptible, String subnetId, int limit, Boolean assignPublicIp, String userData, Map<String, String> instanceTags)
-
-
Method Details
-
getTraits
Description copied from interface:ComputeSource
Returns an object describing behavioural traits specific to this compute source.- Specified by:
getTraits
in interfaceComputeSource
- Returns:
- an object describing behavioural traits specific to this compute source
-
getInstancePricing
Description copied from interface:ComputeSource
Gets the instance pricing for this source, e.g. Spot- Specified by:
getInstancePricing
in interfaceComputeSource
- Returns:
- the instance pricing for this source
-
getCredentials
Description copied from interface:Credentialed
Return the names of the credentials to be used for this Credentialed entity.- Specified by:
getCredentials
in interfaceCredentialed
- Returns:
- the names of the credentials to be used
-
getSupportingResourceCreated
Description copied from interface:ComputeSource
Indicates if supporting resources have been created for this source.- Specified by:
getSupportingResourceCreated
in interfaceComputeSource
- Returns:
- true, if supporting resources have been created for this source; false, if no supporting resources have been created; null, if unknown
-
builder
-
toBuilder
-
getId
Description copied from interface:Identified
Returns the ID- Specified by:
getId
in interfaceComputeSource
- Specified by:
getId
in interfaceIdentified
- Returns:
- the ID
-
getCreatedFromId
Description copied from interface:ComputeSource
Gets the ID of the source template if this source was created from a template.- Specified by:
getCreatedFromId
in interfaceComputeSource
- Returns:
- the ID of the source template if this source was created from a template
-
getName
Description copied from interface:ComputeSource
Returns the name of this compute source (which must be unique within the containing ComputeRequirement).- Specified by:
getName
in interfaceComputeSource
- Specified by:
getName
in interfaceNamed
- Returns:
- the name of this compute source
-
getCredential
- Specified by:
getCredential
in interfaceComputeSource
- Specified by:
getCredential
in interfaceOciComputeSource
-
getSshKey
The public SSH key. If provided, instances will be accessible with the matching private key through SSH.- Specified by:
getSshKey
in interfaceOciComputeSource
- Returns:
- the public SSH key
-
getRegion
The OCI region where instances will be provisioned.- Specified by:
getRegion
in interfaceComputeSource
- Returns:
- the OCI region where instances will be provisioned
-
getAvailabilityDomain
The OCI availability domain where instances will be provisioned.- Specified by:
getAvailabilityDomain
in interfaceOciComputeSource
- Returns:
- the OCI availability domain where instances will be provisioned
-
getCompartmentId
The OCI compartment ID (ocid) where instances will be provisioned.- Specified by:
getCompartmentId
in interfaceOciComputeSource
- Returns:
- the OCI compartment ID (ocid) where instances will be provisioned
-
getImageId
The region-specific OCI Image ID (ocid) for the image to use for the provisioned instances.- Specified by:
getImageId
in interfaceComputeSource
- Returns:
- the OCI Image ID (ocid) for the image to use for the provisioned instances
-
getShape
Description copied from interface:OciComputeSource
The machine shape to use for the provisioned instances.- Specified by:
getShape
in interfaceOciComputeSource
- Returns:
- the machine shape to use for the provisioned instances
-
getFlexOcpus
Description copied from interface:OciComputeSource
The number of OCPUs to provision on a flex type machine shape- Specified by:
getFlexOcpus
in interfaceOciComputeSource
- Returns:
- the number of OCPUs to provision on a flex type machine shape
-
getFlexRam
Description copied from interface:OciComputeSource
The amount of ram in GB to provision on a flex type machine shape- Specified by:
getFlexRam
in interfaceOciComputeSource
- Returns:
- the amount of ram in GB to provision on a flex type machine shape
-
isPreemptible
public boolean isPreemptible() -
getSubnetId
The region-specific OCI Subnet ID (ocid) for the subnet to use for the provisioned instances.- Specified by:
getSubnetId
in interfaceOciComputeSource
- Returns:
- the region-specific OCI Subnet ID (ocid) for the subnet to use for the provisioned instances
-
getLimit
public int getLimit()Description copied from interface:ComputeSource
Returns the limit in number of instances that can be provisioned from this source.- Specified by:
getLimit
in interfaceComputeSource
- Returns:
- the limit in number of instances that can be provisioned from this source
-
isAssignPublicIp
public boolean isAssignPublicIp()Indicates if provisioned instances should be assigned public IP addresses.- Specified by:
isAssignPublicIp
in interfaceOciComputeSource
- Returns:
- true, if provisioned instances should be assigned public IP addresses; otherwise, false
-
getUserData
Description copied from interface:ComputeSource
Gets the user-data script to be passed to the provisioned instance at startup.- Specified by:
getUserData
in interfaceComputeSource
- Returns:
- the user-data script
-
getInstanceTags
Description copied from interface:ComputeSource
Gets the custom instance tags to be set on the provisioned instance at startup.- Specified by:
getInstanceTags
in interfaceComputeSource
- Returns:
- the custom instance tags
-
getInstanceSummary
Description copied from interface:ComputeSource
A summary of instance counts according to instance status- Specified by:
getInstanceSummary
in interfaceComputeSource
- Returns:
- a summary of instance counts according to instance status
-
getStatus
Description copied from interface:ComputeSource
Gets the current provisioning status of this source.- Specified by:
getStatus
in interfaceComputeSource
- Returns:
- the current provisioning status of this source
-
getStatusMessage
Description copied from interface:ComputeSource
Gets the message associated with the current provisioning status of this source. Returns null if no further detail is relevant to the status.- Specified by:
getStatusMessage
in interfaceComputeSource
- Returns:
- the message associated with the current provisioning status of this source
-
getExhaustion
Description copied from interface:ComputeSource
If this source is associated with an exhausted allowance, gets the exhaustion state.- Specified by:
getExhaustion
in interfaceComputeSource
- Returns:
- the exhaustion state, if the source is associated with an exhausted allowance; otherwise, null
-
setId
Description copied from interface:ComputeSource
Sets the ID- Specified by:
setId
in interfaceComputeSource
- Parameters:
id
- This should only be set by the YellowDog Platform
-
setCreatedFromId
Description copied from interface:ComputeSource
Sets the source template ID- Specified by:
setCreatedFromId
in interfaceComputeSource
- Parameters:
createdFromId
- This should only be set by the YellowDog Platform
-
setName
Description copied from interface:ComputeSource
Sets the name of this compute source (which must be unique within the containing ComputeRequirement).- Specified by:
setName
in interfaceComputeSource
- Parameters:
name
- the name of this compute source
-
setCredential
-
setSshKey
The public SSH key. If provided, instances will be accessible with the matching private key through SSH.- Parameters:
sshKey
- the public SSH key
-
setRegion
The OCI region where instances will be provisioned.- Parameters:
region
- the OCI region where instances will be provisioned
This should not be changed once the requirement has been submitted to YellowDog Compute.
-
setAvailabilityDomain
The OCI availability domain where instances will be provisioned.- Parameters:
availabilityDomain
- the OCI availability domain where instances will be provisioned
This should not be changed once the requirement has been submitted to YellowDog Compute.
-
setCompartmentId
The OCI compartment ID (ocid) where instances will be provisioned.- Parameters:
compartmentId
- the OCI compartment ID (ocid) where instances will be provisioned
This should not be changed once the requirement has been submitted to YellowDog Compute.
-
setImageId
The region-specific OCI Image ID (ocid) for the image to use for the provisioned instances.- Specified by:
setImageId
in interfaceComputeSource
- Parameters:
imageId
- the OCI Image ID (ocid) for the image to use for the provisioned instances
-
setShape
Description copied from interface:OciComputeSource
The machine shape to use for the provisioned instances.- Specified by:
setShape
in interfaceOciComputeSource
- Parameters:
shape
- the machine shape to use for the provisioned instances
-
setFlexOcpus
-
setFlexRam
-
setPreemptible
public void setPreemptible(boolean preemptible) -
setSubnetId
The region-specific OCI Subnet ID (ocid) for the subnet to use for the provisioned instances.- Parameters:
subnetId
- the region-specific OCI Subnet ID (ocid) for the subnet to use for the provisioned instances
-
setLimit
public void setLimit(int limit) Description copied from interface:ComputeSource
Sets the limit in number of instances that can be provisioned from this source.- Specified by:
setLimit
in interfaceComputeSource
- Parameters:
limit
- the limit in number of instances that can be provisioned from this source
-
setAssignPublicIp
public void setAssignPublicIp(boolean assignPublicIp) Indicates if provisioned instances should be assigned public IP addresses.- Parameters:
assignPublicIp
- true, if provisioned instances should be assigned public IP addresses; otherwise, false
-
setUserData
Description copied from interface:ComputeSource
Sets the user-data script to be passed to the provisioned instance at startup.- Specified by:
setUserData
in interfaceComputeSource
- Parameters:
userData
- the user-data script
-
setInstanceTags
public void setInstanceTags(Map<@OciInstanceTagKey String, @OciInstanceTagValue String> instanceTags) Description copied from interface:ComputeSource
Sets the custom instance tags to be set on the provisioned instance at startup.- Specified by:
setInstanceTags
in interfaceComputeSource
- Parameters:
instanceTags
- the custom instance tags
-
setInstanceSummary
- Specified by:
setInstanceSummary
in interfaceComputeSource
-
setStatus
Description copied from interface:ComputeSource
Sets the current provisioning status of this source.- Specified by:
setStatus
in interfaceComputeSource
- Parameters:
status
- This should only be set by the YellowDog Platform
-
setStatusMessage
Description copied from interface:ComputeSource
Sets the message associated with the current provisioning status of this source.- Specified by:
setStatusMessage
in interfaceComputeSource
- Parameters:
statusMessage
- This should only be set by the YellowDog Platform
-
setExhaustion
- Specified by:
setExhaustion
in interfaceComputeSource
-
equals
-
canEqual
-
hashCode
-
toString
-