tencent cloud

All product documents
TencentDB for Redis®
ModifyNetworkConfig
Last updated: 2024-12-12 14:25:44
ModifyNetworkConfig
Last updated: 2024-12-12 14:25:44

1. API Description

Domain name for API request: redis.intl.tencentcloudapi.com.

This API is used to modify the network configuration of an instance.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyNetworkConfig.
Version Yes String Common Params. The value used for this API: 2018-04-12.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String Instance ID. Log in to the Redis console and copy it in the instance list.
Operation Yes String Network change type. Valid values:
- changeVip: VPC change, including the private IPv4 address and port.
- changeVpc: Subnet change.
- changeBaseToVpc: Change from classic network to VPC.
- changeVPort: Port change.
Vip No String Private IPv4 address of the instance, which is required if Operation is changeVip.
VpcId No String VPC ID after the modification.
- Configure this parameter when Operation is set to changeVpc or changeBaseToVpc.
- Log in to the Redis console, switch to the Instance Details page, and click the VPC name next to the associated network in the Network Information area to obtain the VPC ID.
SubnetId No String ID of the subnet to which the VPC belongs after the modification.
- Configure this parameter when Operation is set to changeVpc or changeBaseToVpc.
- Log in to the Redis console, switch to the Instance Details page, and click the subnet name next to the associated network in the Network Information area to obtain the subnet ID.
Recycle No Integer Retention duration of the original private IPv4 address.
- Unit: day.
- Valid values: 0, 1, 2, 3, 7, and 15.
Note: If the retention duration is not set or set to 0, the original network address will be released immediately.
VPort No Integer Network port after the change, which is required if Operation is changeVPort or changeVip. Value range: [1024,65535].

3. Output Parameters

Parameter Name Type Description
Status Boolean Execution status. Ignore this parameter.
SubnetId String New subnet ID of the instance
VpcId String New VPC ID of the instance
Vip String New private IPv4 address of the instance
TaskId Integer Task ID. Obtain taskId and query the task execution status through the API DescribeTaskInfo.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Example of Modifying the Network Configuration of an Instance

This example shows you how to modify the VPC of an instance through this API.

Input Example

POST / HTTP/1.1
Host: redis.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyNetworkConfig
<Common request parameters>

{
    "InstanceId": "crs-5a4p****",
    "Operation": "changeVip"
}

Output Example

{
    "Response": {
        "Status": true,
        "Vip": "192.168.1.1",
        "VpcId": "vpc-hu6khgap",
        "SubnetId": "subnet-6mt7lir6",
        "TaskId": 10086,
        "RequestId": "f1b5aabe-806a-4886-b839-9907baa24c85"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.SystemError Internal system error, which is irrelevant to the business.
FailedOperation.Unknown Invalid data is entered for weekday.
InternalError.DbOperationFailed Internal system error with the database operation, which may be update, insert, select, etc.
InternalError.InternalError Internal error.
InvalidParameter Incorrect parameter.
InvalidParameter.NotSupported The operation is unsupported due to incorrect parameters.
InvalidParameter.PermissionDenied The API has no CAM permissions.
InvalidParameterValue.CheckNotPass Business verification failed
ResourceNotFound.InstanceNotExists No Redis instance is found by the serialId.
ResourceUnavailable.InstanceLockedError Redis has been locked by another process.
ResourceUnavailable.InstanceStatusError Operation unsupported: the instance is exceptional.
ResourceUnavailable.InstanceUnLockedError The instance has been locked by another process.
UnauthorizedOperation The operation is unauthorized.
UnauthorizedOperation.NoCAMAuthed No CAM permissions.
UnauthorizedOperation.UserNotInWhiteList The user is not in the allowlist.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support