All Products
Search
Document Center

Web Application Firewall:DescribeCloudResourceAccessPortDetails

Last Updated:Nov 15, 2024

Queries a port of the cloud service that is added to Web Application Firewall (WAF). This operation is supported for only Elastic Compute Service (ECS) and Classic Load Balancer (CLB).

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-waf:DescribeCloudResourceAccessPortDetailsget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the WAF instance.

Note You can call the DescribeInstance operation to query the ID of the WAF instance.
waf-cn-tl32ast****
ResourceManagerResourceGroupIdstringNo

The ID of the Alibaba Cloud resource group.

rg-acfm***q
ResourceInstanceIdstringYes

The instance ID of the resource.

lb-2zeugkfj81jvo****4tqm
PortstringNo

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

443
ProtocolstringNo

The type of the protocol. Valid values:

  • http
  • https
https
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Default value: 10.

10
ResourceProductstringNo

The cloud service. Valid values:

  • clb4: Layer 4 CLB.
  • clb7: Layer 7 CLB.
  • ecs: ECS.
clb7
RegionIdstringNo

The region in which the WAF instance is deployed. Valid values:

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

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

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

The total number of entries returned.

10
AccessPortDetailsarray<object>

The details of the ports of cloud services that are added to WAF.

AccessPortDetailobject

The details of the port of the cloud service that is added to WAF.

Protocolstring

The type of the protocol. Valid values:

  • http
  • https
https
Portinteger

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

443
Certificatesarray<object>

The certificates that are associated with the ports of cloud services.

Certificateobject

The information about the certificate that is associated with the port of the cloud service.

CertificateNamestring

The name of the certificate.

cert-name1
CertificateIdstring

The ID of the certificate.

123-cn-hangzhou
AppliedTypestring

The type of the HTTPS certificate. Valid values:

  • default: default certificate.
  • extension: additional certificate.
default
XffHeaderModeinteger

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

  • 0: No Layer 7 proxies are deployed in front of WAF.
  • 1: WAF reads the first value of the X-Forwarded-For (XFF) header field as the originating IP address of the client.
  • 2: WAF reads the value of a custom header field as the originating IP address of the client.
0
XffHeadersarray

The custom header field that is used to obtain the originating IP address of a client. Specify the value in the ["header1","header2",...] format.

Note This parameter is required only if you set XffHeaderMode to 2.
XffHeaderstring

The custom header field that is used to obtain the originating IP address of a client. Specify the value in the ["header1","header2",...] format.

Note This parameter is required only if you set XffHeaderMode to 2.
header1
LogHeadersarray<object>

The custom header field that you want to use to label requests that are processed by WAF.

Note This parameter is returned only when the traffic marking feature is enabled for the domain name.
LogHeaderobject

The custom header field that you want to use to label requests that are processed by WAF.

Note This parameter is returned only when the traffic marking feature is enabled for the domain name.
Keystring

The key of the custom header field.

key1
Valuestring

The value of the custom header field.

value1
Statusinteger

The status of the domain name. Valid values:

  • 1: indicates that the port is available.
  • 2: indicates that the port is being created.
  • 3: indicates that the port is being modified.
  • 4: indicates that the port is being released.
1
TLSVersionstring

The version of the Transport Layer Security (TLS) protocol. Valid values:

  • tlsv1
  • tlsv1.1
  • tlsv1.2
tlsv1
EnableTLSv3boolean

Indicates whether to support TLS 1.3. Valid values:

  • true
  • false
true
CipherSuiteinteger

The type of the cipher suites. Valid values:

  • 1: all cipher suites.
  • 2: strong cipher suites.
  • 99: custom cipher suites.
1
CustomCiphersarray

The custom cipher suites that you want to add. This parameter is available only if you set CipherSuite to 99.

CustomCipherstring

The custom cipher suite.

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

The timeout period for read connections. Unit: seconds. Valid values: 1 to 3600.

5
WriteTimeoutinteger

The timeout period for write connections. Unit: seconds. Valid values: 1 to 3600.

1
Keepaliveboolean

Indicates whether to enable the persistent connection feature. Valid values:

  • true (default)
  • false:
true
KeepaliveRequestsinteger

The number of reused persistent connections. Valid values: 60 to 1000.

Note This parameter specifies the number of requests that reuse persistent connections after you enable the persistent connection feature.
1000
KeepaliveTimeoutinteger

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

Note If no new requests are initiated over the idle persistent connection within the specified timeout period, the connection is closed.
10
Http2Enabledboolean

Indicates whether to enable HTTP/2. Valid values:

  • true
  • false
True
XffProtoboolean

Indicates whether to use the X-Forward-For-Proto header to identify the protocol used by WAF to forward requests to the origin server. Valid values:

  • true (default)
  • false
true
OwnerUserIdstring

The ID of the Alibaba Cloud account to which the resource belongs.

123

Examples

Sample success responses

JSONformat

{
  "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"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400Waf.Instance.ValidFaildWAF instance check failed. Check whether the instance ID is correct.WAF instance check failed. Check whether the instance ID is correct.

For a list of error codes, visit the Service error codes.