All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

AttachVolume

Last updated:2022-09-05 10:13:13

1. Description

You can call this operation to attach the specified EBS volume to the specified KEC instance. You can attach an EBS volume to a KEC instance only when the EBS volume is in the available state and the KEC instance is in the active or stopped state.

2. Request parameters

Parameter Type Required Description
VolumeId String Yes The ID of the EBS volume to be attached to a KEC instance. The EBS volume and the KEC instance must reside in the same availability zone. The ID must be 36 characters in length and can contain letters, digits, hyphens (-), and underscores (_).
InstanceId String Yes The ID of the KEC instance to which the EBS volume is to be attached.
DeleteWithInstance Boolean No Specifies whether to delete the EBS volume when the KEC instance to which it is attached is deleted. Default value: false. Valid values:
true: Delete the EBS volume when the KEC instance is deleted.
false: Detach the EBS volume from the KEC instance but do not delete the EBS volume when the KEC instance is deleted.
Version String Yes The API version. Valid value: 2016-03-04.

3. Response parameters

Parameter Type Required Description
RequestId String Yes The request ID, which is unique. A request ID is returned for each request.
Return Boolean No Indicates whether the EBS volume is attached. True indicates yes.

4. Examples

Request parameters

http://ebs.api.ksyun.com/
?Action=AttachVolume
&Version=2016-03-04
&VolumeId=b01cbcb3-04dd-40c8-bfbb-dc990d54ee68
&InstanceId=af4868ec-8d5e-46a4-83fb-4a33af05da74

Response parameters

{
  "RequestId": "6e2682a1-5968-42f5-80e5-284aae218df0",
  "Return": true
}
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback