All Products
Search
Document Center

CDN:DescribeCdnDomainConfigs

Last Updated:Aug 06, 2024

Queries the configurations of an accelerated domain name. You can query the configurations of one or more features at the same time.

Operation description

Note You can call this operation up to 100 times per second per account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
cdn:DescribeCdnDomainConfigsget
  • Domain
    acs:cdn:*:{#accountId}:domain/{#DomainName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DomainNamestringYes

The accelerated domain name. You can specify only one domain name in each request.

example.com
FunctionNamesstringNo

The names of the features. Separate multiple feature names with commas (,). For more information, see Parameters for configuring features for domain names.

aliauth
ConfigIdstringNo

The ID of the configuration. For more information about ConfigId, see Usage notes on ConfigId.

6295

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

C80705BF-0F76-41FA-BAD1-5B59296A4E59
DomainConfigsarray<object>

The configurations of the domain name.

object
Statusstring

The status of the configuration. Valid values:

  • success
  • testing
  • failed
  • configuring
success
ParentIdstring

The ID of the rule condition. This parameter is optional.

To create a rule condition, you can configure the condition feature that is described in the Parameters for configuring features for domain names topic. A rule condition can identify parameters that are included in requests and filter requests based on the identified parameters. Each rule condition has a ConfigId . You can use ConfigId as ParentId that is referenced by other features. This way, you can combine rule conditions and features for flexible configurations.

For more information, see BatchSetCdnDomainConfig or ParentId configuration example in this topic.

222728944812032
ConfigIdstring

The ID of the configuration.

6295
FunctionNamestring

The name of the feature.

aliauth
FunctionArgsarray<object>

The configuration of each feature.

object
ArgNamestring

The parameter name, which is the configuration item of functionName. You can configure multiple configuration items.

auth_type
ArgValuestring

The parameter value, which is the value of the configuration item of functionName.

req_auth

ParentId configuration example

If the ParentId parameter is **-1**, the existing rule conditions in the configurations are deleted.

   "functionArgs": [{
     "argName": "Parameter A", 
     "argValue": Value of parameter A"
    }, 
  {
    "argName": "Parameter B", 
    "argValue": "Value of parameter B"
     }], 
 "functionName": "Feature name"
 "ParentId": "Optional. This corresponds to configid of the referenced rule condition."
}]

The following code provides a sample configuration if parentId is not used. In this example, the origin_request_header feature is used to add back-to-origin HTTP headers, and the rule condition whose configuration ID is 222728944812032 is referenced.

        "functionArgs": [{
            "argName": "header_operation_type",
            "argValue": "add"
        }, {
            "argName": "header_name",
            "argValue": "Accept-Encoding"
        }, {
            "argName": "header_value",
            "argValue": "gzip"
        }, {
            "argName": "duplicate",
            "argValue": "off"
        }],
        "functionName": "origin_request_header"
}]

The following code provides a sample configuration if parentId is used. In this example, the origin_request_header feature is used to add back-to-origin HTTP headers, and the rule condition whose configuration ID is 222728944812032 is referenced.

        "functionArgs": [{
            "argName": "header_operation_type",
            "argValue": "add"
        }, {
            "argName": "header_name",
            "argValue": "Accept-Encoding"
        }, {
            "argName": "header_value",
            "argValue": "gzip"
        }, {
            "argName": "duplicate",
            "argValue": "off"
        }],
        "functionName": "origin_request_header",
        "parentId": "222728944812032"
}]

Examples

Sample success responses

JSONformat

{
  "RequestId": "C80705BF-0F76-41FA-BAD1-5B59296A4E59",
  "DomainConfigs": {
    "DomainConfig": [
      {
        "Status": "success",
        "ParentId": "222728944812032",
        "ConfigId": "6295",
        "FunctionName": "aliauth",
        "FunctionArgs": {
          "FunctionArg": [
            {
              "ArgName": "auth_type",
              "ArgValue": "req_auth"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400Invalid%s.ValueNotSupportedFunctionName [%s] is not supported.The specified method is not supported.

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