All Products
Search
Document Center

Auto Scaling:ModifyNotificationConfiguration

更新時間:Dec 23, 2024

Modifies an event notification 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

ModifyNotificationConfiguration

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

ScalingGroupId

String

Yes

asg-bp1igpak5ft1flyp****

The ID of the scaling group.

NotificationArn

String

Yes

acs:ess:cn-beijing:161456884340****:cloudmonitor

The Alibaba Cloud Resource Name (ARN) of the notification recipient. The following list describes the value formats of this parameter:

  • If you specify CloudMonitor as the notification recipient, specify the value in the acs:ess:{region-id}:{account-id}:cloudmonitor format.

  • If you specify a Simple Message Queue (SMQ, formerly MNS) queue as the notification recipient, specify the value in the acs:mns:{region-id}:{account-id}:queue/{queuename} format.

  • If you specify an SMQ topic as the notification recipient, specify the value in the acs:mns:{region-id}:{account-id}:topic/{topicname} format.

The variables in the preceding value formats have the following meanings:

  • region-id: the region ID of the scaling group.

  • account-id: the ID of the Alibaba Cloud account.

  • queuename: the name of the SMQ queue.

  • topicname: the name of the SMQ topic.

NotificationType.N

String

No

AUTOSCALING:SCALE_OUT_SUCCESS

The type of the event notification rule N. Valid values of N: 1 to 8. Valid values:

  • AUTOSCALING:SCALE_OUT_SUCCESS: a successful scale-out event.

  • AUTOSCALING:SCALE_IN_SUCCESS: a successful scale-in event.

  • AUTOSCALING:SCALE_OUT_ERROR: a failed scale-out event.

  • AUTOSCALING:SCALE_IN_ERROR: a failed scale-in event.

  • AUTOSCALING:SCALE_REJECT: a rejected scaling request.

  • AUTOSCALING:SCALE_OUT_START: a started scale-out event.

  • AUTOSCALING:SCALE_IN_START: a started scale-in event.

  • AUTOSCALING:SCHEDULE_TASK_EXPIRING: an expiring scheduled task.

  • SCALING_GROUP_DIAGNOSE: a scaling group diagnosis task.

  • AUTOSCALING:SCALE_OUT_WARN: a partially successful scale-out event.

  • AUTOSCALG:SCALE_IN_WARN: a partially successful scale-in event.

RegionId

String

No

cn-beijing

The region ID of the scaling group.

TimeZone

String

No

UTC+8

The time zone of notifications.

Specify the value in UTC. For example, a value of UTC+8 specifies that the time is 8 hours ahead of Coordinated Universal Time, and a value of UTC-7 specifies that the time is 7 hours behind Coordinated Universal Time.

Response parameters

Parameter

Type

Example

Description

RequestId

String

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

The request ID.

Examples

Sample requests

http(s)://ess.aliyuncs.com/?Action=ModifyNotificationConfiguration
&ScalingGroupId=asg-bp1igpak5ft1flyp****
&NotificationArn=acs:ess:cn-beijing:161456884340****:cloudmonitor
&NotificationType=["AUTOSCALING:SCALE_OUT_SUCCESS"]
&RegionId=cn-beijing
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyNotificationConfigurationResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
</ModifyNotificationConfigurationResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

Error codes

For a list of error codes, see Service error codes.

HTTP status code

Error code

Description

Description

400

InvalidNotificationTypes

The specified NotificationType is invalid.

The value you assigned to NotificationType.N is invalid.

400

NotificationConfigurationNotExist

The specified notification configuration not exist for the scaling group.

The specified type of scaling events do not exist in the current scaling group.

400

InvalidParameter.TimeZone

The specified parameter TimeZone is not valid.

The value you assigned to TimeZone is invalid.

404

InvalidScalingGroupId.NotFound

The specified scaling group does not exist.

The specified scaling group does not exist within the Alibaba Cloud account.