Modifies the SSL settings of an ApsaraDB for MongoDB instance.
Usage
Before you call this operation, make sure that the following requirements are met:
- The instance is in the running state.
- The instance is a replica set instance.
- The engine version of the instance is <ph props="intl">3.4 or 4.0</ph><ph props="china">3.4, 4.0, or 4.2</ph>.
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 | ModifyDBInstanceSSL |
The operation that you want to perform. Set the value to ModifyDBInstanceSSL. |
| RegionId | String | No | cn-hangzhou |
The region ID of the instance. You can call the DescribeDBInstanceAttribute operation to query the region ID of the instance. |
| DBInstanceId | String | Yes | dds-bp2235**** |
The ID of the instance. |
| SSLAction | String | Yes | Open |
The operation on the SSL feature. Valid values: Valid values:
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 6D806B11-078F-4154-BF9F-844F56D08964 |
The ID of the request. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/?Action=ModifyDBInstanceSSL
&DBInstanceId=dds-bp2235****
&SSLAction=Open
&<Common request parameters>Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyDBInstanceSSLResponse>
<RequestId>6D806B11-078F-4154-BF9F-844F56D08964</RequestId>
</ModifyDBInstanceSSLResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "6D806B11-078F-4154-BF9F-844F56D08964"
}Error codes
| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 403 | IncorrectDBInstanceState | Current DB instance state does not support this operation. | The error message returned because this operation is not supported while the instance is in the current state. Wait until the state of the instance becomes Running and try again. |
| 403 | IncorrectDBInstanceLockMode | Current DB instance lock mode does not support this operation. | The error message returned because the instance has been locked and no operations can be performed on the instance. Unlock the instance and try again. |
For a list of error codes, visit the API Error Center.