Modifies the protection status of an on-demand instance.

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 for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyOnDemaondDefenseStatus

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

InstanceId String Yes ddosbgp-cn-z2q1qzxb****

The ID of the on-demand instance.

Note You can call the DescribeOnDemandInstance operation to query the IDs of all on-demand instances.
DefenseStatus String Yes Defense

The protection status of the on-demand instance. Valid values:

  • Defense: enables the on-demand instance.
  • UnDefense: disables the on-demand instance.
RegionId String No cn-zhangjiakou

The region ID of the on-demand instance.

Note You can call the DescribeRegions operation to query the most recent region list.

All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.

For more information about sample requests, see the "Examples" section of this topic.

Response parameters

Parameter Type Example Description
RequestId String 4C467B38-3910-447D-87BC-AC049166F216

The ID of the request, which is used to locate and troubleshoot issues.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ModifyOnDemaondDefenseStatus
&InstanceId=ddosbgp-cn-z2q1qzxb****
&DefenseStatus=Defense
&RegionId=cn-zhangjiakou
&<Common request parameters>

Sample success responses

XML format

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

<ModifyOnDemaondDefenseStatusResponse>
    <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
</ModifyOnDemaondDefenseStatusResponse>

JSON format

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

{
  "RequestId" : "4C467B38-3910-447D-87BC-AC049166F216"
}

Error codes

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