All Products
Search
Document Center

Web Application Firewall:DescribeCloudResources

Last Updated:Nov 15, 2024

Queries cloud service resources that are added to Web Application Firewall (WAF).

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:DescribeCloudResourceslist
*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_v3prepaid_public_cn-lbj****cn0c
ResourceInstanceIdstringNo

The ID of the resource.

alb-43glijk0fr****gths
ResourceNamedeprecatedstringNo

The name of the resource.

alb-name
ResourceRegionIdstringNo

The region ID of the resource. For information about region IDs, see the following table.

Note Different cloud services are available in different regions. The specified cloud service must be available in the specified region.
cn-beijing
ResourceProductstringNo

The cloud service to which the resource belongs. If you do not specify this parameter, the system automatically returns the Application Load Balancer (ALB), Microservices Engine (MSE), Function Compute, and Serverless App Engine (SAE) resources that are added to WAF. Valid values:

  • alb: ALB.
  • mse: MSE.
  • fc: Function Compute.
  • sae: SAE.
  • ecs: Elastic Compute Service (ECS).
  • clb4: Layer 4 Classic Load Balancer (CLB).
  • clb7: Layer 7 CLB.
  • nlb: Network Load Balancer (NLB).
Note Different cloud services are available in different regions. The specified cloud service must be available in the specified region.
alb
PageNumberlongNo

The page number. Default value: 1.

1
PageSizelongNo

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

10
ResourceRouteNamestringNo

The route name. You can use this parameter if you set ResourceProduct to mse.

mse-default-traffic
ResourceDomainstringNo

The domain name. You can use this parameter if you set ResourceProduct to fc or sae.

fc-domain-test
ResourceFunctionstringNo

The function name. You can use this parameter if you set ResourceProduct to fc.

fc-test
OwnerUserIdstringNo

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

11769793******
ResourceInstanceNamestringNo

The name of the instance that is added to WAF.

test-name
RegionIdstringNo

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

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

The ID of the Alibaba Cloud resource group.

rg-acfm4gh****wela
Region IDRegion nameSupported service
cn-hangzhouChina (Hangzhou)SAE,ALB,FC,MSE,ECS,CLB
cn-shanghaiChina (Shanghai)SAE,ALB,FC,MSE,ECS,CLB
cn-shenzhenChina (Shenzhen)SAE,ALB,FC,MSE,ECS,CLB
cn-beijingChina (Beijing)SAE,ALB,FC,MSE,ECS,CLB
cn-zhangjiakouChina (Zhangjiakou)SAE,ALB,FC,MSE,ECS,CLB
cn-chengduChina (Chengdu)ALB,ECS,CLB
cn-qingdaoChina (Qingdao)ALB,ECS,CLB
cn-guangzhouChina (Guangzhou)ALB
cn-wulanchabuChina (Ulanqab)ALB
cn-hongkongChina (Hong Kong)ALB,MSE,ECS,CLB
cn-fuzhouChina (Fuzhou - Local Region)ALB
ap-southeast-6Philippines (Manila)ALB
ap-southeast-5Indonesia (Jakarta)ALB,ECS,CLB
ap-northeast-1Japan (Tokyo)ALB
ap-southeast-3Malaysia (Kuala Lumpur)ALB,MSE,ECS,CLB
ap-southeast-1SingaporeALB,MSE
ap-south-1India (Mumbai) (Closing Down)ALB
eu-central-1Germany (Frankfurt)ALB
us-west-1US (Silicon Valley)ALB
us-east-1US (Virginia)ALB

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TotalCountlong

The total number of cloud service resources returned.

121
RequestIdstring

The request ID.

C327F81A-CCE2-5B21-817C-F93E29C5****
CloudResourcesarray<object>

The cloud service resources that are added to WAF.

CloudResourceobject

The cloud service resource.

ResourceRouteNamestring

The route name. This parameter has a value only if the value of ResourceProduct is mse.

test-route-name
ResourceRegionIdstring

The region ID of the resource.

cn-hangzhou
ResourceFunctionstring

The function name. This parameter has a value only if the value of ResourceProduct is fc.

test-resource-function
ResourceNamedeprecatedstring

The name of the resource.

test-resource-name
ResourceInstancedeprecatedstring

The ID of the resource.

alb-ffff****
ResourceProductstring

The cloud service to which the resource belongs. Valid values:

  • alb: ALB.
  • mse: MSE.
  • fc: Function Compute.
  • sae: SAE.
  • ecs: ECS.
  • clb4: Layer 4 CLB.
  • clb7: Layer 7 CLB.
alb
ResourceServicestring

The service name. This parameter has a value only if the value of ResourceProduct is fc.

test-resource-service
ResourceDomainstring

The domain name. This parameter has a value only if the value of ResourceProduct is fc or sae.

test-resource-domain
OwnerUserIdstring

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

11769793******
HttpPortCountinteger

The number of the HTTP ports that are added to WAF.

Note This parameter is returned only if the cloud service is ECS or CLB.
1
HttpsPortCountinteger

The number of the HTTPS ports that are added to WAF.

Note This parameter is returned only if the cloud service is ECS or CLB.
1
ResourceInstanceIpstring

The IP address of the instance that is added to WAF.

1.1.1.1
ResourceInstanceIdstring

The ID of the instance that is added to WAF.

lb-uf60ub45fr9b***
ResourceInstanceNamestring

The name of the instance that is added to WAF.

test-name

Examples

Sample success responses

JSONformat

{
  "TotalCount": 121,
  "RequestId": "C327F81A-CCE2-5B21-817C-F93E29C5****",
  "CloudResources": [
    {
      "ResourceRouteName": "test-route-name",
      "ResourceRegionId": "cn-hangzhou",
      "ResourceFunction": "test-resource-function",
      "ResourceName": "test-resource-name",
      "ResourceInstance": "alb-ffff****",
      "ResourceProduct": "alb",
      "ResourceService": "test-resource-service",
      "ResourceDomain": "test-resource-domain",
      "OwnerUserId": "11769793******",
      "HttpPortCount": 1,
      "HttpsPortCount": 1,
      "ResourceInstanceIp": "1.1.1.1",
      "ResourceInstanceId": "lb-uf60ub45fr9b***",
      "ResourceInstanceName": "test-name"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-07-09API Description Update. The request parameters of the API has changed. The response structure of the API has changedView Change Details