UpdateRule

更新时间:
复制 MD 格式

Updates the configuration of a rule.

URI

/openapi/updateRule

Request parameters

NameTypeRequiredExampleDescription
EventBusNameStringYesdefaultThe name of the event bus. For more information, see Limits.
RuleNameStringYesmyRule3The name of the event rule. For more information, see Limits.
DescriptionStringNotestThe description of the rule.
StatusStringNoENABLEThe status of the rule. Valid values:
  • ENABLE: The event rule is enabled. It is the default state of the event rule.
  • DISABLE: The event rule is disabled.
FilterPatternStringNo
{\"source\":[\"acs.oss\"],\"type\":[\"oss:BucketQueried:GetBucketStat\"]}
The event pattern in JSON format. The following patterns are supported:
  • stringEqual pattern
  • stringExpression pattern

    Each field can have a maximum of five expressions in the map data structure.

Each field can have a maximum of five expressions in the map data structure.

Response parameters

If the operation is successful, the service returns an HTTP 200 status code and an empty response body.

Examples

Sample request

POST /openapi/updateRule HTTP/1.1
Host: 123456789098****.eventbridge.cn-hangzhou.aliyuncs.com
Date: Sat, 18 Apr 2020 05:30:41 GMT
x-eventbridge-version: 2020-04-01
Authorization: acs vZ3VL0SuJdHi****:Jo2PbTj******zYAYoYslKLvWzg=
Content-Type: application/json;charset=UTF-8
Content-Length: 26

{
    "EventBusName": "default",
    "RuleName": "myRule3",
    "FilterPattern": "{\"source\":[\"acs.oss\"],\"type\":[\"oss:BucketQueried:GetBucketStat\"]}"
}

Sample response

HTTP/1.1 200 OK
Server: AliyunEventBridge
Connection: keep-alive
Content-Type: application/json;charset=utf-8
Content-Length: 79
x-eventbridge-request-id: 5E9A9081333245F1D800****
Date: Sat, 18 Apr 2020 05:30:41 GMT