All Products
Search
Document Center

Web Application Firewall:DescribeCloudResourceAccessPortDetails

Last Updated:Aug 10, 2026

Queries the port details of cloud service instances that are connected to WAF.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-waf:DescribeCloudResourceAccessPortDetails

get

*All Resource

*

  • acs:ResourceGroupId
None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the WAF instance.

Note

You can call DescribeInstance to query the ID of the current WAF instance.

waf-cn-tl32ast****

ResourceManagerResourceGroupId

string

No

The ID of the Alibaba Cloud resource group.

rg-acfm***q

ResourceInstanceId

string

Yes

The instance ID of the resource.

lb-2zeugkfj81jvo****4tqm

Port

string

No

The port of the cloud service that is connected to WAF.

443

Protocol

string

No

The protocol type.

Valid values:

  • http :

    HTTP protocol.

  • https :

    HTTPS protocol.

https

PageNumber

integer

No

The page number of the list. Default value: 1.

1

PageSize

integer

No

The number of entries per page in a paged query. Default value: 10.

10

ResourceProduct

string

No

The cloud service type. Valid values:

  • clb4: Layer 4 CLB.

  • clb7: Layer 7 CLB.

  • ecs: ECS.

  • nlb: NLB.

clb7

RegionId

string

No

The region where the WAF instance resides. Valid values:

  • cn-hangzhou: the Chinese mainland.

  • ap-southeast-1: outside the Chinese mainland.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

2EFCFE18-78F8-5079-B312-07***48B

TotalCount

integer

The total number of entries returned.

10

AccessPortDetails

array<object>

The port details of cloud service instances connected to WAF.

array<object>

The port details of cloud service instances connected to WAF.

Protocol

string

The protocol type. Valid values:

  • http: HTTP protocol.

  • https: HTTPS protocol.

https

Port

integer

The port of the cloud service that is connected to WAF.

443

Certificates

array<object>

The list of certificates for the cloud service port connected to WAF.

object

The certificate information for the cloud service port connected to WAF.

CertificateName

string

The certificate name.

cert-name1

CertificateId

string

The ID of the added certificate.

123-cn-hangzhou

AppliedType

string

The certificate type for the HTTPS protocol. Valid values:

  • default: default certificate.

  • extension: extension certificate.

default

XffHeaderMode

integer

The method that WAF uses to obtain the originating IP address of the client. Valid values:

  • 0: The client traffic does not pass through any Layer 7 proxy before reaching WAF.

  • 1: WAF reads the first value in the X-Forwarded-For (XFF) header as the client IP address.

  • 2: WAF reads the value of a custom header field that you specify as the client IP address.

  • 3: WAF reads the Client IP from the Proxy Protocol header as the client IP address.

0

XffHeaders

array

The list of custom header fields used to obtain the client IP address, in the format ["header1","header2",……].

Note

This parameter is required only when XffHeaderMode is set to 2 (WAF reads the value of a custom header field that you specify as the client IP address).

string

The list of custom header fields used to obtain the client IP address, in the format ["header1","header2",……].

Note

This parameter is required only when XffHeaderMode is set to 2 (WAF reads the value of a custom header field that you specify as the client IP address).

header1

LogHeaders

array<object>

The traffic tag fields and values of the domain name, used to mark traffic processed by WAF.

Note

This parameter is returned only when the traffic tag feature is enabled for the domain name.

object

The traffic tag fields and values of the domain name, used to mark traffic processed by WAF.

Note

This parameter is returned only when the traffic tag feature is enabled for the domain name.

Key

string

The specified custom request header field.

key1

Value

string

The value of the specified custom request header field.

value1

Status

integer

The domain name status. Valid values:

  • 1: The port is in a normal state.

  • 2: The port is being created.

  • 3: The port is being modified.

  • 4: The port is being released.

1

TLSVersion

string

The TLS version. Valid values:

  • tlsv1: Supports TLS 1.0 and later. Highest compatibility, lower security.

  • tlsv1.1: Supports TLS 1.1 and later. Good compatibility, good security.

  • tlsv1.2: Supports TLS 1.2 and later. Good compatibility, highest security.

  • tlsv1.3: Supports only TLS 1.3. Highest security, lower compatibility.

tlsv1

EnableTLSv3

boolean

Indicates whether TLS 1.3 is supported. Valid values:

  • true: TLS 1.3 is supported.

  • false: TLS 1.3 is not supported.

Note

This parameter is used only when HttpsPorts is not empty (the domain name uses the HTTPS protocol). When TLSVersion is set to tlsv1.3, this value must be true.

true

CipherSuite

integer

The cipher suite type. Valid values:

  • 1: all cipher suites are added.

  • 2: strong cipher suites are added. This value is available only when TLSVersion is set to tlsv1.2.

  • 99: custom cipher suites are added. This value is available only when TLSVersion is not set to tlsv1.3.

1

CustomCiphers

array

The specific custom cipher suites to add. This parameter is used only when CipherSuite is set to 99.

string

The custom cipher suite.

ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384

ReadTimeout

integer

The read timeout period, in seconds. Valid values: 1 to 3600.

5

WriteTimeout

