UpdateNamespaceSlsConfigs
Updates the Simple Log Service (SLS) configuration at the namespace level.
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. The region is not required. This parameter is recommended. |
test |
| SlsConfigs |
string |
No |
The configuration for collecting logs to Simple Log Service (SLS).
The parameter settings are as follows:
If the SLS collection configuration remains unchanged during multiple deployments, you do not need to set this parameter (that is, the SlsConfigs field is not required in the request). If you no longer need the SLS collection feature, you must set the value of this field to an empty string (that is, set the SlsConfigs field to "") in the request. Note
A project automatically created with a job template is deleted when the job template is deleted. Therefore, when you select an existing project, you cannot select a project automatically created by SAE. |
[{"projectName":"test","logDir":"/tmp/a.log","logstoreName":"sae","logtailName":""}] |
| SlsLogEnvTags |
string |
No |
sls log tags |
[] |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
Id of the request |
AD0286B2-F4A4-5D43-9329-97DEF1019F06 |
| Message |
string |
The additional information. |
success |
| TraceId |
string |
The trace ID used to precisely query call information. |
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: redirection. 4xx: request error. 5xx: server error. |
200 |
| Success |
boolean |
Indicates whether the SLS configuration for the namespace was updated successfully. Valid values:
|
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. | The specified NamespaceId does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.