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

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

CreateAutoSnapshotPolicyRequest

*/ public class CreateAutoSnapshotPolicyRequest 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("CopiedSnapshotsRetentionDays") private Integer copiedSnapshotsRetentionDays; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("CopyEncryptionConfiguration") private CopyEncryptionConfiguration copyEncryptionConfiguration; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("EnableCrossRegionCopy") private Boolean enableCrossRegionCopy; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerId") private Long ownerId; @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("StorageLocationArn") private String storageLocationArn; @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("TargetCopyRegions") private String targetCopyRegions; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("autoSnapshotPolicyName") private String autoSnapshotPolicyName; @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("repeatWeekdays") @com.aliyun.core.annotation.Validation(required = true) private String repeatWeekdays; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("retentionDays") @com.aliyun.core.annotation.Validation(required = true) private Integer retentionDays; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("timePoints") @com.aliyun.core.annotation.Validation(required = true) private String timePoints; private CreateAutoSnapshotPolicyRequest(Builder builder) { super(builder); this.sourceRegionId = builder.sourceRegionId; this.copiedSnapshotsRetentionDays = builder.copiedSnapshotsRetentionDays; this.copyEncryptionConfiguration = builder.copyEncryptionConfiguration; this.enableCrossRegionCopy = builder.enableCrossRegionCopy; this.ownerId = builder.ownerId; this.resourceGroupId = builder.resourceGroupId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; this.storageLocationArn = builder.storageLocationArn; this.tag = builder.tag; this.targetCopyRegions = builder.targetCopyRegions; this.autoSnapshotPolicyName = builder.autoSnapshotPolicyName; this.regionId = builder.regionId; this.repeatWeekdays = builder.repeatWeekdays; this.retentionDays = builder.retentionDays; this.timePoints = builder.timePoints; } public static Builder builder() { return new Builder(); } public static CreateAutoSnapshotPolicyRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return sourceRegionId */ public String getSourceRegionId() { return this.sourceRegionId; } /** * @return copiedSnapshotsRetentionDays */ public Integer getCopiedSnapshotsRetentionDays() { return this.copiedSnapshotsRetentionDays; } /** * @return copyEncryptionConfiguration */ public CopyEncryptionConfiguration getCopyEncryptionConfiguration() { return this.copyEncryptionConfiguration; } /** * @return enableCrossRegionCopy */ public Boolean getEnableCrossRegionCopy() { return this.enableCrossRegionCopy; } /** * @return ownerId */ public Long getOwnerId() { return this.ownerId; } /** * @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; } /** * @return targetCopyRegions */ public String getTargetCopyRegions() { return this.targetCopyRegions; } /** * @return autoSnapshotPolicyName */ public String getAutoSnapshotPolicyName() { return this.autoSnapshotPolicyName; } /** * @return regionId */ public String getRegionId() { return this.regionId; } /** * @return repeatWeekdays */ public String getRepeatWeekdays() { return this.repeatWeekdays; } /** * @return retentionDays */ public Integer getRetentionDays() { return this.retentionDays; } /** * @return timePoints */ public String getTimePoints() { return this.timePoints; } public static final class Builder extends Request.Builder { private String sourceRegionId; private Integer copiedSnapshotsRetentionDays; private CopyEncryptionConfiguration copyEncryptionConfiguration; private Boolean enableCrossRegionCopy; private Long ownerId; private String resourceGroupId; private String resourceOwnerAccount; private Long resourceOwnerId; private String storageLocationArn; private java.util.List < Tag> tag; private String targetCopyRegions; private String autoSnapshotPolicyName; private String regionId; private String repeatWeekdays; private Integer retentionDays; private String timePoints; private Builder() { super(); } private Builder(CreateAutoSnapshotPolicyRequest request) { super(request); this.sourceRegionId = request.sourceRegionId; this.copiedSnapshotsRetentionDays = request.copiedSnapshotsRetentionDays; this.copyEncryptionConfiguration = request.copyEncryptionConfiguration; this.enableCrossRegionCopy = request.enableCrossRegionCopy; this.ownerId = request.ownerId; this.resourceGroupId = request.resourceGroupId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; this.storageLocationArn = request.storageLocationArn; this.tag = request.tag; this.targetCopyRegions = request.targetCopyRegions; this.autoSnapshotPolicyName = request.autoSnapshotPolicyName; this.regionId = request.regionId; this.repeatWeekdays = request.repeatWeekdays; this.retentionDays = request.retentionDays; this.timePoints = request.timePoints; } /** * SourceRegionId. */ public Builder sourceRegionId(String sourceRegionId) { this.putHostParameter("SourceRegionId", sourceRegionId); this.sourceRegionId = sourceRegionId; return this; } /** *

The retention period of the snapshot copy in the destination region. Unit: days. Valid values:

*
    *
  • -1: The snapshot copy is retained until it is deleted.
  • *
  • 1 to 65535: The snapshot copy is retained for the specified number of days. After the retention period of the snapshot copy expires, the snapshot copy is automatically deleted.
  • *
*

Default value: -1.

* * example: *

30

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

The encryption parameters for cross-region snapshot replication.

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

Specifies whether to enable cross-region replication for snapshots.

*
    *
  • true
  • *
  • false
  • *
* * example: *

false