integer

The write timeout period, in seconds. Valid values: 1 to 3600.

1

Keepalive

boolean

Indicates whether keep-alive connections are enabled. Valid values:

  • true (default): Keep-alive connections are enabled.

  • false: Keep-alive connections are disabled.

true

KeepaliveRequests

integer

The number of requests that can reuse a keep-alive connection. Valid values: 60 to 1000.

Note

Specifies how many requests can reuse a keep-alive connection after keep-alive is enabled.

1000

KeepaliveTimeout

integer

The idle timeout period for keep-alive connections. Valid values: 10 to 3600. Default value: 15. Unit: seconds.

Note

Specifies how long an idle keep-alive connection remains open before it is released.

10

Http2Enabled

boolean

Indicates whether HTTP/2 is enabled. Valid values:

  • true: HTTP/2 is enabled.

  • false: HTTP/2 is disabled.

True

XffProto

boolean

Specifies whether the X-Forward-For-Proto header passes the WAF protocol. Valid values:

  • true (default): The WAF protocol is passed.

  • false: The WAF protocol is not passed.

true

OwnerUserId

string

The UID of the cloud service resource ownership.

123

SubStatus

string

The protection exception status. Valid values:

  • InvalidCert: invalid certificate.

  • ClientCertOpend: mutual authentication is enabled.

  • NetworkConfigLost: cloud service network configuration exception.

InvalidCert

SubStatusDetails

array<object>

The specific reasons for the protection exception status. This parameter has a value only when SubStatus is set to InvalidCert.

object

The specific reasons for the protection exception status. This parameter has a value only when SubStatus is set to InvalidCert.

CertName

string

The certificate name in SSL Certificates Service.

test-name

Domain

string

The domain name bound to the certificate.

test.aliyun.com

CertId

string

The certificate ID in SSL Certificates Service.

123-cn-hangzhou

AppliedType

string

The certificate type for the HTTPS protocol. Valid values:

  • default: default certificate.

  • extension: extension certificate.

default

ProductCertName

string

The certificate name stored in the cloud service.

test-name

ProductCertId

string

The certificate ID stored in the cloud service.

123

CommonName

string

The common name (CN).

test.aliyun.com

ReasonCode

string

The specific reason for the protection exception status. Valid values:

  • UserUploadCert: The certificate is manually uploaded.

  • CertNotExistInCertCenter: The certificate does not exist in SSL Certificates Service.

  • CertExpired: The cloud certificate has expired.

  • EmptyCertCN: The CN of the certificate is empty.

CertNotExistInCertCenter

ExpireTime

integer

The expiration time of the certificate, in UNIX timestamp format. Unit: seconds.

1746328456000

CloudResourceId

string

The ID of the connected resource, automatically generated by WAF.

i-bp1**************7ey-80-ecs

MaxBodySize

integer

The maximum request body size. Valid values: 2 to 10. Default value: 2. Unit: GB.

2

Examples

Success response

JSON format

{
  "RequestId": "2EFCFE18-78F8-5079-B312-07***48B",
  "TotalCount": 10,
  "AccessPortDetails": [
    {
      "Protocol": "https",
      "Port": 443,
      "Certificates": [
        {
          "CertificateName": "cert-name1",
          "CertificateId": "123-cn-hangzhou",
          "AppliedType": "default"
        }
      ],
      "XffHeaderMode": 0,
      "XffHeaders": [
        "header1"
      ],
      "LogHeaders": [
        {
          "Key": "key1",
          "Value": "value1"
        }
      ],
      "Status": 1,
      "TLSVersion": "tlsv1",
      "EnableTLSv3": true,
      "CipherSuite": 1,
      "CustomCiphers": [
        "ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384"
      ],
      "ReadTimeout": 5,
      "WriteTimeout": 1,
      "Keepalive": true,
      "KeepaliveRequests": 1000,
      "KeepaliveTimeout": 10,
      "Http2Enabled": true,
      "XffProto": true,
      "OwnerUserId": "123",
      "SubStatus": "InvalidCert",
      "SubStatusDetails": [
        {
          "CertName": "test-name",
          "Domain": "test.aliyun.com",
          "CertId": "123-cn-hangzhou",
          "AppliedType": "default",
          "ProductCertName": "test-name",
          "ProductCertId": "123",
          "CommonName": "test.aliyun.com",
          "ReasonCode": "CertNotExistInCertCenter",
          "ExpireTime": 1746328456000
        }
      ],
      "CloudResourceId": "i-bp1**************7ey-80-ecs",
      "MaxBodySize": 2
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 Waf.Instance.ValidFaild WAF instance check failed. Check whether the instance ID is correct. WAF instance check failed. Check whether the instance ID is correct.
400 Waf.Pullin.CloudProductParamEmpty The resource Id of the cloud product accessing WAF is null or null values exist in the three input parameters of the cloud product name, port, and cloud product instance. The resource Id of the cloud product accessing WAF is null or null values exist in the three input parameters of the cloud product name, port, and cloud product instance.
400 Waf.Pullin.CloudResourceInvalid CloudResourceId parameter is illegal. CloudResourceId parameter is illegal

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.