Class AlibabaInstancesComputeSource

java.lang.Object
co.yellowdog.platform.model.AlibabaInstancesComputeSource
All Implemented Interfaces:
AlibabaComputeSource, ComputeSource, Credentialed, Identified, Named, Serializable

@JsonClassDescription("Details needed for provisioning instances from Alibaba Cloud") public class AlibabaInstancesComputeSource extends Object implements AlibabaComputeSource
Defines a source of compute composed of Alibaba Cloud ECS instances.
See Also:
  • Constructor Details

  • Method Details

    • getTraits

      public ComputeSourceTraits getTraits()
      Description copied from interface: ComputeSource
      Returns an object describing behavioural traits specific to this compute source.
      Specified by:
      getTraits in interface ComputeSource
      Returns:
      an object describing behavioural traits specific to this compute source
    • getInstancePricing

      public InstancePricing getInstancePricing()
      Description copied from interface: ComputeSource
      Gets the instance pricing for this source, e.g. Spot
      Specified by:
      getInstancePricing in interface ComputeSource
      Returns:
      the instance pricing for this source
    • getCredentials

      public Set<String> getCredentials()
      Description copied from interface: Credentialed
      Return the names of the credentials to be used for this Credentialed entity.
      Specified by:
      getCredentials in interface Credentialed
      Returns:
      the names of the credentials to be used
    • getSupportingResourceCreated

      public Boolean getSupportingResourceCreated()
      Description copied from interface: ComputeSource
      Indicates if supporting resources have been created for this source.
      Specified by:
      getSupportingResourceCreated in interface ComputeSource
      Returns:
      true, if supporting resources have been created for this source; false, if no supporting resources have been created; null, if unknown
    • builder

      public static AlibabaInstancesComputeSource.Builder builder()
    • toBuilder

    • getId

      public String getId()
      Description copied from interface: Identified
      Returns the ID
      Specified by:
      getId in interface ComputeSource
      Specified by:
      getId in interface Identified
      Returns:
      the ID
    • getCreatedFromId

      public String 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 interface ComputeSource
      Returns:
      the ID of the source template if this source was created from a template
    • getName

      public String getName()
      The name of the compute source. This must be unique within a compute requirement.
      Specified by:
      getName in interface ComputeSource
      Specified by:
      getName in interface Named
      Returns:
      the name of the compute source
    • getCredential

      public String getCredential()
      Specified by:
      getCredential in interface AlibabaComputeSource
      Specified by:
      getCredential in interface ComputeSource
    • getRegion

      public String getRegion()
      The Alibaba Cloud region where instances will be provisioned.
      Specified by:
      getRegion in interface ComputeSource
      Returns:
      the Alibaba Cloud region where instances will be provisioned
    • getAvailabilityZone

      public String getAvailabilityZone()
      The Alibaba Cloud availability zone within the region where instances will be provisioned.
      Specified by:
      getAvailabilityZone in interface AlibabaComputeSource
      Returns:
      the Alibaba Cloud availability zone where instances will be provisioned
    • getSecurityGroupId

      public String getSecurityGroupId()
      The ID of the Alibaba Cloud Security Group for the provisioned instances.
      Returns:
      the ID of the Alibaba Cloud Security Group for the provisioned instances
    • getInstanceType

      public String getInstanceType()
      The Alibaba Cloud instance type for the provisioned instances.
      Specified by:
      getInstanceType in interface ComputeSource
      Returns:
      the Alibaba Cloud instance type for the provisioned instances
    • getImageId

      public String getImageId()
      The region-specific Alibaba Cloud ID for the image to use for the provisioned instances.
      Specified by:
      getImageId in interface ComputeSource
      Returns:
      the Alibaba Cloud ID for the image to use for the provisioned instances
    • getUserData

      public String getUserData()
      Description copied from interface: ComputeSource
      Gets the user-data script to be passed to the provisioned instance at startup.
      Specified by:
      getUserData in interface ComputeSource
      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 interface ComputeSource
      Returns:
      the custom instance tags
    • getRamRoleName

      public String getRamRoleName()
      The name of the RAM Role to use for the provisioned instances.
      Returns:
      the name of the RAM Role to use
    • getKeyName

      public String getKeyName()
      The name of the Alibaba Cloud key pair to use when logging into any instances provisioned from this source.
      Returns:
      the name of the key pair to use
    • getInstanceChargeType

      public AlibabaInstanceChargeType getInstanceChargeType()
      The Alibaba Cloud charge type to use for the provisioned instances.
      Returns:
      the Alibaba Cloud charge type to use for the provisioned instances
    • isAssignPublicIp

      public boolean isAssignPublicIp()
      Indicates if provisioned instances should be assigned public IP addresses.
      Returns:
      true, if provisioned instances should be assigned public IP addresses; otherwise, false
    • getSpotStrategy

      public AlibabaSpotStrategy getSpotStrategy()
      The Alibaba Cloud spot strategy to use when provisioning instances.
      Returns:
      the Alibaba Cloud spot strategy to use when provisioning instances
    • getSpotPriceLimit

      public Float getSpotPriceLimit()
      The Alibaba Cloud spot price limit to use with SPOT_WITH_PRICE_LIMIT spot strategy.
      Returns:
      the Alibaba Cloud spot price limit to use with SPOT_WITH_PRICE_LIMIT spot strategy
    • 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 interface ComputeSource
      Returns:
      the limit in number of instances that can be provisioned from this source
    • isSpecifyMinimum

      public boolean isSpecifyMinimum()
      Indicates if YellowDog Compute should specify the minimum when requesting instances from Alibaba Cloud. If true, then no instances are provisioned unless all requested instances are available; otherwise, if false, YellowDog Compute will provision as many instances as possible up to the number requested from this compute source.
      Returns:
      true, if YellowDog Compute should specify minimum instance count to Alibaba Cloud; otherwise, false
    • getInstanceSummary

      public InstanceSummary getInstanceSummary()
      Description copied from interface: ComputeSource
      A summary of instance counts according to instance status
      Specified by:
      getInstanceSummary in interface ComputeSource
      Returns:
      a summary of instance counts according to instance status
    • getStatus

      public ComputeSourceStatus getStatus()
      Description copied from interface: ComputeSource
      Gets the current provisioning status of this source.
      Specified by:
      getStatus in interface ComputeSource
      Returns:
      the current provisioning status of this source
    • getStatusMessage

      public String 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 interface ComputeSource
      Returns:
      the message associated with the current provisioning status of this source
    • getExhaustion

      public ComputeSourceExhaustion getExhaustion()
      Description copied from interface: ComputeSource
      If this source is associated with an exhausted allowance, gets the exhaustion state.
      Specified by:
      getExhaustion in interface ComputeSource
      Returns:
      the exhaustion state, if the source is associated with an exhausted allowance; otherwise, null
    • setId

      public void setId(String id)
      Description copied from interface: ComputeSource
      Sets the ID
      Specified by:
      setId in interface ComputeSource
      Parameters:
      id - This should only be set by the YellowDog Platform
    • setCreatedFromId

      public void setCreatedFromId(String createdFromId)
      Description copied from interface: ComputeSource
      Sets the source template ID
      Specified by:
      setCreatedFromId in interface ComputeSource
      Parameters:
      createdFromId - This should only be set by the YellowDog Platform
    • setName

      public void setName(String name)
      The name of the compute source. This must be unique within a compute requirement.
      Specified by:
      setName in interface ComputeSource
      Parameters:
      name - the name of the compute source
      This should not be changed once the requirement has been submitted to YellowDog Compute.
    • setCredential

      public void setCredential(String credential)
    • setRegion

      public void setRegion(String region)
      The Alibaba Cloud region where instances will be provisioned.
      Parameters:
      region - the Alibaba Cloud region where instances will be provisioned
      This should not be changed once the requirement has been submitted to YellowDog Compute.
    • setAvailabilityZone

      public void setAvailabilityZone(String availabilityZone)
      The Alibaba Cloud availability zone within the region where instances will be provisioned.
      Parameters:
      availabilityZone - the Alibaba Cloud availability zone where instances will be provisioned
      This should not be changed once the requirement has been submitted to YellowDog Compute.
    • setVSwitchId

      public void setVSwitchId(String vSwitchId)
      The ID of the virtual switch to use for the provisioned instances.
      Parameters:
      vSwitchId - the ID of the virtual switch to use
    • setSecurityGroupId

      public void setSecurityGroupId(String securityGroupId)
      The ID of the Alibaba Cloud Security Group for the provisioned instances.
      Parameters:
      securityGroupId - the ID of the Alibaba Cloud Security Group for the provisioned instances
    • setInstanceType

      public void setInstanceType(String instanceType)
      The Alibaba Cloud instance type for the provisioned instances.
      Specified by:
      setInstanceType in interface ComputeSource
      Parameters:
      instanceType - the Alibaba Cloud instance type for the provisioned instances
    • setImageId

      public void setImageId(String imageId)
      The region-specific Alibaba Cloud ID for the image to use for the provisioned instances.
      Specified by:
      setImageId in interface ComputeSource
      Parameters:
      imageId - the Alibaba Cloud ID for the image to use for the provisioned instances
    • setUserData

      public void setUserData(String userData)
      Description copied from interface: ComputeSource
      Sets the user-data script to be passed to the provisioned instance at startup.
      Specified by:
      setUserData in interface ComputeSource
      Parameters:
      userData - the user-data script
    • setInstanceTags

      public void setInstanceTags(Map<@AlibabaInstanceTagKey String,@AlibabaInstanceTagValue 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 interface ComputeSource
      Parameters:
      instanceTags - the custom instance tags
    • setRamRoleName

      public void setRamRoleName(String ramRoleName)
      The name of the RAM Role to use for the provisioned instances.
      Parameters:
      ramRoleName - the name of the RAM Role to use
    • setKeyName

      public void setKeyName(String keyName)
      The name of the Alibaba Cloud key pair to use when logging into any instances provisioned from this source.
      Parameters:
      keyName - the name of the key pair to use
    • setInstanceChargeType

      public void setInstanceChargeType(AlibabaInstanceChargeType instanceChargeType)
      The Alibaba Cloud charge type to use for the provisioned instances.
      Parameters:
      instanceChargeType - the Alibaba Cloud charge type to use for the provisioned instances
    • 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
    • setSpotStrategy

      public void setSpotStrategy(AlibabaSpotStrategy spotStrategy)
      The Alibaba Cloud spot strategy to use when provisioning instances.
      Parameters:
      spotStrategy - the Alibaba Cloud spot strategy to use when provisioning instances
    • setSpotPriceLimit

      public void setSpotPriceLimit(Float spotPriceLimit)
      The Alibaba Cloud spot price limit to use with SPOT_WITH_PRICE_LIMIT spot strategy.
      Parameters:
      spotPriceLimit - the Alibaba Cloud spot price limit to use with SPOT_WITH_PRICE_LIMIT spot strategy
    • 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 interface ComputeSource
      Parameters:
      limit - the limit in number of instances that can be provisioned from this source
    • setSpecifyMinimum

      public void setSpecifyMinimum(boolean specifyMinimum)
      Indicates if YellowDog Compute should specify the minimum when requesting instances from Alibaba Cloud. If true, then no instances are provisioned unless all requested instances are available; otherwise, if false, YellowDog Compute will provision as many instances as possible up to the number requested from this compute source.
      Parameters:
      specifyMinimum - true, if YellowDog Compute should specify minimum instance count to Alibaba Cloud; otherwise, false
    • setInstanceSummary

      public void setInstanceSummary(InstanceSummary instanceSummary)
      Specified by:
      setInstanceSummary in interface ComputeSource
    • setStatus

      public void setStatus(ComputeSourceStatus status)
      Description copied from interface: ComputeSource
      Sets the current provisioning status of this source.
      Specified by:
      setStatus in interface ComputeSource
      Parameters:
      status - This should only be set by the YellowDog Platform
    • setStatusMessage

      public void setStatusMessage(String statusMessage)
      Description copied from interface: ComputeSource
      Sets the message associated with the current provisioning status of this source.
      Specified by:
      setStatusMessage in interface ComputeSource
      Parameters:
      statusMessage - This should only be set by the YellowDog Platform
    • setExhaustion

      public void setExhaustion(ComputeSourceExhaustion exhaustion)
      Specified by:
      setExhaustion in interface ComputeSource
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getVSwitchId

      public String getVSwitchId()
      The ID of the virtual switch to use for the provisioned instances.
      Returns:
      the ID of the virtual switch to use