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

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

// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ecs20140526.models;

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

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

CreateSnapshotGroupRequest

*/ public class CreateSnapshotGroupRequest extends Request { @Query @NameInMap("Description") private String description; @Query @NameInMap("DiskId") private java.util.List < String > diskId; @Query @NameInMap("ExcludeDiskId") private java.util.List < String > excludeDiskId; @Query @NameInMap("InstanceId") private String instanceId; @Query @NameInMap("InstantAccess") private Boolean instantAccess; @Query @NameInMap("InstantAccessRetentionDays") private Integer instantAccessRetentionDays; @Query @NameInMap("Name") private String name; @Query @NameInMap("OwnerAccount") private String ownerAccount; @Query @NameInMap("OwnerId") private Long ownerId; @Query @NameInMap("RegionId") @Validation(required = true) private String regionId; @Query @NameInMap("ResourceGroupId") private String resourceGroupId; @Query @NameInMap("ResourceOwnerAccount") private String resourceOwnerAccount; @Query @NameInMap("ResourceOwnerId") private Long resourceOwnerId; @Query @NameInMap("StorageLocationArn") private String storageLocationArn; @Query @NameInMap("Tag") private java.util.List < Tag> tag; private CreateSnapshotGroupRequest(Builder builder) { super(builder); this.description = builder.description; this.diskId = builder.diskId; this.excludeDiskId = builder.excludeDiskId; this.instanceId = builder.instanceId; this.instantAccess = builder.instantAccess; this.instantAccessRetentionDays = builder.instantAccessRetentionDays; this.name = builder.name; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.regionId = builder.regionId; this.resourceGroupId = builder.resourceGroupId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; this.storageLocationArn = builder.storageLocationArn; this.tag = builder.tag; } public static Builder builder() { return new Builder(); } public static CreateSnapshotGroupRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return description */ public String getDescription() { return this.description; } /** * @return diskId */ public java.util.List < String > getDiskId() { return this.diskId; } /** * @return excludeDiskId */ public java.util.List < String > getExcludeDiskId() { return this.excludeDiskId; } /** * @return instanceId */ public String getInstanceId() { return this.instanceId; } /** * @return instantAccess */ public Boolean getInstantAccess() { return this.instantAccess; } /** * @return instantAccessRetentionDays */ public Integer getInstantAccessRetentionDays() { return this.instantAccessRetentionDays; } /** * @return name */ public String getName() { return this.name; } /** * @return ownerAccount */ public String getOwnerAccount() { return this.ownerAccount; } /** * @return ownerId */ public Long getOwnerId() { return this.ownerId; } /** * @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 storageLocationArn */ public String getStorageLocationArn() { return this.storageLocationArn; } /** * @return tag */ public java.util.List < Tag> getTag() { return this.tag; } public static final class Builder extends Request.Builder { private String description; private java.util.List < String > diskId; private java.util.List < String > excludeDiskId; private String instanceId; private Boolean instantAccess; private Integer instantAccessRetentionDays; private String name; private String ownerAccount; private Long ownerId; private String regionId; private String resourceGroupId; private String resourceOwnerAccount; private Long resourceOwnerId; private String storageLocationArn; private java.util.List < Tag> tag; private Builder() { super(); } private Builder(CreateSnapshotGroupRequest request) { super(request); this.description = request.description; this.diskId = request.diskId; this.excludeDiskId = request.excludeDiskId; this.instanceId = request.instanceId; this.instantAccess = request.instantAccess; this.instantAccessRetentionDays = request.instantAccessRetentionDays; this.name = request.name; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.regionId = request.regionId; this.resourceGroupId = request.resourceGroupId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; this.storageLocationArn = request.storageLocationArn; this.tag = request.tag; } /** * The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. */ public Builder description(String description) { this.putQueryParameter("Description", description); this.description = description; return this; } /** * The ID of cloud disk N for which you want to create snapshots. You can specify multiple cloud disk IDs across instances within the same zone. Valid values of N: 1 to 16. A single snapshot-consistent group can contain snapshots of up to 16 cloud disks whose total disk size does not exceed 32 TiB. *

* * Take note of the following items: * * * You cannot specify both DiskId.N and `ExcludeDiskId.N` in the same request. * * If `InstanceId` is set, you can use DiskId.N to specify only cloud disks attached to the instance specified by InstanceId, and you cannot use DiskId.N to specify cloud disks attached to multiple instances. */ public Builder diskId(java.util.List < String > diskId) { this.putQueryParameter("DiskId", diskId); this.diskId = diskId; return this; } /** * The ID of cloud disk N for which you do not want to create snapshots. If this parameter is specified, the created snapshot-consistent group does not contain snapshots of the cloud disk. Valid values of N: 1 to 16. *

* * This parameter is empty by default, which indicates that snapshots are created for all the disks of the instance. * * > You cannot specify ExcludeDiskId.N and `DiskId.N` in the same request. */ public Builder excludeDiskId(java.util.List < String > excludeDiskId) { this.putQueryParameter("ExcludeDiskId", excludeDiskId); this.excludeDiskId = excludeDiskId; return this; } /** * The instance ID. */ public Builder instanceId(String instanceId) { this.putQueryParameter("InstanceId", instanceId); this.instanceId = instanceId; return this; } /** * Specifies whether to enable the instant access feature. Valid values: *

* * * true * * false * * Default value: false. */ public Builder instantAccess(Boolean instantAccess) { this.putQueryParameter("InstantAccess", instantAccess); this.instantAccess = instantAccess; return this; } /** * The number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535. *

* * This parameter takes effect only when `InstantAccess` is set to true. The instant access feature is automatically disabled when the specified duration ends. * * This parameter is empty by default, which indicates that the expiration time of the instant access feature is determined by the time when snapshots are released. */ public Builder instantAccessRetentionDays(Integer instantAccessRetentionDays) { this.putQueryParameter("InstantAccessRetentionDays", instantAccessRetentionDays); this.instantAccessRetentionDays = instantAccessRetentionDays; return this; } /** * The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (\_), hyphens (-), and colons (:). It must start with a letter and cannot start with `http://` or `https://`. */ public Builder name(String name) { this.putQueryParameter("Name", name); this.name = name; 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 region ID of the instance. You can call the [DescribeRegions](~~25609~~) operation to query the most recent list of regions. */ public Builder regionId(String regionId) { this.putQueryParameter("RegionId", regionId); this.regionId = regionId; return this; } /** * The ID of the resource group to which the snapshot-consistent group belongs. */ 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; } /** * > This parameter is unavailable for public use. */ public Builder storageLocationArn(String storageLocationArn) { this.putQueryParameter("StorageLocationArn", storageLocationArn); this.storageLocationArn = storageLocationArn; return this; } /** * The list of tags. */ public Builder tag(java.util.List < Tag> tag) { this.putQueryParameter("Tag", tag); this.tag = tag; return this; } @Override public CreateSnapshotGroupRequest build() { return new CreateSnapshotGroupRequest(this); } } public static class Tag extends TeaModel { @NameInMap("Key") private String key; @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 of the snapshot-consistent group. 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 start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`. */ public Builder key(String key) { this.key = key; return this; } /** * The value of tag N of the snapshot-consistent group. Valid values of N: 1 to 20. The tag value can be an empty string. It can be up to 128 characters in length and cannot start with `acs:`. It 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