All Products
Search
Document Center

Elastic Compute Service:DescribeStorageCapacityUnits

Last Updated:Nov 14, 2024

Queries the details of one or more SCUs.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:DescribeStorageCapacityUnitsget
*StorageCapacityUnit
acs:ecs:{#regionId}:{#accountId}:scu/*
*StorageCapacityUnit
acs:ecs:{#regionId}:{#accountId}:scu/{#scuId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the SCU. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
PageNumberintegerNo

The number of the page to return.

Pages start from page 1.

Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page.

Maximum value: 100.

Default value: 10.

1
NamestringNo

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

testScuName
CapacityintegerNo

The capacity of the SCU. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, and 51200.

20
AllocationTypestringNo

The allocation type. Valid values:

  • Normal: queries SCUs that belong to the current Alibaba Cloud account.
  • Shared: queries SCUs shared between the Alibaba Cloud account and RAM users.

Default value: Normal.

Normal
StorageCapacityUnitIdarrayNo

One or multiple SCU IDs. You can specify 1 to 100 SCU IDs.

stringNo

One or multiple SCU IDs. You can specify 1 to 100 SCU IDs.

scu-bp67acfmxazb4p****
StatusarrayNo

The state of SCUs. You can specify 1 to 4 types of state. Valid values:

  • Creating: The SCUs are being created.
  • Active: The SCUs are in effect.
  • Expired: The SCUs have expired.
  • Pending: The SCUs have not taken effect.
stringNo

The state of SCUs. You can specify 1 to 4 types of state. Valid values:

  • Creating: The SCUs are being created.
  • Active: The SCUs are in effect.
  • Expired: The SCUs expired.
  • Pending: The SCUs have not taken effect.
Active
Tagarray<object>No

The tags of the SCUs.

objectNo
KeystringNo

The key of tag N of the SCU. N is the identifier for the tag, which you can use to set and query the tag. Valid values of N: 1 to 20.

TestKey
ValuestringNo

The value of tag N of the SCU. N is the identifier for the tag, which you can use to set and query the tag. The value of N must coincide with Tag.N.Key. Valid values of N: 1 to 20.

TestValue

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries returned per page.

10
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
PageNumberinteger

The page number of the returned page.

1
TotalCountinteger

The total number of SCUs.

1
StorageCapacityUnitsarray<object>

Details about the SCUs.

StorageCapacityUnitobject
CreationTimestring

The time when the SCU was created.

2021-08-17T02:55Z
Statusstring

The state of the SCU.

Active
StartTimestring

The time when the SCU took effect.

2021-08-17T02:55Z
Capacityinteger

The capacity of the SCU.

20
Descriptionstring

The description of the SCU.

testScuDescription
AllocationStatusstring

Indicates the allocation state of the SCU when the AllocationType parameter is set to Shared. Valid values:

  • allocated: The SCU is allocated to other accounts.
  • BeAllocated: The SCU is allocated from another account.
allocated
ExpiredTimestring

The time when the SCU expires.

2021-09-17T16:00Z
StorageCapacityUnitIdstring

The ID of the SCU.

scu-bp67acfmxazb4p****
Namestring

The name of the SCU.

testScuName
RegionIdstring

The region ID of the SCU.

cn-hangzhou
Tagsarray<object>

The tag key-value pairs of the SCU.

Tagobject
TagValuestring

The value of tag N.

TestKey
TagKeystring

The key of tag N.

TestValue

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "PageNumber": 1,
  "TotalCount": 1,
  "StorageCapacityUnits": {
    "StorageCapacityUnit": [
      {
        "CreationTime": "2021-08-17T02:55Z",
        "Status": "Active",
        "StartTime": "2021-08-17T02:55Z",
        "Capacity": 20,
        "Description": "testScuDescription",
        "AllocationStatus": "allocated",
        "ExpiredTime": "2021-09-17T16:00Z",
        "StorageCapacityUnitId": "scu-bp67acfmxazb4p****",
        "Name": "testScuName",
        "RegionId": "cn-hangzhou",
        "Tags": {
          "Tag": [
            {
              "TagValue": "TestKey",
              "TagKey": "TestValue"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameter.RegionIdThe specified RegionId should not be null.The RegionId parameter is required.
400InvalidParameter.NameThe specified Name is invalid.The specified Name parameter is invalid.
400InvalidParameter.CapacityExceedThe specified Capacity exceeds the limitation of quota.The specified Capacity value exceeds the maximum allowed value.
400InvalidAllocationType.ValueNotSupportedThe specified AllocationType is not supported.The specified AllocationType parameter is invalid.

For a list of error codes, visit the Service error codes.