All Products
Search
Document Center

Key Management Service:DescribeNetworkRule

Last Updated:Oct 11, 2023

Queries the details of an access control rule.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes DescribeNetworkRule

The operation that you want to perform. Set the value to DescribeNetworkRule.

Name String Yes networkrule_test

The name of the access control rule that you want to query.

Response parameters

Parameter

Type

Example

Description

RequestId String 3bf02f7a-015b-4f93-be0f-cc043fda2d33

The ID of the request, which is used to locate and troubleshoot issues.

Arn String acs:kms:cn-hangzhou:119285303511****:network/networkrule_test

The ARN of the access control rule.

Type String Private

The network type. Only private IP addresses are supported. The value is fixed as Private.

Description String Create by kst-hzz62ee817bvyyr5****

The description.

SourcePrivateIp String ["192.10.XX.XX","192.168.XX.XX/24"]

The private IP address or private CIDR block.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeNetworkRule
&Name=networkrule_test
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeNetworkRuleResponse>
    <RequestId>3bf02f7a-015b-4f93-be0f-cc043fda2d33</RequestId>
    <Arn>acs:kms:cn-hangzhou:119285303511****:network/networkrule_test</Arn>
    <Type>Private</Type>
    <Description>Create by kst-hzz62ee817bvyyr5****</Description>
    <SourcePrivateIp>["192.10.XX.XX","192.168.XX.XX/24"]</SourcePrivateIp>
</DescribeNetworkRuleResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "3bf02f7a-015b-4f93-be0f-cc043fda2d33",
  "Arn" : "acs:kms:cn-hangzhou:119285303511****:network/networkrule_test",
  "Type" : "Private",
  "Description" : "Create by kst-hzz62ee817bvyyr5****",
  "SourcePrivateIp" : "[\"192.10.XX.XX\",\"192.168.XX.XX/24\"]"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter is not valid. The specified parameter is invalid.
404 InvalidAccessKeyId.NotFound The Access Key ID provided does not exist in our records. The specified AccessKey ID does not exist.

For a list of error codes, see Service error codes.