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

Updating the Configuration of an Analyzer

Function

This API is used to update the configuration of an analyzer.

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:analyzer:update

Write

analyzer *

g:ResourceTag/<tag-key>

-

-

URI

PUT /v5/analyzers/{analyzer_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.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

configuration

No

AnalyzerConfiguration object

Definition:

Configuration items of the analyzer.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Table 3 AnalyzerConfiguration

Parameter

Mandatory

Type

Description

unused_access

No

unused_access object

Definition:

Configuration items of unused access analyzers.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Table 4 unused_access

Parameter

Mandatory

Type

Description

unused_access_age

Yes

Integer

Definition:

Preset number of days for generating findings.

Constraints:

N/A

Range:

The value ranges from 1 to 180.

Default Value:

90.

unused_analysis_rule

No

UnusedAnalysisRule object

Definition:

Unused analysis rule.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Table 5 UnusedAnalysisRule

Parameter

Mandatory

Type

Description

exclusions

No

Array of UnusedAnalysisRuleCriteria objects

Definition:

Exclusion rule.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Table 6 UnusedAnalysisRuleCriteria

Parameter

Mandatory

Type

Description

account_ids

No

Array of strings

Definition:

List of organization account IDs. This parameter is optional when you create an unused access analyzer at the organization level. The specified accounts will not generate analysis findings.

To view the list of your organization account IDs on the Huawei Cloud console, perform the following steps:

  1. Log in to the Huawei Cloud console.

  2. Open the service list in the upper left corner of the page and choose Organizations.

  3. Click account management on the left to view the account ID list of the organization.

Constraints:

N/A

Range:

The array length ranges from 1 to 2,000. The array elements contain 1 to 36 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

Default Value:

N/A

resource_tags

No

Array of Tag objects

Definition:

List of resource tags.

Constraints:

N/A

Range:

Array length: 1 to 20.

Default Value:

N/A

Table 7 Tag

Parameter

Mandatory

Type

Description

key

Yes

String

Definition:

Tag key.

Constraints:

Cannot start with sys and cannot start or end with a space.

Range:

1 to 128 characters. The value can contain Unicode letters, digits, spaces, and the following special characters: _.:=+-@.

Default Value:

N/A

value

Yes

String

Definition:

String value associated with the tag key.

Constraints:

N/A

Range:

0 to 255 characters. The value can contain Unicode letters, digits, spaces, and the following special characters: _.:/=+-@.

Default Value:

N/A

Response Parameters

Status code: 200

OK

None

Example Requests

Updating the configuration of a specified analyzer

PUT https://{hostname}/v5/analyzers/{analyzer_id}

{
  "configuration" : {
    "unused_access" : {
      "unused_access_age" : 30,
      "unused_analysis_rule" : {
        "exclusions" : [ {
          "account_ids" : [ "123", "456" ]
        }, {
          "resource_tags" : [ {
            "key" : "key-1",
            "value" : "value-1"
          }, {
            "key" : "key-2",
            "value" : "value-2"
          } ]
        } ]
      }
    }
  }
}

Example Responses

None

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.