Creating an Analyzer
Function
This API is used to create an analyzer for your account or organization.
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.
URI
POST /v5/analyzers
Request 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 |
| name | Yes | String | Definition: Analyzer name. Constraints: Must start with a letter. Range: 1 to 255 characters. Only letters, digits, underscores (_), hyphens (-), and periods (.) are allowed. Default Value: N/A |
| tags | No | Array of Tag objects | Definition: List of custom tags. Constraints: N/A Range: Array length: 1 to 20. Default Value: N/A |
| type | Yes | String | Definition: Analyzer type. Constraints: N/A Range:
Default Value: N/A |
| 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 |
| 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| exclusions | No | Array of UnusedAnalysisRuleCriteria objects | Definition: Exclusion rule. Constraints: N/A Range: N/A Default Value: N/A |
| 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:
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 |
| 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: 201
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition: Unique identifier of an analyzer. Range: 1 to 36 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
| urn | String | Definition: Unique resource identifier of an analyzer. Range: The value can contain up to 1,500 characters. |
Example Requests
Creating an analyzer for your account or organization
POST https://{hostname}/v5/analyzers
{
"name" : "my-analyzer",
"tags" : [ {
"key" : "key-1",
"value" : "value-1"
} ],
"type" : "account"
} Example Responses
Status code: 201
Created
{
"id" : "{analyzer_id}",
"urn" : "AccessAnalyzer:{region_id}:{domain_id}:analyzer:{analyzer_id}"
} Status Codes
| Status Code | Description |
|---|---|
| 201 | Created |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot