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 classA 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, boolean maintainCapacity, List<AwsFleetInstanceOverride> instanceOverrides, String userData, Map<String, String> instanceTags, Integer bootVolumeSizeGb) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected booleanbooleanThe 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.intgetLimit()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.inthashCode()booleanIndicates if provisioned instances should be assigned public IP addresses.booleanIndicates if AWS EC2 Fleet should maintain the instance count independently of YellowDog Compute, replacing the reprovision functionality.voidsetAssignPublicIp(boolean assignPublicIp) Indicates if provisioned instances should be assigned public IP addresses.voidsetAvailabilityZone(String availabilityZone) The AWS availability zone within the region where instances will be provisioned.voidsetBootVolumeSizeGb(Integer bootVolumeSizeGb) voidsetCapacityReservation(AwsCapacityReservation capacityReservation) Specifies the capacity reservation to target for provisioned instances.voidsetCreateClusterPlacementGroup(Boolean createClusterPlacementGroup) Indicates if instances should be provisioned within a cluster placement group.voidsetCreatedFromId(String createdFromId) Sets the source template IDvoidsetCreateElasticFabricAdapter(Boolean createElasticFabricAdapter) Indicates if instances should be provisioned with an Elastic Fabric Adapter network interface.voidsetCredential(String credential) voidsetEnableDetailedMonitoring(Boolean enableDetailedMonitoring) Indicates if provisioned instances should have detailed CloudWatch monitoring enabled.voidsetEnableInstanceMetadataTags(Boolean enableInstanceMetadataTags) Indicates if provisioned instances should expose their tags via instance metadata.voidsetExhaustion(ComputeSourceExhaustion exhaustion) voidsetExistingPlacementGroup(AwsPlacementGroup existingPlacementGroup) Indicates an existing placement group within which instances should be provisioned.voidsetFleetId(String fleetId) The ID of the AWS EC2 Fleet.voidsetIamInstanceProfileArn(String iamInstanceProfileArn) The ARN of the IAM Instance Profile to use for the provisioned instances.voidSets the IDvoidsetImageId(String imageId) The region-specific Amazon Machine Image (AMI) ID for the image to use for the provisioned instances.voidsetInstanceOverrides(List<@NotNull @Valid AwsFleetInstanceOverride> instanceOverrides) Extra instance provision options that can override the main parameters set in this source.voidsetInstanceSummary(InstanceSummary instanceSummary) voidsetInstanceTags(Map<@AwsInstanceTagKey String, @AwsInstanceTagValue String> instanceTags) Sets the custom instance tags to be set on the provisioned instance at startup.voidsetInstanceType(String instanceType) The EC2 instance type for the provisioned instances.voidsetKeyName(String keyName) The name of the EC2 key pair to use when logging into any instances provisioned from this source.voidsetLimit(int limit) Sets the limit in number of instances that can be provisioned from this source.voidsetMaintainCapacity(boolean maintainCapacity) Indicates if AWS EC2 Fleet should maintain the instance count independently of YellowDog Compute, replacing the reprovision functionality.voidSets the name of this compute source (which must be unique within the containing ComputeRequirement).voidsetOnDemandOptions(AwsFleetOnDemandOptions onDemandOptions) Options related to provisioning On-Demand instances.voidsetPurchaseOption(AwsFleetPurchaseOption purchaseOption) Determines which instance purchase options (On-Demand and/or Spot) are available to AWS EC2 Fleet.voidThe AWS region where instances will be provisioned.voidsetRootDeviceName(String rootDeviceName) voidsetSecondaryNetworkInterfaces(List<@NotNull @Valid AwsSecondaryNetworkInterface> secondaryNetworkInterfaces) Secondary network interfaces to create on provisioned instances.voidsetSecurityGroupId(String securityGroupId) The ID of the AWS Security Group for the provisioned instances.voidsetSpotOptions(AwsFleetSpotOptions spotOptions) Options related to provisioning Spot instances.voidsetStatus(ComputeSourceStatus status) Sets the current provisioning status of this source.voidsetStatusMessage(String statusMessage) Sets the message associated with the current provisioning status of this source.voidsetSubnetId(String subnetId) The ID of the subnet to use for the provisioned instances.voidsetSupportingResourceCreated(Boolean supportingResourceCreated) voidsetUserData(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, waitMethods 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, boolean maintainCapacity, List<AwsFleetInstanceOverride> instanceOverrides, String userData, Map<String, String> instanceTags, Integer bootVolumeSizeGb)
-
-
Method Details
-
getTraits
Description copied from interface:ComputeSourceReturns an object describing behavioural traits specific to this compute source.- Specified by:
getTraitsin interfaceComputeSource- Returns:
- an object describing behavioural traits specific to this compute source
-
getInstancePricing
Description copied from interface:ComputeSourceGets the instance pricing for this source, e.g. Spot- Specified by:
getInstancePricingin interfaceComputeSource- Returns:
- the instance pricing for this source
-
getCredentials
Description copied from interface:CredentialedReturn the names of the credentials to be used for this Credentialed entity.- Specified by:
getCredentialsin interfaceCredentialed- Returns:
- the names of the credentials to be used
-
builder
-
toBuilder
-
getId
Description copied from interface:IdentifiedReturns the ID- Specified by:
getIdin interfaceComputeSource- Specified by:
getIdin interfaceIdentified- Returns:
- the ID
-
getCreatedFromId
Description copied from interface:ComputeSourceGets the ID of the source template if this source was created from a template.- Specified by:
getCreatedFromIdin interfaceComputeSource- Returns:
- the ID of the source template if this source was created from a template
-
getName
Description copied from interface:ComputeSourceReturns the name of this compute source (which must be unique within the containing ComputeRequirement).- Specified by:
getNamein interfaceComputeSource- Specified by:
getNamein interfaceNamed- Returns:
- the name of this compute source
-
getCredential
- Specified by:
getCredentialin interfaceAwsComputeSource- Specified by:
getCredentialin interfaceComputeSource
-
getRegion
The AWS region where instances will be provisioned.- Specified by:
getRegionin 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:
getAvailabilityZonein 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:
getSecurityGroupIdin 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:
getSubnetIdin interfaceAwsComputeSource- Returns:
- the ID of the subnet to use
-
getInstanceType
The EC2 instance type for the provisioned instances.- Specified by:
getInstanceTypein 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:
getImageIdin interfaceComputeSource- Returns:
- the AMI ID for the image to use for the provisioned instances
-
getUserData
Description copied from interface:ComputeSourceGets the user-data script to be passed to the provisioned instance at startup.- Specified by:
getUserDatain interfaceComputeSource- Returns:
- the user-data script
-
getInstanceTags
Description copied from interface:ComputeSourceGets the custom instance tags to be set on the provisioned instance at startup.- Specified by:
getInstanceTagsin interfaceAwsComputeSource- Specified by:
getInstanceTagsin interfaceComputeSource- Returns:
- the custom instance tags
-
getBootVolumeSizeGb
- Specified by:
getBootVolumeSizeGbin interfaceAwsComputeSource
-
getIamInstanceProfileArn
The ARN of the IAM Instance Profile to use for the provisioned instances.- Specified by:
getIamInstanceProfileArnin 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:
getKeyNamein interfaceAwsComputeSource- Returns:
- the name of the key pair to use
-
getEnableDetailedMonitoring
Indicates if provisioned instances should have detailed CloudWatch monitoring enabled.- Specified by:
getEnableDetailedMonitoringin 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:
getEnableInstanceMetadataTagsin 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:
isAssignPublicIpin 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:
getCreateClusterPlacementGroupin 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:
getExistingPlacementGroupin interfaceAwsComputeSource- Returns:
- an existing placement group
-
getCreateElasticFabricAdapter
Indicates if instances should be provisioned with an Elastic Fabric Adapter network interface.- Specified by:
getCreateElasticFabricAdapterin 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:
getSecondaryNetworkInterfacesin interfaceAwsComputeSource
-
getCapacityReservation
Specifies the capacity reservation to target for provisioned instances.- Specified by:
getCapacityReservationin interfaceAwsComputeSource
-
getLimit
public int getLimit()Description copied from interface:ComputeSourceReturns the limit in number of instances that can be provisioned from this source.- Specified by:
getLimitin 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:ComputeSourceA summary of instance counts according to instance status- Specified by:
getInstanceSummaryin interfaceComputeSource- Returns:
- a summary of instance counts according to instance status
-
getStatus
Description copied from interface:ComputeSourceGets the current provisioning status of this source.- Specified by:
getStatusin interfaceComputeSource- Returns:
- the current provisioning status of this source
-
getStatusMessage
Description copied from interface:ComputeSourceGets the message associated with the current provisioning status of this source. Returns null if no further detail is relevant to the status.- Specified by:
getStatusMessagein interfaceComputeSource- Returns:
- the message associated with the current provisioning status of this source
-
getExhaustion
Description copied from interface:ComputeSourceIf this source is associated with an exhausted allowance, gets the exhaustion state.- Specified by:
getExhaustionin interfaceComputeSource- Returns:
- the exhaustion state, if the source is associated with an exhausted allowance; otherwise, null
-
getSupportingResourceCreated
Description copied from interface:ComputeSourceIndicates if supporting resources have been created for this source.- Specified by:
getSupportingResourceCreatedin interfaceAwsComputeSource- Specified by:
getSupportingResourceCreatedin interfaceComputeSource- Returns:
- true, if supporting resources have been created for this source; false, if no supporting resources have been created; null, if unknown
-
getRootDeviceName
-
setId
Description copied from interface:ComputeSourceSets the ID- Specified by:
setIdin interfaceComputeSource- Parameters:
id- This should only be set by the YellowDog Platform
-
setCreatedFromId
Description copied from interface:ComputeSourceSets the source template ID- Specified by:
setCreatedFromIdin interfaceComputeSource- Parameters:
createdFromId- This should only be set by the YellowDog Platform
-
setName
Description copied from interface:ComputeSourceSets the name of this compute source (which must be unique within the containing ComputeRequirement).- Specified by:
setNamein 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:
setInstanceTypein 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:
setImageIdin interfaceComputeSource- Parameters:
imageId- the AMI ID for the image to use for the provisioned instances
-
setUserData
Description copied from interface:ComputeSourceSets the user-data script to be passed to the provisioned instance at startup.- Specified by:
setUserDatain interfaceComputeSource- Parameters:
userData- the user-data script
-
setInstanceTags
public void setInstanceTags(Map<@AwsInstanceTagKey String, @AwsInstanceTagValue String> instanceTags) Description copied from interface:ComputeSourceSets the custom instance tags to be set on the provisioned instance at startup.- Specified by:
setInstanceTagsin interfaceComputeSource- Parameters:
instanceTags- the custom instance tags
-
setBootVolumeSizeGb
-
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:ComputeSourceSets the limit in number of instances that can be provisioned from this source.- Specified by:
setLimitin 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:
setInstanceSummaryin interfaceComputeSource
-
setStatus
Description copied from interface:ComputeSourceSets the current provisioning status of this source.- Specified by:
setStatusin interfaceComputeSource- Parameters:
status- This should only be set by the YellowDog Platform
-
setStatusMessage
Description copied from interface:ComputeSourceSets the message associated with the current provisioning status of this source.- Specified by:
setStatusMessagein interfaceComputeSource- Parameters:
statusMessage- This should only be set by the YellowDog Platform
-
setExhaustion
- Specified by:
setExhaustionin interfaceComputeSource
-
setSupportingResourceCreated
- Specified by:
setSupportingResourceCreatedin interfaceAwsComputeSource
-
setRootDeviceName
-
equals
-
canEqual
-
hashCode
-
toString
-