Skip to Content
Private Network(UVPC)DescribeSecGroup

Get Security Group Information - DescribeSecGroup

Overview

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is DescribeSecGroup.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. Please refer to GetProjectList APIYes
ProjectIdstringProject ID. If not filled, it defaults to the default project. Sub-accounts must fill this in. Please refer to the GetProjectList APINo
LimitintPagination query data length. Default is 20.No
OffsetintStarting offset for paginated queries. Default is 0.No
VPCIdstringVPC ID to which the Resource ID belongsNo
SecGroupId.NstringSecurity Group Resource ID Array, if passed, Offset/Limit/BusinessId will be invalid. Supports array format. Type is string array.No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
DataSetarray[SecGroupInfo]Refer to SecGroupInfo for details.Yes

Data Model

SecGroupInfo

Field NameTypeDescription InformationRequired
SecGroupIdstringSecurity Group Resource IDNo
NamestringSecurity Group NameNo
VPCIdstringVPC Resource IDNo
AccountintUser IDNo
TagstringBusiness GroupNo
RemarkstringNoteNo
TypestringSecurity group type, enumeration values are: “user defined”, security group created by custom definition; “recommend web”, security group created using Web template; “recommend non web”, security group created using non-Web template.No
CreateTimeintCreation time, formatted as Unix Timestamp, e.g., 1747030299No
Rulearray[SecGroupRuleInfo]List of rules in the security group, see SecGroupRuleInfoNo

SecGroupRuleInfo

Field NameTypeDescription InformationRequired
RuleIdstringRule IDNo
DirectionstringIngress/Egress”, Inbound Rules/Outbound RulesNo
IPRangestringAddressNo
PriorityintPriorityNo
ProtocolTypestringProtocol TypeNo
DstPortstringTarget PortNo
RuleActionstringMatching StrategyNo
RemarkstringSecurity Group Rule RemarksNo

Example

Request Example

https://api.dezai.com/?Action=DescribeSecGroup &Region=cn-zj &ProjectId=pFHEwWhK &SecGroupId.n=yswMXnnq &Offset=MtvhXVlk &Limit=MZYPwcOZ &VPCId=ZJqpHNUF &BusinessId=HNhpzbsv

Response Example

{ "Action": "DescribeSecGroupResponse", "DataSet": [ "XJMgfJJa" ], "RetCode": 0 }