Creates or modifies the whitelist of a cluster, including IP address whitelists and security groups.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:ModifyDBClusterAccessWhitelist |
update |
*dbcluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The cluster ID. |
pc-************* |
| SecurityIps |
string |
No |
The IP addresses or CIDR blocks in the IP address whitelist group. A maximum of 1,000 IP addresses or CIDR blocks can be added across all IP address whitelist groups. Separate multiple IP addresses or CIDR blocks with commas (,). The following formats are supported:
Note
This parameter is supported only when WhiteListType is set to IP. |
10.23.12.24 |
| DBClusterIPArrayName |
string |
No |
The name of the IP address whitelist group. The name must be 2 to 120 characters in length and can contain lowercase letters and digits. It must start with a letter and end with a letter or a digit.
Note
|
default |
| DBClusterIPArrayAttribute |
string |
No |
The attribute of the IP address whitelist group. If you set this parameter to hidden, the group is not visible in the console. Note
|
hidden |
| WhiteListType |
string |
No |
The whitelist type. Valid values:
Default value: IP. |
IP |
| SecurityGroupIds |
string |
No |
The IDs of the security groups. Separate multiple security group IDs with commas (,). Note
|
sg-********* |
| ModifyMode |
string |
No |
The modification mode of the IP address whitelist. Valid values:
Note
This parameter is supported only when WhiteListType is set to IP. |
Cover |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. The token is case-sensitive. |
123e4567-e89b-12d3-a456-426655440000 |
| PfsInstanceId |
string |
No |
The file system instance ID. |
pfs-xxx |
| ProjectId |
string |
No |
The unique identifier of the project. |
proj-xxxxxxxxxxxxxxxxxxxxxxxxxx |
| DryRun |
boolean |
No |
Specifies whether to perform only a dry run. Valid values: true and false. Default value: false. If you set this parameter to true, the system checks your identity and permissions, and validates the request parameters, destination cluster, and whitelist type. If the dry run succeeds, the system returns the DryRunOperation error code and does not perform actual resource changes or tasks. If the dry run fails, the system returns a corresponding error code, such as InvalidSecurityIPList.Format. For example, if DryRun is set to true and the checks succeed, the system returns Code=DryRunOperation. If the checks fail, the system returns Code=InvalidSecurityIPList.Format. A dry run does not cover all quota, dependency, or conflict checks in the actual execution phase. Passing a dry run does not guarantee that the subsequent actual execution will succeed. If you set this parameter to false, the system performs the actual execution. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
D0CEC6AC-7760-409A-A0D5-E6CD86****** |
Examples
Success response
JSON format
{
"RequestId": "D0CEC6AC-7760-409A-A0D5-E6CD86******"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | DryRunOperation | The dry run completed. No operation was performed. | |
| 400 | NumberExceed.securityGroupIds | The number of SecurityGroupIds exceeds 10. | The number of security groups cannot exceed 10. Modify the parameter and try again. |
| 400 | InvalidSecurityIPList.Duplicate | Specified security IP list is not valid: Duplicate IP address in the list | The specified IP address whitelist is invalid, because the whitelist contains duplicate IP addresses. |
| 400 | InvalidSecurityIPList.Format | Specified security IP list format is not valid. | The format of the specified IP address in the whitelist is invalid. |
| 400 | LockTimeout | The request processing has failed due to lock timeout. | Failed to process the request due to a lock timeout. |
| 403 | SecurityIPList.Duplicate | Specified same security IP already exists. | The specified security group IP address already exists. |
| 403 | OperationDenied.LockMode | The operation is not permitted when the instance is locked. | This operation is not supported while the cluster is in the locked state. |
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
| 404 | InvalidDBClusterId.NotFound | The DBInstanceId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.