All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.sdk.service.ecs20140526.models.CreateDiskRequest Maven / Gradle / Ivy

There is a newer version: 5.0.29
Show newest version
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ecs20140526.models;

import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;

/**
 * {@link CreateDiskRequest} extends {@link RequestModel}
 *
 * 

CreateDiskRequest

*/ public class CreateDiskRequest extends Request { @com.aliyun.core.annotation.Host @com.aliyun.core.annotation.NameInMap("SourceRegionId") private String sourceRegionId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("AdvancedFeatures") private String advancedFeatures; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Arn") private java.util.List < Arn> arn; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("BurstingEnabled") private Boolean burstingEnabled; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ClientToken") private String clientToken; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Description") private String description; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DiskCategory") private String diskCategory; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DiskName") private String diskName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("EncryptAlgorithm") private String encryptAlgorithm; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Encrypted") private Boolean encrypted; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InstanceId") private String instanceId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("KMSKeyId") @com.aliyun.core.annotation.Validation(maxLength = 64) private String KMSKeyId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("MultiAttach") private String multiAttach; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerAccount") private String ownerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerId") private Long ownerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("PerformanceLevel") private String performanceLevel; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ProvisionedIops") private Long provisionedIops; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("RegionId") @com.aliyun.core.annotation.Validation(required = true) private String regionId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceGroupId") private String resourceGroupId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerAccount") private String resourceOwnerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerId") private Long resourceOwnerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Size") @com.aliyun.core.annotation.Validation(maximum = 65536, minimum = 1) private Integer size; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SnapshotId") private String snapshotId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("StorageClusterId") private String storageClusterId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("StorageSetId") private String storageSetId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("StorageSetPartitionNumber") private Integer storageSetPartitionNumber; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Tag") private java.util.List < Tag> tag; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ZoneId") private String zoneId; private CreateDiskRequest(Builder builder) { super(builder); this.sourceRegionId = builder.sourceRegionId; this.advancedFeatures = builder.advancedFeatures; this.arn = builder.arn; this.burstingEnabled = builder.burstingEnabled; this.clientToken = builder.clientToken; this.description = builder.description; this.diskCategory = builder.diskCategory; this.diskName = builder.diskName; this.encryptAlgorithm = builder.encryptAlgorithm; this.encrypted = builder.encrypted; this.instanceId = builder.instanceId; this.KMSKeyId = builder.KMSKeyId; this.multiAttach = builder.multiAttach; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.performanceLevel = builder.performanceLevel; this.provisionedIops = builder.provisionedIops; this.regionId = builder.regionId; this.resourceGroupId = builder.resourceGroupId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; this.size = builder.size; this.snapshotId = builder.snapshotId; this.storageClusterId = builder.storageClusterId; this.storageSetId = builder.storageSetId; this.storageSetPartitionNumber = builder.storageSetPartitionNumber; this.tag = builder.tag; this.zoneId = builder.zoneId; } public static Builder builder() { return new Builder(); } public static CreateDiskRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return sourceRegionId */ public String getSourceRegionId() { return this.sourceRegionId; } /** * @return advancedFeatures */ public String getAdvancedFeatures() { return this.advancedFeatures; } /** * @return arn */ public java.util.List < Arn> getArn() { return this.arn; } /** * @return burstingEnabled */ public Boolean getBurstingEnabled() { return this.burstingEnabled; } /** * @return clientToken */ public String getClientToken() { return this.clientToken; } /** * @return description */ public String getDescription() { return this.description; } /** * @return diskCategory */ public String getDiskCategory() { return this.diskCategory; } /** * @return diskName */ public String getDiskName() { return this.diskName; } /** * @return encryptAlgorithm */ public String getEncryptAlgorithm() { return this.encryptAlgorithm; } /** * @return encrypted */ public Boolean getEncrypted() { return this.encrypted; } /** * @return instanceId */ public String getInstanceId() { return this.instanceId; } /** * @return KMSKeyId */ public String getKMSKeyId() { return this.KMSKeyId; } /** * @return multiAttach */ public String getMultiAttach() { return this.multiAttach; } /** * @return ownerAccount */ public String getOwnerAccount() { return this.ownerAccount; } /** * @return ownerId */ public Long getOwnerId() { return this.ownerId; } /** * @return performanceLevel */ public String getPerformanceLevel() { return this.performanceLevel; } /** * @return provisionedIops */ public Long getProvisionedIops() { return this.provisionedIops; } /** * @return regionId */ public String getRegionId() { return this.regionId; } /** * @return resourceGroupId */ public String getResourceGroupId() { return this.resourceGroupId; } /** * @return resourceOwnerAccount */ public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } /** * @return resourceOwnerId */ public Long getResourceOwnerId() { return this.resourceOwnerId; } /** * @return size */ public Integer getSize() { return this.size; } /** * @return snapshotId */ public String getSnapshotId() { return this.snapshotId; } /** * @return storageClusterId */ public String getStorageClusterId() { return this.storageClusterId; } /** * @return storageSetId */ public String getStorageSetId() { return this.storageSetId; } /** * @return storageSetPartitionNumber */ public Integer getStorageSetPartitionNumber() { return this.storageSetPartitionNumber; } /** * @return tag */ public java.util.List < Tag> getTag() { return this.tag; } /** * @return zoneId */ public String getZoneId() { return this.zoneId; } public static final class Builder extends Request.Builder { private String sourceRegionId; private String advancedFeatures; private java.util.List < Arn> arn; private Boolean burstingEnabled; private String clientToken; private String description; private String diskCategory; private String diskName; private String encryptAlgorithm; private Boolean encrypted; private String instanceId; private String KMSKeyId; private String multiAttach; private String ownerAccount; private Long ownerId; private String performanceLevel; private Long provisionedIops; private String regionId; private String resourceGroupId; private String resourceOwnerAccount; private Long resourceOwnerId; private Integer size; private String snapshotId; private String storageClusterId; private String storageSetId; private Integer storageSetPartitionNumber; private java.util.List < Tag> tag; private String zoneId; private Builder() { super(); } private Builder(CreateDiskRequest request) { super(request); this.sourceRegionId = request.sourceRegionId; this.advancedFeatures = request.advancedFeatures; this.arn = request.arn; this.burstingEnabled = request.burstingEnabled; this.clientToken = request.clientToken; this.description = request.description; this.diskCategory = request.diskCategory; this.diskName = request.diskName; this.encryptAlgorithm = request.encryptAlgorithm; this.encrypted = request.encrypted; this.instanceId = request.instanceId; this.KMSKeyId = request.KMSKeyId; this.multiAttach = request.multiAttach; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.performanceLevel = request.performanceLevel; this.provisionedIops = request.provisionedIops; this.regionId = request.regionId; this.resourceGroupId = request.resourceGroupId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; this.size = request.size; this.snapshotId = request.snapshotId; this.storageClusterId = request.storageClusterId; this.storageSetId = request.storageSetId; this.storageSetPartitionNumber = request.storageSetPartitionNumber; this.tag = request.tag; this.zoneId = request.zoneId; } /** * SourceRegionId. */ public Builder sourceRegionId(String sourceRegionId) { this.putHostParameter("SourceRegionId", sourceRegionId); this.sourceRegionId = sourceRegionId; return this; } /** * This parameter is not publicly available. */ public Builder advancedFeatures(String advancedFeatures) { this.putQueryParameter("AdvancedFeatures", advancedFeatures); this.advancedFeatures = advancedFeatures; return this; } /** * This parameter is not publicly available. */ public Builder arn(java.util.List < Arn> arn) { this.putQueryParameter("Arn", arn); this.arn = arn; return this; } /** * Specifies whether to enable the performance burst feature. Valid values: *

