You can call this operation to create or modify a data export rule.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes PutExporterRule

The operation that you want to perform. Set the value to PutExporterRule.

RuleName String Yes MyRuleName

The name of the rule.

Note The name of the rule must be unique.
Describe String Yes Export CPU metrics

The description of the data export rule.

Namespace String Yes acs_ecs_dashboard

The namespace of the monitored service.

Note For more information, see DescribeMetricMetaList or Preset metrics reference.
MetricName String Yes cpu_total

The name of the metric.

Note For more information, see DescribeMetricMetaList or Preset metrics reference.
TargetWindows String Yes 60,300

The time window of the exported data.

Note
  • Separate multiple windows with commas (,).
  • Data in a time window of less than 60 seconds cannot be exported.
DstNames.N RepeatList No distName1

The destination to which the data is exported. You can export the data to a maximum of 20 destinations.

Response parameters

Parameter Type Example Description
Code String 200

The status code.

Note The status code 200 indicates a successful call, whereas any other status code indicates a failed call.
Message String success

The returned message.

RequestId String 461CF2CD-2FC3-4B26-8645-7BD27E7D0F1D

The ID of the request.

Success Boolean true

Indicates whether the operation was successful. Valid values:

  • true: indicates that the operation was successful.
  • false: indicates that the operation failed.

Examples

Sample requests

http(s)://[Endpoint]/? Action=PutExporterRule
&RuleName=MyRuleName
&Describe=Export rule description
&Namespace=acs_ecs_dashboard
&MetricName=cpu_total
&TargetWindows=60,300
&<Common request parameters>

Sample success responses

XML format

<Message>success</Message>
<RequestId>8B524AE2-FBB1-4202-AA17-B3DEAAC8D861</RequestId>
<Code>200</Code>
<Success>true</Success>

JSON format

{
	"Message": "success",
	"RequestId": "8B524AE2-FBB1-4202-AA17-B3DEAAC8D861",
	"Code": "200",
	"Success": true
}

Error codes

For a list of error codes, visit the API Error Center.