Creates a forwarding rule for a website.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
yundun-ddoscoo:CreateWebRule | create | *All Resource
| None | None |
Request parameters
Parameter | Type | Required | Description | Example |
ResourceGroupId | string | No | The ID of the resource group to which the Anti-DDoS Proxy instance belongs in Resource Management. If you leave this parameter empty, the instance belongs to the default resource group. For more information about resource groups, see Create a resource group. | rg-acfm2pz25js**** |
Domain | string | Yes | The domain name of the website to add to the Anti-DDoS Proxy instance for protection. | example.aliyundoc.com |
RsType | integer | Yes | The address type of the origin server. Valid values:
| 0 |
Rules | string | Yes | The details of the forwarding rule, in a JSON string format. The value is an array of objects. Each object contains the following fields:
| [{"ProxyRules":[{"ProxyPort":443,"RealServers":["192.1.XX.XX"]}],"ProxyType":"https"}] |
HttpsExt | string | No | The advanced HTTPS settings. This parameter takes effect only when the value of ProxyType includes https. This parameter is a JSON string. The value is a JSON object that contains the following fields:
| {"Http2":1,"Http2https":1,"Https2http":1} |
DefenseId | string | No | The ID of the protection rule to associate. This parameter is used when an Alibaba Cloud service, such as Object Storage Service (OSS), is integrated with an Anti-DDoS instance. Note This parameter is for internal use. Do not use this parameter. For example, if your OSS is integrated with an Anti-DDoS Proxy instance, the instance allocates a resource pool of IP addresses to the OSS tenant account. Each IP address has a unique protection ID. The protection ID is a CNAME that resolves to the IP address of the Anti-DDoS instance by default. You can resolve the CNAME to an IP address. This lets you reuse the IP address for flexible scheduling. Note You cannot specify both InstanceIds and DefenseId. | testid |
| InstanceIds | array | No | The IDs of the Anti-DDoS Proxy instances to associate. | ddoscoo-cn-mp91j1ao**** |
string | No | The ID of the Anti-DDoS Proxy instance to associate. You must specify either this parameter or DefenseId. Note Call the DescribeInstanceIds operation to query the IDs of all Anti-DDoS instances. | ddoscoo-cn-i7m27nf3**** |
In addition to the request parameters described in this topic, you must specify common request parameters. For more information about common request parameters, see Common parameters.
For more information about the request format, see the request example in the Examples section of this topic.
Response elements
Element | Type | Description | Example |
object | |||
RequestId | string | The ID of the request. This ID is generated by Alibaba Cloud and is unique for each request. You can use this ID to troubleshoot issues. | 9EC62E89-BD30-4FCD-9CB8-FA53865FF0D7 |
Examples
Success response
JSON format
{
"RequestId": "9EC62E89-BD30-4FCD-9CB8-FA53865FF0D7"
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.