*/ public Builder enableCrossRegionCopy(Boolean enableCrossRegionCopy) { this.putQueryParameter("EnableCrossRegionCopy", enableCrossRegionCopy); this.enableCrossRegionCopy = enableCrossRegionCopy; return this; } /** * OwnerId. */ public Builder ownerId(Long ownerId) { this.putQueryParameter("OwnerId", ownerId); this.ownerId = ownerId; return this; } /** *

The resource group ID.

* * example: *

rg-aek2kkmhmhs****

*/ 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 not publicly available.

*
* * example: *

null

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

The tags to add to the automatic snapshot policy.

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

The destination region to which to copy the snapshot. You can specify only a single destination region.

* * example: *

["cn-hangzhou"]

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

The name of the automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).

*

By default, this parameter is left empty.

* * example: *

TestName

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

The ID of the region in which to create the automatic snapshot policy. 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 days of the week on which to create automatic snapshots. Valid values: 1 to 7, which correspond to Monday to Sunday. 1 indicates Monday. Format description:

*
    *
  • Set this parameter to a JSON-formatted array. For example, a value of ["1"] specifies automatic snapshots to be created every Monday.
  • *
  • To schedule multiple automatic snapshots to be created in a week, you can specify multiple values. Separate the values with commas (,). You can specify a maximum of seven days. For example, a value of ["1","3","5"] specifies automatic snapshots to be created every Monday, Wednesday, and Friday.
  • *
*

This parameter is required.

* * example: *

["1","2"]

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

The retention period of the automatic snapshot. Unit: days. Valid values:

*
    *
  • -1: The automatic snapshot is retained until it is deleted.
  • *
  • 1 to 65535: The automatic snapshot is retained for the specified number of days. After the retention period of the automatic snapshot expires, the automatic snapshot is automatically deleted.
  • *
*

Default value: -1.

*

This parameter is required.

* * example: *

30

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

The points in time of the day at which to create automatic snapshots. The time must be in UTC+8. Unit: hours. Valid values: 0 to 23, which correspond to the 24 on-the-hour points in time from 00:00:00 to 23:00:00. 1 indicates 01:00:00. Format description:

*
    *
  • Set this parameter to a JSON-formatted array. For example, a value of ["1"] specifies automatic snapshots to be created at 01:00:00.
  • *
  • To schedule multiple automatic snapshots to be created in a day, you can specify multiple values. Separate the values with commas (,). You can specify a maximum of 24 points in time. For example, a value of ["1","3","5"] specifies automatic snapshots to be created at 01:00:00, 03:00:00, and 05:00:00.
  • *
*

This parameter is required.

* * example: *

["0", "1", … "23"]

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

CreateAutoSnapshotPolicyRequest

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

* * example: *

1000000000

*/ public Builder assumeRoleFor(Long assumeRoleFor) { this.assumeRoleFor = assumeRoleFor; return this; } /** *

This parameter is not publicly available.

* * example: *

hide

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

This parameter is not publicly available.

* * example: *

hide

*/ public Builder rolearn(String rolearn) { this.rolearn = rolearn; return this; } public Arn build() { return new Arn(this); } } } /** * * {@link CreateAutoSnapshotPolicyRequest} extends {@link TeaModel} * *

CreateAutoSnapshotPolicyRequest

*/ public static class CopyEncryptionConfiguration extends TeaModel { @com.aliyun.core.annotation.NameInMap("Arn") private java.util.List < Arn> arn; @com.aliyun.core.annotation.NameInMap("Encrypted") private Boolean encrypted; @com.aliyun.core.annotation.NameInMap("KMSKeyId") private String KMSKeyId; private CopyEncryptionConfiguration(Builder builder) { this.arn = builder.arn; this.encrypted = builder.encrypted; this.KMSKeyId = builder.KMSKeyId; } public static Builder builder() { return new Builder(); } public static CopyEncryptionConfiguration create() { return builder().build(); } /** * @return arn */ public java.util.List < Arn> getArn() { return this.arn; } /** * @return encrypted */ public Boolean getEncrypted() { return this.encrypted; } /** * @return KMSKeyId */ public String getKMSKeyId() { return this.KMSKeyId; } public static final class Builder { private java.util.List < Arn> arn; private Boolean encrypted; private String KMSKeyId; /** *

This parameter is not publicly available.

*/ public Builder arn(java.util.List < Arn> arn) { this.arn = arn; return this; } /** *

Specifies whether to enable cross-region snapshot replication and encryption. Valid values:

*
    *
  • true
  • *
  • false
  • *
*

Default value: false.

* * example: *

false

*/ public Builder encrypted(Boolean encrypted) { this.encrypted = encrypted; return this; } /** *

The ID of the KMS key used in cross-region snapshot replication and encryption.

* * example: *

0e478b7a-4262-4802-b8cb-00d3fb40826X

*/ public Builder KMSKeyId(String KMSKeyId) { this.KMSKeyId = KMSKeyId; return this; } public CopyEncryptionConfiguration build() { return new CopyEncryptionConfiguration(this); } } } /** * * {@link CreateAutoSnapshotPolicyRequest} extends {@link TeaModel} * *

CreateAutoSnapshotPolicyRequest

*/ 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 automatic snapshot policy. 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.

* * example: *

TestKey

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

The value of tag N to add to the automatic snapshot policy. 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://. The tag value cannot start with acs:.

* * 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