Enable or disables password-free access for an ApsaraDB for Redis instance. This can ensure convenient and secure database access.

When the password-free access feature is enabled, Elastic Compute Service (ECS) instances in the same virtual private cloud (VPC) can access the ApsaraDB for Redis instance without a password. You can also use the username and password to access the ApsaraDB for Redis instance.

Note The ApsaraDB for Redis instance is deployed in VPC. For more information, see Enable password-free access.

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 ModifyInstanceVpcAuthMode

The operation that you want to perform. Set the value to ModifyInstanceVpcAuthMode.

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance.

VpcAuthMode String Yes Close

Specifies whether to enable password authentication for access in the VPC. Valid values:

  • Open: enables password authentication.
  • Close: disables password authentication.
Note Default value: Open.
RegionId String No cn-hangzhou

The ID of the region where the instance is deployed.

Response parameters

Parameter Type Example Description
RequestId String ABAF95F6-35C1-4177-AF3A-70969EBD****

The ID of the request.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/?Action=ModifyInstanceVpcAuthMode
&InstanceId=r-bp1zxszhcgatnx****
&VpcAuthMode=Close
&<Common request parameters>

Sample success responses

XML format

<ModifyInstanceVpcAuthModeResponse>
      <RequestId>ABAF95F6-35C1-4177-AF3A-70969EBD****</RequestId>
</ModifyInstanceVpcAuthModeResponse>

JSON format

{
    "RequestId": "ABAF95F6-35C1-4177-AF3A-70969EBD****"
}

Error codes

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