All Products
Search
Document Center

Key Management Service:UpdateNetworkRule

Last Updated:Oct 11, 2023

Updates an access control rule.

  • You can update only private IP addresses and description of an access control rule. You cannot update the name and network type of an access control rule.

  • Updating an access control rule affects all permission policies that are bound to the access control rule. Exercise caution when you perform this operation.

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

UpdateNetworkRule

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

Name

String

Yes

networkrule_test

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

Description

String

No

Create by kst-hzz62ee817bvyyr5****

The description after the update.

SourcePrivateIp

String

No

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

The private IP address or CIDR block after the update. Separate multiple items with commas (,).

Response parameters

Parameter

Type

Example

Description

RequestId

String

3bf02f7a-015b-4f34-be0f-cc043fda2d85

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

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateNetworkRule
&Name=networkrule_test
&Description=Create by kst-hzz62ee817bvyyr5****
&SourcePrivateIp=["192.10.XX.XX","192.168.XX.XX/24"]
&Common request parameters

Sample success responses

XML format

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

<UpdateNetworkRuleResponse>
    <RequestId>3bf02f7a-015b-4f34-be0f-cc043fda2d85</RequestId>
</UpdateNetworkRuleResponse>

JSON format

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

{
  "RequestId" : "3bf02f7a-015b-4f34-be0f-cc043fda2d85"
}

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.