Skip to Content
Private Network(UVPC)DescribeResourceSecGroup

Query the security group information bound to the resource - DescribeResourceSecGroup

Overview

Query the security group information bound to the resource

Definition

Public Parameters

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

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See Region and Availability Zone ListYes
ProjectIdstringProject ID. Leave blank for the default project, sub-account must fill in. Please refer to GetProjectList APINo
ResourceTypestringResource types, such as UHost, UNINo
OffsetintOffset for pagination queries. If ResourceId is provided, pagination is not applied.No
LimitintMaximum number of resources returned when querying by pagination.No
VPCIdstringVPC ID. Optional, used for pagination (can be omitted when paginating); when ResourceId is not empty, ignore.No
ResourceId.NstringResource ID array, if specified, no pagination; otherwise, paginate to get the specified type of resources under the account. Supports string array format.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
TotalCountintTotal number of resources. When ResourceId is passed in, it refers to the number of valid resources among the passed-in resources.Yes
DataSetarray[ResourceSecgroupInfoEx]Security group information bound to the resourceYes

Data Model

ResourceSecgroupInfoEx

Field NameTypeDescription InformationRequired
ResourceIdstringResource IDYes
ResourceNamestringResource NameYes
CountintThe number of security groups bound to this resourceYes
SecGroupInfoarray[BindingSecGroupInfo]Bind Security Group InformationYes
PermitAssociatebooleanIndicates whether binding a security group is allowedYes
ExInfoResourceExInfoSecurity Group Binding InformationNo

BindingSecGroupInfo

Field NameTypeDescription InformationRequired
SecGroupIdstringSecurity Group IDNo
NamestringSecurity Group NameNo
VPCIdstringSecurity Group’s VPCNo
PriorityintThe priority of this resource bound to this security groupNo

ResourceExInfo

Field NameTypeDescription InformationRequired
SuperResourceIdstringParent Resource IDYes
ResourceNamestringResource NameNo
IParray[string]Host Internal IPNo
EIParray[string]Host External IPNo
Uniarray[ResourceSecgroupInfo]Elastic NIC InformationNo
SuperResourceNamestringParent Resource NameNo

ResourceSecgroupInfo

Field NameTypeDescription InformationRequired
ResourceIdstringResource IDYes
CountintNumber of Resources Bound to Security GroupYes
SecGroupInfoarray[SecGroupSimpleInfo]See SecGroupSimpleInfoNo

SecGroupSimpleInfo

Field NameTypeDescription InformationRequired
SecGroupIdstringSecurity Group Resource IDNo
NamestringSecurity Group NameNo

Example

Request Example

https://api.dezai.com/?Action=DescribeResourceSecGroup &Region=cn-zj &Zone=cn-zj-01 &ProjectId=bKOyoPxS &ResourceType=ECVHqgZo &ResourceId.n=YziDaDxa &Offset=4 &Limit=3

Response Example

{ "Action": "DescribeResourceSecGroupResponse", "DataSet": [ { "Count": 6, "ResourceId": "ljSwPBgv", "SecGroupInfo": [ { "Name": "ohoFGMfk", "SecGroupId": "aVrzsMDI" } ] } ], "RetCode": 0, "TotalCount": 4 }