DescribeKeywordLib

Updated at:

Queries the list of text libraries.

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-greenweb:DescribeKeywordLib

get

*KeywordLib

acs:yundun-greenweb:*:{#accountId}:keywordlib/*

None None

Request parameters

Parameter

Type

Required

Description

Example

SourceIp

string

No

The IP address of the access source.

58.***.97.190

Lang

string

No

The language.

zh

ServiceModule

string

Yes

The associated service module. Valid values:

  • open_api: content moderation API

  • website: website detection

open_api

Response elements

Element

Type

Description

Example

object

TotalCount

integer

The total number of entries returned.

10

RequestId

string

The request ID.

AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****

KeywordLibList

array<object>

The keyword library list.

object

The keyword library list.

Source

string

The source of the keyword library. Valid values:

  • MANUAL: Manually created.

  • FEEDBACK: Automatic creation based on user feedback results.

MANUAL

Count

integer

The number of keywords.

16

Language

string

The language.

zh

ModifiedTime

string

The modification time, in the format of YYYY-MM-DD HH:mm:ss ±HHMM (default time zone: UTC+08:00).

2023-10-25 15:59:17 +0800

ResourceType

string

The resource type.

TEXT

LibType

string

The keyword library type.

textKeyword

Code

string

The keyword library code.

12200013

Category

string

The purpose of the keyword library. Valid values:

  • BLACK: Blacklist.

  • WHITE: Whitelist.

BLACK

Name

string

The name of the keyword library.

测试

ServiceModule

string

The service module to query. Valid values:

  • open_api: content moderation API

  • website: website detection

open_api

MatchMode

string

The matching mode.

precise

Id

integer

The primary key ID.

21732

Enable

boolean

Indicates whether the keyword library is enabled.

true

BizTypes

array

The business type.

string

The business type.

[\"default\"]

Examples

Success response

JSON format

{
  "TotalCount": 10,
  "RequestId": "AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****",
  "KeywordLibList": [
    {
      "Source": "MANUAL",
      "Count": 16,
      "Language": "zh",
      "ModifiedTime": "2023-10-25 15:59:17 +0800",
      "ResourceType": "TEXT",
      "LibType": "textKeyword",
      "Code": "12200013",
      "Category": "BLACK",
      "Name": "测试",
      "ServiceModule": "open_api",
      "MatchMode": "precise",
      "Id": 21732,
      "Enable": true,
      "BizTypes": [
        "[\\\"default\\\"]"
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.