Example 5: Transferring Logs to OBS
Scenario
This section describes how to transfer logs of one or more log streams to OBS.
Other Involved APIs
Call the following API to obtain the name of the OBS bucket to which logs will be transferred:
Transferring Logs to OBS
- URI format
POST /v2/{project_id}/log-dump/obs
- Example Request
POST https://{endpoint}/v2/{project_id}/log-dump/obs
Obtain the value of {endpoint} from Endpoints.
Body:
{ "log_group_id": "d9dba9f3-xxxx-48bd-xxxx-xxxxa24a8053", "log_stream_ids": ["45e7f609-xxxx-4cd3-835b-xxxx4a124718"], "obs_bucket_name": "lts-test", "type": "cycle", "storage_format": "RAW", "switch_on": "true", "prefix_name": "fileprefixname", "dir_prefix_name": "dirprefixname", "period": 5, "period_unit": "min" }
- Example Response
{ "log_dump_obs_id" : "45fdc36b-xxxx-4567-xxxx-559xxxxdf968" }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot