ListProtectedResources

Updated at:

Queries the list of protected resources.

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

hbr:ListProtectedResources

list

*All Resource

*

None None

Request syntax

GET  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

NextToken

string

No

The pagination token for the next page. If NextToken is empty, no next page exists.

aWQj********MCMy

MaxResults

integer

No

The maximum number of results to return per query.

Valid values: 10 to 100. Default value: 10.

10

CreatedByProduct

string

No

The product capability to which the resource belongs. Valid values:

  • HBR: Cloud Backup standard capabilities.

  • BASIC: ECS File Backup Essential Edition.

BASIC

SourceType

string

No

The type of backup feature. Valid values:

  • ECS_FILE: ECS file backup.

  • COMMON_FILE_SYSTEM: CPFS backup.

  • COMMON_NAS: On-premises NAS backup.

  • File: On-premises file backup.

  • NAS: Alibaba Cloud NAS backup.

  • OSS: OSS backup.

Valid values:

  • NAS :

    NAS

  • COMMON_FILE_SYSTEM :

    COMMON_FILE_SYSTEM

  • ECS_FILE :

    ECS_FILE

  • COMMON_NAS :

    COMMON_NAS

  • File :

    File

  • OSS :

    OSS

ECS_FILE

ResourceId

string

No

The resource ID. The meaning of this parameter varies based on the value of SourceType:

  • SourceType=ECS_FILE: the ECS instance ID.

  • SourceType=COMMON_FILE_SYSTEM: the CPFS data source ID.

  • SourceType=COMMON_NAS: the on-premises NAS data source ID.

  • SourceType=File: the on-premises server client ID.

  • SourceType=NAS: the Alibaba Cloud NAS file system ID.

  • SourceType=OSS: the OSS bucket.

i-wz95************7zrd

Skip

integer

No

The number of entries to skip for a paged query. If the number of skipped entries exceeds the total number of matched entries, an empty list is returned. The number of skipped entries must be a multiple of MaxResults.

10

HasSnapshot

boolean

No

Specifies whether backup points exist.

true

Response elements

Element

Type

Description

Example

object

Schema of Response

Code

string

The return code. A value of 200 indicates success.

200

MaxResults

integer

The maximum number of results to return per query.

Valid values: 10 to 100. Default value: 10.

10

Message

string

The return message. A value of successful indicates success. If an error occurs, the corresponding error message is returned.

successful

NextToken

string

The pagination token for the next page. If NextToken is empty, no next page exists.

eyJJ************MX0=

ProtectedResources

array<object>

The list of protected resources.

object

The protected resource.

BackupPlanCount

integer

The number of backup plans.

1

CreatedByProduct

string

The product capability to which the resource belongs. Valid values:

  • HBR: Cloud Backup standard capabilities.

  • BASIC: ECS File Backup Essential Edition.

BASIC

ProtectedDataSize

integer

The protected data volume, in bytes. This parameter is supported only for ECS File Backup Essential Edition.

  • SourceType=ECS_FILE: the storage capacity of the backed-up block storage.

107374182400

ProtectedResourceId

string

The ID of the protected resource.

pr-0004************gs61

ResourceId

string

The resource ID. The meaning of this parameter varies based on the value of SourceType:

  • SourceType=ECS_FILE: the ECS instance ID.

  • SourceType=COMMON_FILE_SYSTEM: the CPFS data source ID.

  • SourceType=COMMON_NAS: the on-premises NAS data source ID.

  • SourceType=File: the on-premises server client ID.

  • SourceType=NAS: the Alibaba Cloud NAS file system ID.

  • SourceType=OSS: the OSS bucket.

i-wz95************7zrd

ResourceOwnerId

integer

The UID of the user to whom the resource belongs.

1024********0703

ResourceRegionId

string

The ID of the region to which the resource belongs.

cn-hangzhou

SnapshotCount

integer

The number of backup snapshots.

30

SourceType

string

The type of backup feature. Valid values:

  • ECS_FILE: ECS file backup.

  • COMMON_FILE_SYSTEM: CPFS backup.

  • COMMON_NAS: On-premises NAS backup.

  • File: On-premises file backup.

  • NAS: Alibaba Cloud NAS backup.

  • OSS: OSS backup.

ECS_FILE

RequestId

string

The request ID.

EB09****-****-****-****-********6C38

Success

boolean

Indicates whether the request is successful.

  • true: The request is successful.

  • false: The request failed.

true

TotalCount

integer

The total number of protected resources.

3

Examples

Success response

JSON format

{
  "Code": "200",
  "MaxResults": 10,
  "Message": "successful",
  "NextToken": "eyJJ************MX0=",
  "ProtectedResources": [
    {
      "BackupPlanCount": 1,
      "CreatedByProduct": "BASIC",
      "ProtectedDataSize": 107374182400,
      "ProtectedResourceId": "pr-0004************gs61",
      "ResourceId": "i-wz95************7zrd",
      "ResourceOwnerId": 0,
      "ResourceRegionId": "cn-hangzhou",
      "SnapshotCount": 30,
      "SourceType": "ECS_FILE"
    }
  ],
  "RequestId": "EB09****-****-****-****-********6C38",
  "Success": true,
  "TotalCount": 3
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.