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

com.aliyun.sdk.service.ecs20140526.models.DescribeSnapshotsRequest 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 DescribeSnapshotsRequest} extends {@link RequestModel}
 *
 * 

DescribeSnapshotsRequest

*/ public class DescribeSnapshotsRequest extends Request { @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Filter") private java.util.List < Filter> filter; @com.aliyun.core.annotation.Host @com.aliyun.core.annotation.NameInMap("SourceRegionId") private String sourceRegionId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Category") private String category; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DiskId") private String diskId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DryRun") private Boolean dryRun; @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") private String KMSKeyId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("MaxResults") @com.aliyun.core.annotation.Validation(maximum = 100, minimum = 1) private Integer maxResults; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("NextToken") private String nextToken; @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("PageNumber") private Integer pageNumber; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("PageSize") @com.aliyun.core.annotation.Validation(maximum = 100, minimum = 1) private Integer pageSize; @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("SnapshotIds") private String snapshotIds; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SnapshotLinkId") private String snapshotLinkId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SnapshotName") private String snapshotName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SnapshotType") private String snapshotType; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SourceDiskType") private String sourceDiskType; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Status") private String status; @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("Usage") private String usage; private DescribeSnapshotsRequest(Builder builder) { super(builder); this.filter = builder.filter; this.sourceRegionId = builder.sourceRegionId; this.category = builder.category; this.diskId = builder.diskId; this.dryRun = builder.dryRun; this.encrypted = builder.encrypted; this.instanceId = builder.instanceId; this.KMSKeyId = builder.KMSKeyId; this.maxResults = builder.maxResults; this.nextToken = builder.nextToken; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.pageNumber = builder.pageNumber; this.pageSize = builder.pageSize; this.regionId = builder.regionId; this.resourceGroupId = builder.resourceGroupId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; this.snapshotIds = builder.snapshotIds; this.snapshotLinkId = builder.snapshotLinkId; this.snapshotName = builder.snapshotName; this.snapshotType = builder.snapshotType; this.sourceDiskType = builder.sourceDiskType; this.status = builder.status; this.tag = builder.tag; this.usage = builder.usage; } public static Builder builder() { return new Builder(); } public static DescribeSnapshotsRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return filter */ public java.util.List < Filter> getFilter() { return this.filter; } /** * @return sourceRegionId */ public String getSourceRegionId() { return this.sourceRegionId; } /** * @return category */ public String getCategory() { return this.category; } /** * @return diskId */ public String getDiskId() { return this.diskId; } /** * @return dryRun */ public Boolean getDryRun() { return this.dryRun; } /** * @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 maxResults */ public Integer getMaxResults() { return this.maxResults; } /** * @return nextToken */ public String getNextToken() { return this.nextToken; } /** * @return ownerAccount */ public String getOwnerAccount() { return this.ownerAccount; } /** * @return ownerId */ public Long getOwnerId() { return this.ownerId; } /** * @return pageNumber */ public Integer getPageNumber() { return this.pageNumber; } /** * @return pageSize */ public Integer getPageSize() { return this.pageSize; } /** * @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 snapshotIds */ public String getSnapshotIds() { return this.snapshotIds; } /** * @return snapshotLinkId */ public String getSnapshotLinkId() { return this.snapshotLinkId; } /** * @return snapshotName */ public String getSnapshotName() { return this.snapshotName; } /** * @return snapshotType */ public String getSnapshotType() { return this.snapshotType; } /** * @return sourceDiskType */ public String getSourceDiskType() { return this.sourceDiskType; } /** * @return status */ public String getStatus() { return this.status; } /** * @return tag */ public java.util.List < Tag> getTag() { return this.tag; } /** * @return usage */ public String getUsage() { return this.usage; } public static final class Builder extends Request.Builder { private java.util.List < Filter> filter; private String sourceRegionId; private String category; private String diskId; private Boolean dryRun; private Boolean encrypted; private String instanceId; private String KMSKeyId; private Integer maxResults; private String nextToken; private String ownerAccount; private Long ownerId; private Integer pageNumber; private Integer pageSize; private String regionId; private String resourceGroupId; private String resourceOwnerAccount; private Long resourceOwnerId; private String snapshotIds; private String snapshotLinkId; private String snapshotName; private String snapshotType; private String sourceDiskType; private String status; private java.util.List < Tag> tag; private String usage; private Builder() { super(); } private Builder(DescribeSnapshotsRequest request) { super(request); this.filter = request.filter; this.sourceRegionId = request.sourceRegionId; this.category = request.category; this.diskId = request.diskId; this.dryRun = request.dryRun; this.encrypted = request.encrypted; this.instanceId = request.instanceId; this.KMSKeyId = request.KMSKeyId; this.maxResults = request.maxResults; this.nextToken = request.nextToken; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.pageNumber = request.pageNumber; this.pageSize = request.pageSize; this.regionId = request.regionId; this.resourceGroupId = request.resourceGroupId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; this.snapshotIds = request.snapshotIds; this.snapshotLinkId = request.snapshotLinkId; this.snapshotName = request.snapshotName; this.snapshotType = request.snapshotType; this.sourceDiskType = request.sourceDiskType; this.status = request.status; this.tag = request.tag; this.usage = request.usage; } /** * Filter. */ public Builder filter(java.util.List < Filter> filter) { this.putQueryParameter("Filter", filter); this.filter = filter; return this; } /** * SourceRegionId. */ public Builder sourceRegionId(String sourceRegionId) { this.putHostParameter("SourceRegionId", sourceRegionId); this.sourceRegionId = sourceRegionId; return this; } /** *

The category of the snapshot. Valid values:

*
    *
  • Standard: normal snapshot
  • *
  • Flash: local snapshot
  • *
*

The local snapshot feature is replaced by the instant access feature. When you specify this parameter, take note of the following items:

*
    *
  • If you have used local snapshots before December 14, 2020, you can use this parameter.
  • *
  • If you have not used local snapshots before December 14, 2020, you cannot use this parameter.
  • *
*
*

This parameter will be removed in the future. We recommend that you use other parameters to ensure future compatibility.

*
* * example: *

Standard

*/ public Builder category(String category) { this.putQueryParameter("Category", category); this.category = category; return this; } /** *

The disk ID.

* * example: *

d-bp67acfmxazb4p****

*/ public Builder diskId(String diskId) { this.putQueryParameter("DiskId", diskId); this.diskId = diskId; return this; } /** *

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*
    *
  • true: performs only a dry run. The system checks your AccessKey pair, the permissions of the RAM user, and the required parameters. If the request passes the dry run, the DryRunOperation error code is returned. Otherwise, an error message is returned.
  • *
  • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
  • *
* * example: *

false

*/ public Builder dryRun(Boolean dryRun) { this.putQueryParameter("DryRun", dryRun); this.dryRun = dryRun; return this; } /** *

Specifies whether the snapshot is encrypted. Default value: false.

* * example: *

false

*/ public Builder encrypted(Boolean encrypted) { this.putQueryParameter("Encrypted", encrypted); this.encrypted = encrypted; return this; } /** *

The instance ID.

* * example: *

i-bp67acfmxazb4p****

*/ 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 data disk.

* * example: *

0e478b7a-4262-4802-b8cb-00d3fb40****

*/ public Builder KMSKeyId(String KMSKeyId) { this.putQueryParameter("KMSKeyId", KMSKeyId); this.KMSKeyId = KMSKeyId; return this; } /** *

The maximum number of entries per page. Valid values: 1 to 100.

*

Default value: 10.

* * example: *

10

*/ public Builder maxResults(Integer maxResults) { this.putQueryParameter("MaxResults", maxResults); this.maxResults = maxResults; return this; } /** *

The pagination token that is used in the next request to retrieve a new page of results. You must specify the token that is obtained from the previous query as the value of NextToken.

* * example: *

caeba0bbb2be03f84eb48b699f0a4883

*/ public Builder nextToken(String nextToken) { this.putQueryParameter("NextToken", nextToken); this.nextToken = nextToken; 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 page number. Pages start from page 1.

*

Default value: 1.

* * example: *

1

*/ public Builder pageNumber(Integer pageNumber) { this.putQueryParameter("PageNumber", pageNumber); this.pageNumber = pageNumber; return this; } /** *

The number of entries per page. Valid values: 1 to 100.

*

Default value: 10.

* * example: *

10

*/ public Builder pageSize(Integer pageSize) { this.putQueryParameter("PageSize", pageSize); this.pageSize = pageSize; return this; } /** *

The region ID of the disk. You can call the DescribeRegions operation to query the most recent region list.

*

This parameter is required.

* * example: *

cn-hangzhou

*/ public Builder regionId(String regionId) { this.putQueryParameter("RegionId", regionId); this.regionId = regionId; return this; } /** *

The resource group ID. If you configure this parameter to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.

*
*

Resources in the default resource group are displayed in the response regardless of whether you configure this parameter.

*
* * example: *

rg-bp67acfmxazb4p****

*/ 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 IDs of snapshots. You can specify a JSON array that consists of up to 100 snapshot IDs. Separate the snapshot IDs with commas (,).

* * example: *

["s-bp67acfmxazb4p****", "s-bp67acfmxazb5p****", … "s-bp67acfmxazb6p****"]

*/ public Builder snapshotIds(String snapshotIds) { this.putQueryParameter("SnapshotIds", snapshotIds); this.snapshotIds = snapshotIds; return this; } /** *

The snapshot chain ID. You can specify a JSON array that contains up to 100 snapshot chain IDs. Separate the snapshot chain IDs with commas (,).

* * example: *

["sl-bp1grgphbcc9brb5****", "sl-bp1c4izumvq0i5bs****", … "sl-bp1akk7isz866dds****"]

*/ public Builder snapshotLinkId(String snapshotLinkId) { this.putQueryParameter("SnapshotLinkId", snapshotLinkId); this.snapshotLinkId = snapshotLinkId; return this; } /** *

The name of the snapshot.

* * example: *

testSnapshotName

*/ public Builder snapshotName(String snapshotName) { this.putQueryParameter("SnapshotName", snapshotName); this.snapshotName = snapshotName; return this; } /** *

The type of the snapshot. Valid values:

*
    *
  • auto: automatic snapshot
  • *
  • user: manual snapshot
  • *
  • all (default): all snapshot types
  • *
* * example: *

all

*/ public Builder snapshotType(String snapshotType) { this.putQueryParameter("SnapshotType", snapshotType); this.snapshotType = snapshotType; return this; } /** *

The source disk type of the snapshot. Valid values:

*
    *
  • system: system disk.
  • *
  • data: data disk.
  • *
*
*

The value of this parameter is case-insensitive.

*
* * example: *

Data

*/ public Builder sourceDiskType(String sourceDiskType) { this.putQueryParameter("SourceDiskType", sourceDiskType); this.sourceDiskType = sourceDiskType; return this; } /** *

The status of the snapshot. Valid values:

*
    *
  • progressing: The snapshot is being created.
  • *
  • accomplished: The snapshot is created.
  • *
  • failed: The snapshot fails to be created.
  • *
  • all (default): This value indicates all snapshot states.
  • *
* * example: *

all

*/ public Builder status(String status) { this.putQueryParameter("Status", status); this.status = status; return this; } /** *

The tags of the snapshot.

*/ public Builder tag(java.util.List < Tag> tag) { this.putQueryParameter("Tag", tag); this.tag = tag; return this; } /** *

Specifies whether the snapshot has been used to create custom images or disks. Valid values:

*
    *
  • image: The snapshot has been used to create custom images.
  • *
  • disk: The snapshot has been used to create disks.
  • *
  • image_disk: The snapshot has been used to create both custom images and data disks.
  • *
  • none: The snapshot has not been used to create custom images or disks.
  • *
* * example: *

none

*/ public Builder usage(String usage) { this.putQueryParameter("Usage", usage); this.usage = usage; return this; } @Override public DescribeSnapshotsRequest build() { return new DescribeSnapshotsRequest(this); } } /** * * {@link DescribeSnapshotsRequest} extends {@link TeaModel} * *

DescribeSnapshotsRequest

*/ public static class Filter extends TeaModel { @com.aliyun.core.annotation.NameInMap("Key") private String key; @com.aliyun.core.annotation.NameInMap("Value") private String value; private Filter(Builder builder) { this.key = builder.key; this.value = builder.value; } public static Builder builder() { return new Builder(); } public static Filter 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 filter 1 that is used to query resources. Set the value to CreationStartTime. You can specify a time by configuring both Filter.1.Key and Filter.1.Value to query resources that were created after the time.

* * example: *

CreationStartTime

*/ public Builder key(String key) { this.key = key; return this; } /** *

The value of filter 1 that is used to query resources. Set the value to a time. If you configure this parameter, you must also configure Filter.1.Key. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

* * example: *

2019-12-13T17:00Z

*/ public Builder value(String value) { this.value = value; return this; } public Filter build() { return new Filter(this); } } } /** * * {@link DescribeSnapshotsRequest} extends {@link TeaModel} * *

DescribeSnapshotsRequest

*/ 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 of the snapshot. Valid values of N: 1 to 20

*

If a single tag is specified to query resources, up to 1,000 resources that have this tag added are returned. If multiple tags are specified to query resources, up to 1,000 resources that have all these tags added are returned. To query more than 1,000 resources with the specified tags, call the ListTagResources operation.

* * example: *

TestKey

*/ public Builder key(String key) { this.key = key; return this; } /** *

The value of tag N of the snapshot. Valid values of N: 1 to 20.

* * example: *

TestValue

*/ public Builder value(String value) { this.value = value; return this; } public Tag build() { return new Tag(this); } } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy