Queries the access mode settings of a website.

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 DescribeWebAccessMode

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

Domains.N RepeatList Yes www.aliyun.com

The domain name of website N.

Note A forwarding rule must be configured for the domain name. You can call the DescribeDomains operation to query all domain names.
RegionId String No cn-hangzhou

The region ID of the instance. Valid values:

  • cn-hangzhou: mainland China, which indicates an Anti-DDoS Pro instance
  • ap-southeast-1: outside mainland China, which indicates an Anti-DDoS Premium instance

Response parameters

Parameter Type Example Description
DomainModes Array

Details about the access mode used by the website.

AccessMode Integer 0

The access mode used by the website. Valid values:

  • 0: A record
  • 1: Anti-DDoS
  • 2: Back-to-Source
Domain String www.aliyun.com

The domain name of the website.

RequestId String 0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeWebAccessMode
&Domains.1=www.aliyun.com
&<Common request parameters>

Sample success responses

XML format

<DescribeWebAccessModeResponse>
      <RequestId>0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc</RequestId>
      <DomainModes>
            <Domain>www.aliyun.com</Domain>
            <AccessMode>0</AccessMode>
      </DomainModes>
</DescribeWebAccessModeResponse>

JSON format

{
    "RequestId": "0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc",
    "DomainModes": [
        {
            "Domain": "www.aliyun.com",
            "AccessMode": 0
        }
    ]
}

Error codes

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