Creating or Modifying the Resource Recorder
Function
This API is used to create or modify the resource recorder. Only one resource recorder can be configured.
Calling Method
For details, see Calling APIs.
URI
PUT /v1/resource-manager/domains/{domain_id}/tracker-config
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
domain_id |
Yes |
String |
Specifies the account ID. Maximum: 36 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
Specifies the invoker's token. |
X-Security-Token |
No |
String |
Specifies a temporary security credential. This parameter is mandatory when you make an API call using a temporary security credential. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
channel |
Yes |
ChannelConfigBody object |
Specifies configurations for the tracker. |
selector |
Yes |
SelectorConfigBody object |
Specifies the selector. |
retention_period_in_days |
No |
Integer |
Specifies the number of days for data storage. |
agency_name |
Yes |
String |
Specifies the IAM agency name. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
smn |
No |
TrackerSMNChannelConfigBody object |
Specifies SMN related configurations. For details about how to grant other accounts the permissions for publishing messages to SMN topics, see Cross-Account Authorization (Resource Recorder > Enabling, Configuring, or Modifying the Resource Recorder) in the User Guide. |
obs |
No |
TrackerOBSChannelConfigBody object |
Specifies OBS related configurations. For details about how to grant other accounts the permissions for dumping files to OBS buckets, see Cross-Account Authorization (Resource Recorder > Enabling, Configuring, or Modifying the Resource Recorder) in the User Guide. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
region_id |
Yes |
String |
Specifies the region ID of the SMN topic. |
project_id |
Yes |
String |
Specifies the project ID of the user. |
topic_urn |
Yes |
String |
Specifies the SMN topic URN. |
Response Parameters
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. |
error_msg |
String |
Specifies the error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. |
error_msg |
String |
Specifies the error message. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. |
error_msg |
String |
Specifies the error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. |
error_msg |
String |
Specifies the error message. |
Example Requests
Creating the resource recorder and enabling message pushing and dumping
PUT /v1/resource-manager/domains/{domain_id}/tracker-config { "channel" : { "smn" : { "region_id" : "regionid1", "project_id" : "39c2af998c334ed6bcbb75b27318f7b5", "topic_urn" : "urn:smn:regionid1:39c2af998c334ed6bcbb75b27318f7b5:resource-manager-test" }, "obs" : { "bucket_name" : "config-snapshot", "region_id" : "regionid1", "bucket_prefix" : "log_dir" } }, "selector" : { "all_supported" : true, "resource_types" : [ ] }, "agency_name" : "rms_tracker_agency", "retention_period_in_days" : 2557 }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
200 |
Operation succeeded. |
400 |
Invalid parameters. |
403 |
Authentication failed or you do not have the operation permissions. |
404 |
Resources not found. |
500 |
Server error. |
Error Codes
See Error Codes.
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