public static final class AttachDiskRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
AttachDiskRequest.Builder |
bootable(Boolean bootable)
Specifies whether to attach the disk as a system disk.
|
AttachDiskRequest |
build() |
AttachDiskRequest.Builder |
deleteWithInstance(Boolean deleteWithInstance)
Specifies whether to release the disk when the instance is released.
|
AttachDiskRequest.Builder |
device(String device)
The device name of the disk.
|
AttachDiskRequest.Builder |
diskId(String diskId)
The ID of the disk.
|
AttachDiskRequest.Builder |
force(Boolean force)
Specifies whether to forcefully attach the disk to the instance.
|
AttachDiskRequest.Builder |
instanceId(String instanceId)
The ID of the instance to which you want to attach the disk.
|
AttachDiskRequest.Builder |
keyPairName(String keyPairName)
The name of the SSH key pair that you bind to the Linux instance when you attach the system disk.
|
AttachDiskRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
AttachDiskRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
AttachDiskRequest.Builder |
password(String password)
The password that is set when you attach the system disk.
|
AttachDiskRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
AttachDiskRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
AttachDiskRequest.Builder |
sourceRegionId(String sourceRegionId)
SourceRegionId.
|
public AttachDiskRequest.Builder sourceRegionId(String sourceRegionId)
public AttachDiskRequest.Builder bootable(Boolean bootable)
Default value: false. > You can set `Bootable` to true only if the instance does not have a system disk.
public AttachDiskRequest.Builder deleteWithInstance(Boolean deleteWithInstance)
* true: releases the disk when the instance is released. * false: does not release the disk when the instance is released. The disk is retained as a pay-as-you-go data disk. Default value: false. When you specify this parameter, take note of the following items: * If `OperationLocks` in the DescribeInstances response contains `"LockReason" : "security"` for the instance to which the disk is attached, the instance is locked for security reasons. Regardless of whether you set `DeleteWithInstance` to `false`, the DeleteWithInstance setting is ignored, and the disk is released when the instance is released. * If you want to attach an `elastic ephemeral disk`, you must set `DeleteWithInstance` to `true`. * This parameter is unavailable for disks for which the multi-attach feature is enabled.
public AttachDiskRequest.Builder device(String device)
> This parameter will be removed in the future. We recommend that you use other parameters to ensure future compatibility.
public AttachDiskRequest.Builder diskId(String diskId)
> For more information about the limits on attaching a data disk and a system disk, see the "Usage notes" section of this topic.
public AttachDiskRequest.Builder force(Boolean force)
* true * false Default value: false.
public AttachDiskRequest.Builder instanceId(String instanceId)
public AttachDiskRequest.Builder keyPairName(String keyPairName)
* Windows instances do not support logons based on SSH key pairs. The `Password` parameter takes effect even if the KeyPairName parameter is specified. * For Linux instances, the username and password-based logon method is disabled by default.
public AttachDiskRequest.Builder ownerAccount(String ownerAccount)
public AttachDiskRequest.Builder ownerId(Long ownerId)
public AttachDiskRequest.Builder password(String password)
()`~!@#$%^&*-_+=|{}[]:;\"<>,.?/ For Windows instances, passwords cannot start with a forward slash (/). > If `Password` is configured, we recommend that you send requests over HTTPS to prevent password leaks.
public AttachDiskRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public AttachDiskRequest.Builder resourceOwnerId(Long resourceOwnerId)
public AttachDiskRequest build()
Copyright © 2024. All rights reserved.