* * * true * * false * * > This parameter is available only when DiskCategory is set to cloud_auto. For more information, see [ESSD AutoPL disks](~~368372~~). */ public Builder burstingEnabled(Boolean burstingEnabled) { this.putQueryParameter("BurstingEnabled", burstingEnabled); this.burstingEnabled = burstingEnabled; return this; } /** * The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The **token** can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](~~25693~~). */ public Builder clientToken(String clientToken) { this.putQueryParameter("ClientToken", clientToken); this.clientToken = clientToken; return this; } /** * The description of the disk. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. *

* * This parameter is left empty by default. */ public Builder description(String description) { this.putQueryParameter("Description", description); this.description = description; return this; } /** * The category of the data disk. Valid values: *

* * * cloud: basic disk * * cloud_efficiency: ultra disk * * cloud_ssd: standard SSD * * cloud_essd: ESSD * * cloud_auto: ESSD AutoPL disk * * cloud_essd_entry: ESSD Entry disk * * elastic_ephemeral_disk_standard: standard elastic ephemeral disk * * elastic_ephemeral_disk_premium: premium elastic ephemeral disk * * Default value: cloud. */ public Builder diskCategory(String diskCategory) { this.putQueryParameter("DiskCategory", diskCategory); this.diskCategory = diskCategory; return this; } /** * The name of the disk. The name must be 2 to 128 characters in length and can contain letters and digits. The name can contain colons (:), underscores (\_), periods (.), and hyphens (-). *

* * This parameter is left empty by default. */ public Builder diskName(String diskName) { this.putQueryParameter("DiskName", diskName); this.diskName = diskName; return this; } /** * This parameter is not publicly available. */ public Builder encryptAlgorithm(String encryptAlgorithm) { this.putQueryParameter("EncryptAlgorithm", encryptAlgorithm); this.encryptAlgorithm = encryptAlgorithm; return this; } /** * Specifies whether to encrypt the disk. Valid values: *

* * * true * * false * * Default value: false. */ public Builder encrypted(Boolean encrypted) { this.putQueryParameter("Encrypted", encrypted); this.encrypted = encrypted; return this; } /** * The ID of the subscription instance to which to attach the subscription disk. *

* * * If you specify an instance ID, the following parameters are ignored: ResourceGroupId, Tag.N.Key, Tag.N.Value, ClientToken, and KMSKeyId. * * You cannot specify both ZoneId and InstanceId in a request. * * This parameter is empty by default, which indicates that a pay-as-you-go disk is created in the region and zone specified by RegionId and ZoneId. */ public Builder instanceId(String instanceId) { this.putQueryParameter("InstanceId", instanceId); this.instanceId = instanceId; return this; } /** * The ID of the Key Management Service (KMS) key that is used for the disk. */ public Builder KMSKeyId(String KMSKeyId) { this.putQueryParameter("KMSKeyId", KMSKeyId); this.KMSKeyId = KMSKeyId; return this; } /** * Specifies whether to enable the multi-attach feature for the disk. Valid values: *

* * * Disabled * * Enabled Set the value to `Enabled` only for ESSDs. * * Default value: Disabled. * * > Disks for which the multi-attach feature is enabled support only the pay-as-you-go billing method. When `MultiAttach` is set to Enabled, you cannot specify `InstanceId`. You can call the [AttachDisk](~~25515~~) operation to attach disks to instances after the disks are created. Disks for which the multi-attach feature is enabled can be attached only as data disks. */ public Builder multiAttach(String multiAttach) { this.putQueryParameter("MultiAttach", multiAttach); this.multiAttach = multiAttach; return this; } /** * OwnerAccount. */ public Builder ownerAccount(String ownerAccount) { this.putQueryParameter("OwnerAccount", ownerAccount); this.ownerAccount = ownerAccount; return this; } /** * OwnerId. */ public Builder ownerId(Long ownerId) { this.putQueryParameter("OwnerId", ownerId); this.ownerId = ownerId; return this; } /** * The performance level of the disk if the disk is an ESSD. Valid values: *

* * * PL0: A single ESSD can deliver up to 10,000 random read/write IOPS. * * PL1: A single ESSD can deliver up to 50,000 random read/write IOPS. * * PL2: A single ESSD can deliver up to 100,000 random read/write IOPS. * * PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. * * Default value: PL1. * * For information about ESSD performance levels, see [ESSDs](~~122389~~). */ public Builder performanceLevel(String performanceLevel) { this.putQueryParameter("PerformanceLevel", performanceLevel); this.performanceLevel = performanceLevel; return this; } /** * The provisioned read/write IOPS of the ESSD AutoPL disk. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS}. *

* * Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}. * * > This parameter is available only when DiskCategory is set to cloud_auto. For more information, see [ESSD AutoPL disks](~~368372~~). */ public Builder provisionedIops(Long provisionedIops) { this.putQueryParameter("ProvisionedIops", provisionedIops); this.provisionedIops = provisionedIops; return this; } /** * The ID of the region in which to create the disk. You can call the [DescribeRegions](~~25609~~) operation to query the most recent region list. */ public Builder regionId(String regionId) { this.putQueryParameter("RegionId", regionId); this.regionId = regionId; return this; } /** * The ID of the resource group to which to add the disk. */ public Builder resourceGroupId(String resourceGroupId) { this.putQueryParameter("ResourceGroupId", resourceGroupId); this.resourceGroupId = resourceGroupId; return this; } /** * ResourceOwnerAccount. */ public Builder resourceOwnerAccount(String resourceOwnerAccount) { this.putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); this.resourceOwnerAccount = resourceOwnerAccount; return this; } /** * ResourceOwnerId. */ public Builder resourceOwnerId(Long resourceOwnerId) { this.putQueryParameter("ResourceOwnerId", resourceOwnerId); this.resourceOwnerId = resourceOwnerId; return this; } /** * The size of the disk. Unit: GiB. This parameter is required. Valid values: *

* * * Valid values when DiskCategory is set to cloud: 5 to 2000. * * * Valid values when DiskCategory is set to cloud_efficiency: 20 to 32768. * * * Valid values when DiskCategory is set to cloud_ssd: 20 to 32768. * * * Valid values when DiskCategory is set to cloud_essd: vary based on the `PerformanceLevel` value. * * * Valid values when PerformanceLevel is set to PL0: 1 to 32768. * * Valid values when PerformanceLevel is set to PL1: 20 to 32768. * * Valid values when PerformanceLevel is set to PL2: 461 to 32768. * * Valid values when PerformanceLevel is set to PL3: 1261 to 32768. * * * Valid values when DiskCategory is set to cloud_auto: 1 to 32768. * * * Valid values when DiskCategory is set to cloud_essd_entry: 10 to 32768. * * * Valid values when DiskCategory is set to elastic_ephemeral_disk_standard: 64 to 8192. * * * Valid values when DiskCategory is set to elastic_ephemeral_disk_premium: 64 to 8192. * * If `SnapshotId` is specified, the following limits apply to `SnapshotId` and `Size`: * * * If the size of the snapshot specified by `SnapshotId` is larger than the value of `Size`, the size of the created disk is equal to the specified snapshot size. * * If the size of the snapshot specified by `SnapshotId` is smaller than the value of `Size`, the size of the created disk is equal to the value of `Size`. */ public Builder size(Integer size) { this.putQueryParameter("Size", size); this.size = size; return this; } /** * The ID of the snapshot to use to create the disk. Snapshots that were created on or before July 15, 2013 cannot be used to create disks. *

* * The following limits apply to `SnapshotId` and `Size`: * * * If the size of the snapshot specified by `SnapshotId` is larger than the value of `Size`, the size of the created disk is equal to the specified snapshot size. * * If the size of the snapshot specified by `SnapshotId` is smaller than the value of `Size`, the size of the created disk is equal to the value of `Size`. * * You cannot create elastic ephemeral disks from snapshots. */ public Builder snapshotId(String snapshotId) { this.putQueryParameter("SnapshotId", snapshotId); this.snapshotId = snapshotId; return this; } /** * The ID of the dedicated block storage cluster in which to create the disk. To create a disk in a specific dedicated block storage cluster, you must specify this parameter. *

* * > You can specify the storage set-related parameters (`StorageSetId` and `StorageSetPartitionNumber`) or the dedicated block storage cluster-related parameter (`StorageClusterId`), but not both. If you specify a storage set-related parameter and a dedicated block storage cluster-related parameter in a request, the request fails. */ public Builder storageClusterId(String storageClusterId) { this.putQueryParameter("StorageClusterId", storageClusterId); this.storageClusterId = storageClusterId; return this; } /** * The ID of the storage set. *

* * > You cannot specify storage set-related parameters (`StorageSetId` and `StorageSetPartitionNumber`) and the dedicated block storage cluster-related parameter (`StorageClusterId`) at the same time. Otherwise, the operation cannot be called. */ public Builder storageSetId(String storageSetId) { this.putQueryParameter("StorageSetId", storageSetId); this.storageSetId = storageSetId; return this; } /** * The number of partitions in the storage set. The value must be greater than or equal to 2 but cannot exceed the quota obtained by calling the [DescribeAccountAttributes](~~73772~~)operation. *

* * Default value: 2. */ public Builder storageSetPartitionNumber(Integer storageSetPartitionNumber) { this.putQueryParameter("StorageSetPartitionNumber", storageSetPartitionNumber); this.storageSetPartitionNumber = storageSetPartitionNumber; return this; } /** * The tags to add to the disk. */ public Builder tag(java.util.List < Tag> tag) { this.putQueryParameter("Tag", tag); this.tag = tag; return this; } /** * The ID of the zone in which to create the pay-as-you-go disk. *

* * * If you do not specify InstanceId, you must specify ZoneId. * * You cannot specify both ZoneId and InstanceId in a request. */ public Builder zoneId(String zoneId) { this.putQueryParameter("ZoneId", zoneId); this.zoneId = zoneId; return this; } @Override public CreateDiskRequest build() { return new CreateDiskRequest(this); } } public static class Arn extends TeaModel { @com.aliyun.core.annotation.NameInMap("AssumeRoleFor") private Long assumeRoleFor; @com.aliyun.core.annotation.NameInMap("RoleType") private String roleType; @com.aliyun.core.annotation.NameInMap("Rolearn") private String rolearn; private Arn(Builder builder) { this.assumeRoleFor = builder.assumeRoleFor; this.roleType = builder.roleType; this.rolearn = builder.rolearn; } public static Builder builder() { return new Builder(); } public static Arn create() { return builder().build(); } /** * @return assumeRoleFor */ public Long getAssumeRoleFor() { return this.assumeRoleFor; } /** * @return roleType */ public String getRoleType() { return this.roleType; } /** * @return rolearn */ public String getRolearn() { return this.rolearn; } public static final class Builder { private Long assumeRoleFor; private String roleType; private String rolearn; /** * This parameter is not publicly available. */ public Builder assumeRoleFor(Long assumeRoleFor) { this.assumeRoleFor = assumeRoleFor; return this; } /** * This parameter is not publicly available. */ public Builder roleType(String roleType) { this.roleType = roleType; return this; } /** * This parameter is not publicly available. */ public Builder rolearn(String rolearn) { this.rolearn = rolearn; return this; } public Arn build() { return new Arn(this); } } } public static class Tag extends TeaModel { @com.aliyun.core.annotation.NameInMap("Key") private String key; @com.aliyun.core.annotation.NameInMap("Value") private String value; private Tag(Builder builder) { this.key = builder.key; this.value = builder.value; } public static Builder builder() { return new Builder(); } public static Tag create() { return builder().build(); } /** * @return key */ public String getKey() { return this.key; } /** * @return value */ public String getValue() { return this.value; } public static final class Builder { private String key; private String value; /** * The key of tag N to add to the disk. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot contain `http://` or `https://`. The tag key cannot start with `acs:` or `aliyun`. */ public Builder key(String key) { this.key = key; return this; } /** * The value of tag N to add to the disk. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain `http://` or `https://`. */ public Builder value(String value) { this.value = value; return this; } public Tag build() { return new Tag(this); } } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy