DescribeStorageCapacityUnits

更新时间:
复制 MD 格式

Queries the details of storage capacity units (SCUs). In the request, you can specify the name, status, or capacity of each SCU.

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 supports 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

ecs:DescribeStorageCapacityUnits

get

StorageCapacityUnit

acs:ecs:{#regionId}:{#accountId}:scu/*

StorageCapacityUnit

acs:ecs:{#regionId}:{#accountId}:scu/{#scuId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

cn-hangzhou

PageNumber

integer

No

The number of the page to return.

Pages start from page 1.

Default value: 1.

1

PageSize

integer

No

The number of entries per page.

Valid values: 1 to 100.

Default value: 10.

1

Name

string

No

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

Capacity

integer

No

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

20

AllocationType

string

No

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

StorageCapacityUnitId

array

No

The IDs of the SCUs. You can specify 1 to 100 SCU IDs.

scu-bp67acfmxazb4p****

string

No

The ID of SCU N.

scu-bp67acfmxazb4p****

Status

array

No

The states of SCUs. The array is 1 to 4 in length.

Active

string

No

The status of the SCU. Valid values:

  • Creating: The SCUs are being created.

  • Active: The SCUs are enabled.

  • Expired: The SCUs expired.

  • Pending: The SCUs have not taken effect.

Active

Tag

array<object>

No

The tags to add to the SCU. You can add up to 20 tags.

object

No

Key

string

No

The key of tag N to be added to the SCU.

TestKey

Value

string

No

The value of tag N to be added to the SCU.

TestValue

Response elements

Element

Type

Description

Example

object

PageSize

integer

The number of entries returned per page.

10

RequestId

string

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

PageNumber

integer

The page number of the returned page.

1

TotalCount

integer

The total number of SCUs.

1

StorageCapacityUnits

object

StorageCapacityUnit

array<object>

Details about the SCUs.

array<object>

CreationTime

string

The time when the SCU was created.

2021-08-17T02:55Z

Status

string

The status of the SCU. 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.

Active

StartTime

string

The time when the SCU took effect.

2021-08-17T02:55Z

Capacity

integer

The capacity of the SCU.

20

Description

string

The description of the SCU.

testScuDescription

AllocationStatus

string

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

ExpiredTime

string

The time when the SCU expires.

2021-09-17T16:00Z

StorageCapacityUnitId

string

The ID of the SCU.

scu-bp67acfmxazb4p****

Name

string

The name of the SCU.

testScuName

RegionId

string

The region ID of the SCU.

cn-hangzhou

Tags

object

Tag

array<object>

The tag key-value pairs of the SCU.

object

TagValue

string

The value of tag N.

TestKey

TagKey

string

The key of tag N.

TestValue

Examples

Success response

JSON format

{
  "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 code

Error code

Error message

Description

400 MissingParameter.RegionId The specified RegionId should not be null. The RegionId parameter is required.
400 InvalidParameter.Name The specified Name is invalid. The specified Name parameter is invalid.
400 InvalidParameter.CapacityExceed The specified Capacity exceeds the limitation of quota. The specified Capacity value exceeds the maximum allowed value.
400 InvalidAllocationType.ValueNotSupported The specified AllocationType is not supported. The specified AllocationType parameter is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.