Changes the network type of an ApsaraDB for MongoDB instance.
Operation description
This operation is applicable to replica set instances and sharded cluster instances, but not standalone instances. You can call this operation to change the network of an instance from a classic network to a VPC.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:ModifyDBInstanceNetworkType |
update |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
The instance ID. |
dds-bp11483712c1**** |
| NetworkType |
string |
Yes |
The network type to switch to. Valid value:
|
VPC |
| VpcId |
string |
No |
The ID of the VPC. Note
This parameter is required when the NetworkType parameter is set to VPC. |
vpc-bp1n3i15v90el48nx**** |
| VSwitchId |
string |
No |
The ID of the vSwitch in the VPC. Note
This parameter is required when the NetworkType parameter is set to VPC. |
vsw-bp1vj604nj5a9zz74**** |
| RetainClassic |
string |
No |
Specifies whether to retain the original classic network address when you change the network type to VPC. Valid values:
Note
|
False |
| ClassicExpiredDays |
integer |
No |
The retention period of the original classic network address when you change the network type to VPC. Valid values: 14, 30, 60, and 120. Unit: days. Note
This parameter is required when the NetworkType parameter is set to VPC and the RetainClassic parameter is set to True. |
30 |
| ZoneId |
string |
Yes |
可用区 ID,您可以通过调用 DescribeRegions 接口查询可用区 ID。 |
cn-hangzhou-b |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
D0E605FD-6ECE-5FBE-84A4-99AAB1B8**** |
Examples
Success response
JSON format
{
"RequestId": "D0E605FD-6ECE-5FBE-84A4-99AAB1B8****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InstanceVpcAuthMode.NotSupported | Instance VpcAuthMode is NotSupported. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.