类 CreateInstanceRequest


  • public class CreateInstanceRequest
    extends AbstractBceRequest
    The request for creating a newly instance.
    • 构造器详细资料

      • CreateInstanceRequest

        public CreateInstanceRequest()
    • 方法详细资料

      • withClientToken

        public CreateInstanceRequest withClientToken​(String clientToken)
        Configure optional client token for the request. The request will be idempotent if client token is provided. If the clientToken is not specified by the user, a random String generated by default algorithm will be used.
        参数:
        clientToken - An ASCII string whose length is less than 64. See more detail at BCE API doc
        返回:
        CreateInstanceRequest with specific clientToken
      • getClientToken

        public String getClientToken()
      • setClientToken

        public void setClientToken​(String clientToken)
      • withInstanceType

        public CreateInstanceRequest withInstanceType​(String instanceType)
        Configure instanceType for the request.
        参数:
        instanceType - The specified Specification to create the instance. See more detail on BCE API doc
        返回:
        CreateInstanceRequest with specific instanceType
      • getInstanceType

        public String getInstanceType()
      • setInstanceType

        public void setInstanceType​(String instanceType)
      • getSpec

        public String getSpec()
      • setSpec

        public void setSpec​(String spec)
      • getCpuCount

        public int getCpuCount()
      • setCpuCount

        public void setCpuCount​(int cpuCount)
      • withMemoryCapacityInGB

        public CreateInstanceRequest withMemoryCapacityInGB​(int memoryCapacityInGB)
      • getMemoryCapacityInGB

        public int getMemoryCapacityInGB()
      • setMemoryCapacityInGB

        public void setMemoryCapacityInGB​(int memoryCapacityInGB)
      • getRootDiskSizeInGb

        public int getRootDiskSizeInGb()
      • setRootDiskSizeInGb

        public void setRootDiskSizeInGb​(int rootDiskSizeInGb)
      • getRootDiskStorageType

        public String getRootDiskStorageType()
      • setRootDiskStorageType

        public void setRootDiskStorageType​(String rootDiskStorageType)
      • setEphemeralDisks

        public void setEphemeralDisks​(List<EphemeralDisk> ephemeralDisks)
      • withImageId

        public CreateInstanceRequest withImageId​(String imageId)
        Configure imageId for the request.
        参数:
        imageId - The specified image id to create the instance.
        返回:
        CreateInstanceRequest with specific imageId
      • getImageId

        public String getImageId()
      • setImageId

        public void setImageId​(String imageId)
      • getLocalDiskSizeInGB

        @Deprecated
        public int getLocalDiskSizeInGB()
        已过时。
      • setLocalDiskSizeInGB

        @Deprecated
        public void setLocalDiskSizeInGB​(int localDiskSizeInGB)
        已过时。
      • withLocalDiskSizeInGB

        @Deprecated
        public CreateInstanceRequest withLocalDiskSizeInGB​(int localDiskSizeInGB)
        已过时。
        Configure localDiskSizeInGB for the request.
        参数:
        localDiskSizeInGB - The optional parameter to specify the temporary disk size in GB.
        返回:
        CreateInstanceRequest with specific localDiskSizeInGB
      • withCreateCdsList

        public CreateInstanceRequest withCreateCdsList​(List<CreateCdsModel> createCdsList)
        Configure createCdsList for the request.
        参数:
        createCdsList - The optional list of volume detail info to create.
        返回:
        CreateInstanceRequest with specific createCdsList
      • getNetworkCapacityInMbps

        public int getNetworkCapacityInMbps()
      • setNetworkCapacityInMbps

        public void setNetworkCapacityInMbps​(int networkCapacityInMbps)
      • withNetworkCapacityInMbps

        public CreateInstanceRequest withNetworkCapacityInMbps​(int networkCapacityInMbps)
        Configure networkCapacityInMbps for the request.
        参数:
        networkCapacityInMbps - The optional parameter to specify the bandwidth in Mbps for the new instance.
        返回:
        CreateInstanceRequest with specific networkCapacityInMbps
      • getPurchaseCount

        public int getPurchaseCount()
      • setPurchaseCount

        public void setPurchaseCount​(int purchaseCount)
      • withPurchaseCount

        public CreateInstanceRequest withPurchaseCount​(int purchaseCount)
        Configure purchaseCount for the request.
        参数:
        purchaseCount - The number of instance to buy, the default value is 1.
        返回:
        CreateInstanceRequest with specific purchaseCount
      • getName

        public String getName()
      • setName

        public void setName​(String name)
      • getHostname

        public String getHostname()
      • setHostname

        public void setHostname​(String hostname)
      • isAutoSeqSuffix

        public boolean isAutoSeqSuffix()
      • setAutoSeqSuffix

        public void setAutoSeqSuffix​(boolean autoSeqSuffix)
      • withName

        public CreateInstanceRequest withName​(String name)
        Configure name for the request.
        参数:
        name - The optional parameter to desc the instance that will be created.
        返回:
        CreateInstanceRequest with specific name
      • getAdminPass

        public String getAdminPass()
      • setAdminPass

        public void setAdminPass​(String adminPass)
      • withAdminPass

        public CreateInstanceRequest withAdminPass​(String adminPass)
        Configure adminPass for the request.
        参数:
        adminPass - The optional parameter to specify the password for the instance. The adminPass will be encrypted in AES-128 algorithm with the substring of the former 16 characters of user SecretKey. See more detail on BCE API doc
        返回:
        CreateInstanceRequest with specific adminPass
      • getBilling

        public Billing getBilling()
      • setBilling

        public void setBilling​(Billing billing)
      • withBilling

        public CreateInstanceRequest withBilling​(Billing billing)
        Configure billing for the request.
        参数:
        billing - The detail model to specify the billing.
        返回:
        CreateInstanceRequest with specific billing
      • isRelationTag

        public boolean isRelationTag()
      • setRelationTag

        public void setRelationTag​(boolean relationTag)
      • withRelationTag

        public CreateInstanceRequest withRelationTag​(boolean relationTag)
        Configure relationTag for the request.
        参数:
        relationTag - Indicates whether the tag is bound to all relation instances.
        返回:
        CreateInstanceRequest with specific relationTag
      • withTags

        public CreateInstanceRequest withTags​(List<TagModel> tags)
        Configure tags for the request.
        参数:
        tags - The list of tag to be bonded.
        返回:
        CreateInstanceRequest with specific tags
      • getDedicatedHostId

        public String getDedicatedHostId()
      • setDedicatedHostId

        public void setDedicatedHostId​(String dedicatedHostId)
      • withZoneName

        public CreateInstanceRequest withZoneName​(String zoneName)
        Configure the zone name for the request
        参数:
        zoneName -
        返回:
        CreateInstanceRequest with specified zone name
      • getZoneName

        public String getZoneName()
      • setZoneName

        public void setZoneName​(String zoneName)
      • withSubnetId

        public CreateInstanceRequest withSubnetId​(String subnetId)
        Configure the subnetId for the request
        参数:
        subnetId -
        返回:
        CreateInstanceRequest with specified subnetId
      • getSubnetId

        public String getSubnetId()
      • setSubnetId

        public void setSubnetId​(String subnetId)
      • withSecurityGroupId

        public CreateInstanceRequest withSecurityGroupId​(String securityGroupId)
        Configure the securityGroupId for the request
        参数:
        securityGroupId -
        返回:
        CreateInstanceRequest with specified securityGroupId
      • getSecurityGroupId

        public String getSecurityGroupId()
      • setSecurityGroupId

        public void setSecurityGroupId​(String securityGroupId)
      • setGpuCard

        public void setGpuCard​(GpuCardType gpuCard)
      • withGpuCard

        public CreateInstanceRequest withGpuCard​(GpuCardType gpuCard)
        Configure the gpuCard for the request, see all of supported gpu card type in GpuCardType
        参数:
        gpuCard -
        返回:
        CreateInstanceRequest with specified gpuCard
      • setFpgaCard

        public void setFpgaCard​(FpgaCardType fpgaCard)
      • withFpgaCard

        public CreateInstanceRequest withFpgaCard​(FpgaCardType fpgaCard)
        Configure the fpgaCard for the request, see all of supported fpga card type in FpgaCardType
        参数:
        fpgaCard -
        返回:
        CreateInstanceRequest with specified fpgaCard
      • getCardCount

        public int getCardCount()
      • setCardCount

        public void setCardCount​(int cardCount)
      • withCardCount

        public CreateInstanceRequest withCardCount​(int cardCount)
        Configure the card count of gpuCardType or gpgaCardType for the request, if creating gpu / fpga instance, one or more card count must be specified.
        参数:
        cardCount -
        返回:
        CreateInstanceRequest with card count of gpuCardType or gpgaCardTyp.
      • getAspId

        public String getAspId()
      • setAspId

        public void setAspId​(String aspId)
      • withAspId

        public CreateInstanceRequest withAspId​(String aspId)
        Configure the aspId for the request
        参数:
        aspId - The id of the asp.
        返回:
        CreateInstanceRequest with specified aspId
      • getAutoRenewTime

        public int getAutoRenewTime()
      • setAutoRenewTime

        public void setAutoRenewTime​(int autoRenewTime)
      • withAutoRenewTime

        public CreateInstanceRequest withAutoRenewTime​(int autoRenewTime)
        Configure the autoRenewTime for the request
        参数:
        autoRenewTime - The specified auto renew time length.
        返回:
        CreateInstanceRequest with specified autoRenewTime
      • getAutoRenewTimeUnit

        public String getAutoRenewTimeUnit()
      • setAutoRenewTimeUnit

        public void setAutoRenewTimeUnit​(String autoRenewTimeUnit)
      • withAutoRenewTimeUnit

        public CreateInstanceRequest withAutoRenewTimeUnit​(String autoRenewTimeUnit)
        Configure the autoRenewTimeUnit for the request
        参数:
        autoRenewTimeUnit - The specified auto renew time unit. The unit can be "month" or "year".
        返回:
        CreateInstanceRequest with specified autoRenewTimeUnit
      • isCdsAutoRenew

        public boolean isCdsAutoRenew()
      • setCdsAutoRenew

        public void setCdsAutoRenew​(boolean cdsAutoRenew)
      • withCdsAutoRenew

        public CreateInstanceRequest withCdsAutoRenew​(boolean cdsAutoRenew)
        Configure the cdsAutoRenew for the request
        参数:
        cdsAutoRenew - The option param to indicate that whether the cds is auto renew or not. If true, it means the instance is auto renew.
        返回:
        CreateInstanceRequest with specified cdsAutoRenew
      • getDeployId

        public String getDeployId()
      • setDeployId

        public void setDeployId​(String deployId)
      • withDeployId

        public CreateInstanceRequest withDeployId​(String deployId)
        Configure the deployId for the request
        参数:
        deployId - The specified deployment set id.
        返回:
        CreateInstanceRequest with specified deployId
      • isDisableRootDiskSerial

        public boolean isDisableRootDiskSerial()
      • setDisableRootDiskSerial

        public void setDisableRootDiskSerial​(boolean disableRootDiskSerial)
      • getInternetChargeType

        public String getInternetChargeType()
      • setInternetChargeType

        public void setInternetChargeType​(String internetChargeType)
      • withInternetChargeType

        public CreateInstanceRequest withInternetChargeType​(String internetChargeType)
        Configure the internetChargeType for the request
        参数:
        internetChargeType - The specified internet charge type.
        返回:
        CreateInstanceRequest with specified internetChargeType
      • getKeypairId

        public String getKeypairId()
      • setKeypairId

        public void setKeypairId​(String keypairId)
      • withKeypairId

        public CreateInstanceRequest withKeypairId​(String keypairId)
        Configure the keypairId for the request
        参数:
        keypairId - The specified keypair id.
        返回:
        CreateInstanceRequest with specified keypairId
      • getBidModel

        public String getBidModel()
      • setBidModel

        public void setBidModel​(String bidModel)
      • withBidModel

        public CreateInstanceRequest withBidModel​(String bidModel)
        Configure the bidModel for the request
        参数:
        bidModel - The specified bidModel. The value can be "market" or "custom".
        返回:
        CreateInstanceRequest with specified bidModel
      • getBidPrice

        public String getBidPrice()
      • setBidPrice

        public void setBidPrice​(String bidPrice)
      • getUserData

        public String getUserData()
      • setUserData

        public void setUserData​(String userData)
      • withBidPrice

        public CreateInstanceRequest withBidPrice​(String bidPrice)
        Configure the bidPrice for the request
        参数:
        bidPrice - The specified bidPrice. Only the value of bidModel is custom, the param works.
        返回:
        CreateInstanceRequest with specified bidPrice
      • getInternalIps

        public List<String> getInternalIps()
      • setInternalIps

        public void setInternalIps​(List<String> internalIps)
      • getResGroupId

        public String getResGroupId()
      • setResGroupId

        public void setResGroupId​(String resGroupId)