Querying an Endpoint Rule
Function
This API is used to query an endpoint rule.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
dns:resolverRule:get
Read
resolverRule *
-
-
-
URI
GET /v2.1/resolverrules/{resolverrule_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
resolverrule_id |
Yes |
String |
ID of an endpoint rule |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition The user token. The token can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. For details about how to obtain a user token, seeObtaining a User Token. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
resolver_rule |
ShowResolverRuleRespParam object |
Endpoint rules |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Endpoint rule ID, which is a UUID used to identify the rule |
|
name |
String |
Rule name |
|
domain_name |
String |
Domain name |
|
endpoint_id |
String |
ID of the endpoint to which the current rule belongs |
|
status |
String |
Resource status. The value can be PENDING_CREATE, ACTIVE, PENDING_DELETE, or ERROR. |
|
rule_type |
String |
Rule type. This parameter is reserved. The default value is FORWARD. |
|
ipaddress_count |
Integer |
Number of IP addresses in the endpoint rule |
|
ipaddresses |
Array of IpValue objects |
Destination IP address added to a rule |
|
routers |
Array of Router objects |
VPC associated with the endpoint rule |
|
create_time |
String |
The creation time. Format: yyyy-MM-dd'T'HH:mm:ss.SSS |
|
update_time |
String |
The update time. Format: yyyy-MM-dd'T'HH:mm:ss.SSS |
|
Parameter |
Type |
Description |
|---|---|---|
|
router_id |
String |
ID of the associated VPC. |
|
router_region |
String |
Region where the associated VPC is located. |
|
status |
String |
Resource status. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition Error code Range N/A |
|
message |
String |
Definition Error description Range N/A |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition Error code Range N/A |
|
message |
String |
Definition Error description Range N/A |
Example Requests
None
Example Responses
Status code: 200
Successful request
{
"resolver_rule" : {
"id" : "8a36f60a753badb401753bade3400002",
"name" : "rule-xxx",
"domain_name" : "www.example.com",
"endpoint_id" : "8a36f60a753badb401753bade3400001",
"status" : "ACTIVE",
"rule_type" : "FORWARD",
"ipaddress_count" : 0,
"ipaddresses" : [ {
"ip" : "1.1.1.1"
}, {
"ip" : "2.2.2.2"
} ],
"routers" : [ {
"router_id" : "ff7bd47f-3f12-4f24-a078-e6064abaa670",
"router_region" : "NetworkService",
"status" : "ACTIVE"
}, {
"router_id" : "ff7bd47f-3f12-4f24-a078-e6064abaa671",
"router_region" : "NetworkService",
"status" : "ACTIVE"
} ],
"create_time" : "2020-10-18T12:27:31.448",
"update_time" : "2020-10-18T12:27:31.448"
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successful request |
|
400 |
Error response |
|
500 |
Error response |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.