All Products
Search
Document Center

Cloud Storage Gateway:DescribeGatewayBlockVolumes

Last Updated:Aug 04, 2025

Queries details about iSCSI gateway volumes, such as operation status, data transfer, address, capacity, port, CHAP, OSS Bucket SSL, LUN ID, and volume status.

Operation description


Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

hcs-sgw:DescribeGatewayBlockVolumes

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

GatewayId

string

Yes

The ID of the gateway.

gw-000dt67z4ijngqvh***

IndexId

string

No

The index ID. If this parameter is left empty, the configurations of all iSCSI gateway volumes on the gateway are enumerated.

alex-or2020010816***

Refresh

boolean

No

Specifies whether to forcibly refresh the cache. Valid values:

  • true (default): yes.

  • false: no.

true

Response parameters

Parameter

Type

Description

Example

object

BlockVolumes

object

BlockVolume

array<object>

The information about the iSCSI gateway volume.

object

Status

integer

The operation status. Valid values:

  • 0: The operation is successful.

  • 1: The volume failed to be created.

  • 2: The volume failed to be deleted.

  • 3: The target failed to be enabled.

  • 4: The target failed to be disabled.

  • 5: A database error occurred.

  • 6: The cache failed to be enabled.

  • 7: The cache failed to be disabled.

  • 8: A system error occurred.

0

ChunkSize

integer

The storage allocation unit. Unit: bytes. The storage allocation unit can be 8 KB, 16 KB, 32 KB, 64 KB, or 128 KB. The default value is 32 KB.

32768

TotalUpload

integer

The total amount of data that is uploaded. Unit: bytes.

123214564

DiskType

string

The type of the cache disk.

cloud_efficiency

DiskId

string

The ID of the cache disk.

d-bp1a8athxvwbja18***

Port

integer

The port.

0

IndexId

string

The index ID.

alex-or2020010816***

TotalDownload

integer

The total amount of data that is downloaded. Unit: bytes.

56342324

ChapEnabled

boolean

Indicates whether CHAP is enabled.

true

Enabled

boolean

Indicates whether the block volume is enabled.

true

Address

string

The service IP address.

172.16.0.22

Name

string

The name of the block volume.

alex

Target

string

The volume target.

iqn**************

OssEndpoint

string

The region of the Object Storage Service (OSS) bucket that corresponds to the block volume.

Note You must distinguish between internal and public endpoints. If the OSS bucket and the gateway are in the same region, we recommend that you use an internal endpoint, such as oss-cn-hangzhou-internal.aliyuncs.com.

oss-cn-hangzhou-internal.aliyuncs.com

OssBucketName

string

The name of the OSS bucket.

random***

CacheMode

string

The cache mode. Valid values:

  • Cache: cache mode.

  • WriteThrough: write-through mode.

Cache

State

string

The cache status. Valid values:

  • clean: The synchronization is complete.

  • dirty: The synchronization is incomplete.

clean

Protocol

string

The protocol.

iSCSI

LunId

integer

The LUN ID.

0

OssBucketSsl

boolean

Indicates whether SSL is used for the OSS bucket.

true

VolumeState

integer

The volume status. Valid values:

  • 0: Failed

  • 1: Complete

  • 2: Creating

  • 3: Deleting

  • 4: Enabling

  • 5: Disabling

  • 6: Running

1

LocalPath

string

The local path of the cache disk.

/dev/vdb

ChapInUser

string

The inbound CHAP user.

alex***

Size

integer

The capacity. Unit: bytes.

107374182400

OssBucketRegionId

string

The region where the Object Storage Service (OSS) bucket corresponding to the block volume is located.

Message

string

The description of the request result.

successful

RequestId

string

The request ID.

787D4AD4-5536-4C36-9FB0-D74C0554D344

Code

string

The status code. A status code of 200 indicates that the request is successful.

200

Success

boolean

Indicates whether the request is successful.

true

Examples

Success response

JSON format

{
  "BlockVolumes": {
    "BlockVolume": [
      {
        "Status": 0,
        "ChunkSize": 32768,
        "TotalUpload": 123214564,
        "DiskType": "cloud_efficiency",
        "DiskId": "d-bp1a8athxvwbja18***",
        "Port": 0,
        "IndexId": "alex-or2020010816***",
        "TotalDownload": 56342324,
        "ChapEnabled": true,
        "Enabled": true,
        "Address": "172.16.0.22",
        "Name": "alex",
        "Target": "iqn**************",
        "OssEndpoint": "oss-cn-hangzhou-internal.aliyuncs.com",
        "OssBucketName": "random***",
        "CacheMode": "Cache",
        "State": "clean",
        "Protocol": "iSCSI",
        "LunId": 0,
        "OssBucketSsl": true,
        "VolumeState": 1,
        "LocalPath": "/dev/vdb",
        "ChapInUser": "alex***",
        "Size": 107374182400,
        "OssBucketRegionId": ""
      }
    ]
  },
  "Message": "successful",
  "RequestId": "787D4AD4-5536-4C36-9FB0-D74C0554D344",
  "Code": "200",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 EmptyGatewayId You must enter a valid ID for the gateway. You must enter a valid ID for the gateway.
400 GatewayNotExist The specified gateway does not exist. You must specify a valid parameter. The specified gateway does not exist. You must specify a valid parameter.
400 GatewayInUpgrading The gateway is upgrading. Try again later. The gateway is upgrading. Try again later.
400 GatewayInOperation The gateway is processing requests . Try again later. The gateway is busy. Try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.