类 CreateVolumeRequest


  • public class CreateVolumeRequest
    extends AbstractBceRequest
    The request for creating a new volume.
    • 构造器详细资料

      • CreateVolumeRequest

        public CreateVolumeRequest()
    • 方法详细资料

      • getClientToken

        public String getClientToken()
      • setClientToken

        public void setClientToken​(String clientToken)
      • withClientToken

        public CreateVolumeRequest withClientToken​(String clientToken)
        Configure optional client token for the request. The request will be idempotent if client token is provided.
        参数:
        clientToken - An ASCII string whose length is less than 64. See more detail at BCE API doc
        返回:
        CreateVolumeRequest with specific clientToken
      • getPurchaseCount

        public int getPurchaseCount()
      • setPurchaseCount

        public void setPurchaseCount​(int purchaseCount)
      • withPurchaseCount

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

        public int getCdsSizeInGB()
      • setCdsSizeInGB

        public void setCdsSizeInGB​(int cdsSizeInGB)
      • withCdsSizeInGB

        public CreateVolumeRequest withCdsSizeInGB​(int cdsSizeInGB)
        Configure cdsSizeInGB for the request.
        参数:
        cdsSizeInGB - The size of volume to create in GB. By specifying the snapshotId, it will create volume from the specified snapshot and the parameter cdsSizeInGB will be ignored.
        返回:
        CreateVolumeRequest with cdsSizeInGB.
      • getStorageType

        public String getStorageType()
      • setStorageType

        public void setStorageType​(String storageType)
      • withStorageType

        public CreateVolumeRequest withStorageType​(String storageType)
        Configure storageType for the request.
        参数:
        storageType - The storage type of volume, see more detail in BCE API doc
        返回:
        CreateVolumeRequest with storageType.
      • getBilling

        public Billing getBilling()
      • setBilling

        public void setBilling​(Billing billing)
      • withBilling

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

        public String getSnapshotId()
      • setSnapshotId

        public void setSnapshotId​(String snapshotId)
      • withSnapshotId

        public CreateVolumeRequest withSnapshotId​(String snapshotId)
        Configure snapshotId for the request.
        参数:
        snapshotId - The id of snapshot.By specifying the snapshotId, it will create volume from the specified snapshot and the parameter cdsSizeInGB will be ignored.
        返回:
        CreateVolumeRequest with snapshotId.
      • getZoneName

        public String getZoneName()
      • setZoneName

        public void setZoneName​(String zoneName)
      • getClusterId

        public String getClusterId()
      • setClusterId

        public void setClusterId​(String clusterId)