All Products
Search
Document Center

Web Application Firewall:DescribeCloudResourceAccessPortDetails

Last Updated:Jul 13, 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 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 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 name of the certificate.

cert-name1

CertificateId

string

The ID of the added certificate.

123-cn-hangzhou

AppliedType

string

The type of the certificate for the HTTPS protocol. Valid values:

  • default: the default certificate.

  • extension: the additional 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.

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 custom request header field.

key1

Value

string

The value of the 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

  • tlsv1.1

  • tlsv1.2

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.

true

CipherSuite

integer

The cipher suite type. Valid values:

  • 1: all cipher suites are added.

  • 2: strong cipher suites are added.

  • 99: custom cipher suites are added.

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 persistent connections are enabled. Valid values:

  • true (default): Persistent connections are enabled.

  • false: Persistent connections are disabled.

true

KeepaliveRequests

integer

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

Note

The number of persistent connections to reuse after persistent connections are enabled.

1000

KeepaliveTimeout

integer

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

Note

The idle time after which a reused persistent connection 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 is used to pass 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: the cloud service network configuration is abnormal.

InvalidCert

SubStatusDetails

array<object>

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

object

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

CertName

string

The name of the certificate in Certificates Management Service.

test-name

Domain

string

The domain name that is bound to the certificate.

test.aliyun.com

CertId

string

The ID of the certificate in Certificates Management Service.

123-cn-hangzhou

AppliedType

string

The type of the certificate for the HTTPS protocol. Valid values:

  • default: the default certificate.

  • extension: the additional certificate.

default

ProductCertName

string

The name of the certificate that is saved for the cloud service.

test-name

ProductCertId

string

The ID of the certificate that is saved for the cloud service.

123

CommonName

string

The common name (CN).

test.aliyun.com

ReasonCode

string

The reason for the abnormal protection status. Valid values:

  • UserUploadCert: The certificate is manually uploaded.

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

  • CertExpired: The certificate has expired.

  • EmptyCertCN: The CN of the certificate is empty.

CertNotExistInCertCenter

ExpireTime

integer

The expiration time of the certificate. The value is a UNIX timestamp. 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.