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 class
A 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 boolean
boolean
Optionally 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.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 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.int
hashCode()
boolean
void
setAdminUserCredential
(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).void
setAssignPublicIp
(boolean assignPublicIp) void
setAvailabilityZone
(String availabilityZone) void
setCreatedFromId
(String createdFromId) Sets the source template IDvoid
setCreateProximityPlacementGroup
(Boolean createProximityPlacementGroup) Indicates if instances should be provisioned within a proximity placement group.void
setCredential
(String credential) void
setEnvironment
(String environment) void
setExhaustion
(ComputeSourceExhaustion exhaustion) void
Sets the IDvoid
setImageId
(String imageId) The YellowDog prefixed Azure image ID for the image to use for the provisioned instances.void
setInstanceSummary
(InstanceSummary instanceSummary) void
setInstanceTags
(Map<@AzureInstanceTagKey String, @AzureInstanceTagValue 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
setNetworkName
(String networkName) void
setNetworkResourceGroupName
(String networkResourceGroupName) void
The Azure region where instances will be provisioned.void
setSpotMaxPrice
(Double spotMaxPrice) 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
setSubnetName
(String subnetName) void
setSupportingResourceCreated
(Boolean supportingResourceCreated) void
setUseAcceleratedNetworking
(Boolean useAcceleratedNetworking) Indicates if instances should be provisioned with a primary networking interface with accelerated networking.void
setUserData
(String userData) Sets the user-data script to be passed to the provisioned instance at startup.void
setUseSpot
(Boolean useSpot) void
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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: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
-
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 interfaceAzureComputeSource
- Specified by:
getCredential
in interfaceComputeSource
-
getRegion
The Azure region where instances will be provisioned.- Specified by:
getRegion
in interfaceComputeSource
- Returns:
- the AWS region where instances will be provisioned
-
getAvailabilityZone
- Specified by:
getAvailabilityZone
in interfaceAzureComputeSource
-
getNetworkResourceGroupName
- Specified by:
getNetworkResourceGroupName
in interfaceAzureComputeSource
-
getNetworkName
- Specified by:
getNetworkName
in interfaceAzureComputeSource
-
getSubnetName
- Specified by:
getSubnetName
in interfaceAzureComputeSource
-
getEnvironment
Description copied from interface:AzureComputeSource
Allows 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:
getEnvironment
in interfaceAzureComputeSource
- Returns:
- an Azure environment other than the default public environment
-
getVmSize
- Specified by:
getVmSize
in interfaceAzureComputeSource
-
getImageId
The YellowDog prefixed Azure image ID for the image to use for the provisioned instances.- Specified by:
getImageId
in interfaceComputeSource
- Returns:
- the image 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
-
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:
getAdminUserCredential
in 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:
getSshKey
in interfaceAzureComputeSource
- Returns:
- the public SSH key
-
isAssignPublicIp
public boolean isAssignPublicIp()- Specified by:
isAssignPublicIp
in interfaceAzureComputeSource
-
getCreateProximityPlacementGroup
Indicates if instances should be provisioned within a proximity placement group.- Specified by:
getCreateProximityPlacementGroup
in 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:
getUseAcceleratedNetworking
in 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:AzureComputeSource
Indicates if Spot VMs should be requested from Azure. Requires Spot max price to be set.- Specified by:
getUseSpot
in interfaceAzureComputeSource
- Returns:
- if Spot VMs should be requested from Azure
-
getSpotMaxPrice
Description copied from interface:AzureComputeSource
The maximum price that will be paid for Spot VMs provisioned from this source.- Specified by:
getSpotMaxPrice
in interfaceAzureComputeSource
- Returns:
- the maximum price that will be paid for Spot VMs
-
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
-
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 interfaceAzureComputeSource
- 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 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:
setVmSize
in interfaceAzureComputeSource
-
setImageId
The YellowDog prefixed Azure image ID for the image to use for the provisioned instances.- Specified by:
setImageId
in interfaceComputeSource
- Parameters:
imageId
- the image 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<@AzureInstanceTagKey String, @AzureInstanceTagValue 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
-
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: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
-
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 interfaceAzureComputeSource
-
equals
-
canEqual
-
hashCode
-
toString
-