Modifies the name, category, moderation scenario, business scenarios, or enabled status of an image library.
Operation description
Call this operation to update the basic information of an image library. For information about constructing an HTTP request, see Request structure. To use an existing HTTP client, see SDK overview.
Billing: This operation is free of charge.
QPS limits
This operation is limited to 10 calls per second per account. Throttling is triggered when the limit is exceeded. Design your client to stay within this limit.
Request parameters
For the common request parameters required by all AI Guardrails API requests, see Common parameters.
The following table describes the parameters in the request body.
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Id | Integer | Yes | 2147 | The primary key ID of the image library. |
| Name | String | Yes | test2sdkdk | The name of the image library. |
| Category | String | Yes | BLACK | The category of the image library. Valid values:
|
| Scene | String | Yes | PORN | The moderation scenario to which the image library applies. Valid values:
|
| BizTypes | List | No | ["bizTypeA", "bizTypeB", "bizTypeC"] | The business scenarios associated with the image library. To get valid BizType values, call CreateBizType. |
| Enable | Boolean | No | true | Specifies whether to enable the image library. Valid values: true (enabled), false (disabled). |
Response parameters
This operation returns only common response parameters. For details, see Common response parameters.
| Parameter | Type | Example | Description |
|---|---|---|---|
| requestId | String | 795D8871-4889-4C0F-A8B1-C7D2B990FF61 | The request ID. |
| code | Integer | 200 | The HTTP status code. A value of 200 indicates success. |
Examples
Sample request
http(s)://green.cn-shanghai.aliyuncs.com/?Action=UpdateImageLib&ServiceModule=open_api
&<Common request parameters>
{
"Id": 2147,
"Name": "test2sdkdk",
"Category": "BLACK",
"Scene": "PORN",
"BizTypes": [
"bizTypeA",
"bizTypeB",
"bizTypeC"
]
}Sample success response
{
"requestId": "795D8871-4889-4C0F-A8B1-C7D2B990FF61",
"code": 200
}