Call ModifySecurityGroupConfiguration to configure security groups in the Redis whitelist.

For more information about how to perform the corresponding operation in the console, see add security groups.

Note Calling ModifySecurityGroupConfiguration clears the security groups already configured in the Redis whitelist, and then add the security groups specified by the SecurityGroupId parameter to the whitelist.

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

Name Type Required Example Description
Action String No ModifySecurityGroupConfiguration

The parameter specified by the system. Value: ModifySecurityGroupConfiguration.

DBInstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the instance.

SecurityGroupId String Yes sg-bp1xxxxxxxxxxxxxx

The IDs of security groups. Separate multiple security group IDs with commas (,).

RegionId String No cn-hangzhou

The ID of the region where the instance group resides.

Response parameters

Name Type Example Description
RequestId String Cost

The ID of the request.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/
?Action=ModifySecurityGroupConfiguration
?InstanceId=r-bp1xxxxxxxxxxxxx
?SecurityGroupId=sg-bp1xxxxxxxxxxxxxx1 and sg-bp1xxxxxxxxxxxxx2
&<Common request parameters>

Sample success responses

XML format

<ModifySecurityGroupConfigurationResponse>
      <RequestId>147CAC09-E8C6-43F8-9599-982A43D6EBF3</RequestId>
</ModifySecurityGroupConfigurationResponse>

JSON format

{
    "RequestId": "147CAC09-E8C6-43F8-9599-982A43D6EBF3"
}

Error codes

For a list of error codes, visit the API Error Center.