Skip to main content

DescribeSecurityGroups

Description

call DescribeSecurityGroups to query the basic information of the security group you created.

Request Method

POST

Request Path

/apsara/route/Ecs/DescribeSecurityGroups

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
Tag.N.keyBODYstringNonullthe tag key of the security group. Description To improve compatibility, we recommend that you use the Tag.N.Key parameter as much as possible.
Tag.N.KeyBODYstringNoTestKeythe tag key of the security group. The value range of n is 1~20.
PageSizeBODYintegerNo10the number of rows per page set during paging query. Maximum value: 50. default value: 10.
ResourceGroupIdBODYstringNorg-bp67acfmxazb4p****the ID of the enterprise resource group where the security group is located.
SecurityGroupNameBODYstringNoSGTestNamesecurity group name.
SecurityGroupIdBODYstringNosg-bp67acfmxazb4p****security group ID.
DryRunBODYbooleanNofalsewhether to precheck only this request. Value range: true: sends a check request and does not query the resource status. Check items include whether the AccessKey is valid, the authorization status of RAM users, and whether required parameters are filled in. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation will be returned. false: sends a normal request, returns a 2XX HTTP status code after checking, and directly queries the resource status. default value: false.
SecurityGroupIdsBODYstringNo["sg-bp67acfmxazb4p****", "sg-bp67acfmxazb4p****", "sg-bp67acfmxazb4p****",...]security group ID list. Up to 100 security group IDs are supported at a time. The IDs are separated by commas (,) in the JSON format.
versionBODYstringNo2016-01-01version of api
Tag.N.valueBODYstringNonullthe tag value of the security group. description to improve compatibility, it is recommended that you try to use the Tag.N.Value parameter.
VpcIdBODYstringNovpc-bp67acfmxazb4p****the vpc network ID where the security group is located.
PageNumberBODYintegerNo1the page number of the security group list. starting value: 1. default value: 1.
regionIdBODYstringYesNo sample value for this parameter.region id
Tag.N.ValueBODYstringNoTestValuethe tag value of the security group. The value range of n is 1~20.
NetworkTypeBODYstringNovpcthe network type of the security group. Value range: vpc classic
RegionIdBODYstringYescn-qingdao-env17-d01region ID. You can call the DescribeRegions to view the latest Alibaba Cloud region list.

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}