ListApplicationCustomRules

Updated at:

Performs a paged query to retrieve the list of custom rules under a specified application program template, sorted by priority in ascending order. Supports paging, fuzzy search by rule name, and filtering by rule ID, priority, action, and application ID.

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

yundun-cloudfirewall:ListApplicationCustomRules

list

*All Resource

*

None None

Request syntax

GET  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

ApplicationTemplateId

string

Yes

The ID of the application template to query. This parameter is required. The template must exist within the current Alibaba Cloud account.

ati-4f0691c56b8d4f06

ApplicationCustomRuleName

string

No

The name of the custom rule. Fuzzy match is supported.

Custom rule

Priority

integer

No

The priority of the rule. Exact match is supported. Valid values: integers from 1 to 200.

1

RuleAction

string

No

The action of the rule. Exact match is supported. Valid values:

  • Allow: allows the traffic.

  • Alert: monitors the traffic.

  • Deny: blocks the traffic.

Deny

ApplicationCustomRuleId

string

No

The ID of the application custom rule. Exact match is supported.

acr-7d2e4f6a8b0c1d3e

Lang

string

No

The language of the returned information. Valid values:

  • zh: Chinese. This is the default value.

  • en: English. This parameter determines whether the returned application names are in Chinese or English.

zh

ApplicationId

integer

No

The ID of the application. This parameter is used to filter custom rules associated with the application. The application must exist in the built-in application signature library.

10012150000

PageSize

integer

No

The number of entries per page. Valid values: integers greater than or equal to 1. Default value: 10.

10

PageNo

integer

No

The page number. Valid values: integers greater than or equal to 1. Default value: 1.

1

Response elements

Element

Type

Description

Example

object

The response data.

RequestId

string

The request ID.

CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2837D

TotalCount

integer

The total number of application custom rules that meet the filter conditions.

2

PageSize

integer

The number of entries per page.

10

PageNo

integer

The current page number.

1

ApplicationCustomRules

array<object>

The list of application custom rules, sorted by priority in ascending order.

array<object>

ApplicationCustomRuleId

string

The ID of the application custom rule.

acr-7d2e4f6a8b0c1d3e

ApplicationCustomRuleName

string

The name of the custom rule.

Custom rule 01

ApplicationTemplateId

string

The ID of the application template to which the rule belongs.

ati-4f0691c56b8d4f06

Priority

integer

The priority of the rule. Valid values: integers from 1 to 200. A smaller value indicates a higher priority.

1

RuleAction

string

The action performed after the rule is matched. Valid values:

  • Allow: allows the traffic.

  • Alert: monitors the traffic.

  • Deny: blocks the traffic.

Deny

Applications

array<object>

The list of applications associated with the rule.

object

ApplicationId

integer

The ID of the application in the built-in application signature library.

10012150000

ApplicationName

string

The name of the application. The name is returned in Chinese or English based on the Lang parameter.

DingTalk

Examples

Success response

JSON format

{
  "RequestId": "CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2837D",
  "TotalCount": 2,
  "PageSize": 10,
  "PageNo": 1,
  "ApplicationCustomRules": [
    {
      "ApplicationCustomRuleId": "acr-7d2e4f6a8b0c1d3e",
      "ApplicationCustomRuleName": "Custom rule 01",
      "ApplicationTemplateId": "ati-4f0691c56b8d4f06",
      "Priority": 1,
      "RuleAction": "Deny",
      "Applications": [
        {
          "ApplicationId": 10012150000,
          "ApplicationName": "DingTalk"
        }
      ]
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 ErrorParameters Parameters error. Parameter error.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.