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 |
instanceId(String instanceId)
The ID of the instance to which 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 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. > If the `Bootable` parameter is set to true, the instance must be in the No System Disk state.
public AttachDiskRequest.Builder deleteWithInstance(Boolean deleteWithInstance)
* true: releases the disk when the instance is released. * false: does not release the data 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. Even if `DeleteWithInstance` is set to `false`, the DeleteWithInstance parameter is ignored, and the disk is released when the instance is released. * This parameter cannot be specified 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 system disk, see the "Description" section of this topic.
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)
( ) ` ~ ! @ # $ % ^ & * - _ + = | { } [ ] : ; \" < > , . ? / The password of a Windows instance cannot start with a forward slash (/). > If the `Password` parameter is specified, 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 © 2023. All rights reserved.