Interface ComputeSource
- All Superinterfaces:
Credentialed
,Identified
,Named
,Serializable
- All Known Subinterfaces:
AlibabaComputeSource
,AwsComputeSource
,AzureComputeSource
,GceComputeSource
,OciComputeSource
- All Known Implementing Classes:
AlibabaInstancesComputeSource
,AwsFleetComputeSource
,AwsInstancesComputeSource
,AzureInstancesComputeSource
,AzureScaleSetComputeSource
,GceInstanceGroupComputeSource
,GceInstancesComputeSource
,OciInstancePoolComputeSource
,OciInstancesComputeSource
,SimulatorComputeSource
The interface implemented by all compute source model objects.
A compute source describes a specific source for acquiring instances in order to meet the compute requirement.
A compute source describes a specific source for acquiring instances in order to meet the compute requirement.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGets the ID of the source template if this source was created from a template.If this source is associated with an exhausted allowance, gets the exhaustion state.getId()
Returns the ID@NotBlank String
Gets the image ID to use for the instances that will be provisioned.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.@NotBlank String
Gets the provider-specific instance type of the instances that will be provisioned.@Min(0L) 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).Gets the Cloud Provider for this source.@NotBlank String
Gets the provider-specific region where instances will be provisioned.Gets the current provisioning status of this source.Gets the message associated with the current provisioning status of this source.Gets the provider-specific subregion (aka Availability Domain, Availability Zone or Zone) where instances will be provisioned.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.void
setCreatedFromId
(String templateId) Sets the source template IDvoid
setExhaustion
(ComputeSourceExhaustion exhaustion) void
Sets the IDvoid
setImageId
(String imageId) Sets the image ID to use for the instances that will be provisioned.void
setInstanceSummary
(InstanceSummary instanceSummary) void
setInstanceTags
(Map<String, String> instanceTags) Sets the custom instance tags to be set on the provisioned instance at startup.void
setInstanceType
(String instanceType) Sets the provider-specific instance type of the instances that will be provisioned.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
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
setUserData
(String userData) Sets the user-data script to be passed to the provisioned instance at startup.Methods inherited from interface co.yellowdog.platform.model.Credentialed
getCredentials
-
Field Details
-
DEFAULT_ASSIGN_PUBLIC_IP
static final boolean DEFAULT_ASSIGN_PUBLIC_IP- See Also:
-
-
Method Details
-
getTraits
ComputeSourceTraits getTraits()Returns an object describing behavioural traits specific to this compute source.- Returns:
- an object describing behavioural traits specific to this compute source
-
getProvider
CloudProvider getProvider()Gets the Cloud Provider for this source.- Returns:
- the Cloud Provider for this source
-
getInstancePricing
InstancePricing getInstancePricing()Gets the instance pricing for this source, e.g. Spot- Returns:
- the instance pricing for this source
-
getId
Description copied from interface:Identified
Returns the ID- Specified by:
getId
in interfaceIdentified
- Returns:
- the ID
-
setId
Sets the ID- Parameters:
id
- This should only be set by the YellowDog Platform
-
getCreatedFromId
Gets the ID of the source template if this source was created from a template.- Returns:
- the ID of the source template if this source was created from a template
-
setCreatedFromId
Sets the source template ID- Parameters:
templateId
- This should only be set by the YellowDog Platform
-
getName
@Name @NotBlank @Pattern(regexp="[a-z](?:[a-z\\d_-]{0,58}[a-z\\d])?") @Size(max=60) @JsonPropertyDescription("The compute source name") @Name @NotBlank @Pattern(regexp="[a-z](?:[a-z\\d_-]{0,58}[a-z\\d])?") @Size(max=60) String getName()Returns the name of this compute source (which must be unique within the containing ComputeRequirement). -
setName
Sets the name of this compute source (which must be unique within the containing ComputeRequirement).- Parameters:
name
- the name of this compute source
-
getCredential
@CredentialName @JsonPropertyDescription("The fully qualified name of the keyring credential '{keyring name}/{credential name}' to use") @CredentialName String getCredential() -
getRegion
@NotBlank @JsonPropertyDescription("The provider-specific region where instances will be provisioned") @NotBlank String getRegion()Gets the provider-specific region where instances will be provisioned.- Returns:
- the provider-specific region where instances will be provisioned
-
getSubregion
@JsonPropertyDescription("The provider-specific subregion where instances will be provisioned") String getSubregion()Gets the provider-specific subregion (aka Availability Domain, Availability Zone or Zone) where instances will be provisioned.- Returns:
- the provider-specific subregion where instances will be provisioned
-
getInstanceType
@NotBlank @JsonPropertyDescription("The provider-specific instance type of the instances that will be provisioned") @NotBlank String getInstanceType()Gets the provider-specific instance type of the instances that will be provisioned.- Returns:
- the provider-specific instance type of the instances that will be provisioned
-
setInstanceType
Sets the provider-specific instance type of the instances that will be provisioned.- Parameters:
instanceType
- the provider-specific instance type of the instances that will be provisioned
-
getImageId
@NotBlank @JsonPropertyDescription("The image ID to use for the instances that will be provisioned") @NotBlank String getImageId()Gets the image ID to use for the instances that will be provisioned.- Returns:
- the image ID to use for the instances that will be provisioned
-
setImageId
Sets the image ID to use for the instances that will be provisioned.- Parameters:
imageId
- the image ID to use for the instances that will be provisioned
-
getUserData
@JsonPropertyDescription("The user-data script to be passed to the provisioned instance at startup") String getUserData()Gets the user-data script to be passed to the provisioned instance at startup.- Returns:
- the user-data script
-
setUserData
Sets the user-data script to be passed to the provisioned instance at startup.- Parameters:
userData
- the user-data script
-
getInstanceTags
-
setInstanceTags
-
getLimit
@Min(0L) @JsonPropertyDescription("The limit in number of instances that can be provisioned per requirement from this source") @Min(0L) int getLimit()Returns the limit in number of instances that can be provisioned from this source.- Returns:
- the limit in number of instances that can be provisioned from this source
-
setLimit
void setLimit(int limit) Sets the limit in number of instances that can be provisioned from this source.- Parameters:
limit
- the limit in number of instances that can be provisioned from this source
-
getInstanceSummary
A summary of instance counts according to instance status- Returns:
- a summary of instance counts according to instance status
-
setInstanceSummary
-
getStatus
Gets the current provisioning status of this source.- Returns:
- the current provisioning status of this source
-
setStatus
Sets the current provisioning status of this source.- Parameters:
status
- This should only be set by the YellowDog Platform
-
getStatusMessage
Gets the message associated with the current provisioning status of this source. Returns null if no further detail is relevant to the status.- Returns:
- the message associated with the current provisioning status of this source
-
setStatusMessage
Sets the message associated with the current provisioning status of this source.- Parameters:
statusMessage
- This should only be set by the YellowDog Platform
-
getExhaustion
If this source is associated with an exhausted allowance, gets the exhaustion state.- Returns:
- the exhaustion state, if the source is associated with an exhausted allowance; otherwise, null
-
setExhaustion
-
getSupportingResourceCreated
Boolean getSupportingResourceCreated()Indicates if supporting resources have been created for this source.- Returns:
- true, if supporting resources have been created for this source; false, if no supporting resources have been created; null, if unknown
-