Updated on 2026-07-22 GMT+08:00

Updating the Criteria and Values of the Specified Archive Rule

Function

This API is used to update the criteria and values of the specified archive rule.

Authorization Information

Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

AccessAnalyzer:archiveRule:update

Write

archiveRule *

-

-

-

URI

PUT /v5/analyzers/{analyzer_id}/archive-rules/{archive_rule_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

analyzer_id

Yes

String

Definition:

Unique identifier of an analyzer.

You can call the ListAnalyzers API to obtain the analyzer ID. The response parameters of this API return an analyzer list. The id field of each analyzer object is the analyzer ID.

Range:

1 to 36 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

archive_rule_id

Yes

String

Definition:

Unique identifier of an archive rule.

You can call the ListArchiveRules API to retrieve the list of archive rules created for a specified analyzer. The response of this API contains an archive rule list. Each archive rule object in the list contains a unique id field, which is the archive rule ID.

Range:

1 to 36 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

filters

Yes

Array of FindingFilter objects

Definition:

A filter to match the returned findings.

Constraints:

N/A

Range:

The array length ranges from 1 to 10.

Default Value:

N/A

Table 3 FindingFilter

Parameter

Mandatory

Type

Description

criterion

Yes

Criterion object

Definition:

Criteria in the filter.

Constraints:

Only one operator is allowed.

Range:

N/A

Default Value:

N/A

key

Yes

String

Definition:

Filter key.

Constraints:

N/A

Range:

  • resource: resource URN.

  • resource_type: resource type.

  • resource_owner_account: resource owner account.

  • is_public: public access permission.

  • id: finding ID

  • status: finding type

  • principal_type: principal type.

  • principal_identifier: principal identifier

  • change_type: finding status change

  • existing_finding_id: ID of an existing finding

  • existing_finding_status: status of an existing finding

  • condition.g:PrincipalUrn: principal URN

  • condition.g:PrincipalId: principal ID

  • condition.g:PrincipalAccount: principal account

  • condition.g:PrincipalOrgId: principal organization ID

  • condition.g:PrincipalOrgPath: principal organization path

  • condition.g:PrincipalOrgManagementAccountId: principal organization management account ID

  • condition.g:SourceIp: source IP address

  • condition.g:SourceVpc: source VPC

  • condition.g: SourceVpce: source VPC endpoint

  • finding_type: finding type

Default Value:

N/A

Table 4 Criterion

Parameter

Mandatory

Type

Description

contains

No

Array of strings

Definition:

Matching the "contains" operator in the filter.

Constraints:

N/A

Range:

Array length: 1 to 20.

Default Value:

N/A

eq

No

Array of strings

Definition:

Matching the "eq" operator in the filter.

Constraints:

N/A

Range:

Array length: 1 to 20.

Default Value:

N/A

exists

No

Boolean

Definition:

Matching the "exists" operator in the filter

Constraints:

N/A

Range:

N/A

Default Value:

N/A

neq

No

Array of strings

Definition:

Matching the "neq" operator in the filter.

Constraints:

N/A

Range:

Array length: 1 to 20.

Default Value:

N/A

Response Parameters

Status code: 200

OK

None

Example Requests

Updating the criteria and values of the specified archive rule

PUT https://{hostname}/v5/analyzers/{analyzer_id}/archive-rules/{archive_rule_id}

{
  "filters" : [ {
    "criterion" : {
      "eq" : [ "iam:agency" ]
    },
    "key" : "resource_type"
  }, {
    "criterion" : {
      "eq" : [ "obs:bucket" ]
    },
    "key" : "resource_type"
  } ]
}

Example Responses

None

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.