Queries whether the log collection feature is enabled for the domain names that are added to a WAF 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 of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeLogServiceStatus

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

InstanceId String Yes waf-cn-zz11sr5****

The ID of the WAF instance.

Note You can call the DescribeInstanceInfo operation to query the ID of the WAF instance.
Region String No cn

The region ID of the WAF instance. Default value: cn, which indicates that the WAF instance resides in the Chinese mainland. If the WAF instance resides outside the Chinese mainland, set the value to cn-hongkong.

Note You can call the DescribeInstanceInfo operation to query the region ID of the WAF instance.
ResourceGroupId String No rg-acfm2pz25js****

The ID of the resource group to which the WAF instance belongs in Resource Management. This parameter is empty by default, which indicates that the WAF instance belongs to the default resource group.

For more information about resource groups, see Create a resource group.

PageNumber Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Default value: 10.

DomainNames.N RepeatList No www.aliyun.com

The domain names that you want to query. A maximum of 10 domain names can be queried at a time. If you do not specify this parameter, all domain names are queried.

Note You can call the DescribeDomainNames operation to query all the domain names that are added to the WAF instance.

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
DomainStatus Array of status

Indicates whether the log collection feature is enabled.

Domain String www.aliyun.com

The domain name.

SlsLogActive Integer 1

Indicates whether the log collection feature is enabled for the domain name. Valid values:

  • 1: enabled
  • 0: disabled
RequestId String C2E97B3F-1623-4CDF-A7E2-FD9D4CF1027A

The ID of the request.

TotalCount Integer 1

The total number of entries returned.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeLogServiceStatus
&InstanceId=waf-cn-zz11sr5****
&<Common request parameters>

Sample success responses

XML format

<DescribeLogServiceStatusResponse>
      <RequestId>C2E97B3F-1623-4CDF-A7E2-FD9D4CF1027A</RequestId>
      <TotalCount>1</TotalCount>
      <DomainStatus>
            <Domain>www.aliyun.com</Domain>
            <SlsLogActive>1</SlsLogActive>
      </DomainStatus>
</DescribeLogServiceStatusResponse>

JSON format

{
    "RequestId": "C2E97B3F-1623-4CDF-A7E2-FD9D4CF1027A",
    "TotalCount": 1,
    "DomainStatus": [
        {
            "Domain": "www.aliyun.com",
            "SlsLogActive": 1
        }
    ]
}

Error codes

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