Class AzureInstancesComputeSource
java.lang.Object
co.yellowdog.platform.model.AzureInstancesComputeSource
- All Implemented Interfaces:
AzureComputeSource,ComputeSource,Credentialed,Identified,Named,Serializable
@JsonClassDescription("Details needed for provisioning distinct instances from Azure")
public class AzureInstancesComputeSource
extends Object
implements AzureComputeSource
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder that can be used to build a new AzureInstancesComputeSource that is automatically validated on build. -
Field Summary
Fields inherited from interface co.yellowdog.platform.model.ComputeSource
DEFAULT_ASSIGN_PUBLIC_IP -
Constructor Summary
ConstructorsConstructorDescriptionAzureInstancesComputeSource(String name, String credential, String adminUserCredential, String sshKey, String environment, String networkResourceGroupName, String networkName, String subnetName, String vmSize, String region, String imageId, int limit, Boolean assignPublicIp, Boolean useSpot, Double spotMaxPrice, Boolean createProximityPlacementGroup, Boolean useAcceleratedNetworking, String userData, Map<String, String> instanceTags) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected booleanbooleanOptionally specifies the name of an AzureInstanceCredential that provides the admin user name and password to use for root (Linux) or administrator (Windows).Gets the ID of the source template if this source was created from a template.Indicates if instances should be provisioned within a proximity placement group.Return the names of the credentials to be used for this Credentialed entity.Allows the specification of an Azure environment other than the default public environment.If this source is associated with an exhausted allowance, gets the exhaustion state.getId()Returns the IDThe YellowDog prefixed Azure image ID for the image to use for the provisioned instances.A summary of instance counts according to instance statusGets the custom instance tags to be set on the provisioned instance at startup.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).The Azure region where instances will be provisioned.The maximum price that will be paid for Spot VMs provisioned from this source.The public SSH key.Gets the current provisioning status of this source.Gets the message associated with the current provisioning status of this source.Indicates if supporting resources have been created for this source.Returns an object describing behavioural traits specific to this compute source.Indicates if instances should be provisioned with a primary networking interface with accelerated networking.Gets the user-data script to be passed to the provisioned instance at startup.Indicates if Spot VMs should be requested from Azure.inthashCode()booleanvoidsetAdminUserCredential(String adminUserCredential) Optionally specifies the name of an AzureInstanceCredential that provides the admin user name and password to use for root (Linux) or administrator (Windows).voidsetAssignPublicIp(boolean assignPublicIp) voidsetAvailabilityZone(String availabilityZone) voidsetCreatedFromId(String createdFromId) Sets the source template IDvoidsetCreateProximityPlacementGroup(Boolean createProximityPlacementGroup) Indicates if instances should be provisioned within a proximity placement group.voidsetCredential(String credential) voidsetEnvironment(String environment) voidsetExhaustion(ComputeSourceExhaustion exhaustion) voidSets the IDvoidsetImageId(String imageId) The YellowDog prefixed Azure image ID for the image to use for the provisioned instances.voidsetInstanceSummary(InstanceSummary instanceSummary) voidsetInstanceTags(Map<@AzureInstanceTagKey String, @AzureInstanceTagValue String> instanceTags) Sets the custom instance tags to be set on the provisioned instance at startup.voidsetLimit(int limit) Sets the limit in number of instances that can be provisioned from this source.voidSets the name of this compute source (which must be unique within the containing ComputeRequirement).voidsetNetworkName(String networkName) voidsetNetworkResourceGroupName(String networkResourceGroupName) voidThe Azure region where instances will be provisioned.voidsetSpotMaxPrice(Double spotMaxPrice) voidThe public SSH key.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.voidsetSubnetName(String subnetName) voidsetSupportingResourceCreated(Boolean supportingResourceCreated) voidsetUseAcceleratedNetworking(Boolean useAcceleratedNetworking) Indicates if instances should be provisioned with a primary networking interface with accelerated networking.voidsetUserData(String userData) Sets the user-data script to be passed to the provisioned instance at startup.voidsetUseSpot(Boolean useSpot) voidtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface co.yellowdog.platform.model.AzureComputeSource
getInstancePricing, getInstanceType, getProvider, getSubregion, setInstanceType
-
Constructor Details
-
AzureInstancesComputeSource
public AzureInstancesComputeSource(String name, String credential, String adminUserCredential, String sshKey, String environment, String networkResourceGroupName, String networkName, String subnetName, String vmSize, String region, String imageId, int limit, Boolean assignPublicIp, Boolean useSpot, Double spotMaxPrice, Boolean createProximityPlacementGroup, Boolean useAcceleratedNetworking, String userData, Map<String, String> instanceTags)
-
-
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
-
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 interfaceAzureComputeSource- Specified by:
getCredentialin interfaceComputeSource
-
getRegion
The Azure region where instances will be provisioned.- Specified by:
getRegionin interfaceComputeSource- Returns:
- the AWS region where instances will be provisioned
-
getAvailabilityZone
- Specified by:
getAvailabilityZonein interfaceAzureComputeSource
-
getNetworkResourceGroupName
- Specified by:
getNetworkResourceGroupNamein interfaceAzureComputeSource
-
getNetworkName
- Specified by:
getNetworkNamein interfaceAzureComputeSource
-
getSubnetName
- Specified by:
getSubnetNamein interfaceAzureComputeSource
-
getEnvironment
Description copied from interface:AzureComputeSourceAllows the specification of an Azure environment other than the default public environment. This should normally be left blank. Valid values are "china", "germany", "us_government".- Specified by:
getEnvironmentin interfaceAzureComputeSource- Returns:
- an Azure environment other than the default public environment
-
getVmSize
- Specified by:
getVmSizein interfaceAzureComputeSource
-
getImageId
The YellowDog prefixed Azure image ID for the image to use for the provisioned instances.- Specified by:
getImageIdin interfaceComputeSource- Returns:
- the image 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 interfaceAzureComputeSource- Specified by:
getInstanceTagsin interfaceComputeSource- Returns:
- the custom instance tags
-
getAdminUserCredential
Optionally specifies the name of an AzureInstanceCredential that provides the admin user name and password to use for root (Linux) or administrator (Windows). If not specified, then YellowDog Compute uses the default admin user name and a different randomly generated password for each instance.- Specified by:
getAdminUserCredentialin interfaceAzureComputeSource- Returns:
- the admin user credential
-
getSshKey
The public SSH key. If provided, instances will be accessible with the matching private key through SSH.- Specified by:
getSshKeyin interfaceAzureComputeSource- Returns:
- the public SSH key
-
isAssignPublicIp
public boolean isAssignPublicIp()- Specified by:
isAssignPublicIpin interfaceAzureComputeSource
-
getCreateProximityPlacementGroup
Indicates if instances should be provisioned within a proximity placement group.- Specified by:
getCreateProximityPlacementGroupin interfaceAzureComputeSource- Returns:
- true, if provisioned instances should be provisioned within a proximity placement group; otherwise, false or null
-
getUseAcceleratedNetworking
Indicates if instances should be provisioned with a primary networking interface with accelerated networking.- Specified by:
getUseAcceleratedNetworkingin interfaceAzureComputeSource- Returns:
- true, if instances should be provisioned with a primary networking interface with accelerated networking; otherwise, false or null
-
getUseSpot
Description copied from interface:AzureComputeSourceIndicates if Spot VMs should be requested from Azure. Requires Spot max price to be set.- Specified by:
getUseSpotin interfaceAzureComputeSource- Returns:
- if Spot VMs should be requested from Azure
-
getSpotMaxPrice
Description copied from interface:AzureComputeSourceThe maximum price that will be paid for Spot VMs provisioned from this source.- Specified by:
getSpotMaxPricein interfaceAzureComputeSource- Returns:
- the maximum price that will be paid for Spot VMs
-
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
-
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 interfaceAzureComputeSource- 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
-
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 Azure 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
-
setNetworkResourceGroupName
-
setNetworkName
-
setSubnetName
-
setEnvironment
-
setVmSize
- Specified by:
setVmSizein interfaceAzureComputeSource
-
setImageId
The YellowDog prefixed Azure image ID for the image to use for the provisioned instances.- Specified by:
setImageIdin interfaceComputeSource- Parameters:
imageId- the image 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<@AzureInstanceTagKey String, @AzureInstanceTagValue 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
-
setAdminUserCredential
Optionally specifies the name of an AzureInstanceCredential that provides the admin user name and password to use for root (Linux) or administrator (Windows). If not specified, then YellowDog Compute uses the default admin user name and a different randomly generated password for each instance.- Parameters:
adminUserCredential- the admin user credential
-
setSshKey
The public SSH key. If provided, instances will be accessible with the matching private key through SSH.- Parameters:
sshKey- the public SSH key
-
setAssignPublicIp
public void setAssignPublicIp(boolean assignPublicIp) -
setCreateProximityPlacementGroup
Indicates if instances should be provisioned within a proximity placement group.- Parameters:
createProximityPlacementGroup- true, if provisioned instances should be provisioned within a proximity placement group; otherwise, false or null
-
setUseAcceleratedNetworking
Indicates if instances should be provisioned with a primary networking interface with accelerated networking.- Parameters:
useAcceleratedNetworking- true, if instances should be provisioned with a primary networking interface with accelerated networking; otherwise, false or null
-
setUseSpot
-
setSpotMaxPrice
-
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
-
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 interfaceAzureComputeSource
-
equals
-
canEqual
-
hashCode
-
toString
-