DeliverToUserSls
Configures operation log delivery for specified products and writes the logs to a Simple Log Service (SLS) project and Logstore of the current account.
Operation description
Before you begin
Specify the region where SLS is deployed and at least one product delivery scope.
Specify either
ProjectNameorExistedProjectName. If you use an existing project, make sure that it belongs to the current account and is located in the specified region.Only one enabled delivery configuration can exist for the same account and product type. Before you call this operation, you can call
DescribeSlsDeliveryConfigto query existing configurations. If an enabled configuration already exists, calling this operation again returnsSlsDeliveryAlreadyExists.
Configuration management
This operation is used to configure delivery, not to query logs.
To pause delivery, call
StopDeliveryConfig. Stopping delivery does not delete the delivery configuration.To reconfigure the delivery destination or rebuild the configuration, query and delete the corresponding old configuration by calling
DeleteDeliveryConfigbefore you call this operation. Deleting a delivery configuration does not delete the SLS project or Logstore.Do not treat repeated calls for an existing configuration as update or resume operations. After the call, you can call
DescribeSlsDeliveryConfigto confirm the configuration status.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:DeliverToUserSls |
create |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
No |
The name of the SLS project to be created or reused. The name must start with Specify either this parameter or |
elastic-desktop-audit |
| LogStoreName |
string |
No |
The name of the destination Logstore. The name must start with If this parameter is not specified, the part after |
elastic_desktop_audit |
| Ttl |
integer |
No |
The data retention period of the new Logstore. Unit: days. Valid values: 1 to 3650. Default value: 30. If an existing Logstore is reused, this operation does not update its data retention period. |
30 |
| ExistedProjectName |
string |
No |
The name of an existing SLS project. The name must start with Specify either this parameter or |
elastic-desktop-audit |
| SlsRegionId |
string |
Yes |
The ID of the region where the destination SLS project is located. This parameter is required. |
cn-hangzhou |
| DeliveryScopes |
array<object> |
Yes |
The list of product scopes for which delivery needs to be configured. Specify at least one item. You cannot create duplicate enabled delivery configurations for the same account and product type. |
[{"ProductType":"CloudBrowser"}] |
|
object |
No |
A product delivery scope. |
||
| ProductType |
string |
Yes |
The product type to which the logs belong. Specify the product type for which you want to enable log delivery. For example, |
CloudBrowser |
The project name must start with elastic-desktop-, and the Logstore name must start with elastic_desktop_. The example names only demonstrate the format. Replace them with actual names.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The processing result of the delivery configuration. |
||
| RequestId |
string |
The ID of the request. It is used to troubleshoot call issues. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
The request ID is returned upon success. A success response does not indicate that new logs have been generated in the destination Logstore. You can call the operation for querying delivery configurations to confirm the status.
Examples
Success response
JSON format
{
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.