All Products
Search
Document Center

Key Management Service:ListNetworkRules

Last Updated:Oct 11, 2023

Queries a list of access control rules.

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 ListNetworkRules

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

PageNumber Integer No 1

The page number. Default value: 1.

PageSize Integer No 10

The number of entries per page. Valid values: 1 to 100. Default value: 20.

Response parameters

Parameter

Type

Example

Description

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

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

PageNumber Integer 1

The page number.

PageSize Integer 10

The number of entries per page.

TotalCount Integer 1

The total number of entries returned.

NetworkRules Array of NetworkRule

A list of access control rules.

NetworkRule
Type String Private

The network type. The value is fixed as Private. Self-managed applications can access KMS instances only over a private virtual private cloud (VPC).

Name String networkrule_test

The name of the access control rule.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListNetworkRules
&PageNumber=1
&PageSize=10
&Common request parameters

Sample success responses

XML format

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

<ListNetworkRulesResponse>
    <RequestId>3bf02f7a-015b-4f34-be0f-cc043fda2d33</RequestId>
    <PageNumber>1</PageNumber>
    <PageSize>10</PageSize>
    <TotalCount>1</TotalCount>
    <NetworkRules>
        <Type>Private</Type>
        <Name>networkrule_test</Name>
    </NetworkRules>
</ListNetworkRulesResponse>

JSON format

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

{
  "RequestId" : "3bf02f7a-015b-4f34-be0f-cc043fda2d33",
  "PageNumber" : 1,
  "PageSize" : 10,
  "TotalCount" : 1,
  "NetworkRules" : [ {
    "Type" : "Private",
    "Name" : "networkrule_test"
  } ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter is invalid. 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.