Queries details about the ECS security groups associated with an ApsaraDB for RDS instance.

After an ECS security group is added to a whitelist of an RDS instance, all of the ECS instances in the ECS security group are granted access to the RDS instance. For more information, see Configure a whitelist for an RDS MySQL instance.

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 DescribeSecurityGroupConfiguration

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

DBInstanceId String Yes rm-uf6wjk5xxxxxx

The ID of the RDS instance.

Response parameters

Parameter Type Example Description
RequestId String 87BDAE8C-ACB0-4A26-BBCC-7D1DD31D630D

The ID of the request.

DBInstanceName String rm-uf6wjk5xxxxxx

The ID of the RDS instance.

Items Array

An array that consists of ECS security groups.

RegionId String cn-hangzhou

The ID of the region to which the ECS security group belongs.

SecurityGroupId String sg-xxxxxxx

The ID of the ECS security group.

NetworkType String VPC

The network type of the ECS security group. Valid values:

  • Classic
  • VPC

Examples

Sample requests

http(s)://rds.aliyuncs.com/? Action=DescribeSecurityGroupConfiguration
&DBInstanceId=rm-uf6wjk5xxxxxx
&<Common request parameters>

Sample success responses

XML format

<DescribeSecurityGroupConfigurationResponse>
  <Items>
        <EcsSecurityGroupRelation>
              <NetworkType>VPC</NetworkType>
              <SecurityGroupId>sg-1xxxxxxx</SecurityGroupId>
              <RegionId>cn-hangzhou</RegionId>
        </EcsSecurityGroupRelation>
        <EcsSecurityGroupRelation>
              <NetworkType>VPC</NetworkType>
              <SecurityGroupId>sg-2xxxxxxx</SecurityGroupId>
              <RegionId>cn-hangzhou</RegionId>
        </EcsSecurityGroupRelation>
  </Items>
  <RequestId>87BDAE8C-ACB0-4A26-BBCC-7D1DD31D630D</RequestId>
  <DBInstanceName>rm-uf6wjk5xxxxxx</DBInstanceName>
</DescribeSecurityGroupConfigurationResponse>

JSON format

{"Items":
    {"EcsSecurityGroupRelation":
        [{"NetworkType":"VPC",
          "SecurityGroupId":"sg-1xxxxxxx",
          "RegionId":"cn-hangzhou"},
         {"NetworkType":"VPC",
          "SecurityGroupId":"sg-2xxxxxxx",
          "RegionId":"cn-hangzhou"}]},
 "RequestId":"87BDAE8C-ACB0-4A26-BBCC-7D1DD31D630D",
 "DBInstanceName":"rm-uf6wjk5xxxxxx"}

Error codes

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