Updates the namespace-level SLS configuration.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sae:UpdateNamespaceSlsConfigs |
update |
*All Resource
|
None | None |
Request syntax
POST /pop/cas/namespace/updateNamespaceSlsConfigs HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NamespaceId |
string |
No |
The ID of the namespace. |
cn-beijing:test |
| NameSpaceShortId |
string |
No |
The short ID of the namespace. You do not need to include the region. This parameter is recommended. |
test |
| SlsConfigs |
string |
No |
The configuration for collecting logs to SLS.
The parameters are described as follows:
If the SLS configuration remains the same across deployments, you can omit this parameter. To disable log collection to SLS, set the value of Note
SAE automatically deletes a project when you delete the task template used to create it. Therefore, when you select an existing project, do not select a project that was automatically created by SAE. |
[{"projectName":"test","logDir":"/tmp/a.log","logstoreName":"sae","logtailName":""}] |
| SlsLogEnvTags |
string |
No |
The SLS log tags. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| requestId |
string |
The request ID. |
AD0286B2-F4A4-5D43-9329-97DEF1019F06 |
| Message |
string |
Additional information. |
success |
| TraceId |
string |
The trace ID for the request. You can use this ID to query the details of the request. |
0a98a02315955564772843261e**** |
| ErrorCode |
string |
The error code. Valid values:
|
InvalidNamespaceId.NotFound |
| Code |
string |
The API status code or POP error code. Valid values: 2xx (success), 3xx (redirect), 4xx (client error), 5xx (server error). |
200 |
| Success |
boolean |
Indicates whether the namespace's SLS configuration was successfully updated. A value of |
true |
Examples
Success response
JSON format
{
"requestId": "AD0286B2-F4A4-5D43-9329-97DEF1019F06",
"Message": "success",
"TraceId": "0a98a02315955564772843261e****",
"ErrorCode": "InvalidNamespaceId.NotFound",
"Code": "200",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | InvalidNamespaceId.NotFound | The specified NamespaceId does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.