Changing a Database Port
Function
This API is used to change the database port of an instance.
Constraints
This API supports the following instances:
- GeminiDB Cassandra
- GeminiDB Mongo
- GeminiDB Redis
This operation is not supported for frozen or abnormal instances.
GeminiDB Redis and GeminiDB Cassandra do not allow you to change the database port of a DR instance. To change the database port, you have to change the port of the primary instance first. The load balancer port of a GeminiDB Redis instance is changed accordingly.
The instance must be restarted to make changes take effect. Exercise caution when modifying the database port.
Authorization Information
Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- 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
gaussdbfornosql:instance:updatePort
Write
instance *
- g:ResourceTag/<tag-key>
- g:EnterpriseProjectId
nosql:instance:modifyPort
-
URI
PUT /v3/{project_id}/instances/{instance_id}/port
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Explanation: Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints: N/A Values: N/A Default value: N/A |
|
instance_id |
Yes |
String |
Explanation: Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If there are no instances available, call the API described in Creating an Instance to create one. Constraints: N/A Values: N/A Default value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token You can obtain the token by calling the IAM API by following Obtaining a User Token Through Password Authentication. Constraints N/A Range N/A Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
port |
Yes |
Integer |
Definition New database port number. Constraints N/A Range The database port number of GeminiDB Mongo replica sets 4.0 ranges from 2100 to 9500, except 8636, 8637, and 8638. The database port number of GeminiDB Cassandra instances ranges from 2100 to 9500, except 7000, 7001, 7199, 8636, 8479, 8484, 8999, 8018, 2180, 2887, 3887, 8079, 8091, and 8092. The port number of the GeminiDB Redis instance ranges from 1024 to 65535, except 2180, 2887, 3887, 6377, 6378, 6380, 8018, 8079, 8091, 8479, 8484, 8999, 9864, 9866, 9867, 12017, 12333 and 50069. Default value: N/A |
Response Parameters
Status code: 202
|
Parameter |
Type |
Description |
|---|---|---|
|
job_id |
String |
Explanation: Task ID Values: N/A |
Example Requests
- URI example
PUT https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/c865f921f3dd45198f209a607533a779in06/port
- Changing the database port number to 8888
{ "port" : 8888 }
Example Responses
Status code: 202
Accepted
{
"job_id" : "89638f5e-0780-497c-b3c0-4d0968383e19"
}
Status Codes
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot