Class AwsFleetComputeSource
java.lang.Object
co.yellowdog.platform.model.AwsFleetComputeSource
- All Implemented Interfaces:
AwsComputeSource
,ComputeSource
,Credentialed
,Identified
,Named
,Serializable
@JsonClassDescription("Details needed for provisioning instances using an AWS EC2 Fleet request")
@ValidatedBy(AwsFleetComputeSourceValidator.class)
public class AwsFleetComputeSource
extends Object
implements AwsComputeSource
Defines a source of compute provisioned using an AWS EC2 Fleet request.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A builder that can be used to build a new AwsFleetComputeSource that is automatically validated on build. -
Field Summary
Fields inherited from interface co.yellowdog.platform.model.ComputeSource
DEFAULT_ASSIGN_PUBLIC_IP
-
Constructor Summary
ConstructorsConstructorDescriptionAwsFleetComputeSource
(String name, String credential, String region, String availabilityZone, String securityGroupId, String instanceType, String imageId, int limit, Boolean assignPublicIp, Boolean createClusterPlacementGroup, AwsPlacementGroup existingPlacementGroup, Boolean createElasticFabricAdapter, List<AwsSecondaryNetworkInterface> secondaryNetworkInterfaces, AwsCapacityReservation capacityReservation, Boolean enableDetailedMonitoring, Boolean enableInstanceMetadataTags, String keyName, String iamInstanceProfileArn, String subnetId, AwsFleetPurchaseOption purchaseOption, AwsFleetOnDemandOptions onDemandOptions, AwsFleetSpotOptions spotOptions, List<AwsFleetInstanceOverride> instanceOverrides, String userData, Map<String, String> instanceTags) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
protected boolean
boolean
The AWS availability zone within the region where instances will be provisioned.Specifies the capacity reservation to target for provisioned instances.Indicates if instances should be provisioned within a cluster placement group.Gets the ID of the source template if this source was created from a template.Indicates if instances should be provisioned with an Elastic Fabric Adapter network interface.Return the names of the credentials to be used for this Credentialed entity.Indicates if provisioned instances should have detailed CloudWatch monitoring enabled.Indicates if provisioned instances should expose their tags via instance metadata.If this source is associated with an exhausted allowance, gets the exhaustion state.Indicates an existing placement group within which instances should be provisioned.The ID of the AWS EC2 Fleet.The ARN of the IAM Instance Profile to use for the provisioned instances.getId()
Returns the IDThe region-specific Amazon Machine Image (AMI) ID for the image to use for the provisioned instances.List
<@NotNull @Valid AwsFleetInstanceOverride> Extra instance provision options that can override the main parameters set in this source.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.The EC2 instance type for the provisioned instances.The name of the EC2 key pair to use when logging into any instances provisioned from this source.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).Options related to provisioning On-Demand instances.Determines which instance purchase options (On-Demand and/or Spot) are available to AWS EC2 Fleet.The AWS region where instances will be provisioned.List
<@NotNull @Valid AwsSecondaryNetworkInterface> Secondary network interfaces to create on provisioned instances.The ID of the AWS Security Group for the provisioned instances.Options related to provisioning Spot instances.Gets the current provisioning status of this source.Gets the message associated with the current provisioning status of this source.The ID of 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
Indicates if AWS EC2 Fleet should maintain the instance count independently of YellowDog Compute, replacing the reprovision functionality.void
setAssignPublicIp
(boolean assignPublicIp) Indicates if provisioned instances should be assigned public IP addresses.void
setAvailabilityZone
(String availabilityZone) The AWS availability zone within the region where instances will be provisioned.void
setCapacityReservation
(AwsCapacityReservation capacityReservation) Specifies the capacity reservation to target for provisioned instances.void
setCreateClusterPlacementGroup
(Boolean createClusterPlacementGroup) Indicates if instances should be provisioned within a cluster placement group.void
setCreatedFromId
(String createdFromId) Sets the source template IDvoid
setCreateElasticFabricAdapter
(Boolean createElasticFabricAdapter) Indicates if instances should be provisioned with an Elastic Fabric Adapter network interface.void
setCredential
(String credential) void
setEnableDetailedMonitoring
(Boolean enableDetailedMonitoring) Indicates if provisioned instances should have detailed CloudWatch monitoring enabled.void
setEnableInstanceMetadataTags
(Boolean enableInstanceMetadataTags) Indicates if provisioned instances should expose their tags via instance metadata.void
setExhaustion
(ComputeSourceExhaustion exhaustion) void
setExistingPlacementGroup
(AwsPlacementGroup existingPlacementGroup) Indicates an existing placement group within which instances should be provisioned.void
setFleetId
(String fleetId) The ID of the AWS EC2 Fleet.void
setIamInstanceProfileArn
(String iamInstanceProfileArn) The ARN of the IAM Instance Profile to use for the provisioned instances.void
Sets the IDvoid
setImageId
(String imageId) The region-specific Amazon Machine Image (AMI) ID for the image to use for the provisioned instances.void
setInstanceOverrides
(List<@NotNull @Valid AwsFleetInstanceOverride> instanceOverrides) Extra instance provision options that can override the main parameters set in this source.void
setInstanceSummary
(InstanceSummary instanceSummary) void
setInstanceTags
(Map<@AwsInstanceTagKey String, @AwsInstanceTagValue String> instanceTags) Sets the custom instance tags to be set on the provisioned instance at startup.void
setInstanceType
(String instanceType) The EC2 instance type for the provisioned instances.void
setKeyName
(String keyName) The name of the EC2 key pair to use when logging into any instances provisioned from this source.void
setLimit
(int limit) Sets the limit in number of instances that can be provisioned from this source.void
setMaintainCapacity
(boolean maintainCapacity) Indicates if AWS EC2 Fleet should maintain the instance count independently of YellowDog Compute, replacing the reprovision functionality.void
Sets the name of this compute source (which must be unique within the containing ComputeRequirement).void
setOnDemandOptions
(AwsFleetOnDemandOptions onDemandOptions) Options related to provisioning On-Demand instances.void
setPurchaseOption
(AwsFleetPurchaseOption purchaseOption) Determines which instance purchase options (On-Demand and/or Spot) are available to AWS EC2 Fleet.void
The AWS region where instances will be provisioned.void
setSecondaryNetworkInterfaces
(List<@NotNull @Valid AwsSecondaryNetworkInterface> secondaryNetworkInterfaces) Secondary network interfaces to create on provisioned instances.void
setSecurityGroupId
(String securityGroupId) The ID of the AWS Security Group for the provisioned instances.void
setSpotOptions
(AwsFleetSpotOptions spotOptions) Options related to provisioning Spot instances.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 ID of the subnet to use for the provisioned instances.void
setSupportingResourceCreated
(Boolean supportingResourceCreated) 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.AwsComputeSource
getProvider, getSubregion
-
Constructor Details
-
AwsFleetComputeSource
public AwsFleetComputeSource(String name, String credential, String region, String availabilityZone, String securityGroupId, String instanceType, String imageId, int limit, Boolean assignPublicIp, Boolean createClusterPlacementGroup, AwsPlacementGroup existingPlacementGroup, Boolean createElasticFabricAdapter, List<AwsSecondaryNetworkInterface> secondaryNetworkInterfaces, AwsCapacityReservation capacityReservation, Boolean enableDetailedMonitoring, Boolean enableInstanceMetadataTags, String keyName, String iamInstanceProfileArn, String subnetId, AwsFleetPurchaseOption purchaseOption, AwsFleetOnDemandOptions onDemandOptions, AwsFleetSpotOptions spotOptions, List<AwsFleetInstanceOverride> instanceOverrides, 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
-
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 interfaceAwsComputeSource
- Specified by:
getCredential
in interfaceComputeSource
-
getRegion
The AWS region where instances will be provisioned.- Specified by:
getRegion
in interfaceComputeSource
- Returns:
- the AWS region where instances will be provisioned
-
getAvailabilityZone
The AWS availability zone within the region where instances will be provisioned.- Specified by:
getAvailabilityZone
in interfaceAwsComputeSource
- Returns:
- the AWS availability zone where instances will be provisioned
-
getSecurityGroupId
The ID of the AWS Security Group for the provisioned instances.- Specified by:
getSecurityGroupId
in interfaceAwsComputeSource
- Returns:
- the ID of the AWS Security Group for the provisioned instances
-
getSubnetId
The ID of the subnet to use for the provisioned instances.- Specified by:
getSubnetId
in interfaceAwsComputeSource
- Returns:
- the ID of the subnet to use
-
getInstanceType
The EC2 instance type for the provisioned instances.- Specified by:
getInstanceType
in interfaceComputeSource
- Returns:
- the EC2 instance type for the provisioned instances
-
getImageId
The region-specific Amazon Machine Image (AMI) ID for the image to use for the provisioned instances.- Specified by:
getImageId
in interfaceComputeSource
- Returns:
- the AMI ID for the image to use for the provisioned instances
-
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
-
getIamInstanceProfileArn
The ARN of the IAM Instance Profile to use for the provisioned instances.- Specified by:
getIamInstanceProfileArn
in interfaceAwsComputeSource
- Returns:
- the ARN of the IAM Instance Profile to use
-
getKeyName
The name of the EC2 key pair to use when logging into any instances provisioned from this source.- Specified by:
getKeyName
in interfaceAwsComputeSource
- Returns:
- the name of the key pair to use
-
getEnableDetailedMonitoring
Indicates if provisioned instances should have detailed CloudWatch monitoring enabled.- Specified by:
getEnableDetailedMonitoring
in interfaceAwsComputeSource
- Returns:
- true, if provisioned instances should have detailed CloudWatch monitoring enabled; otherwise, false
-
getEnableInstanceMetadataTags
Indicates if provisioned instances should expose their tags via instance metadata.- Specified by:
getEnableInstanceMetadataTags
in interfaceAwsComputeSource
- Returns:
- true, if provisioned instances should expose their tags via instance metadata; otherwise, false
-
isAssignPublicIp
public boolean isAssignPublicIp()Indicates if provisioned instances should be assigned public IP addresses.- Specified by:
isAssignPublicIp
in interfaceAwsComputeSource
- Returns:
- true, if provisioned instances should be assigned public IP addresses; otherwise, false
-
getCreateClusterPlacementGroup
Indicates if instances should be provisioned within a cluster placement group.- Specified by:
getCreateClusterPlacementGroup
in interfaceAwsComputeSource
- Returns:
- true, if provisioned instances should be provisioned within a cluster placement group; otherwise, false or null
-
getExistingPlacementGroup
Indicates an existing placement group within which instances should be provisioned.- Specified by:
getExistingPlacementGroup
in interfaceAwsComputeSource
- Returns:
- an existing placement group
-
getCreateElasticFabricAdapter
Indicates if instances should be provisioned with an Elastic Fabric Adapter network interface.- Specified by:
getCreateElasticFabricAdapter
in interfaceAwsComputeSource
- Returns:
- true, if instances should be provisioned with an Elastic Fabric Adapter network interface; otherwise, false or null
-
getSecondaryNetworkInterfaces
Secondary network interfaces to create on provisioned instances.- Specified by:
getSecondaryNetworkInterfaces
in interfaceAwsComputeSource
-
getCapacityReservation
Specifies the capacity reservation to target for provisioned instances.- Specified by:
getCapacityReservation
in interfaceAwsComputeSource
-
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
-
isMaintainCapacity
public boolean isMaintainCapacity()Indicates if AWS EC2 Fleet should maintain the instance count independently of YellowDog Compute, replacing the reprovision functionality. -
getInstanceOverrides
Extra instance provision options that can override the main parameters set in this source. -
getPurchaseOption
Determines which instance purchase options (On-Demand and/or Spot) are available to AWS EC2 Fleet. -
getOnDemandOptions
Options related to provisioning On-Demand instances. -
getSpotOptions
Options related to provisioning Spot instances. -
getFleetId
The ID of the AWS EC2 Fleet. -
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
-
getSupportingResourceCreated
Description copied from interface:ComputeSource
Indicates if supporting resources have been created for this source.- Specified by:
getSupportingResourceCreated
in interfaceAwsComputeSource
- 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
-
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
-
setRegion
The AWS region where instances will be provisioned.- Parameters:
region
- the AWS region where instances will be provisioned
This should not be changed once the requirement has been submitted to YellowDog Compute.
-
setAvailabilityZone
The AWS availability zone within the region where instances will be provisioned.- Parameters:
availabilityZone
- the AWS availability zone where instances will be provisioned
This should not be changed once the requirement has been submitted to YellowDog Compute.
-
setSecurityGroupId
The ID of the AWS Security Group for the provisioned instances.- Parameters:
securityGroupId
- the ID of the AWS Security Group for the provisioned instances
-
setSubnetId
The ID of the subnet to use for the provisioned instances.- Parameters:
subnetId
- the ID of the subnet to use
-
setInstanceType
The EC2 instance type for the provisioned instances.- Specified by:
setInstanceType
in interfaceComputeSource
- Parameters:
instanceType
- the EC2 instance type for the provisioned instances
-
setImageId
The region-specific Amazon Machine Image (AMI) ID for the image to use for the provisioned instances.- Specified by:
setImageId
in interfaceComputeSource
- Parameters:
imageId
- the AMI ID for the image to use for the provisioned instances
-
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<@AwsInstanceTagKey String, @AwsInstanceTagValue 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
-
setIamInstanceProfileArn
The ARN of the IAM Instance Profile to use for the provisioned instances.- Parameters:
iamInstanceProfileArn
- the ARN of the IAM Instance Profile to use
-
setKeyName
The name of the EC2 key pair to use when logging into any instances provisioned from this source.- Parameters:
keyName
- the name of the key pair to use
-
setEnableDetailedMonitoring
Indicates if provisioned instances should have detailed CloudWatch monitoring enabled.- Parameters:
enableDetailedMonitoring
- true, if provisioned instances should have detailed CloudWatch monitoring enabled; otherwise, false
-
setEnableInstanceMetadataTags
Indicates if provisioned instances should expose their tags via instance metadata.- Parameters:
enableInstanceMetadataTags
- true, if provisioned instances should expose their tags via instance metadata; otherwise, false
-
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
-
setCreateClusterPlacementGroup
Indicates if instances should be provisioned within a cluster placement group.- Parameters:
createClusterPlacementGroup
- true, if provisioned instances should be provisioned within a cluster placement group; otherwise, false or null
-
setExistingPlacementGroup
Indicates an existing placement group within which instances should be provisioned.- Parameters:
an
- existing placement group
-
setCreateElasticFabricAdapter
Indicates if instances should be provisioned with an Elastic Fabric Adapter network interface.- Parameters:
createElasticFabricAdapter
- true, if instances should be provisioned with an Elastic Fabric Adapter network interface; otherwise, false or null
-
setSecondaryNetworkInterfaces
public void setSecondaryNetworkInterfaces(List<@NotNull @Valid AwsSecondaryNetworkInterface> secondaryNetworkInterfaces) Secondary network interfaces to create on provisioned instances. -
setCapacityReservation
Specifies the capacity reservation to target for 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
-
setMaintainCapacity
public void setMaintainCapacity(boolean maintainCapacity) Indicates if AWS EC2 Fleet should maintain the instance count independently of YellowDog Compute, replacing the reprovision functionality. -
setInstanceOverrides
Extra instance provision options that can override the main parameters set in this source. -
setPurchaseOption
Determines which instance purchase options (On-Demand and/or Spot) are available to AWS EC2 Fleet. -
setOnDemandOptions
Options related to provisioning On-Demand instances. -
setSpotOptions
Options related to provisioning Spot instances. -
setFleetId
The ID of the AWS EC2 Fleet. -
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
-
setSupportingResourceCreated
- Specified by:
setSupportingResourceCreated
in interfaceAwsComputeSource
-
equals
-
canEqual
-
hashCode
-
toString
-